Git Product home page Git Product logo

Comments (13)

TheSpydog avatar TheSpydog commented on May 30, 2024

It's actually extremely simple -- just replace the FNA.dll / fnalib files with the latest versions, since they're all dynamically linked.

That said, some games may depend on non-XNA 4.0 compliant behavior (like certain Color constructors) or hardwired dependencies to the old fnalibs (like openal_soft). If that's the case, there's almost always a workaround, but you can cross that bridge when you come to it.

from xnatofna.

liandris avatar liandris commented on May 30, 2024

Well, I've tried copying just dll files with the same names from another FNA game, but it failed to load after that. Is there a place where I can get the compiled FNA dll files that should do such a trick for general cases?

The game I'm trying to work with is Axiom Verge.

from xnatofna.

TheSpydog avatar TheSpydog commented on May 30, 2024

You can get the native libraries (SDL2, SDL_image, FAudio, Theorafile, MojoShader) here.

For FNA itself, the recommended way to get the DLL is to compile it yourself from the source code, but for your convenience I'll upload a prebuilt DLL...

...buuuuuuuuuuut turns out that FNA 20.02+ does indeed break Axiom Verge. Whoops. The latest version that is confirmed to work with AV at the moment is FNA 20.01, so I've attached that here: FNA-20-01.zip

I'll look into getting a proper fix. I'm curious why you wanted to update the libs?

from xnatofna.

liandris avatar liandris commented on May 30, 2024

Now I've tried to use the files provided here in Readme.

  • Release.zip (contains FNA.dll 18.5)
  • fnalibs.tar.bz2 (got all files from \x86)

The game actually runs but crashes almost immediately. The log reveals there is a problem because "MOJOSHADER_glProgramViewportFlip" was not found in "MojoShader.dll".

I've checked and it appears MOJOSHADER_glProgramViewportFlip is only mentioned in FNA.dll 18.5. So it seems like they should not be used together, which contradicts with the instructions.

For FNA itself, the recommended way to get the DLL is to compile it yourself from the source code, but for your convenience I'll upload a prebuilt DLL...

...buuuuuuuuuuut turns out that FNA 20.02+ does indeed break Axiom Verge. Whoops. The latest version that is confirmed to work with AV at the moment is FNA 20.01, so I've attached that here: FNA-20-01.zip

Wow thank you so much! It really does work.

I'm curious why you wanted to update the libs?

I was looking forward to play the game but it appears to suffer from a really annoying lag issue. It seems random but constant, changing options doesn't solve it, and judging by discussions, it has the same issue on other platforms as well (Switch). I experienced this issue on both PC I could access. Tried contacting the dev and got no reply. Then I've noticed it uses an old FNA build, and thought that maybe updating it would change anything. Well, there was not much hope for it and now I'm seeing the same lag on FNA 20.01.

But knowing it's not a FNA issue helps. Coincidentally, while debugging the game recently I found a piece that looked strange, and modifying it seemed to help with the lag, although I'm still not sure. Say, would it be okay for me to ask for help with such a matter? And where is the best place for this?

from xnatofna.

liandris avatar liandris commented on May 30, 2024

After applying FNA 20.01 with libs the native DS4 support doesn't work anymore in Axiom Verge. Switching to XINPUT mode helps. Is this expected?

from xnatofna.

TheSpydog avatar TheSpydog commented on May 30, 2024

Say, would it be okay for me to ask for help with such a matter? And where is the best place for this?

If this is specific to Axiom Verge, I suggest either reaching out to the developer (again) or finding an Axiom Verge modding community that might take an interest in solving this problem.

After applying FNA 20.01 with libs the native DS4 support doesn't work anymore in Axiom Verge. Switching to XINPUT mode helps. Is this expected?

Hmm, I bet that's an SDL2 change. Try grabbing the SDL 2.0.10-win32-x86/64 package from this page and replacing SDL2.dll. I'm fuzzy on the details but I know some gamepad-related stuff changed in the latest version (2.0.12) so maybe that's it.

from xnatofna.

flibitijibibo avatar flibitijibibo commented on May 30, 2024

I pinged Tom about the spec violation, I don't know if the game will get any updates any time soon since AV2's probably going at full speed right now, but if it does the fix should be very easy on the client side.

