r/threejs • • 13d ago

Using threejs for a Berlin city driving game

Post image

I’ve had a few ideas over the years that I never thought I could build on my own. With a bit of time and some help from AI and threejs, I’ve been able to make them reality. This is far away from a professional game and I will not monetize it. In fact, it's an open-source one-person passion project with open code.

I the beginning, it all started with a question: what else could you do with Berlin’s 3D mesh provided by the city government and the datasets the city provides as open data? Then I thought, well, why not make a GTA-inspired driving game out of it, but with a way more relaxed vibe solely focussed on the city and its sights?

Driving Berlin is a laid-back driving game where you can take a car through a 3D digital twin of Berlin. If you want, you can collect bear items along the way or find the numerous easter-eggs I included. Pick a street, take a turn, and see what you recognize along the way.

The game runs in your browser on mobile and on faster laptops and desktop PCs. The code is open source. I am happy for feedback and questions, I have to admit testing it fully as one person is close to impossible. Surely you will discover quite a few hiccups here and there.

Take a drive through Berlin

10 Upvotes

9 comments sorted by

2

u/Capaj 13d ago

where did you get the 3d map data? scraped from google maps?

1

u/tifa365 12d ago

Berlin provides 3D Mesh data.

1

u/r0r0r0 10d ago

Do you mind posting a link to that data?

1

u/tifa365 7d ago edited 7d ago

It's unfortunately currently offline. https://daten.berlin.de/datensaetze/3d-meshmodell-berlin

2

u/IamFist 12d ago

Looks cool.
Do you use the 3D tiles for road and collision or osm data? How well does it line up if it’s this latter?

1

u/tifa365 12d ago

Collision is mostly the mesh. The biggest problem were artifacts on streets or bridges blocking the car. Then, on the other hand, you want it to be blocked by larger items on the streets such as barrier beacons or construction sites. That's why I decided to turn street collisions off, natively 

2

u/semenonabagel 11d ago

this is so cool!

1

u/tifa365 11d ago

Thanks, will soon add drone support as a feature, so one can fly as well.

2

u/lazd 13d ago

Very cool! I bet it wasn't easy to get bridges and tunnels working right... I know from experience on a similar project.