Close
0%
0%

Mechwarrior 4 Simulator Cockpit Panel

I'm building a cockpit panel for the 2002 Battlemech simulator game Mechwarrior 4: Mercenaries.

Similar projects worth following
Inspired by the DIY A-10 Simulator Cockpit by the Warthog Project, I'm building a small but all-inclusive cockpit panel for Mechwarrior 4. I use a lasercut front panel with tons of interface elements in front of an old LCD computer monitor. The screen's UI is programmed with OpenFrameworks and gets the necessary ingame data by reading out the Memory.
The design is not based on anything from the Battletech / Mechwarrior universe.

Please head over to the Warthog Project for a more in-depth description of the techniques I use to build this cockpit panel.

Files for OpenFrameworks.zip

x-zip-compressed - 1.59 MB - 06/26/2022 at 21:18

Download

MechwarriorPanelA05.ino

ino - 5.15 kB - 06/26/2022 at 20:31

Download

Mechwarrior Interface Panels Export A01.ai

postscript - 1.09 MB - 06/26/2022 at 20:29

Download

Mechwarrior Interface Panels Export A01 Kopie.pdf

Adobe Portable Document Format - 1.09 MB - 06/26/2022 at 20:29

Preview

Mechwarrior Interface Case Export A01 Kopie.pdf

Adobe Portable Document Format - 333.72 kB - 06/26/2022 at 20:29

Preview

View all 6 files

  • Wiring

    Joris Wegner06/26/2022 at 19:42 1 comment

    It's terrible, but it works!

  • Coding stuff

    Joris Wegner03/03/2022 at 20:36 0 comments

    The interface work has been completed so far, just a detail shot of what it looks like up close.


  • Everything seems to work well so far

    Joris Wegner03/03/2022 at 20:34 1 comment

    I'm quite happy with the result! The backlighting effect looks nice, everything fits well. The next step is to work on the wooden enclosure.

    I might try adding a layer of clearcoat. Maybe it helps to hide the scorch marks from the engraving, since the don't wash off completely.

  • Engraving

    Joris Wegner03/03/2022 at 20:30 0 comments

    I engraved the outlines of the modules on a board and carefully aligned the modules to match before engraving the text layer. Some of the engraving is a bit off, I don't know why. I think it's good enough for me though.
    I had to make a jig for the small buttons since they got blown away by the laser cutter's compressor.

  • Painting

    Joris Wegner03/03/2022 at 20:25 0 comments

    I sanded the white acrylic parts with 600 grit sandpaper and painted them twice with black acrylic spraypaint. I also prepared some circuit boards for mounting buttons later.


  • Lasercutting the panels

    Joris Wegner03/03/2022 at 20:19 0 comments

    Just like the Warthog project, I use 3 mm black acrylic as a base for modules that holds LEDs, switches and buttons in place. a sandwich from one 2 mm and one 3 mm white translucent acrylic sheet is used on top of that to diffuse the LEDs and will be painted and engraved later. Everything is held together with M3 standoffs.


    A couple shallow holes have to be drilled into the 3 mm white acrylic to make the LEDs fit flush into their mounting holes.

  • Cockpit Panel Mockup

    Joris Wegner02/03/2022 at 00:53 0 comments

    A quick Photoshop mockup of what it will roughly look like. I already spotted some stuff that I changed in the meantime.

  • Making the UI

    Joris Wegner01/30/2022 at 02:02 0 comments

    I didn't find an easy way of extracting the data that I needed for the interface from the game. It's not like there is a nice software interface like some flightsims have and apparently Mechwarrior 4 is a nightmare to mod. The crew that made the MekPaks seem to have had access to some tools that are not publically available. So I bit the bullet and used Cheatengine to find the memory addresses where the game's variables are stored. It took weeks. Parameters like "Speed" or "Engine heat" were relatively easy to find but other stuff was a nightmare. I extracted dozens of parameters and some are still missing.

    I have no idea how to get the firing groups and the radar content due to the way Cheatengine works. Especially the latter is really sad since it is such an important UI element. So if anyone has an idea, please hit me up. I'm continuing with the build anyway.

    With all the memory addresses available, I was able to write an OpenFrameworks sketch that accesses them and displays their content on a custom graphic interface.

  • Reasons

    Joris Wegner01/30/2022 at 01:53 0 comments

    MW4: Mercenaries is a game I loved to play in my youth and has aged really well in my opinion, especially the modded MekTek MekPak version that used to be available for free - and should still be available after a quick search.

    I became obsessed with building a custom UI for the game and don't really know why. I thought that a nice-looking panel with some buttons connected to an arduino would be some work but trivial in the end. So I decided to include an LCD display with a custom interface to give feedback from the game. I prepared a pixel-accurate mockup of what the interface will look like. Instead of the regular green seen in the game, I wanted an amber/yellow color scheme inspired by the turret interfaces in the Alien movie sequel. Since I couldn't find a font that matches the inspiration, I made my own. I will probably make it available as part of the project.

    The layout should be flexible enough for other Mechwarrior games. Since I don't like competetive online games and don't want to support games that seem to rely on the modding community to make them work, I never upgraded to MWO or MW5 - but I might change my mind.

View all 9 project logs

Enjoy this project?

Share

Discussions

Victor Rodrigue wrote 09/23/2023 at 12:59 point

Hi Some Guy.

I was able to limp and get Openframeworks and Visual Studio (I think) playing together.  I am following your directions, but am not sure what you mean on step #5.  Where or what is "of_vXXX_vsXXXX"?

  Are you sure? yes | no

Some Guy wrote 09/18/2023 at 05:04 point

Any advice for compiling the code (or can you provide a precompiled binary)?

