Advice to prepare for level design
Posted: Mon Apr 02, 2012 10:19 pm
Hello,
I desperately need advice on how I should prepare and set-up my code and things for the future when I start creating the images for the ground and platforms and make a variety of terrain patterns and levels. For instance, if there's some way to make a floor entity, that can have it's width or height scaled up or down, and repeat certain "tiles" as needed. I'm also wondering if it can assign "crust" tiles to the outer edges while repeating the inside tiles, or if I should make separate entities for the floor that I want to be scalable and for the crust.
Right now I have nothing but a global "yFloor" variable that shows the height of one floor because I've been perpetually confused by relating boxes to each other
Also... differentiating between different classes of objects (player, projectile, enemy, floor, etc) and coding different results for each of their collisions.
I think I have the start of something like this, as you can see the game prints the player object's name and it's class ("player").
Here's my code
I desperately need advice on how I should prepare and set-up my code and things for the future when I start creating the images for the ground and platforms and make a variety of terrain patterns and levels. For instance, if there's some way to make a floor entity, that can have it's width or height scaled up or down, and repeat certain "tiles" as needed. I'm also wondering if it can assign "crust" tiles to the outer edges while repeating the inside tiles, or if I should make separate entities for the floor that I want to be scalable and for the crust.
Right now I have nothing but a global "yFloor" variable that shows the height of one floor because I've been perpetually confused by relating boxes to each other
Also... differentiating between different classes of objects (player, projectile, enemy, floor, etc) and coding different results for each of their collisions.
I think I have the start of something like this, as you can see the game prints the player object's name and it's class ("player").
Here's my code