Page 1 of 4

Top-Down City With Depth

Posted: Thu Apr 15, 2010 11:29 am
by Thursdaybloom
This is something I'd been working on the past couple of days. I had the idea of adding depth to a birds-eye-view city. To do this I knew I had to design a way to offset the tops of the buildings based on player location and have them move independently to the streets.

Because of the popularity of GTA it's almost impossible to make a top-down city game without it being classed as a clone. Something like this could obviously end up being used for such a clone, but that's definitely not what I had in mind when I made it. I pretty much just wanted to prove to myself I could achieve it. Despite that, I'm going to keep working on this to see how far I can take it.

Because this is just a proof-of-concept demo I've cheated with the map scrolling by making the city layout one large spritebatch that you move around with WASD. The map itself involves a lot of copy/paste so it's nothing special.

Enjoy.


TODO:
Proper map scrolling
Include player sprite and building collision so you can only "drive" on the roads and pavement

I'd also like to redesign using 64x64 tiles and eventually use Box2d for collisions between cars and buildings



edit: there's now 2 attachments - the original 0.2 and a verson with the dimensions of tileset.png changed to 512x1024. If Topdown City hasn't worked for you previously then try the *-po2.love version and report back.

Re: Top-Down City With Depth

Posted: Thu Apr 15, 2010 2:53 pm
by bartbes
Nicely done.

Re: Top-Down City With Depth

Posted: Thu Apr 15, 2010 5:20 pm
by Chief
Well that is freaking awesome! Real GTA feeling there!

Re: Top-Down City With Depth

Posted: Thu Apr 15, 2010 9:52 pm
by kikito
looks promising. Keep up with the good work!

Re: Top-Down City With Depth

Posted: Fri Apr 16, 2010 10:30 am
by smartazz
Not bad at all, good work :)

Re: Top-Down City With Depth

Posted: Sat Apr 17, 2010 4:03 am
by Deecodeuh
Make the roofs black. I can see through the ceilings.

Re: Top-Down City With Depth

Posted: Sat Apr 17, 2010 4:48 am
by Thursdaybloom
Can you screencap that for me because I've not had that issue.

Re: Top-Down City With Depth

Posted: Sat Apr 17, 2010 4:52 am
by DarkPrince
Also there seems to be a depth issue. When you view from the left of the black tall building up top, you can see the west-side wall of the building to the right of the black building goes OVER the roof... hehe.

Re: Top-Down City With Depth

Posted: Sat Apr 17, 2010 5:14 am
by Thursdaybloom
DarkPrince wrote:Also there seems to be a depth issue. When you view from the left of the black tall building up top, you can see the west-side wall of the building to the right of the black building goes OVER the roof... hehe.
Ok, seems that every building to the right takes drawing precedence over its left-hand neighbour. This could have something to do with the building numbering system I've used. Thanks for pointing that out!


Edit: Updated file. I put the drawing of the roof spritebatches in their own for loop, not at the end of the existing one. This seems to have fixed it. Let me know if it doesn't work for you.

Re: Top-Down City With Depth

Posted: Sat Apr 17, 2010 7:54 am
by nevon
When I run it now, I just get a black screen. Before the update it looked like a garbled mess.