Hi Everyone. Whilst not a newbie coder as such, I am certainly a newbie in game development. I have written a routine which renders a tile map using sprites - simply because I wanted to use the built in collision routines. However, I am not convinced this is the correct approach, and is surely a bad use of sprites and memory.
I would much rather use tiled images and use dbPasteImage() for example to render my screen. However, this means I need to implement some kind of custom collision detection to determine where my player can walk, and where they can't.
My map currently is an array eg map[20][15]. and for brevity purposes looks like the following:
0,0,0,0,0
0,0,0,0,1
0,0,0,0,1
1,1,1,1,1 (where 1=solid ground, 0=air)
I can ascertain which map tile my player is currently in. Would I be on the right track by testing the adjacent tile around me (above, below,right,left) and depending on whether the tile is solid, allow my player to pass or force him to stop.
I guess for me the problem with game development is knowing the best way to do something, or the way in which most common games are written.
I'd be very grateful for any advice, or links to tutorials or example code that may help me grasp these concepts.
Cheers
Stoddsie