how to test for different ground levels
Im working on a side scroller and am not using tiles but am using fullscreen bitmaps and just scrolling them, how do I make it so the player will fall through one part but not another? like say the character is walking and then it comes to a hole in the ground how to I make sure the character can fall down the hole?
Have an array of tiles (you should do anyway) and then figure out where the player is. If they move from the last turn through into an impassable block (you determine this from your array) then you move them to the top of the block.
EG: Your array is something like
If they can fall through 0''s and 2''s then they do, if they cross over into a 1 then they get moved on top of the 1 block... Get it?
-Chris Bennett of Dwarfsoft - Site:"The Philosophers' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
EG: Your array is something like
0, 0, 0, 0, 2, 0, 0, 0, 0, 0,1, 1, 0, 0, 2, 1, 1, 1, 1, 1,2, 2, 2, 1, 2, 2, 1, 1, 1, 1
If they can fall through 0''s and 2''s then they do, if they cross over into a 1 then they get moved on top of the 1 block... Get it?
-Chris Bennett of Dwarfsoft - Site:"The Philosophers' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
yeah, dont use large bitmaps, use tiles
then you just have your array for the map like dwarfsoft said, and each block has collision information for each side
when you try to move, you test if the block below the player has collision detection on the top of it, and if it doesn''t then the player falls.
why would you want to scroll large bitmaps?
then you just have your array for the map like dwarfsoft said, and each block has collision information for each side
when you try to move, you test if the block below the player has collision detection on the top of it, and if it doesn''t then the player falls.
why would you want to scroll large bitmaps?
That would be a very large bitmap which was hugely hogging your entire memory. I would hate to have to wait for the 6MB Bitmap to load
You will have to keep stored the current location on the bitmap...
Bah. There is a tutorial here
-Chris Bennett of Dwarfsoft - Site:"The Philosophers' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
You will have to keep stored the current location on the bitmap...
Bah. There is a tutorial here
-Chris Bennett of Dwarfsoft - Site:"The Philosophers' Stone of Programming Alchemy" - IOL
The future of RPGs - Thanks to all the goblins over in our little Game Design Corner niche
unlike most people here, I dont think a big picture is that bad. Just try to avoid a MASSIVE picture (10240x7680 ?) Make screens, like in the old style adveture games ? you could make them scroll smoothly even ... you''d have to load one or two (maximum four is you scroll up and down as well as left and right) to make something correct. And I think modern system can safely load 4 fullscreen bitmaps at a time...
As for how to test for collision. You need an underlying system. Be it either a tile system (it would then be only a logical tile system, not graphic tiles) and then refer to any article on tiling. Or it could be a balck and white bitmap, that you''d use to designate solid and non solid part of the picture ? Or something similar, so that you could have more info... Personally, I''d go for fullscreen bitmaps drawn respecting a wireframe that would be your logic tiles (that is, draw your massive bitmap so that the tiles behind fit not too badly). Then simply use the classic tiles tricks... with tiles effects, attributes (slippery tile, slow tile, etc).
youpla :-P
As for how to test for collision. You need an underlying system. Be it either a tile system (it would then be only a logical tile system, not graphic tiles) and then refer to any article on tiling. Or it could be a balck and white bitmap, that you''d use to designate solid and non solid part of the picture ? Or something similar, so that you could have more info... Personally, I''d go for fullscreen bitmaps drawn respecting a wireframe that would be your logic tiles (that is, draw your massive bitmap so that the tiles behind fit not too badly). Then simply use the classic tiles tricks... with tiles effects, attributes (slippery tile, slow tile, etc).
youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement