October 23, 2019, 02:04:21 AM

Author Topic: Pharaohs' Curse (Gold)  (Read 266 times)

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Pharaohs' Curse (Gold)
« on: July 17, 2019, 05:38:09 AM »
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

Offline Derron

  • Hero Member
  • *****
  • Posts: 2499
Re: Pharaohs' Curse (Gold)
« Reply #1 on: July 17, 2019, 07:11:08 AM »
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:
Code: [Select]
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

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: Pharaohs' Curse (Gold)
« Reply #2 on: July 17, 2019, 12:25:04 PM »
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:
Code: [Select]
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

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 2071
  • elgol developer
Re: Pharaohs' Curse (Gold)
« Reply #3 on: July 17, 2019, 12:49:36 PM »
I played a few levels(9) of the demo - nice work!   :D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.1, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspbian Buster, pi4 4Gb RAM,1.5Ghz

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: Pharaohs' Curse (Gold)
« Reply #4 on: July 17, 2019, 01:16:47 PM »
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