git-learning-game / oh-my-git

An interactive Git learning game!
https://ohmygit.org
Other
2.03k stars 146 forks source link

Taking any action makes the game not respond for a few seconds on Windows #23

Open westnordost opened 3 years ago

westnordost commented 3 years ago

Platform: Windows 10 Game version: 0.6.0

On taking certain actions, the game's UI does not respond for 1-3 seconds. The music still plays, so do sound effects. After the freeze, the animations play smoothly mostly

Actions with which I can reproduce this:

If this cannot be helped due to mingw or something, one solution might be to make it appear smoother to play the animation(s) already while waiting for the work to be done.

blinry commented 3 years ago

Thanks for the detailed report! Yeah, this is a Windows-specific issue, because we're launching a new Git-bash for each internal command. :/

One thing that would help is batching them together somehow, or keeping a shell open in the background, but we haven't put in the effort yet. :)

xpac1985 commented 3 years ago

Can only join in on this, I've tried this on my work laptop which has some additional privilege management tool which makes it even worse - every command, every click freezes the UI for 5-10 seconds - even typing is slowed down. I just started a Fedora VM to play the game, because else it takes days... I already assumed that the regular goal checking causes a lot of process creations...

pritam-dey3 commented 3 years ago

Any update on this? This lag actually makes playing the game on Windows really annoying.

blinry commented 3 years ago

We appreciate your nagging – lags are no fun, and so this is a high-priority issue! :) Y'all can try the newly released version 0.6.1, which should improve things a bit!

We now have a mechanism in place which, instead of launching a Git bash for each command the game runs (including checks on the win condition), just keeps a single bash open, and runs the commands there. On my Windows testing machine, this speeds things up by a factor of ~4.

Let us know what you think! If this is still a killjoy, we need new ideas on how to quickly run lots of commands in a Unix-like environment on Windows.

DegrangeM commented 3 years ago

I also have this issue and it's very annoying (I gived up playing the game).

However I have the last version (0.6.4) so it doesn't seems to have solved the issue.

goyalyashpal commented 2 years ago

hi, i am not a dev so dont know the specifics, i just felt it needs to be shared here.

we need new ideas on how to quickly run lots of commands in a Unix-like environment on Windows - blinry at comment


mz3r0 commented 10 months ago

I found a workaround solution on Windows by enabling WSL (Windows Subsystem for Linux) in "Turn windows features on or off" and installing linux (I chose Ubuntu). Make sure virtualization is on in your BIOS otherwise you might waste time like I did figuring out what's wrong. After launching wsl, navigate to the linux version of oh my git that you download from https://blinry.itch.io/oh-my-git and run it ./oh-my-git. An error might pop up telling you there's a missing package. Just sudo apt update then install the following:

sudo apt install libxinerama1
sudo apt install libxrandr2
sudo apt install libxi6
sudo apt-get install libasound2
sudo apt-get install libpulse0
sudo apt-get install libgl1

These were missing for me, so install any other missing libraries and it should work. Bam, that's it now it's snappy. Lag is no more.