Ok, first things first... it's not finished. It's our first hackathon for most of us, and we're tired. The game's (more or less) playable; all the code's there, just not all formatted and organised and tested properly. Also we didn't get chance to make a video... we're just too tired.
Inspiration
We started off exploring ideas around maps. Something to do with charting radiation was our first choice, but we knew we'd struggle to get proper data from anywhere. So we stuck with the map idea, and using Leaflet.js and Overpass API, both thanks fo OpenStreetMap data, we've made a basic game.
What it does
There are two players, the user versus the computer. At the beginning of the game, each player is allocated three buildings on the map that belong to them. The aim of the game is to capture your opponent's bases, all while minimising the number of civilian buildings that get destroyed through nuclear bombs. We were going to allow the user to pick from a variety of locations, but this proved difficult to implement so instead it's set on the Oxford Road in Manchester.
How we built it
The map is displayed using Leaflet.js. The coordinates of the map are then sent to the Overpass API, which uses OpenStreetMap data to find where all the building outlines on the map are. Three buildings are randomly allocated to each player. Players take turns to detonate nuclear bombs (destroying all buildings within 200m) to try and destroy enemies. Unfortunately a bit of the gameplay element didn't get finished, so it's perhaps not the most fun to play...
Challenges we ran into
Leaflet and Overpass both use data from the same source, OpenStreetMap. But the formats of the coordinates needed to access things, and the actual parts of buildings that can be accessed, vary hugely between the two. Being online rather than in person was a challenge too, as we didn't really know what each other were doing. The Overpass API has rate limits. The game might freeze for a bit after detonating a bomb, if a 403 has been received.
Accomplishments that we're proud of
We've linked together data from different sources to produce a game that is realistic and based on real statistics (if you excuse the fact that Manchester would be blown to smithereens by the warmongering present within).
What we learned
- Decide what you're doing early on.
- Make sure everyone's on board.
- Make the thing. Quickly.
- Nap.
- Spend a bit less time on making the colours nice and more time on coding.
What's next for Inland Nuclear Battleships
Mainly, fixing the bits that don't work. There's an interesting idea there, it's a shame that the mechanics of the game aren't implemented properly to make it shine through.
Log in or sign up for Devpost to join the conversation.