OpenTTD Admin Port implemented via JS

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
erico252
Engineer
Engineer
Posts: 4
Joined: 27 Jun 2022 17:13

OpenTTD Admin Port implemented via JS

Post by erico252 »

Hi all.

I just wanted to share a little project I have been working on. I have managed to create an Admin Port Connection with Node.js to expose the data to HTTP Requests with Express.js

There is also a web app portion of it to help visualize the data that we can access from the Admin Port. To note, the CSS on the web app at time of writing is full of terrible colors so just a warning ahead of time

Currently from the web app it only connects to locally hosted servers where the Admin port password is "Eric" but if your accessing it from the POST /socket/connect endpoint you can theoretically connect to anywhere with any password.

I am posing this here because while i was working on this project over the last little while i was having a tough time understanding what was going on with the Admin Port. This may not be an ideal implementation of the Admin port but I'm hoping it can give inspiration for others to try their own projects as well!

https://github.com/erico252/Train-Game-Admin

Thanks! :D
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 27 guests