Hi Crabbages
I quite enjoyed the driving game.
I'm not sure how they achieved this. I'm pretty sure that you could do it all 2D but I probably wouldn't, unless it was a straight top down view.
My method would be to do it in 3D and use plains for all the objects, a bit like this (no collision implemented):
sync on
sync rate 60
make matrix 1, 1000, 1000, 10, 10
`use a plain to make the car object
make object plain 1, 10,25
xrotate object 1, 90 :`rotate the car so that is flat on the XZ plane
fix object pivot 1 :`this fixes the direction of the newly rotated plain (rem this out to see what happens if you don't do this)
car_facing# = 0.0
`use plains to make the buildings
make object plain 2, 100,100
xrotate object 2, 90 :`rotate the building so that it is flat on the XZ plain (no need to pix its pivot)
position object 2, 100,0,100
make object plain 3, 100,100
xrotate object 3, 90
position object 3, 300,0,100
make object plain 4, 50,100
xrotate object 4, 90
position object 4, 400,0,100
make object plain 5, 100,100
xrotate object 5, 90
position object 5, 100,0,300
make object plain 6, 100,100
xrotate object 6, 90
position object 6, 300,0,300
`etc, etc.... until you have made your map
`main loop
do
`controls
if upkey() = 1 then move object 1, 5
if downkey() = 1 then move object 1, -5
if leftkey() = 1 then car_facing# = wrapvalue(car_facing# - 2)
if rightkey() = 1 then car_facing# = wrapvalue(car_facing# + 2)
`point the car in the correct direction
yrotate object 1, car_facing#
`use the "set camera to follow" command so the camera follows the car object
set camera to follow object position x(1),object position y(1),object position z(1), car_facing#, 200,200,20,0
point camera object position x(1),object position y(1),object position z(1)
`instructions
text 1,1, "use arrow keys to move"
sync
loop
end
The only real problem with doing this is that all the roads end up at 90 degrees to each other (which might not matter for a first go at a game like this) and I'm not entirely sure how well any collision commands (native DBP or sparky's dll) will cope with the 2D plains being all on the XZ plain, but this is something you can experiment with if you go down this route.
Hope this helps.