• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Animated Sprites in Ruby and FireRed

35
Posts
16
Years
  • Seen Jun 17, 2013
hi,
I have a little problem with my English. My English is bad therefore I can´t understand differrent things....
Is it possible to make a guide with pictures which shows what you are trying to explain?

I also have this question: Where can I find the second frame after I changed it? Or where I have to replace the second frame?
 

marcc5m

what
1,116
Posts
13
Years
hi,
I have a little problem with my English. My English is bad therefore I can´t understand differrent things....
Is it possible to make a guide with pictures which shows what you are trying to explain?

I also have this question: Where can I find the second frame after I changed it? Or where I have to replace the second frame?

Made some changes to the OP, should be much easier to understand now. Screenshots will be there eventually.
For the second frame just insert a 64x128 instead of 64x64 image into Unlz-GBA.
 

droomph

weeb
4,285
Posts
12
Years
Hi

I'm interested in the animation code, such as how they expand or contract the sprite without additional sprites (do they? I don't think so...)...

But I don't have the offset in Emerald, and I can't find it either, since I don't know any Python, Java, C, etc.:(

So if someone could give me the offset, or tell me a good way to find it, that would be awesome.

Thanks
Oh and this is my first post and I'm really really worried that I'm doing something wrong:paranoid:
 

droomph

weeb
4,285
Posts
12
Years
Originally Posted by IIMarckus
There are no additional sprites—the GBA itself can rotate and scale sprites. It's just a graphical effect done by the hardware.

Thanks! :) I was wondering about that. But how would you go about to use the actual rotation/scaling feature? It sounds pretty easy to use. (Are they the two empty bytes in the animation instructions?)

I have a couple other questions. I hope you don't mind:\

Firstly, what is the offset in Emerald for the animations nonetheless? Or what would be a relatively quick way to search for it, if it hasn't been found yet? I don't want to trouble anybody.

And secondly, and can there be more than two sprites? I don't think you can, but I just want to make sure.

Thank you, I have only been doing this for a couple months. :nervous: Please excuse me if I ask any dumb questions. You are all awesome :)

I also hope to be of some help to this community in the future *joy*
 
Last edited:

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Thanks! :) I was wondering about that. But how would you go about to use the actual rotation/scaling feature? It sounds pretty easy to use. (Are they the two empty bytes in the animation instructions?)

I have a couple other questions. I hope you don't mind:\

Firstly, what is the offset in Emerald for the animations nonetheless? Or what would be a relatively quick way to search for it, if it hasn't been found yet? I don't want to trouble anybody.

And secondly, and can there be more than two sprites? I don't think you can, but I just want to make sure.

Thank you, I have only been doing this for a couple months. :nervous: Please excuse me if I ask any dumb questions. You are all awesome :)

I also hope to be of some help to this community in the future *joy*

I really don't know. Emerald's animation system is much more different than the previous animations. As for more than two, Just continue the pattern, we described it well. However, every pokemon will need to have 3, or 4 sprites. I once made an ASM hack where you can have a unique animation for each pokemon. If anyone wants it, I can pull up the code.
 

droomph

weeb
4,285
Posts
12
Years
I really don't know. Emerald's animation system is much more different than the previous animations.

Well, poop. If there's a tutorial anywhere, and/or if you know someone who can guide me to start "researching", can you point me to there? I just think Emerald has so many more possibilities for long games/hacks (YEAH THE NAMES, I KNOW). I'm not wierd I swear

As for more than two, Just continue the pattern, we described it well. However, every pokemon will need to have 3, or 4 sprites.

Hm, shouldn't be too hard. Thanks! I'll keep that in mind.

Also, is there a limit (not considering space)? Is it up to FF, or FFFF? I know this is common sense, but I just want to make sure.


I once made an ASM hack where you can have a unique animation for each pokemon. If anyone wants it, I can pull up the code.

OOHOOHOOH I WANT IT sorry
Wait, what version is this for?

Thank you for your answers! They don't solve my problem, but they sure do point me in the direction I need to go, something I couldn't have done myself! Thanks a million!

