Amegma / Galaxy-Attack

An inspiration of the original Atari Space Invaders game built in pygame :space_invader: :video_game:
MIT License
40 stars 20 forks source link

Fix(#29) Persisting user scores in Sqlite DB #64

Closed nkitsaini closed 1 year ago

nkitsaini commented 1 year ago

Changes:

Fixes: #29

nkitsaini commented 1 year ago

Let me know what you think about removing Scores class altogether now.

Mayank0255 commented 1 year ago

@nkitsaini Can you please update the readme with instructions to setup the project now as there is a sqlite3 integrated?

Another thing that can you test if the build is working fine or not? In the readme there are some commands which are used to make a release which generates an exe file, after that gets generated, you will need to test if the db is working there as well

nkitsaini commented 1 year ago

Hi @Mayank0255

sqlite3 integrated

This does not require any special setup as sqlite3 is in-built library.

test if build is working

pyinstaller command provided in README had an issue:

C:\Users\vm\workspaces\Galaxy-Attack>pyinstaller.exe .\main.spec --onefile --noconsole
250 INFO: PyInstaller: 5.4.1
250 INFO: Python: 3.10.7
327 INFO: Platform: Windows-10-10.0.18363-SP0
option(s) not allowed:
  --onedir/--onefile
  --console/--nowindowed/--windowed/--noconsole
makespec options not valid when a .spec file is given

It was not related to these changes and both --onefile and --noconsole were redundant here.

--onefile is not required since make.spec specifically defines EXE (which is a single file) file. --noconsole is not required because console=False is passed to EXE in make.spec.

I've fixed pyinstaller command in README for this.

Otherwise everything works as expected.