When updating FNA, be sure to do all of the following:

  • Compile FNA.csproj, NOT FNA.Core.csproj
  • Update ALL of the DLLs found in fnalibs.tar.bz2
  • Update gamecontrollerdb.txt
  • Turn off DS4Windows (SDL will do this by force anyway, pray that it works if you don't follow this step)
  • Disable Steam Input (the Steam virtual gamepad does not pass the hardware ID, so DS4 detection will fail)

from xnatofna.

liandris avatar liandris commented on May 30, 2024

Thanks.

Try grabbing the SDL 2.0.10-win32-x86/64 package from this page and replacing SDL2.dll.

Tried this but it didn't change anything.

  • Turn off DS4Windows (SDL will do this by force anyway, pray that it works if you don't follow this step)

I didn't know this. I've tried again with FNA 20.01 provided by @TheSpydog and apparently SDL was unable to turn off DS4Windows, whatever was meant by that. After I terminated DS4W by hand, it began to work. However:

  • Original version did display PS4 icons, and the log reported "GUID: 4c05c405".
  • Updated version displays Xbox icons, and the log reports "GUID: 4c05cc09".
    I've checked the game code and PS4 icons are only displayed if the GUID is exactly 4c05c405.

Where can I find more information about this apparent incompatibility between SDL and DS4W? Perhaps it could be solved on either side.

I must also note that updating FNA modifies the way the sound output works. The overall volume is greatly increased, and I have to decrease it to 40~50% in order to make it sound more like the original.

Also, a small note about the video side, since that was my original issue. The original version reports "Presentation Interval: Default" in the log, and after the FNA update it reports "Presentation Interval: One". It may be related to vsync. Although it doesn't seem to change the experience, as far as I can see - the lag did not go anywhere, and I didn't notice any visible changes.

from xnatofna.

flibitijibibo avatar flibitijibibo commented on May 30, 2024

That's not an incompatibility, it's the game only checking for the original DS4 and not the DS4 Slim. AV will need to be updated to check for the new GUID.

FNA's sound engine was replaced in version 18.10 to more closely match XNA - SoundEffect in particular got a bit louder because it no longer goes through 3D processing and therefore doesn't get affected by attenuation, which is probably why the old version sounds softer.

PresentationInterval.Default and PresentationInterval.One are the same value internally, so nothing to see there. Can I take a wild guess and say this is a GSync monitor?

from xnatofna.

liandris avatar liandris commented on May 30, 2024

No, my monitor is a regular 60hz one. The lag issue seems to have nothing to do with vsync function. From what I saw during testing, there is an issue with the main Update loop.

Not sure if I'm allowed to list the code here, but it should demostrate what I mean:

//original
float num = (float)gameTime.ElapsedGameTime.TotalSeconds * 60f;
      if (num > 2f)
      {
          num = 2f;
      }
num *= this.mTimeStretch;

Whatever I do, I can only get the smooth experience with:
(not really 100% smooth all the times, as it's causing some side effects too, but much less apparent than the original lag)

//mod
float num = 1f;
num *= this.mTimeStretch;

With the original code, it seems to never end up equal to 1 - but always close to it. The last line means that any value unequal to 1 would cause fluctuations in game speed, which is basically what this lag is all about. Maybe there is a problem with ElapsedGameTime.TotalSeconds reporting irregular values each frame, or there is a logic issue with trying to use that value multiplied by 60 each frame.

from xnatofna.

flibitijibibo avatar flibitijibibo commented on May 30, 2024

For a fixed-step game that's somewhat surprising, since the ElapsedGameTime is incremented with a constant value:

https://github.com/FNA-XNA/FNA/blob/master/src/Game.cs#L452

This seems like a very specific precision error - you could hypothetically force vsync to be off so that vblank doesn't make you wait an extra 16ms, but at the same time I would expect EXT_swap_control_tear on NVIDIA/AMD to take over and tear for you anyway. I'd be interested to know how the same hardware running on Linux would perform.

from xnatofna.

liandris avatar liandris commented on May 30, 2024

I'm not sure if AV is a fixed-step game. Yes, with vsync disabled the tearing is very apparent. I'm on AMD/Windows.

Now that you mention fixed-step option, I remember the issue with some XNA games where it had to be forcefully disabled in order to make them work at smooth 60 fps on newer PCs. I didn't try this with AV yet. Didn't think it could change anything for a FNA game.

...now I've tried. This is the original code:

base.IsFixedTimeStep = false;

Changed this to true and did a quick test run. It seems my change in the Update loop essentially did the very same thing to the game. At the very least, a slight glitch in the explosion effect looks the same. I'm very surprised and confused.

from xnatofna.

flibitijibibo avatar flibitijibibo commented on May 30, 2024

Closing this, the spec issues have largely been addressed or isolated in the randomizer branch.

from xnatofna.

Related Issues (20)

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.