OpenTTD in Unity

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

Moderator: OpenTTD Developers

Post Reply
FlamesOfAPhoenix
Engineer
Engineer
Posts: 1
Joined: 10 Aug 2019 17:36

OpenTTD in Unity

Post by FlamesOfAPhoenix » 10 Aug 2019 17:39

Could Anyone port OpenTTD to Unity, it would be a great help for my current WIP-Game, since I didnot find any code/help

User avatar
kamnet
Moderator
Moderator
Posts: 6766
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: OpenTTD in Unity

Post by kamnet » 10 Aug 2019 19:12

OpenTTD source code is here: https://www.openttd.org/downloads/opent ... atest.html

Download and follow the usual steps for compiling source code. If you have any particular issues, please feel free to post them here and somebody may be able to help.

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4736
Joined: 09 Sep 2007 05:03
Location: home

Re: OpenTTD in Unity

Post by Alberth » 12 Aug 2019 07:00

A few challenges to do the port:
1. OpenTTD is written in C++, it's over 300,000 lines of code.
2. It doesn't use the GPU for rendering, drawing is all done by the CPU. You'll have to re-implement that from scratch. Be sure to keep all functionality of NewGRFs, so likely you need to implement some part of NewGRF at the GPU.
3. Once you did that, you'll likely run into performance problems. The current code is highly tuned to run a lot of vehicles smoothly. A JIT interpreter with automagic garbage collection like what's below C# is going to have a hard time keeping that performance.

So good luck porting, you'll need it.
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 7 guests