Alex kidd in Miracle World SMS to Genesis/Megadrive port
Moderator: Mask of Destiny
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
			
			
									
						
										
						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
 - Contact:
 
Take a look at BugHunt code. It uses the SGDK sprite engine flawessly http://bughunt.nolddor.ovh/oofwill wrote:is there any recomandation to use the sprite engine?
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
			
			
													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.
									
			
						
										
						I don't use compression.
I tried to use
but game crash  
Edit:
just this line causes game crash:

			
			
									
						
										
						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);Edit:
just this line causes game crash:
Code: Select all
SPR_setAnim(&AlexSprite[0], &alexmarche_sprite);
- 
				Stef
 - Very interested
 - Posts: 3131
 - Joined: Thu Nov 30, 2006 9:46 pm
 - Location: France - Sevres
 - Contact:
 
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.
			
			
									
						
										
						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
			
			
									
						
										
						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