Ground construction
by Cristopher Boyer · in TGB Platformer Kit · 10/29/2008 (4:59 pm) · 3 replies
Phil, is it possible to build ground out of larger images and scene objects with collision to create a sense of perspective, or are we introducing a lot of overhead by not utilizing tilemaps here?
#2
In the above image from Ninja Gaiden 2, you can see that there are fairly large and detailed (for its time) terrain images. The player character is always right in the middle of the image. To recreate such an effect in TGBPSK, I am imagining something like this:
Same image, overlaid with what I'd envision as the sprites and/or t2dSceneObjects. The area covered in red would be the t2dSceneObject on which the character can stand, and the blue would be the static sprite that would simply act as the rest of the ground for perspective. Alternately the red could simply be the sprite chopped in half, with the platform attribute as you mentioned.
Though that makes two images to load instead of one, and for every platform I would imagine that would be slower at runtime, no?
10/30/2008 (10:49 pm)
Well right. My thinking, more illustrated would be like thus:
In the above image from Ninja Gaiden 2, you can see that there are fairly large and detailed (for its time) terrain images. The player character is always right in the middle of the image. To recreate such an effect in TGBPSK, I am imagining something like this:
Same image, overlaid with what I'd envision as the sprites and/or t2dSceneObjects. The area covered in red would be the t2dSceneObject on which the character can stand, and the blue would be the static sprite that would simply act as the rest of the ground for perspective. Alternately the red could simply be the sprite chopped in half, with the platform attribute as you mentioned.Though that makes two images to load instead of one, and for every platform I would imagine that would be slower at runtime, no?
#3
The scene object is an invisible box that sits on top of your image, it will make sure the player doesn't fall through the world. The old way (incorrect way) is to tile your sprites across and give each sprite a collision, thank god you don't have to do that! That made making platformer games suck big time.
Now, as for the background/foreground moving at different speeds that would be with parallax scrolling, which is described pretty good in the platformer total and even the mini platformer tutorial too.
12/07/2008 (7:33 pm)
You're totally over thinking this. All you'd do is pretty much put a scene object around that red area. Then give that red area a behavior of platform object and you're done.The scene object is an invisible box that sits on top of your image, it will make sure the player doesn't fall through the world. The old way (incorrect way) is to tile your sprites across and give each sprite a collision, thank god you don't have to do that! That made making platformer games suck big time.
Now, as for the background/foreground moving at different speeds that would be with parallax scrolling, which is described pretty good in the platformer total and even the mini platformer tutorial too.
Associate Phillip O'Shea
Violent Tulip