Code Monkey home page Code Monkey logo

Comments (6)

ciplogic avatar ciplogic commented on August 26, 2024

Hi Lucas!

So, first of all, I do build it on Fedora with CLion and in fact funnily enough runs on Linux of all my all three platforms.

Few things I can say upfront: as it is not my code I profiled a bit the code and it is "drawing starved" and this drawing it is done on CPU sadly for now.

So, first of all how to be able to play the game:

  • reduce screen resolution to a more low-end resolution. I would say that 1024x768 should work. I have also an i7 with 4th generation and I see it running well enough. To change the resolution, you should edit 'fheroes2.cfg'.
  • compile on release mode. Adding flags to GCC as -flto (you should add them both on linker and on compiler) should improve things.

If you can reduce screen resolution and still things go too slow, I can add a page how to profile, but sadly you will see mostly blit code.

NB. As probably is written, it is not my original code, I wanted just to improve what I found in my honest view as a mess. I will love to improve in time things, but I cannot make an easy performance fix as I don't know .

I think over time are parts to improve and if you would want to invest improving performance, I know a part of code you can look into, but don't jump right away into "fixing big stuff" as it is harder that it seem.

from fheroes2enh.

ciplogic avatar ciplogic commented on August 26, 2024

Make sure you have in the folder you run the fheroes2.cfg file with this line added inside:

# video mode (640x480, 800x576, 1024x768, 1280x1024 or other divisible 32)
videomode = 1024x768

from fheroes2enh.

ciplogic avatar ciplogic commented on August 26, 2024

I tried the release build on Linux (I am having i7-4710HQ CPU @ 2.50GHz) and I can reproduce your behavior with a full screen 1920x1080) but it works ok (at least for my subjective eye) for 1280x1024 resolution (and lower one which I recommend it to you 1024x768).

from fheroes2enh.

ciplogic avatar ciplogic commented on August 26, 2024

May you say the state of the bug with a lower resolution?

Also, I've made a patch to remove few mouse events in between and it shouldn't lag too much.

This reduced the perceived lag but it cannot fully fix it for many many reasons.

from fheroes2enh.

ciplogic avatar ciplogic commented on August 26, 2024

Does it behave now as you want? Or fixes are still required?

from fheroes2enh.

ciplogic avatar ciplogic commented on August 26, 2024

I reverted your commit as it has bad behaviors sometimes:

  • if you switch between full screen and windowed mode, the events will start dissapear
  • scroll mouse events will trigger for infinite number of times

from fheroes2enh.

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.