Heh, and as a side note, I noticed you all do this very late at night. Just sayin' :)
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
I found one of the offset's for Emerald's animations: 0x308CBC

This is a table that seems to control how long each frame lasts. Each Pokemon has two pointers, meaning that starting at 0x308CBC, the first two pointers (the first 8 bytes) is Missingno, then the 3rd and 4th pointer is Bulbasaur, the 5th and 6th pointer is Ivysaur, the 7th and 8th pointer is Venusaur, etc.

Messing around with Bulbasaur's second pointer (0x308CC8), I managed to make it's second frame do this:
limiterremoval.png


Unfortunately the table I found only seems to control how long each frame lasts and some other stuff I don't know. I don't think it controls the movement of the sprite, because no matter what I do to Bulbasaur's pointers, he still moves around on the same (meaning the sprite jumps around)


EDIT: There's another table at 0x309AAC that's definitely related to the animations, but at this table it's only 1 pointer per Pokemon, unlike the table at 0x308CBC.
 
Last edited:

droomph

weeb
4,285
Posts
12
Years
I found one of the offset's for Emerald's animations: 0x308CBC

This is a table that seems to control how long each frame lasts. Each Pokemon has two pointers, meaning that starting at 0x308CBC, the first two pointers (the first 8 bytes) is Missingno, then the 3rd and 4th pointer is Bulbasaur, the 5th and 6th pointer is Ivysaur, the 7th and 8th pointer is Venusaur, etc.

Messing around with Bulbasaur's second pointer (0x308CC8), I managed to make it's second frame do this:

Unfortunately the table I found only seems to control how long each frame lasts and some other stuff I don't know. I don't think it controls the movement of the sprite, because no matter what I do to Bulbasaur's pointers, he still moves around on the same (meaning the sprite jumps around)

:D Thanks, I'll try that
-----------------------------
WAIT A MINUTE that code IS the actual code I was looking for, so that means there's something else to discover...

sadface:surprised:

(I wonder what the first pointer is for? It seems to be just lonely and empty... )

EDIT: There's another table at 0x309AAC that's definitely related to the animations, but at this table it's only 1 pointer per Pokemon, unlike the table at 0x308CBC.

*GASP*

Wait, can I ask you how you can go about to searching for 25 iterations of the same group of numbers? I can tell you're using that trick, and I would love to use it :)

*Later*
These, apparently, are all pointers to pointers to that same chunk of "00 00 00 00 FF FF 00 00" from the stuff from the other table.
 
Last edited:
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Wait, can I ask you how you can go about to searching for 25 iterations of the same group of numbers? I can tell you're using that trick, and I would love to use it :)
Um what? I have no idea what you're talking about. I simply found the table by going to where the sprite stuff was in Emerald in a hex editor, then I scrolled up and I'm like, "oh look, it's a table. Let's mess with it". Then I made Bulbasaur upside-down.
 

droomph

weeb
4,285
Posts
12
Years
Um what? I have no idea what you're talking about. I simply found the table by going to where the sprite stuff was in Emerald in a hex editor, then I scrolled up and I'm like, "oh look, it's a table. Let's mess with it". Then I made Bulbasaur upside-down.

Ah. I couldn't ever concentrate that long :\

So by "sprite stuff" you mean the region generally around 0x300000 to 0x400000, right? I'll be looking.

:DThat's what I was looking for.

MINDBLOW: Why would you need a pointer to a pointer to the actual data? Seriously?

EDIT: also, is there any way to trace the graphics on GBA? We can search it up that way?
 
Last edited:

Haru~

Can't resist the chubbiness :3
16
Posts
12
Years
  • Seen Jul 15, 2012
I altered the ff ff to fe ff, and it seems to work it won't stop playing the animation and it looks like it's non glitchy.

I'll get a video of it up. I'll add a second frame!

EDIT: Not quite, the battle won't totally load, but I'll keep playing with it.

It seems that I've found a "loop" command for those animation codes.
Use: FD FF XX XX ; where XX XX is the number of times the animation will loop (In little endian, of course).
Though it seems to have a limit, the value can only reach ~FDFD times. (From my testing, FFFF crashes the game.)

Note: It repeats the code from the beginning up to the last code before the loop and when the limit is reached, it will proceed to the next code, if any.
Oh, when you do the code like this:
Code:
00 00 09 00 01 00 09 00 FD FF 01 00 FD FF 01 00 FF FF 00 00
[I]'From frame 1 to frame 2 and the animation repeats over and over to no end...[/I]
It seems to loop infinitely with no adverse effects at all.
That means, B/W-style pokemon is indeed possible.

I've tested all this with trainer animations and it works perfectly.
I ought to share it here because I'm quite sure that this can also apply
to pokemon animations. But then I could be wrong...

I might post a video sometime.
 
1,085
Posts
14
Years
  • Age 23
  • Seen Aug 26, 2023
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
It seems that I've found a "loop" command for those animation codes.
Use: FD FF XX XX ; where XX XX is the number of times the animation will loop (In little endian, of course).
Though it seems to have a limit, the value can only reach ~FDFD times. (From my testing, FFFF crashes the game.)

Note: It repeats the code from the beginning up to the last code before the loop and when the limit is reached, it will proceed to the next code, if any.
Oh, when you do the code like this:
Code:
00 00 09 00 01 00 09 00 FD FF 01 00 FD FF 01 00 FF FF 00 00
[I]'From frame 1 to frame 2 and the animation repeats over and over to no end...[/I]
It seems to loop infinitely with no adverse effects at all.
That means, B/W-style pokemon is indeed possible.

I've tested all this with trainer animations and it works perfectly.
I ought to share it here because I'm quite sure that this can also apply
to pokemon animations. But then I could be wrong...

I might post a video sometime.
Awesome. :)

Both animation systems are exactly identical, so it should work both ways. However, it may present a few issues with Pokemon animations. I'd test it, but I can't get my Windows multiboot to work so I can't work on hacks at the moment. :(
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.

Uncompressed, 10 sprites for every Gen 3 Pokemon would take up about 7.7mb. So We can guess about... 5mb, I guess. So yeah, you would HAVE to expand.
 

ShadowTails

I'm working on a better Avatar
638
Posts
18
Years
  • Age 32
  • Seen Mar 7, 2015
Would it be possible to remove animations from Emerald using this knowledge? I'm just curious because I was never a fan of the two frame animation in Emerald and it's the game I want to hack.
 
19
Posts
11
Years
  • Seen Jun 13, 2012
Would it be possible to remove animations from Emerald using this knowledge? I'm just curious because I was never a fan of the two frame animation in Emerald and it's the game I want to hack.
It is possible, just requires some research and effort. You could also replace the second frame with the first one, definitely not the best solution but no one would notice anyway.
 

ShadowTails

I'm working on a better Avatar
638
Posts
18
Years
  • Age 32
  • Seen Mar 7, 2015
Well, I found the stuff that controls the animations and which frames play, so I suppose I could just make it so the second frame never plays, but the sprites would still bounce around all over the place. 305F68 is ? the place holder, and then after each FFFF is the end of the animation as has already been stated in the thread. Bulbasaur is at 305F76 and so on and so forth with the FFFF's. I suppose I could repoint this stuff and make the animations non existent that way? somehow? I mean I dunno, if I just did that it wouldn't change the actual animation part of the animations, but I suppose this is a fix, as it doesn't ever call upon the second frame if I edit them this way.
 

Haru~

Can't resist the chubbiness :3
16
Posts
12
Years
  • Seen Jul 15, 2012
Pawniard has a very simple animation. I have ripped it, and put it into 10 different pictures that are all 64x64. If we do ever have sprites working like they are in B/W, i'll carry on. I wonder how much free space it would take if you would do that for every single Pokémon... you'd have to expand the ROMs to 32MB. But you never know.

I recommend you stick with 8 sprites each (64x512; anything larger than that may cause the game to crash upon loading the sprite). Each 64x512 image when compressed takes about 0x1954(?) bytes. Wait, I was wrong with the size. It's different for each pokemon **facepalms** but it should take more or less that amount.
 
Last edited:
Back
Top