Pharaohs' Curse (Gold)

Started by sphinx, July 17, 2019, 05:38:09

Previous topic - Next topic

sphinx

Hi all

I ported my old game Pharaohs' Curse to MacOS and Linux using BlitzMax NG with the help of both Michael Reitzenstein and Bruce A. Henderson, so, many thanks to both of them.

I published it to itch.io :

https://ancientsoft.itch.io/pharaohs-curse-gold

There is a demo for Windows, MacOS and Linux.
All is good except the Linux version as it works good inside a test folder inside my game folder but a user notified me that there is a problem with the Linux version, when I extract the zip file to ,say, the Desktop or Documents...etc it runs and shows the screen for language selection and then shuts down. When trying to open again nothing is shown whatsoever!!

Though it works ok on MacOS and Windows!!

Can someone try the Linux demo and help me figuring out what is the problem?!!

Thanks a lot in advance
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Derron

#1
Extracted to /home/ronny/Downloads/pcg_demo_linux

Extecuted the ./Pharaos_Curse

Got a language-selection prompted. Choosen Germany. Program vanished

Checked the new files: Country.ini (upper case "C") and prefs.ini (lower case "p") - both only contained some single unreadable byte value (so no "ASCII char")

Executed programme again - segfault too.

Removed the new files (Country.ini and prefs.ini) and it started successful - prompting the language selection (and then to vanish).


Running it through GDB:

0x00000000004a6523 in brl_stream_ReadLine ()
(gdb) bt
#0  0x00000000004a6523 in brl_stream_ReadLine ()
#1  0x00000000004251c5 in _bb_main ()
#2  0x00000000005c74ac in __bb_brl_appstub_appstub ()
#3  0x0000000000407f5f in main ()


Something fails to read a file after start - and you do not catch this error.


I am prettttttty much sure your fault has something to do with case sensitive file systems (eg. Linux).
Ok ... following that assumption I just renamed "Langs/Lang.txt" to "Langs/lang.txt" (lowercase L!) and "Langs/Quit.txt" to "Langs/quit.txt" (lowercase Q) and choose "English" as language ... voila, fullscreen game shown (with a big mousecursor and the desktop-cursor on top - so "HideCursor()" forgotten?).


TLDR: name your files the same way as you use in your code to open. "MySuperConfig.iNI" is different to "mysuperconfig.ini". Find a consistent naming scheme and use it in your code too. Maybe your "test folder" is on a smb-share or on a "mounted ntfs partition". NTFS is not case-sensitive.


PS: You _always_ could have copied the whole source to the "desktop" of your linux machine, opened MaxIDE there and tried a debug-build. I guess you would have catched the error then. After fixing, you could copy back your source to the NTFS partition - but remove the NTFS-project-folder first as Windows would try to merge your "file name case changes" and might keep the old (wrong cased) filename.



bye
Ron

sphinx

Quote from: Derron on July 17, 2019, 07:11:08
Extracted to /home/ronny/Downloads/pcg_demo_linux

Extecuted the ./Pharaos_Curse

Got a language-selection prompted. Choosen Germany. Program vanished

Checked the new files: Country.ini (upper case "C") and prefs.ini (lower case "p") - both only contained some single unreadable byte value (so no "ASCII char")

Executed programme again - segfault too.

Removed the new files (Country.ini and prefs.ini) and it started successful - prompting the language selection (and then to vanish).


Running it through GDB:

0x00000000004a6523 in brl_stream_ReadLine ()
(gdb) bt
#0  0x00000000004a6523 in brl_stream_ReadLine ()
#1  0x00000000004251c5 in _bb_main ()
#2  0x00000000005c74ac in __bb_brl_appstub_appstub ()
#3  0x0000000000407f5f in main ()


Something fails to read a file after start - and you do not catch this error.


I am prettttttty much sure your fault has something to do with case sensitive file systems (eg. Linux).
Ok ... following that assumption I just renamed "Langs/Lang.txt" to "Langs/lang.txt" (lowercase L!) and "Langs/Quit.txt" to "Langs/quit.txt" (lowercase Q) and choose "English" as language ... voila, fullscreen game shown (with a big mousecursor and the desktop-cursor on top - so "HideCursor()" forgotten?).


TLDR: name your files the same way as you use in your code to open. "MySuperConfig.iNI" is different to "mysuperconfig.ini". Find a consistent naming scheme and use it in your code too. Maybe your "test folder" is on a smb-share or on a "mounted ntfs partition". NTFS is not case-sensitive.


PS: You _always_ could have copied the whole source to the "desktop" of your linux machine, opened MaxIDE there and tried a debug-build. I guess you would have catched the error then. After fixing, you could copy back your source to the NTFS partition - but remove the NTFS-project-folder first as Windows would try to merge your "file name case changes" and might keep the old (wrong cased) filename.



bye
Ron

Thanks a lot Derron.
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Steve Elliott

I played a few levels(9) of the demo - nice work!   :D
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

sphinx

Quote from: Steve Elliott on July 17, 2019, 12:49:36
I played a few levels(9) of the demo - nice work!   :D
Thanks Steve :)
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com