klei1984 / max Goto Github PK
View Code? Open in Web Editor NEWM.A.X. Port
Home Page: https://klei1984.github.io/max/
License: MIT License
M.A.X. Port
Home Page: https://klei1984.github.io/max/
License: MIT License
SR is a framework that to statically recompile following games to create Windows or Linux (x86 or arm) versions of the games. It already support some DOS/Windows games and features plugins to improve specifc aspects of the game (e.g. music).
I wonder if this could be used to improve this port.
It looks like there is an M.A.X demo that can be freely (and probably legally) downloaded to test this port. Is there any plans to support it?
Hi!
First of all, amazing work! Really exciting project, I love this game, used to play it a lot (and in case your github username is your birth date -- love for this game might be a generation thing lol!).
As a matter of fact, I started very similar project just a few days ago. Same game. Seems like exactly the same binary. Good thing I found your project so I don't do duplicate work (well, I guess, now I need another game to reverse engineer).
This document is truly a gold mine. In my one week attempt I used rather crude approach where I would open binary with Ghidra and just try to tag as many things as possible manually.
Analyzing through functions like __wcpp_2_dtor_array_store__
was as exciting as you can guess (I was too lazy or too dumb to look for the matching compiler version lol). C pseudocode given by Ghidra helps, though. Spent like a whole yesterday on it 😅
(I'm still kind of proud I was able to decipher logic behind __wcpp_2_dtor_array_store__
just from looking at the assembly / decompiled code; I called it vec_deallocate
, but hey, close enough!).
Well, anyways, good luck, and, again, amazing work you've done so far!
I used to play hotseat games in coop vs AI with my buddies. Now that we're spread out geographically we'd like to do it through the internet for nostalgia's sake, but M.A.X. doesn't support adding AI players to network games.
I'm thinking that perhaps, since you're rewriting whole swathes of the code anyways, allowing this in some basic form wouldn't be a big hassle (even if say, you have to parameterize the game through a config file or command line arguments to avoid having to modify the GUI).
Along the same lines, unless there's some hard technical limitation, it would be nice to uncap the number of players so we can play 4 humans vs 4 AI, and so on.
Good luck with your project, it's always nice to see more love for M.A.X !
hi,
Just wanted to ask how did you obtain symbols for the mve library? Basically I want to reverse-engineer mve library from other dos game: redneck rampage rides again. Thanks
Windows
v0.7.0 und davor
No response
Hallo,
bei mir steht andauern ein Infiltrator auf dem Wasser ohne Platte/Boden.
Und wenn ein Gebäude 262 hits points erreicht, reduziert jede zweite runde der hits point auf 1.
Wenn eine einheit auf einer Wasserplattform/Brücke steht und dieser abgeschossen wird und ein Transportflugzeug drüber steht, plaziert er immer wieder neue Einheiten auf der gleichen stelle, also auf dem Wasser, manchmal 20 Transporter an der geleichen Stelle.
Der Fehler kommt nur bei Custom Game mit Max Port vor.
No response
Linux
v0.6.1
1.04
When starting MAX, there is the MAX-logo screen that fades in, then out. This animation should take about 1 second, but the fading in/out process is extremely slow and takes about 15-30 seconds each. The same thing happens on every fade in/out animation in game, for example when going from the Main Menu to Load Game menu.
System: Arch Linux, KDE
Hardware: ThinkPad T480s i5, Intel GPU.
Circumstances:
It ALWAYS happens if I connect laptop to the docking station and start the game on my external screen 2560x1440.
It NEVER happens when I run it on the same laptop but on built-in screen (1920 x 1080) without using the docking station.
It NEVER happens when running the game inside a Windows 10 VM in resolution of 2560x1440 (different host with NVIDIA RTX GPU passed-through to Windows).
No response
In case you are not aware of it, there is a reimplementation of this game called Mechanized Assault & eXploration Reloaded. Perhaps it could be useful for this port?
Windows
v0.6.1
1.04
The game works so fast that when a vehicle reacts to/attacks an enemy, it fires twice instead of once even if the first projectile destroys the enemy. This causes one-shot kills cost two shots (the second one wasted) and additional lost move.
Apart from that - I have discovered your port just today. I have been playing this game on-off since 1997/98 and yours is the first thing that made any (and huge) improvement to MAX single player gameplay: works very fast in late turns, no more random crashing and wide screen!!!
I am so blown away and thankful for it!!!
Windows
6.1.0 7th March 2024
1.04
This is an old MAX bug, not sure if you can do anything about it.
If you tell Engineer to build a Connectors (or a Water Platform, or a Turret, etc), and the game state is fairly advanced (i.e. you already built up your base quite a bit) in about 20-40% of cases, instead of building what you tell it to build, it will build a Water Platform (or whatever you have been building the most of recently). Unless you check on what it is building immediately after starting, you can't be sure he will build what you told it. For example, if you tell it to build a line of WPs, and leave him to it, in 10 rounds you come back and find out it build a line of Connectors.
No response
Windows
M.A.X. Port v0.2.0
Modifier keys like shift, alt, ctrl tend to stick.
For example press ALT in the Main Menu. As soon as ALT is pressed once other keys stop responding. E.g. press S in the Main Menu next which should open the Setup screen which will not trigger. Pressing a valid shortcut like ALT+C to save a screen shot recovers the wrong modifier state usually. But ALT+TAB could also trigger the issue.
No response
Linux
Latest git
No response
I attach a game that crashes inevitably at the end of this turn. Savegame attached.
Would you be able to identify the cause?
SAVE6.DTA.zip
No response
Linux
0.6.1
1.04 on Ubuntu 23.10
Hi @klei1984 ,
First thanks for you great work, it looks very promising! I just managed to launch M.A.X. and start a new game. I'm looking forward to playing the game again after so many years without crashing in round 1xx :) I really admire your endurance and energy you put into this project!
However I had some problems for launching the game, so I decided to open an Issue for sharing my problems and solutions.
I first tried to run M.A.X. Port on Ubuntu 20.04, but when launching the executable, it was complaining about missing libraries. Not all were in the official repositories, so I manually installed a few ones. But I gave up after some time, as I didn't see an end.
Then I decided to upgrade to Ubuntu 23.10, as I saw in the build instructions that you used this version.
However this didn't work either. I got this error:
./max: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
While searching for a solution, I found this post:
libiconv is included in the libc6 package as a GNU standard C library.
But I have libc6 installed:
sudo dpkg -s libc6
Package: libc6
Status: install ok installed
My solution is to build the required version and add it to the path using an environment variable:
tar -xzf libiconv-1.17.tar.gz
cd libiconv-1.17
./configure --prefix=/usr/local/libiconv
make
export LD_LIBRARY_PATH=/my_path/libiconv-1.17/lib/.libs/
cd max_install_dir
./max
This is for testing, I know that I can also install it to the system using sudo make install
.
How did you setup your libiconv library?
Is there an easy way to install all the required dependencies ? It would be nice if M.A.X. Port could also run on Ubuntu versions, e.g. LTS, that are different from your environment. This would also avoid that other users run into similar problems.
I also had difficulties installing the deb package. For me it is not clear how to install it into the same folder than the M.A.X. installation. Finally I opened the deb file using my archive manager and extracted the files. Is this the right approach ?
If something is not clear, I will try to supply further information.
No response
Windows
website github.io
native msys32 build
your main github.io page does not link to the actual download repo (this)
No response
Linux
No response
I read that HD version is ready. This is important step. Thank you!
Looks perfect. Great job! :
[GRAPHICS_SETTINGS]
screen_mode=2
scale_quality=1
window_width=1920
window_height=1080
That what I mean before that M.A.X. doesn't need new graphics. Just M.A.X. need show game in modern resolutions. In that mode we don't need zoom out
Even better:
[GRAPHICS_SETTINGS]
screen_mode=2
scale_quality=1
window_width=2560
window_height=1440
Not working:
[GRAPHICS_SETTINGS]
screen_mode=2
scale_quality=1
window_width=3840
window_height=2160
Takes infinite to see main menu when open app. And multiple "not responding":
scale_quality=1 or 2 is better? what difference?
scale_quality:
0 - Nearest neighbor (crisp, looks good on CRT monitors)
1 - Linear interpolation (smoother, aliasing artifacts are not that visible)
2 - Best (whatever that is in SDL2)
SDL2 seems works with Vulkan
Linux
latest
builded maxrun like here https://klei1984.github.io/max/build/ today, but it doesn't run not from terminal, not direct. also got errors in build
[ 86%] Building CXX object CMakeFiles/maxrun.dir/src/paths.cpp.o
/home/usr0/max/src/screendump.cpp: In function ‘int screendump_pcx(int, int, unsigned char*, unsigned char*)’:
/home/usr0/max/src/screendump.cpp:61:30: warning: ‘MAX’ directive writing 3 bytes into a region of size between 1 and 4096 [-Wformat-overflow=]
61 | sprintf(filename, "%sMAX%4.4i.PCX", ResourceManager_FilePathGameInstall, file_index);
| ^~~
/home/usr0/max/src/screendump.cpp:61:16: note: ‘sprintf’ output between 12 and 4114 bytes into a destination of size 4096
61 | sprintf(filename, "%sMAX%4.4i.PCX", ResourceManager_FilePathGameInstall, file_index);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 87%] Building CXX object CMakeFiles/maxrun.dir/src/threatmap.cpp.o
[ 88%] Building CXX object CMakeFiles/maxrun.dir/src/main.cpp.o
[ 89%] Building CXX object CMakeFiles/maxrun.dir/src/aiattack.cpp.o
[ 89%] Building CXX object CMakeFiles/maxrun.dir/src/adjustrequest.cpp.o
[ 89%] Building CXX object CMakeFiles/maxrun.dir/src/terrainmap.cpp.o
/home/usr0/max/src/inifile.cpp: In member function ‘void IniSettings::Init()’:
/home/usr0/max/src/inifile.cpp:245:25: warning: format not a string literal and no format arguments [-Wformat-security]
245 | fprintf(fp, format_string);
| ^~~~~~~~~~~~~
/home/usr0/max/src/gamesetupmenu.cpp: In member function ‘void GameSetupMenu::LoadMissionDescription()’:
/home/usr0/max/src/gamesetupmenu.cpp:343:25: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 100 [-Wformat-overflow=]
343 | sprintf(file_name, "%sdescr%i.%s", ResourceManager_FilePathText, game_file_number,
| ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/usr0/max/src/gamesetupmenu.cpp:343:12: note: ‘sprintf’ output 8 or more bytes (assuming 4103) into a destination of size 100
343 | sprintf(file_name, "%sdescr%i.%s", ResourceManager_FilePathText, game_file_number,
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344 | SaveLoadMenu_SaveFileTypes[game_file_type]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/usr0/max/src/textfile.cpp: In member function ‘void TextItem::FatalError(const char*)’:
/home/usr0/max/src/textfile.cpp:44:12: warning: format not a string literal and no format arguments [-Wformat-security]
44 | SDL_Log(string.GetCStr());
| ~~~~~~~^~~~~~~~~~~~~~~~~~
/home/usr0/max/src/textfile.cpp: In member function ‘void SmartTextfileReader::FatalError(const char*, ...)’:
/home/usr0/max/src/textfile.cpp:593:12: warning: format not a string literal and no format arguments [-Wformat-security]
593 | SDL_Log(message.GetCStr());
| ~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/usr0/max/src/game_manager.cpp: In function ‘void GameManager_MenuClickChatGoalButton()’:
/home/usr0/max/src/game_manager.cpp:3831:31: warning: ‘descr’ directive writing 5 bytes into a region of size between 1 and 4096 [-Wformat-overflow=]
3831 | sprintf(file_path, "%sdescr%i.%s", ResourceManager_FilePathText, GameManager_GameFileNumber,
| ^~~~~
/home/usr0/max/src/game_manager.cpp:3831:16: note: ‘sprintf’ output 8 or more bytes (assuming 4103) into a destination of size 4096
3831 | sprintf(file_path, "%sdescr%i.%s", ResourceManager_FilePathText, GameManager_GameFileNumber,
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3832 | SaveLoadMenu_SaveFileTypes[game_file_type]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 90%] Linking CXX executable maxrun
[100%] Built target maxrun
Ubuntu 22.04.01
Maybe it's good to publish latest build release
Hey! Nice to meet you. We have a MAX Community
Please join if you are interested!
The current link to the binaries https://github.com/klei1984/max/blob/master/x is somewhat dead :-).
So when your mouse pointer is moving close to the border of the game it often ends outside of the game.
I'm like 2-3 cm from the border distanced, but than it will leave the MAX window.
Linux
Latest git-built
No response
I just noticed a weird but I've never seen before. I was flying around a 2-plane group (AP + AWACs) and noticed they did not lose speed points. I circled a map with them and they did not lose a single speed point. I then saved the game (attached). After that, they kept the unlimited movement for about 50 grids, and only then it started to run out - perhaps the game-saving action caused the bug to run out).
SAVE9.DTA.zip
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.