SPRITES tutorial on SGDK : need to understand
Posted: Sun Aug 30, 2015 9:55 pm
Hello,
I'm working on the SGDK Sprites tutorial.
As an exercise, I was trying to replace sonic by Marco from Metal Slug and backround planes A and B by Metal Slug background.
Unfortunately, I need more clues about this coding because I don't really understand.
As a result, I get background and sprite that are not displayed correctly.
When I do action with my sprite (jump, etc), the background gets differents.
=> Here are the code files : main.c+gfx.res+gfx.h <=
=> I tried to undestand the main code but I need help to learn more and to progress <=
Screen shot of what I get in emulator
About the background,
> if I run the program without the sprite, backround is displaying correctly, except if its size get too big :
* display OK when both planes A and B are up to 760x224.
* from 768x224, it's not displaying correcty, as in the picture above. The bigger the size is, the worse it gets. It looks like there are some tiles a little bit everywhere.
>to see it correctly when runing the progam with the sprite, I perhaps have to reduce the background size ? But it seems to be above the limit size so it shouldn't be a problem
=> This problem about background is perhaps a memory problem ?
=> about the sprite, how can I get it right ?
moves to set are : LEFT and RIGHT to walk / UP to shoot / A, B, C to jump
(I did let the original file's physics at first because I just wanted to get dispaly first)
Here is the sprite sheet
(I set it, as I think it's correct, with same size for each frame / here it is 8x8 tiles / but frames are perhaps not correctly centered)
background planes A and B (760x224) :
Thank you,
TAMA
I'm working on the SGDK Sprites tutorial.
As an exercise, I was trying to replace sonic by Marco from Metal Slug and backround planes A and B by Metal Slug background.
Unfortunately, I need more clues about this coding because I don't really understand.
As a result, I get background and sprite that are not displayed correctly.
When I do action with my sprite (jump, etc), the background gets differents.
=> Here are the code files : main.c+gfx.res+gfx.h <=
=> I tried to undestand the main code but I need help to learn more and to progress <=
Screen shot of what I get in emulator
About the background,
> if I run the program without the sprite, backround is displaying correctly, except if its size get too big :
* display OK when both planes A and B are up to 760x224.
* from 768x224, it's not displaying correcty, as in the picture above. The bigger the size is, the worse it gets. It looks like there are some tiles a little bit everywhere.
>to see it correctly when runing the progam with the sprite, I perhaps have to reduce the background size ? But it seems to be above the limit size so it shouldn't be a problem
=> This problem about background is perhaps a memory problem ?
=> about the sprite, how can I get it right ?
moves to set are : LEFT and RIGHT to walk / UP to shoot / A, B, C to jump
(I did let the original file's physics at first because I just wanted to get dispaly first)
Here is the sprite sheet
(I set it, as I think it's correct, with same size for each frame / here it is 8x8 tiles / but frames are perhaps not correctly centered)
background planes A and B (760x224) :
Thank you,
TAMA