Animation Sample

SGDK only sub forum

Moderator: Stef

Post Reply
Yukiko
Interested
Posts: 14
Joined: Sat Nov 18, 2017 9:33 am

Animation Sample

Post by Yukiko » Tue Jan 02, 2018 12:10 am

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.
Attachments
Video Sample.7z
7-Zip Archive
(207.67 KiB) Downloaded 267 times

Yukiko
Interested
Posts: 14
Joined: Sat Nov 18, 2017 9:33 am

Re: Animation Sample

Post by Yukiko » Tue Jan 02, 2018 12:23 am

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.
Last edited by Yukiko on Tue Jan 02, 2018 7:33 am, edited 1 time in total.

Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Animation Sample

Post by Boyfinn » 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

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Animation Sample

Post by Stef » Wed Jan 03, 2018 9:19 am

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) :)

Yukiko
Interested
Posts: 14
Joined: Sat Nov 18, 2017 9:33 am

Re: Animation Sample

Post by Yukiko » 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?
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.

Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Animation Sample

Post by Boyfinn » Thu Jan 04, 2018 3:55 am

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.

cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Re: Animation Sample

Post by cloudstrifer » Thu May 17, 2018 3:57 pm

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

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Animation Sample

Post by Stef » Fri May 18, 2018 3:12 pm

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).

cloudstrifer
Very interested
Posts: 118
Joined: Mon Feb 19, 2018 7:31 pm

Re: Animation Sample

Post by cloudstrifer » Fri May 18, 2018 5:31 pm

Thank you!

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Animation Sample

Post by Stef » Fri May 18, 2018 9:05 pm

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) ;)

Post Reply