Scrolling Game Development Kit Forum
SGDK Version 1 => Help/FAQ => Topic started by: utkwes on 2006-04-13, 10:16:49 AM
-
Garr! I've tried all of my limited knowledge of this program to try and eliminate the clipping I incur when jumping around.
If I jump straight up without moving, all is fine, but if I catch a tile diagonally, up and left or right, then I can 'hack' my way up through it. It is quite annoying for a jump based game such as mine. Is there something I am leaving out or not doing right? Any help would be great.
Also, I have defined a tile interaction that should subtract one life from my player. Sometimes, it will subtract more than one life (special function: death), other times, it will be fine. Any suggestions?
If you don't know what I am talking about, you can see what I mean for yourself with my game DOWNLOAD: http://utkwes.googlepages.com/downloads (http://utkwes.googlepages.com/downloads)
Thanks,
Wes
-
Can't try your game at the moment, but I can tell you a couple things that might help.
1) Make sure your sprite is not larger than your tiles. Only the corners of the sprite are checked for collisions with tiles, so if you can fit a tile between the top and bottom of the sprite, then there's nothing to stop the sprite from going through the solid tile by straddling it.
2) Let me re-iterate, only the corners of the sprite are checked for collisions with solidity. That also means that if you have an uphill tile without a solid tile below it, you have a sharp corner that the player could get caught on by allowing the corners of the sprite to straddle the pointy part.
3) Did you check the box for "Initial touch only" to prevent the tile interaction from happening repeatedly for as long as you're touching the tile?
-
I looked at the GDP file, and the special function "Death" is activated by a sprite collisions, not a tile interaction. It restarts the player sprite upon touching a sprite in class "fire" and activates the function, so I'm not sure what the problem is.
-
blue monk could be very right on this one, my tiles are smaller than my sprite.
'Death' is activated by a sprite collision. That is for fireball sprites that will be coming out of the lava tiles.
But the death that is activated by the lava tiles is actually in the map tile interaction for map '1.2' The water and lava tiles are in the 'hazard' tiles.
Another question:
How does the grid work in the map creator? I assume it starts the current tile size in 0,0 pixel and then creates the grid based on tiling from that corner? In that case, is there any way to place tiles arbitrarily or specify an offset? or do I just need to think about the placement and sizes better?
-
As far as 'initial touch only' what if my sprite happens to touch down on a crevise of two death tiles? Gar. Thanks for the help!
-Wes
-
Tiles can only be placed within the gridlines.
-
If a player touches two tiles at once, it checks in a circle from the top-left going clockwise. So if a player fell into a crevice and touches two blocks at once, the one on the right would be activated first. Then the one on the left.
Ok, so that goes back to my question... Would that kill me twice? Thanks.
-Wes
-
If a special function removes the sprite on the first tile interaction, it shouldn't do the second one as well.
-
If a special function removes the sprite on the first tile interaction, it shouldn't do the second one as well.
... but it does.