Page 3 of 3

Posted: Fri Apr 10, 2015 8:30 am
by nolddor
Really nice news!

Posted: Sun Apr 12, 2015 10:36 am
by ICEknight
Cool! But why does Alex do the Janken attack animation when standing? It looks a bit out of place...

Posted: Tue Apr 14, 2015 5:12 pm
by oofwill
i tried to use SGDK sprite engine, but with only 5~6 sprites on screen, Megadrive slowing down.

I don't know why. is there any recomandation to use the sprite engine?

Posted: Tue Apr 14, 2015 10:35 pm
by Moon-Watcher
oofwill wrote:is there any recomandation to use the sprite engine?
Take a look at BugHunt code. It uses the SGDK sprite engine flawessly

Posted: Wed Apr 15, 2015 7:23 am
by oofwill

I've taken a look at this code.
I think i'm using SPRinitSprite in my loop and this is not the way i had to.

I probably should use set attribut, setposition or setanimandframe...

I will test it this afternoon :-)

Posted: Wed Apr 15, 2015 7:25 am
by Arrovs
This kind of slowdown happens with my Sharp claws game too. I really dont know if its our fault or SGDK.

Posted: Wed Apr 15, 2015 7:32 am
by oofwill
I thinh it's my code since with an old version i made, i was not having any slowdown.

DId you use SGDK sprite engine or your own?

Posted: Wed Apr 15, 2015 3:18 pm
by Stef
You may quickly experience slowdown if you use the compression as well, always disable it for sprite. I really need to implement a blazing fast unpacking algo for real time sprites unpacking :p

Posted: Wed Apr 15, 2015 7:44 pm
by oofwill
I don't use compression.

I tried to use

Code: Select all

SPR_setAnim(&AlexSprite[0], &alexmarche_sprite);
SPR_setAttribut(&AlexSprite[0], TILE_ATTR(PAL2, 0, 0, sens));
SPR_setPosition(&AlexSprite[0], SpriteX, SpriteY);
but game crash :shock:

just this line causes game crash:

Code: Select all

SPR_setAnim(&AlexSprite[0], &alexmarche_sprite);

Posted: Wed Apr 15, 2015 8:25 pm
by Stef
The second argument should be the animation index (and so the corresponding row number in your sprite sheet)

Posted: Thu Apr 16, 2015 12:54 am
by oofwill
It's better, but i have little slowdowns when breaking boxes... don't know why...

There's only 5~7 sprites on screen :/

Posted: Thu Apr 16, 2015 10:38 am
by Stef
The sprite engine is not really optimized currently (it does hardware sprite allocation at each update for instance) and i should probably redesign it in a way we can manually allocate the hardware sprite. It does work well when dealing with few big sprite but not so well for many small sprites. Still 5/7 sprites is not a lot and should not produce any slowdown if you don't compress them.

Posted: Wed Apr 29, 2015 12:11 am
by oofwill
My code isn't optimal so this +that could be slowdown i guess...

Don't worry. At this time, this is working and that's the only goal for me, i'm very learning coding with this ;-)

news of this day:

- sprites are ok, animated. No more slowdown.
- enemys can kill us and alex can kill them
- when revive, alex is invincible for several seconds (blinking)