NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Patching MechCommander's "left arm bug" for fun and profit (mhloppy.com)
srean 2 minutes ago [-]
I have forever been confused by 'left' and 'right'. It takes me a few seconds of deliberate thinking to get it right.

So in one of my first piece of software that I wrote for real money I had two functions. One called create_scene_left(), the other called create_scene_rght().

I was very pleased with myself for sneaking in creating_a_scene, but the left and right versions did the opposite of what their names indicated. Users of the software had no problems, but I am sure it would confuse any maintainer.

It even took me an year to even realize that the names were wrong.

toast0 8 hours ago [-]
I wonder if the board game materials have rules or guidance about where equipment goes? I dunno how close the computer games stick to the board game materials though.
murderfs 8 hours ago [-]
The board game has extensive rules on mech design, but for weapons, it's just wherever they'll fit. Some of the built-in hardware has fixed locations: cockpit, life support, sensors go in the head; engines go in the center torso (with light and xtralight fusion engines spilling out into the side torsos as well), arm and hand actuators go in the arms, and hip, leg, and foot actuators go in the legs. You can see this in the critical slot section in a record sheet: https://i.redd.it/jt3p2f1v14gf1.jpeg

This one definitely deviates from tabletop: pretty much everything except the smallest weapons have an integral tonnage, and the weapons themselves don't line up directly with their tabletop versions.

The newer games tend to be absolutely consistent with the mech design rules in terms of what weapons are available, and their weights and sizes, such that board game designs are legal in the game (and usually the state you get the mechs in before you customize them), and customized mechs are legal board game designs. They tend to limit the customization by doing things like having mechs have predefined hardpoints that limit what types/sizes of guns can go where, because otherwise you just end up with every mech being identical, with maximum armor and the rest of the tonnage being spent on whatever happens to be the most optimal weapon.

efromvt 3 hours ago [-]
I wonder if all those different heavy shenanigans are just to get the hollander's gauss/hunchback autoconnon in the right torso by default.

(original Mechcommander is still the best of the series, even if mission 5 broke my soul for awhile).

20k 12 hours ago [-]
Oh man this was my biggest pet peeve with mechcommander as a kid, thanks for fixing it!
derac 12 hours ago [-]
This is cool, maybe "target left arm" implies that it's your left, when targetting them and you're facing each other. So, their right arm.
derac 12 hours ago [-]
Btw, I recently did my first patches with ghidra. Is there any way to avoid jumping into a code cave by shifting all the instructions up then updating any statements referring to those memory locations? Seems like it should be simple enoigh in theory, but I didn't find an implementation on a cursory search. Could probably code up a plugin pretty easily.
ACCount37 4 hours ago [-]
It's basically re-linking the executable. Way too easy to shoot foot - miss one reference and things break in a spectacular, or, worse, subtle fashion. Which means: you definitely need to know where all the references are and what they point to.

References are under no obligation to be presented in a sensible, decompiler-friendly way.

Which is why "jump out into the patch, jump back in" is such a staple of patching. The other way is the hard way, full of pitfalls and potential issues.

BobbyTables2 10 hours ago [-]
How can you be dead certain that all references are known in Ghidra?

Just non-disassembled function or unidentified struct would ruin your plans…

pkhuong 11 hours ago [-]
If you need a compact byte -> bit lookup table on x86, consider using the memory form of the bit test (BT) instruction.
golden-face 11 hours ago [-]
Great writeup! Vividly remember this being a thing especially in multiplayer. What was that janky match matching service, MSN something?

Also a really underrated game, the mechanics (line of sight over the horizon stuff) and isometric graphics were pretty cool for the time and it had a well developed story/campaign mode.

CincinnatiMan 2 hours ago [-]
Mplayer maybe?
5 hours ago [-]
Night_Thastus 10 hours ago [-]
Now let's see this working for Darkest Hours. ;)

(Assuming they didn't fix it themselves, it is a pretty big overhaul to MC1)

99% sure it should work fine for (Exodus and Turncoat), (X-Ray and DSC Raid), and (Xenocide and Bengal Lancers) since those are just custom campaigns.

Lovely stuff. Always a joy to see anything MechWarrior related end up here on HN.

blobbers 9 hours ago [-]
I never played this game! I didn't realize there was a RTS after Crescent Hawk's revenge. I'm looking at the MC2 source code now... it looks like there is a Linux port, meaning could probably get it working for Apple using Fable 5, AI haters, I will challenge you to a batchall.
iamacyborg 8 hours ago [-]
Dear god I loved this game when it came out. It was hard.
protocolture 7 hours ago [-]
I remember it taking me ages to complete the demo missions. And once I had, there being tons of replay value just in the demo missions.
iamacyborg 5 hours ago [-]
That damned Vulture in the base in the second demo mission was rough. I hit a serious wall in the campaign in Op1M5 when you had to defend the farm. It’s almost a shame that MC2 is so easy in comparison
efromvt 3 hours ago [-]
Op1M5 was scarring the first (dozen) time around! Thank you minelayers
iamacyborg 3 hours ago [-]
Yeah I had to go back to M3 to salvage the madcat before I was able to finally get past it
5 hours ago [-]
tangenter 11 hours ago [-]
I wish they would release MC1 source the way they did with MC2.
notrealyme123 6 hours ago [-]
A bit off topic, but a very nice niche YouTubers "SardonicSays" posted a great Retrospective about MechCommander yesterday.

https://www.youtube.com/watch?v=8CVvOWlfl1U

5 hours ago [-]
close04 7 hours ago [-]
It just hit me, in 2026, that MeshCommander [1] (the Intel AMT remote management tool) is probably a homage naming after MechCommander.

Came here excited that MeshCommander is maintained again.

[1] https://github.com/Ylianst/MeshCommander

protocolture 11 hours ago [-]
I really need to put some of these techniques to the test with Metal Fatigue.
tangenter 11 hours ago [-]
A rare gem to see someone talking about MF. I used to play lots of it with friends, our games would last for over 48 hours (we wouldn’t sleep). Different time.
protocolture 10 hours ago [-]
My games would last until whoever was hosting had the bug that kills the game due to having too many units, or running out of names for pilots.

And it was somehow still incredibly satisfying, even though there was probably just one bugger who went underground at the start and all the people who over invested in giant robots would have to play whack a mole to find him.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 14:05:50 GMT+0000 (Coordinated Universal Time) with Vercel.