I tried installing the OpenFrameworks library in Visual Studio / VS Code, but I didn't have much luck with that.

Awesome project, by the way. I was also thinking about reading memory values for this game, so I'm happy to see that somebody has already done the hard work for this.

EDIT: I was able to get it to compile, using some AI-generated instructions to help me out (included below in case they're helpful to anybody).

However, it looks like the application doesn't work for me because my MW4: Mercenaries executable is a different version, thus it has different memory addresses.

My version of the executable has the MekTek patches applied. Are you running with the MekTek patches, or using the stock retail version?

My executable's SHA256 hash is 72BBB1BA3E5E5E7DC7607CA403F3D9ACA301D0B16814A6B577BDA7EC5C922B41

(you can check your hash in PowerShell like this: Get-FileHash -Path "MW4Mercs.exe" -Algorithm SHA256 ). I'm trying to identify which version of the game I need to use to run your program (or maybe edit the source code to use the correct addresses for my build).

Compiling Instructions:

1. **Download OpenFrameworks**: Visit the [official OpenFrameworks download page](https://openframeworks.cc/download/) and get the Windows Visual Studio version.
    
2. **Unzip**: Extract the downloaded zip file to a location of your choice. Ideally, you should avoid locations with spaces in the path. (e.g., `C:\of_vXXX_vsXXXX`)
    
3. **Project Generator**: OpenFrameworks comes with a project generator. Locate it in the `projectGenerator` folder within your OpenFrameworks installation directory. Run `projectGenerator.exe`.
    
4. **Generate Project**: In the Project Generator, set the OF path to where you unzipped OpenFrameworks. Choose or create a folder for your project, and select the appropriate add-ons if needed. Click on "Generate Project".
    
5. **Compile Dependencies**: Before building your project, you may need to compile OpenFrameworks' libraries. Navigate to `of_vXXX_vsXXXX\libs\openFrameworksCompiled\project\vs\` and open `openFrameworksLib.sln` in Visual Studio. Build the solution.
    
6. **Build Your Project**: Open the `.sln` file generated by the Project Generator. Set the solution platform to `x64` (or whatever is suitable for your machine) and then build your project.
   


  Are you sure? yes | no

leonhulsebos wrote 05/08/2023 at 12:44 point

What is the font that u are using for the GUI???

  Are you sure? yes | no

Joris Wegner wrote 07/19/2023 at 20:56 point

It's Sentry Bold, I made it myself. It's in the "Files for OpenFrameworks" zip

  Are you sure? yes | no

RunnerPack wrote 08/05/2022 at 19:47 point

Idea: optical buttons, scanned by lighting sections of the screen in turn, which - when pressed - reflect light into a common light sensor.  With the addition of optical fibers or light pipes, a single analog input (or digital input with external comparator) could read a dozen or more buttons!

You could even take advantage of colored pixels and use color filters on the sensor(s) for things like sliders and rotary controls.

  Are you sure? yes | no

RunnerPack wrote 08/05/2022 at 19:36 point

With a little distressing, this would look epic!

  Are you sure? yes | no

XavierHale wrote 07/23/2022 at 22:16 point

Awesome project! Been playing MW4 for a couple years, would be great to have something like this! Couple of questions, how did you get MW4 to pipe out data for the displays, Leds and such? It would be cool to have like one of those rotating warning lights whenever I go damage critical. And did you use a bunch of small displays or one big one across the back?

  Are you sure? yes | no

Joris Wegner wrote 07/24/2022 at 19:19 point

Thanks! MW4 doesn't supply any data. I used Cheatengine to find the variables in the memory, which was a terrible idea. But you can find the addresses for the player HP in the openFrameworks code that I attached to this project.
I used a single 19" (?) screen in the back.

  Are you sure? yes | no

Tom Nardi wrote 07/08/2022 at 03:33 point

Absolutely phenomenal. I suppose the only real issue with this approach is a relatively limited viewing angle?

  Are you sure? yes | no

Joris Wegner wrote 07/09/2022 at 12:33 point

It's not that bad actually, but I will add some sort of stand later to have it sloped when put on a desk.

  Are you sure? yes | no

Max.K wrote 07/06/2022 at 18:46 point

This is beautiful! I really like the amber color scheme. Looks like a prop from a movie set.

  Are you sure? yes | no

bfsmith07 wrote 07/06/2022 at 18:01 point

It was amazingly epic.  I still have the original CD-ROM somewhere.  If I can find it I'll rip the music tracks, might even be fun to add vintage audio affects to your interface with a Sparkfun MP3 trigger board.  They were tracked to the CD just like a regular old music CD.

  Are you sure? yes | no

Joris Wegner wrote 07/09/2022 at 12:38 point

I wouldn't add the FXs themselves since they can be heard ingame. I might add a beeper for alarms though if I added connectivity between the desktop software and the Arduino. I'd mainly do that for letting the display flicker after a PPC hit though. :D

  Are you sure? yes | no

CircuitBurner wrote 07/06/2022 at 17:54 point

oh wow, what memories.

I played that game so much it was ingrained into my chromosomes.

Excellent, so awesome.

  Are you sure? yes | no

bfsmith07 wrote 07/06/2022 at 16:31 point

Dude! Super cool!  Last time I played Mech Warrior was in 1996 on a first-gen 66 MHz Pentium, didn't realize there had been many more versions since I looked at your project.  Keep up the good work, it looks awesome!

  Are you sure? yes | no

CircuitBurner wrote 07/06/2022 at 17:56 point

yea!

Another living netmech player.

Mechwarrior 2 will forever be noteworthy for its quality production. 

Music was epic.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates