r/masteroforion • u/Pyriold • 2d ago
Tribute to Master of Orion II: Starlord
And here is another Master of Orion II redone, this time as a browser game:

https://apps.futuremagic.de/starlord/
I also used AI to make this. To be as faithfull as possible, the original got recompiled and examined for formulas. Its also open source: https://github.com/ArndRosemeier/StarLord
Comments are welcome here, there is also a contact button.
6
u/Kosh_Ascadian 1d ago
This looks surprisingly good for an AI powered remake. There's some UI and logic issues, but nothing that can't be worked out.
Out of interest (I'm a gamedev too) if its ok to ask a few things:
How long did you spend making this?
How much of it is your specific design decisions (UI etc wise) and how much is just having Claude figure out what "Make MOO2, but modern and in the browser" means? Like any random UI like for instance when you have a colony open, who figured out hiw to display stuff etc?
Ship and star system graphics look pretty good, how were those created?
A lot of questions because I'm an oldschool gamedev with a long career behind just trying to keep up to date on how people are making things now.
5
u/Pyriold 1d ago
About 20 hours of non stop vibing, including recompiling the old .exe. UI is mostly claude with input from me (my own UIs look ugly. Not my strength. I only realized how bad i am once i started vibe coding :)). I gave claude access to openrouter, told it which models to use. The races were made outside claude with mostly my own prompts. Click on what's new to have a decent history of what was done (from a certain point on).
3
u/Kosh_Ascadian 1d ago
Huh. 20 hours is absolutely wild... but I quess if it can decompile the formulas from the original and the content and balance is also from MOO2 then it becomes possible. I read the whats new to get an approximate timeline, wild stuff.
Cool, thank you for the info!
4
u/Desperate-Stress8701 1d ago
Looks pretty cool. Unfortunately building freighter fleets doesn't change the number of freighters you actually have which essentially makes the game unplayable.
I gave it a quick look. My intuition is that the underlying code for building freighters should be the same as that for building spies since both result in a planet independent quantity increasing. The code for building spies seems to be in turn.ts in the completeProject function at line 981 through 1015. I don't see anything involving freighters there which makes me think that the way to fix it would be to simply add a case for freighter.
Also unrelated but why are you doing += 1 instead of ++? To my knowledge the later has <= runtime to the former depending on how the compiler is written.
3
u/Pyriold 1d ago
I immediately set my agent to it. Won't pretend to have fixed this alone. Here is its reply:
Thanks a lot for playing and for digging into the code, you were spot on!
Freighter Fleets really did nothing. A recent refactor of the code that places colony bases rewrote that
switchincompleteProjectand accidentally dropped three cases: Freighter Fleet, Terraforming and Gaia Transformation. So all three ate production without any effect, which as you said makes food logistics (and the game) pretty much unplayable. They're back now, together with a test that builds every project and checks it actually does something, so this can't silently break again. The fix is in the next build on the site.About
+= 1vs++: in JavaScript it makes no difference. V8 and the other engines compile both to the same bytecode and machine code. The "++ can be faster" advice comes from C++, wherei++on an iterator object may create a copy; for plain numbers in JS it's purely style, and+= 1is just the convention in this codebase.Thanks again, reports like this are exactly what helps. If you run into anything else, I'd love to hear it!
The fix is in and i deployed. Might need ctrl-F5 to not get a stale cached version.
1
u/Desperate-Stress8701 1d ago
Gave it a test and freighters seem to work. Also, what about ground defenses? Do they work properly? I'm too busy to look at the code but they're reminiscent of terraforming since they're a building that (presumably) changes data about a planet so I'd assume they'd need to be put in the same function.
That sounds hallucinated. I've done some coding in C/++ and never ran into it although it could be true for a few extremly badly coded data structure. The convention mostly comes from how the gcc compiler worked before optimization (i++ was variable size in bits/2 times faster than i +=1 due to how the code was translated into asembly language). I doubt theres any language coded after 2010 where this is problem although it is interesting since I never see this convention before in any codebase.
Also do you want to have repeat build coded in the game? If you want I can add that when I have time to look at it (1-3 weeks)
1
u/Pyriold 1d ago
Thanks a lot for the suggestion. For me it's quite easy to get this feature in, because it's vibe coded. Opus 5.5 really is a quantum leap there, almost never hallucinates and is very dilligent (although some of the vibe coding problems have to be guarded against still, more on that if you are interested). So, i let it do the work. Here is my agents response.
Glad freighters work for you now!
Good instinct on ground defenses, so I checked every building, not just those. Buildings work differently from projects: a finished building just goes onto the colony's building list, and the economy, ground combat and space combat read their effects from there. That path was fine. I still added tests that build every building through the production queue and check it really does something: barracks add troops, missile bases, ground batteries and stations make the planet stronger in battle, and fighter garrisons and planetary shields join its defense. If one ever breaks again, the tests catch it.
On
++: fair point, and thanks for the history. I'd never really bought that one either. Modern compilers and JS engines turn both into exactly the same thing, so it's purely style.Repeat build: thanks a lot for offering! Your suggestion made me look, and since the original had it, I went ahead and added it right away. There's now a ⟳ button on ships and projects in the production queue. The item keeps getting built until you remove it or the rules stop allowing another (a second portal, say, or terraforming past the best climate). It's in the next build.
I deployed that build already.
3
1
0
u/hey_how_you_doing 2d ago edited 1d ago
Its fascinating and soulless, as many things are with AI. In this case the "soulless" wins out, since the UI still sucks.
EDIT: Also there are some yanky problems with the performance. On a very powerful rig the interface freezes for 500ms whenever I open a system. Most likely the threading is bad and the graphics is loaded on the UI thread, or something.
I hope you actually polish it, and not immediately abandon it because it didnt go viral.
2
u/Pyriold 1d ago
things like the 500ms are probably shaders compiling, which under webgl NEEDS to be on the thread that uses them. Sucks. Or its loading something. In any case, the 500ms should only happen once per item. If you can quantify "soulless" i could work on it. You can check "what's new" to see the dev history of this. Just solo without feedback so far, so bear this in mind.
1
u/hey_how_you_doing 23h ago
The single thing that put me off the most: On the race selection screen, when you select different races, the height of the race description area differs. So for every selection, the height offset makes the selection area of the races jump up and down.
Obviously this is a tiny thing that can be fixed in a few minutes. But it really gives the impression that you haven't done any proper QA testing. Projects like these require a lot of polish and QA testing before it actually feels good to play them. As I said in my first comment, I really hope you continue to work on this project. It will require dozens, if not hundreds, of small improvements before it actually feels good, and discovering all these things cant yet be done fully by AI. But if you put in the work, it could become great.
1
u/Pyriold 13h ago
Slow down there cowboy. This is a SOLO INDY project, free of charge, open source. I still take criticism to heart, but nobody pays me. So please keep that in mind before you badmouth me. And it already has LOTS of improvements since we last spoke (check what's new). So... yea, i don't have proper QA-testing. Because this is a one man job. That's why i post this here asking for comments. Which you gave. Just a bit condescending.
1
-1
u/IKoshelev 2d ago
5 years ago this would mean something, but these days there's too much of this kind of stuff coming out every day to care 😕.
1
u/Mravac_Kid 1d ago
Feel free to point out any other MOO2 clones/remakes/reimaginings, because I'm aware of exactly one other, AI or not. :)
-1
10
u/JonDM2 1d ago
You lost me at "browser"