Alex kidd in Miracle World SMS to Genesis/Megadrive port

Announce (tech) demos or games releases

Moderator: Mask of Destiny

nolddor
Very interested
Posts: 101
Joined: Sun Jun 02, 2013 1:35 pm
Location: Spain

Post by nolddor » Fri Apr 10, 2015 8:30 am

Really nice news!

ICEknight
Very interested
Posts: 51
Joined: Mon Apr 23, 2012 10:41 am

Post by ICEknight » Sun Apr 12, 2015 10:36 am

Cool! But why does Alex do the Janken attack animation when standing? It looks a bit out of place...

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Tue Apr 14, 2015 5:12 pm

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?

https://youtu.be/_p24FLu4anc

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm

Post by Moon-Watcher » Tue Apr 14, 2015 10:35 pm

oofwill wrote:is there any recomandation to use the sprite engine?
Take a look at BugHunt code. It uses the SGDK sprite engine flawessly http://bughunt.nolddor.ovh/

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Wed Apr 15, 2015 7:23 am

Thanks!

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 :-)
Last edited by oofwill on Wed Apr 15, 2015 7:33 am, edited 1 time in total.

Arrovs
Interested
Posts: 18
Joined: Wed Sep 11, 2013 3:44 pm

Post by Arrovs » Wed Apr 15, 2015 7:25 am

This kind of slowdown happens with my Sharp claws game too. I really dont know if its our fault or SGDK.

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Wed Apr 15, 2015 7:32 am

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?

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

Post by Stef » Wed Apr 15, 2015 3:18 pm

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

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Wed Apr 15, 2015 7:44 pm

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:

Edit:
just this line causes game crash:

Code: Select all

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

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

Post by Stef » Wed Apr 15, 2015 8:25 pm

The second argument should be the animation index (and so the corresponding row number in your sprite sheet)

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Thu Apr 16, 2015 12:54 am

It's better, but i have little slowdowns when breaking boxes... don't know why...

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

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

Post by Stef » Thu Apr 16, 2015 10:38 am

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.

oofwill
Very interested
Posts: 173
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill » Wed Apr 29, 2015 12:11 am

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)

https://www.youtube.com/watch?v=2GAQ5NSHK1k

Post Reply