Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lagging on playtime #5

Open
xasans opened this issue Jul 27, 2021 · 23 comments
Open

Lagging on playtime #5

xasans opened this issue Jul 27, 2021 · 23 comments

Comments

@xasans
Copy link

xasans commented Jul 27, 2021

Hi @vi3itor i build project for windows but game is lagging on the playing match. Is it normal?

@vi3itor
Copy link
Owner

vi3itor commented Jul 27, 2021

Hi!
No, it shouldn't lag unless you have a low-spec PC or running it in the virtual machine. The other reason might be Debug build: on one of the machines, when I used cmake, that was installed with Visual Studio, it built Debug version even when I passed the --Release flag. It was solved by installing the latest version of CMake.
Can you try running the initial version of the game, compiled and published by Bastiaan?

@vi3itor
Copy link
Owner

vi3itor commented Jul 27, 2021

You can find it attached. I had to compress rar archive into zip, because GitHub doesn't support attaching rar-files.
gameplayfootball_beta2v02_windows.zip

@acoppola
Copy link

Another reason is that the game choose automatically the integrated graphics if you are on a system that have an integrated and a discrete videocard (some laptops and PCs).
For nVidia users go to the control panel and add your executable to the list and in order to run the game with graphic card.

@vi3itor
Copy link
Owner

vi3itor commented Jul 27, 2021

Thank you Antonio for the valuable comment! I will add it to the installation instructions.

@xasans
Copy link
Author

xasans commented Jul 27, 2021

@vi3itor Yes i have tried compiled version by Bastiaan and works good.
@acoppola Yes my videocard is integrated and i add game to control panel of videocard but lagging doesn't stop
My CPU Intel Core i3-10100 with Intel UHD 630 videocard

@acoppola
Copy link

630

if you have only an integrated videocard performance isn't good. If you have an integrated and a discrete videocard (like me, Intel integrated and GeForce 840M) you should add the exe path in nvidia control panel to use the latter.

@xasans
Copy link
Author

xasans commented Jul 27, 2021

OK @acoppola but why does version of Batsiaan plays fine on my pc?

@acoppola
Copy link

@xasans dunno, can be that Bastian one use SDL 1.2, or it was compiled in a different way, or other stuff (there were a lot of changes). I had slowdowns and I solved that way.

@xasans
Copy link
Author

xasans commented Jul 27, 2021

@acoppola So did you compile on windows or other OS?

@vi3itor
Copy link
Owner

vi3itor commented Jul 27, 2021

@xasans Try applying @WesleyKhoiVo's pull request #2 and please report your CPU usage. I will also publish the binaries tomorrow so you can test current version on your system.
I am also planning to disable logging, which should speed up the game.

@VOM7HC
Copy link

VOM7HC commented Jul 27, 2021

I just improve it minor.

But I think we must change mathematics formula so much from float to integer. Because Bastiaan used too much float - double math, but CPU is better calculate integer.

For example:
number * 0.5 = half number => number / 2 = half number (if it just 2 - integer, no need cast number to float like 0.5)

Useful link:
Floating point unit
FLOPS

@VOM7HC
Copy link

VOM7HC commented Jul 28, 2021

One of reasons I think Bastiaan's compiled version working better is MSVC and Mingw. Now Vi3itor version is built from MSVC and Bastiaan is Mingw, that why his code can use some VLAs.

I don't say we should be compile on Mingw and VLAs (which is bad code pattern - not thread safe from C99 not C++) and a lot of AAA game for Windows is compiled with MSVC instead of MingW, but may be this is the reason why performance is dropped (since he has optimized his code on MingW instead MSVC).

Why aren't VLAs in C++

@vi3itor
Copy link
Owner

vi3itor commented Jul 28, 2021

Yeah, it would be interesting to see to what extent VLAs affect the performance.

@VOM7HC
Copy link

VOM7HC commented Jul 28, 2021

Yeah, it would be interesting to see to what extent VLAs affect the performance.

Yeah, Array allocated in Stack and Vector is allocated in both Heap and Stack (although it was introduced as alternative Array).

When vectors are allocated, do they use memory on the heap or the stack?

@vi3itor
Copy link
Owner

vi3itor commented Jul 28, 2021

@xasans I have published the binaries, you can download and run it on your machine.

An important question: have you tried to decrease the screen resolution? In the binaries above, I set 1280x720 in the config by default. You can try other resolutions supported by your machine (Settings -> Graphics).

@VOM7HC
Copy link

VOM7HC commented Jul 29, 2021

Hello all, I create a discussion, topic: improve performance, so anyone care performance can join this discussion. #6

@ESC4P1STS
Copy link

Can you try running the initial version of the game, compiled and published by Bastiaan?

Hello I tried to run the demo but that didn't work then I downloaded the source code and used the ReadMe.md to compile and it still didn't work, I use windows but I didn't find the gameplayfootball.exe at the end of all that.

@VOM7HC
Copy link

VOM7HC commented Sep 24, 2021

Can you try running the initial version of the game, compiled and published by Bastiaan?

Hello I tried to run the demo but that didn't work then I downloaded the source code and used the ReadMe.md to compile and it still didn't work, I use windows but I didn't find the gameplayfootball.exe at the end of all that.

Did you switch to Windows branch before compile?
Could you give me more detail about your issue (log build or crash and your machine information)?

@ESC4P1STS
Copy link

Did you switch to Windows branch before compile?
Could you give me more detail about your issue (log build or crash and your machine information)?

Yes and I just checked again and it said I have already compiled.
I got to the build section for compiling on windows and this passage of information was confusing asking me to " Make sure that you correctly set the directory for vcpkg (in our case it is installed into C:\dev\vcpkg):" at this moment in time I am still using the Gameplay Football directory to make the build so I don't know whether I messed up there since everything else was fine. At the end of all of this I couldn't build the Debug version giving me an error at the end. I don't know whether you understand me so I might try and take pictures granted I will continue where I left off

@VOM7HC
Copy link

VOM7HC commented Oct 8, 2021

Have you ever tried my new instruction build on Windows with VS 2019? This build is support Debugging mode. Since debug mode it will generate text log in build folder when game is running

@ESC4P1STS
Copy link

ESC4P1STS commented Oct 8, 2021

my new instruction build on Windows with VS 2019?

no I haven't I'll try and use it should i restart the build

@DoomDivine
Copy link

Thank you Antonio for the valuable comment! I will add it to the installation instructions.

Hey there, i had a doubt regarding this game:

So, if i want to create a player, for example a football player with an overall rating of 999 or 1 million ovr, such that he scores from goal to goal and cannot be tackled and is incredibly fast, how would i do that in the game's sources code? How to change the player overall in the game's source code? Please tell me how do i do this, because this has always been my dream modification in a football game, sadly fifa does not allow me to make 1 million ovr players, but i hope this game allows me? Please help me out?

@DoomDivine
Copy link

Hi! No, it shouldn't lag unless you have a low-spec PC or running it in the virtual machine. The other reason might be Debug build: on one of the machines, when I used cmake, that was installed with Visual Studio, it built Debug version even when I passed the --Release flag. It was solved by installing the latest version of CMake. Can you try running the initial version of the game, compiled and published by Bastiaan?

Hey there, i had a doubt regarding this game:

So, if i want to create a player, for example a football player with an overall rating of 999 or 1 million ovr, such that he scores from goal to goal and cannot be tackled and is incredibly fast, how would i do that in the game's sources code? How to change the player overall in the game's source code? Please tell me how do i do this, because this has always been my dream modification in a football game, sadly fifa does not allow me to make 1 million ovr players, but i hope this game allows me? Please help me out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants