Page 1 of 1

Animation Sample

Posted: Tue Jan 02, 2018 12:10 am
by Yukiko
I made this silly little animation. I coded it as a sprite as that was the laziest option, however that lead to the large file size.

The image I used had a four colour index, but SGDK did not like that, so I added the extra twelve colours to the file. For some reason the palette came out wrong.

Re: Animation Sample

Posted: Tue Jan 02, 2018 12:23 am
by Yukiko
The last frame of sprite[1] is shown as the first frame of sprite[2]. I'm guessing that wouldn't happen if I loaded sprite[2] into memory before displaying it.

I'll upload a Youtube video of the animation in the next couple of days.

Re: Animation Sample

Posted: Tue Jan 02, 2018 5:42 am
by Boyfinn
i've done a "sort of" fullscreen video playback thingy in my project
https://www.youtube.com/watch?v=ENOP0_1wdks

Re: Animation Sample

Posted: Wed Jan 03, 2018 9:19 am
by Stef
rescomp indeed requires 4bpp (16 colors) or 8bpp images.
You can probably reduce the rom size using FAST compression mode (decompression should be fast enough to preserve a good frame rate) :)

Re: Animation Sample

Posted: Wed Jan 03, 2018 10:36 am
by Yukiko
Boyfinn wrote:
Tue Jan 02, 2018 5:42 am
i've done a "sort of" fullscreen video playback thingy in my project
https://www.youtube.com/watch?v=ENOP0_1wdks
I like it. Is the text meant to jerk back?
Stef wrote:
Wed Jan 03, 2018 9:19 am
You can probably reduce the rom size using FAST compression mode (decompression should be fast enough to preserve a good frame rate) :)
Fantastic! For some reason I was thinking I could only use compression with IMAGE or BITMAP. Fast compression can be used for the large sprites, while slow can be reserved for the small ones.

Code: Select all

SPRITE test8part1 "sprite/test8part1.png" 15 18 0
SPRITE test8part2 "sprite/test8part2.png" 6 8 0
Results in a 1024kb ROM.

Code: Select all

SPRITE test8part1 "sprite/test8part1.png" 15 18 FAST
SPRITE test8part2 "sprite/test8part2.png" 6 8 FAST
Results in a 384kb ROM.

Code: Select all

SPRITE test8part1 "sprite/test8part1.png" 15 18 FAST
SPRITE test8part2 "sprite/test8part2.png" 6 8 SLOW
Results in a 384kb ROM.

Code: Select all

SPRITE test8part1 "sprite/test8part1.png" 15 18 SLOW
SPRITE test8part2 "sprite/test8part2.png" 6 8 SLOW
Results in a 256kb ROM, with slowdown during the first animation.

Re: Animation Sample

Posted: Thu Jan 04, 2018 3:55 am
by Boyfinn
Yukiko wrote:
Wed Jan 03, 2018 10:36 am
Boyfinn wrote:
Tue Jan 02, 2018 5:42 am
i've done a "sort of" fullscreen video playback thingy in my project
https://www.youtube.com/watch?v=ENOP0_1wdks
I like it. Is the text meant to jerk back?
No, it's not. It's not a problem in the code, but my lazy way of making the animation frames, so its more of an issue on the art/graphics side than code.
The system i currently have is capable of doing fullscreen 4-color 29fps animation, which occupies a whole layer. It has a double buffer for the frames so it takes up about 2-screens worth of tiles.
Also, this animation was only 120-ish frames total on the B-Layer. But as new frames get streamed into the buffer, theres no really upper limit for the amount of frames. The only limiting factor here is cartridge space.

Re: Animation Sample

Posted: Thu May 17, 2018 3:57 pm
by cloudstrifer
Is there a way to customize frame animation like Construct 2?

For example:

Frame 1: 2 Frames
Frame 2: 5 Frames
Frame 3 : 1 Frame

If animation will loop or not and if it is ping-pong.

Image

Re: Animation Sample

Posted: Fri May 18, 2018 3:12 pm
by Stef
Although the internal SpriteDefinition structure somehow allow to do it, the rescomp tool is currently quite limited when it comes to Sprite resource compilation so for now it's not possible to do it. You can do the ping-pong animation but just duplicating the animation frame in reverse order, i think rescomp should be able to detect duplicated frame at least (not 100% sure).

Re: Animation Sample

Posted: Fri May 18, 2018 5:31 pm
by cloudstrifer
Thank you!

Re: Animation Sample

Posted: Fri May 18, 2018 9:05 pm
by Stef
You can also define manually the SpriteDefinition structure so you can customize it but honestly that will be a real pain as you need to fill many information (still doable) ;)