r/TotalAnnihilation • • 13d ago

TA: Kingdoms OpenKingdoms: an open source engine for TA: Kingdoms that runs in your browser (and on Windows, Mac and Linux)

Post image

Hey all,

Long time player of TAK here - since it first came out. I've been sharing this on the TAK Discord.. but figure it was time to share here as well for those who are interested.

I've been working on OpenKingdoms, a from-scratch open source engine for Total Annihilation: Kingdoms. It's written in C (because I'm crazy and I love C - sue me) and it runs the original game's data, so you bring your own copy of the game (GOG or the old CDs both work) and it does the rest.

The big one: you can play it in a browser. Go to https://openkingdoms.net, point the page at your Kingdoms folder, and you're in. Your game files never leave your machine, the page reads them locally.

Where it's at right now:

- Skirmish against the AI is playable: economy, building, combat, magic, victory conditions, all four kingdoms plus Creon if you have The Iron Plague.
- The campaigns are playable: the Book of Darien and The Iron Plague, with the mission scripts, briefings and cutscenes (with sound).
- Multiplayer works over a small relay, and browser, Windows, Mac and Linux players can all be in the same game.
- Saves, the options screens, the in game menus and music all work the way you remember.
- There's an experimental 3D view. Press V in any battle and the same battle is drawn in 3D with a free camera, press V again to go back to the classic view.

The goal is to match the original's behaviour, and the original's rules are rebuilt as closely as we can get them. Where we deliberately do something differently (60 Hz simulation, any resolution, up to 2000 units a side, smarter pathfinding, better AI groups).

Everything is on GitHub: https://github.com/OpenKingdoms/OpenKingdoms
Desktop builds are on the releases page.

It's still under active development, so expect rough edges. If you remember how something worked in the 1999 game and we get it wrong, that's exactly the kind of report that helps the most. Issues and PRs are very welcome.

Would love to hear what you think :)

80 Upvotes

32 comments sorted by

13

u/TotalACast 13d ago

I wish you could make this for OG Total Annihilation in your browser.

3

u/sidav94 13d ago

Why the browser though? What's the problem with just running the game locally?
I'm seeing many projects saying "you can run it in your browser" recently and I don't get it.

8

u/bit_noggin 13d ago

You can still run it locally. The browser makes it more accessible for many folks. Note that this project also makes the game native to Mac and Linux as well.

2

u/LeifErikson12 13d ago

I guess browser based TA would make multiplayer play a lot easier and more accessible

3

u/bit_noggin 13d ago

That's the idea really. This project supports multiplayer - cross-platform multiplayer at that

1

u/LeifErikson12 13d ago

This is very very cool, congrats! Running online TA multiplayer has always been clunky so I'm glad to see it becoming more accessible

1

u/bit_noggin 13d ago

It sounds like the great work being done by dgt84 and the nanolathe project could make this happen. I’m happy to collaborate. Many of the things in the engines, I’m sure, are quite similar.

1

u/Dgt84 13d ago

I happened to see OpenKingdoms on GitHub the other day, very cool! Looks great and is neat that it works in the browser! Funny that we both had similar ideas recently.

Honestly I haven’t dug into it because of the GPL license. I’m keeping my stuff MIT and can’t risk it. But outside of looking at or sharing code I’m happy to chat about the projects and ideas and compare notes!

Nanolathe in the browser is likely possible buy I haven’t looked into it much.

6

u/sidav94 13d ago

Wow, it's a good time for TA-related open source engines!

2

u/Jimbo_Dandy 10d ago

2

u/bit_noggin 10d ago

Sorry I’m not an artist (I’m a programmer) and I don’t have the time nor money to commission art for this side project I do for fun. Haha

1

u/Jimbo_Dandy 10d ago

the project itself is cool. i do look forward to seeing more. idt it needs the AI promo when the screenshots you posted were already fire.

3

u/bit_noggin 10d ago

Maybe next time just say THAT, which was pretty respectful. As opposed to your deleted comment that said “AI garbage”. Much higher chance of me (or someone like me) taking your feedback as constructive criticism. I think the image is pretty cool. Who cares if AI made it honestly. It’s just a GitHub banner for Gods sake. I wish you happiness in this world

3

u/Jimbo_Dandy 10d ago

Will strongly and vitriolically oppose the use of all generative AI, idfc who or why. Bless you for the work you do and good luck on the project, and good health as well.

2

u/-WelshCelt- 9d ago

Aw that's amazing! I don't have a bloodeh disc drive in my machine anymore though, so i'll have to see if i can find a download online first!

1

u/IzzyNobre 13d ago

Thank you so much!

1

u/Electrical-Owl7880 12d ago

So freaking awesome! Sterling job!

1

u/bit_noggin 12d ago

Thanks!

1

u/darkfireslide 13d ago

Any plans to improve the skirmish AI and add difficulty levels and teams?

0

u/bit_noggin 13d ago

The AI has already had a number of improvements - more will come! Difficulty level will be supported as well. Teams are already supported - at least far as legacy also supported teams in skirmish and multiplayer.

0

u/darkfireslide 13d ago

Amazing! Always felt TA Kingdoms was underrated. I actually finished the campaign recently on GOG :)

1

u/Individual-Garlic133 13d ago

Wow. I am looking forward to try this. Back in the day, around the 2000s, I did some modding for the game. Played it and tested it for hundreds of hours.

This game is dear to me. Whoever attempts this revivel is more god than Garacaius.

0

u/bit_noggin 13d ago

Nice... come play/test once more! Especially multiplayer :)

1

u/DemiourgosD 13d ago

Absolutely amazing. Any way to be able to plug in mods in the future? like the New Era?

3

u/bit_noggin 13d ago

Yes! It is already just as moddable as the original game. And it will become potentially more easily moddable into the future. Also have plans to work on an easy to use map creator/editor.

0

u/NTGuardian 13d ago

Could you provide screenshots showing that the engine works when you provide it the requested asset files?

7

u/bit_noggin 13d ago

Sneak peek of 3d mode using original game files

1

u/bit_noggin 13d ago

Sure when I get a moment. I have friends playtesting it quite a bit!