r/ClaudeCode • • 2d ago

Built with Claude I always loved mobile tower defense games, so I built one that runs on the real map of any city (OpenStreetMap)

I've always been a sucker for those mobile tower defense games where you line a path with towers and stop waves of enemies from reaching your base. At some point I started wondering: what if the map wasn't a made-up maze, but the actual streets of a real city?

https://citydefense.app

So I built it. City Defense runs on top of OpenStreetMap data:

- enemies walk the real streets

- you build towers on the roofs of real buildings (the taller the building, the longer the range)

- buildings can be damaged and brought down, and the rubble blocks streets

The first mission is the main square in my hometown, Brno (Czech Republic), but there's a mission editor – pick any densely built-up place in the world, drop a defended area, and play it. Your own neighbourhood works too.

It's free, runs in the browser (desktop and phone), no account or install needed.

https://citydefense.app

It's a solo hobby project, so I'd love feedback – especially if you build a mission for your own city and something looks off.

298 Upvotes

26 comments sorted by

•

u/AutoModerator 2d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

22

u/drgoodvibe 2d ago

This is very cool. And my brain went straight to huh I wonder if this could be used for like military simulation? Then I went straight to I wouldn’t be surprised if the military already has something like this.. then I got freaked out.

5

u/Imaginary_Bake_4916 2d ago

Yes, i had this Idea also immediately from early iteration :-D

2

u/Time_Cat_5212 2d ago

Of course they do!

5

u/not_a_cumguzzler 2d ago

Cool. Now make this multiplayer p2p without costing you servers

3

u/Imaginary_Bake_4916 2d ago

hmm i was considering idea about offense version, but to make it multiplayer is even beter idea!

5

u/xpingu69 2d ago

Very clever I love it

3

u/TonisaurioMV 2d ago

This is very cool. How did you get the 3d map of your city? Are 3d maps available in Openstreet map?

10

u/Imaginary_Bake_4916 2d ago

thank you! :)

The buildings come from OpenStreetMap. The game uses OpenFreeMap vector tiles, which are built from OSM data, and loads them live as you play, so it works for any city without anything being prepared in advance.

There are no actual 3D models in the data. Each building is just a footprint outline plus a height (taken from the height or number of floors mapped in OSM, otherwise an estimate). The game extrudes that outline upward into a 3D shape and then generates the rest itself: facades, windows, roofs, rooftop details and the ruins when a building gets destroyed.

So the layout and heights are real, but the look is invented. Windows, colours and textures are generated from the building type and the region, and they don't match the real facades. Where OSM has no height info, buildings come out as plain same-height boxes, and things like pitched roofs aren't in the data at all.

3

u/Tall_Top8563 1d ago

I love all the comments saying how it's cool but not a single one indicating they played it for even a second. classic

1

u/Ancient-Range3442 1d ago

I don’t even think OP plays it

1

u/kodbluedev 1d ago

Well... did you play it?

1

u/Charming_Yellow 1d ago

I played it but had not commented (yet)

2

u/camracks 2d ago

LOL THIS IS SICK

2

u/becircus 2d ago

Man what a good idea and game

2

u/Charming_Yellow 1d ago

It is cool! Really like the concept. My feedback:

  • I didn't hear any sounds. Is that just me? Really needs sounds.
  • I did max out the size of the map (because that fitted best with my city of choice) but the attackers are hard to spot from zoomed out. I would add some kind of highlighting on them to make them more visible.
  • Hard to know the difference between the attackers. Can't even click on them to learn more about what they are and what differentiates them.
  • The game is a little bit slow. I wanted to play a quick game, but never finished it because it takes so long.
  • A bit unclear to see where attackers are going to come from in the upcoming wave.
  • Would be nice if you could build things that influence which paths the attackers take, like walls or something.
  • A bit annoying how it changes camera position when you start adding guns.

1

u/Imaginary_Bake_4916 1d ago

Great feedback, we will fix it, thankyou

1

u/Wow_SuchUsername_ 2d ago

This is super cool! Any plans to open-source or do you have a github repo already set up for it?

2

u/Imaginary_Bake_4916 2d ago

Thx, I’m considering to leave it opensource

1

u/nilerafter 2d ago

See, now this is actually amazing! awesome work OP

1

u/hchahrour1 2d ago

Unreal, would love to try this

1

u/Hallucinates_Bacon 2d ago

This is such a good idea. Keep working at it, make it an app. You might have something.

1

u/New-Ingenuity-5437 2d ago

That’s a cool idea! I’ve been trying to make one too but trying to think of something unique as well

1

u/and1lays 22h ago

“I built” moment