Sprite issue with first SGDK project
Posted: Thu Nov 26, 2015 2:40 am
Okay, so, I don’t have anything yet, but, I do have what I think is something like 50% of two games lol.
Let me start with this one, that’s bugging me to death.
First I tried to load sprites.
The sprite resources should be declared in resources file like this, right?
“filepath” width(of one frame), height(of one frame), some_number(cannot get what is it), amount of total sprites.
If you look at my code, sprite.c and sprite.h, it provides ability to load sprite and manipulate it. As I understand it, as a super amateur, I just need to send resourceId (e.g. SPR_Viking1) when you create a sprite.
As I understand for the sprite resource, every frame should be the same size. So, in this instance, it should be 16 x 32 pixels….right? Unfortunately, lol, the size is 128 x 800. A width of 128 which is not correct, because the frame width is 16 pixels and totals frames in row is 7. I think it should be 112 width. But if it is 112 width then we lost part of attacking Viking, and really, who wants a Viking that can’t pillage?
Any help on that?
Here’s another attempt where I created a file with cut attacking Viking viking1.png with the following settings
Indexed color and 8bit channel
When I try to compile it, it crashes. With rescomp.EXE. I tried to use different image type, but, no dice. Without viking1.png resource it compiles fine.
These were the problems with assets. I’m a total noob here. Any help would be killer.
Let me start with this one, that’s bugging me to death.
First I tried to load sprites.
The sprite resources should be declared in resources file like this, right?
“filepath” width(of one frame), height(of one frame), some_number(cannot get what is it), amount of total sprites.
If you look at my code, sprite.c and sprite.h, it provides ability to load sprite and manipulate it. As I understand it, as a super amateur, I just need to send resourceId (e.g. SPR_Viking1) when you create a sprite.
As I understand for the sprite resource, every frame should be the same size. So, in this instance, it should be 16 x 32 pixels….right? Unfortunately, lol, the size is 128 x 800. A width of 128 which is not correct, because the frame width is 16 pixels and totals frames in row is 7. I think it should be 112 width. But if it is 112 width then we lost part of attacking Viking, and really, who wants a Viking that can’t pillage?
Any help on that?
Here’s another attempt where I created a file with cut attacking Viking viking1.png with the following settings
Indexed color and 8bit channel
When I try to compile it, it crashes. With rescomp.EXE. I tried to use different image type, but, no dice. Without viking1.png resource it compiles fine.
These were the problems with assets. I’m a total noob here. Any help would be killer.