Giter Club home page Giter Club logo

Comments (15)

lockheed avatar lockheed commented on May 22, 2024 1

Here's a savegame: https://file.io/KkVsW1hGnenx

Steps to replicate the issue:
Take the 9-shooter Alien Plane and station it around 023-068. In a turn or two, a bunch of fighters will approach. AP can one-shot each of them, but because it fires so fast, it will waste 2 shots per kill.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Hello, could you please attach your saved game file? E.g. auto save file is SAVE10.DTA.

from max.

lockheed avatar lockheed commented on May 22, 2024

It happens with every game. You can start any custom game, get Assault Gun as a starting vehicle and when an enemy scout approaches in the first rounds, AG will shoot twice at it at once, even though the first hit will destroy it. The bug affects units that shoot fast projectiles (Assault Guns and Tanks (including Alien), Fighters, Artillery, etc) but not for units shooting missiles (Missile Launcher/Crawler, Rocket Launcher, Corvette, etc). Missile-firing units pause until the projectile reaches target which I think is the reason they are not affected.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Will look into it, but with stock assault gun and scout the two shots are actually needed.

Standard assault gun has 18 attack power. Standard scout has 16 hit points and 4 armor. 1 shot from assault gun means 18 attack power - 4 armor = 14 damage. 14 damage from 16 hit points = scout has 2 hit points remaining, hence second shot required.

Standard tanks have 16 attack power, cannot destroy standard scouts either in one shot.
Standard artillery turrets have 18 attack power.

Alien units have 20+ attack power, they should be able to one shot standard scouts... will make a test game setup.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

SAVE10.ZIP

Made a hot seat test setup. Tested alien tank and alien assault gun versus stock scouts.

Commanding alien unit to attack scout killed scout in one shot.
Commanding scout to move into attack/scan range of alien unit resulted in reaction fire from alien unit killing scout in single shot.

Could you also try the given saved game just to be sure that hot seat and whatever else works the same way at your end?

from max.

lockheed avatar lockheed commented on May 22, 2024

I will make a save game. I notice it primarily with Alien vehicles, but then I am pretty sure I saw it also affecting some regular ones. It is most obvious when an alien attack plane (upgraded to, say, 4 shots) is approached by multiple enemies. It has more than enough power to one-shot each of them, but will only kill 2 as a result.
I will try to add a save game.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Thanks! This will help me a great deal.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

I have a good and a bad news. The good: with your help we identified an aspect of the fire order processing logic that is not determined based on events nor on time or frame rate. The game uses holy magic numbers to determine how many order processing cycles it should wait before it would progress the game logic state machine from bullet/missile is flying to the next order state which is enemy was hit so if not destroyed, lets fire again. The bad: this is not a bug, it is just bad design from the original authors and as such I need to come up with a better design for a feature that is already overly complicated to comprehend without documentation. And no, we have no documentation 😭

So the issue will be solved sooner or later, but it could take from one day to one month... we shall see.

from max.

lockheed avatar lockheed commented on May 22, 2024

Ah, as an MAX fan for over quarter of a century I am well aware of the curse that has befallen MAX after release - the lost source code, no documentation, main dev killing his daughter and rotting in prison. I am impressed you have been able to do so much already, and curious how have you been achieving it. Is it by decompiling and reverse engineering, or running the original MAX code in some kind of "VM" and manipulating all the input? Also, how do you know what the game is actually doing under the hood? Is it not a blackbox to you?

Anyway, when I run MAX in dosbox, it doesn't have that problem - probably because it is so slow in comparison. Perhaps slowing things down during shooting could be a temporary solution?

from max.

klei1984 avatar klei1984 commented on May 22, 2024

I reengineered the game. Took 4 years effort. You can find a blog post about the workflow including a 1 hour video here: https://klei1984.github.io/max/2022/04/29/Work-work.html

The entire source code is here in this GitHub repository. Its 4 MiB of C/C++ code. I also restored many debug features that Interplay had in the game in demo and internal test builds while they removed them from the retail versions. The MS-DOS architecture of the game had to be adapted to run on modern systems so there is no way to build the game for MS-DOS anymore.

from max.

lockheed avatar lockheed commented on May 22, 2024

Well, all I can say I'm beyond impressed. I did not think it was possible.
BTW, what country are you based in?

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Hungary.

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Eventually while I was trying to determine the accurate FPS independent timings to be used for the various attack types, I realized in one of the videos I recorded to compare original dosmax and portmax behaviors that portmax started the next attack without waiting out the attacked unit's status to change from exploding to whatever else. This directed me to a different root cause analysis. Eventually after a couple of hours of code digging I found the real root cause behind the issue.

I incorrectly placed an AND statement instead of an OR statement into a single conditional branch operation... a single byte error really 😞

Any ways. Problem is solved now. Attacks immediately returned to good old dosmax speed at 24 FPS fastest tick rate. I will commit the reimplementation issue correction soon.

from max.

lockheed avatar lockheed commented on May 22, 2024

Fantastic news! When do you predict the next version will be released?

from max.

klei1984 avatar klei1984 commented on May 22, 2024

Its not any time soon I am afraid :(
I have to make a working and compliant deb installer, then still have to fix a dozen reported issues, and I need to finish the multi byte UTF8 encoding related remaining issues.

If we cannot make the GitHub Actions builds run on linux, you could try out building the game from source code.
https://klei1984.github.io/max/build/

The fix is already up on the master git branch.

from max.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.