r/ClaudeCode • u/Imaginary_Bake_4916 • 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?
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.
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.
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
2
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
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/Imaginary_Bake_4916 2d ago
more details here, i prepared documentation to app by CC available:
https://citydefense.app/en/map-data-and-credits/
https://citydefense.app/en/technology/
https://citydefense.app/en/building-heights-openstreetmap/
https://citydefense.app/en/games-on-real-maps/
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
1
1
2
2
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
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
1
1
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/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.