tx00100xt / SeriousSamClassic

Open source game engine version developed by Croteam for Serious Sam Classic (Windows, Linux, FreeBSD, OpenBSD, NetBSD, macOS, Raspberry Pi OS). Based on https://github.com/Croteam-official/Serious-Engine and linux port https://github.com/icculus/Serious-Engine
GNU General Public License v2.0
120 stars 15 forks source link

Problems attempting to load Serious Sam: The First Encounter (RetroPie - Ports section) #21

Open striderhiryux99 opened 1 year ago

striderhiryux99 commented 1 year ago

Hello everyone. I'm using a Pi 4B with 4 GB of ram (64 bit) and the OS is Linux 5.10.17-v8+ aarch64 Raspbian. I just tried Serious Sam: The First Encounter. It shows the loading progress at the bottom of the screen, leads into the introduction showing the Croteam logo, the Egyptian terrain, and the Serious Sam animation, but when I hit the left mouse button it only loads up this routine again. In the samtfe folder (/home/pi/RetroPie/roms/ports) I have the Bin, Controls, Data, Demos, Locales, Mods, Players, SaveGame, Scripts, Temp, and VirtualTrees folders. There is also a tfe shortcut folder that leads to /opt/retropie/ports/samtfe. Inside, I have the Bin folder that has nine files generated when I installed from source. I moved the Help and Levels folders inside here as well. This also has the six necessary .gro files, along with SE_10b.gro.

My runcommand.log shows the following:

Parameters: Executing: xinit /dev/shm/retropie_xinitrc -- vt1 -keeptty

X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: Linux 5.10.17-v8+ aarch64 Raspbian Current Operating System: Linux retropie 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x720M@60,margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:03:C2:0A vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=a373f3d2-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0 Build Date: 19 April 2021 03:23:36PM xorg-server 2:1.20.4-1+rpt3+deb10u3 (https://www.debian.org/support) Current version of pixman: 0.36.0 Before reporting problems, check http://wiki.x.org/ to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Wed Oct 25 00:13:24 2023 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (II) modeset(0): Initializing kms color map for depth 24, 8 bpc. Set mode 1024x768@60Hz on HDMI-1

Executing (via xinit): SDL_VIDEO_KMSDRM_CRTCID=87 SDL_VIDEO_KMSDRM_MODEID=0 /opt/retropie/ports/samtfe/samtfe.sh

STUBBED: load window icon in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/SeriousSam/MainWindow.cpp, line 169. STUBBED: Need SDL invisible window or something in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/SeriousSam/MainWindow.cpp, line 330. STUBBED: !!! FIXME: get the code back in from Ryan's original port. in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/Engine/Base/Stream.cpp, line 995. STUBBED: Report actual SDL device name? in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/Engine/Sound/SoundLibrary.cpp, line 270. STUBBED: co-opt the existing T-buffer support for multisampling? in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/Engine/Graphics/SDL/SDLOpenGL.cpp, line 113. STUBBED: this can't possibly be right, yeah? in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/Engine/Base/SDL/SDLEvents.cpp, line 147. STUBBED: SDL2 can handle these events in /home/pi/RetroPie-Setup/tmp/build/samtfe/SamTFE/Sources/SeriousSam/SeriousSam.cpp, line 1250.

I'm trying to see what I did wrong. If anyone has an idea, please let me know. I'm asking because once I figure out exactly where each file/folder goes, I think I might be able to do the same for Serious Sam: The Second Encounter. I may also be missing some commands that will add files that may be missing. Thanks for your assistance.

tx00100xt commented 1 year ago

It will be clearer if I look at the log. He is here: /home/pi/.local/share/Serious-Engine/serioussam/SeriousSam.log

striderhiryux99 commented 1 year ago

Here is the SeriousSam.log:

--- Serious Engine Startup --- SeriousEngine Build: 10000.10

Running 32-bit version Executable: /opt/retropie/ports/samtfe/tfe/Bin/ Assumed engine data directory: /opt/retropie/ports/samtfe/tfe/ Assumed mods library directory: /opt/retropie/ports/samtfe/tfe/

Examining underlying OS... Type: Unix

Detecting CPU... (No CPU detection in this binary.)

Cannot load variable from 'DefaultMod.txt': Cannot open file /opt/retropie/ports/samtfe/tfe/DefaultMod.txt' (No such file or directory) () Current mod: <none> Cannot load variable from 'ModExt.txt': Cannot open file/opt/retropie/ports/samtfe/tfe/ModExt.txt' (No such file or directory) () Loading group files... /opt/retropie/ports/samtfe/tfe/SE1_10b.gro: 105 files /opt/retropie/ports/samtfe/tfe/1_04_patch.gro: 1 files /opt/retropie/ports/samtfe/tfe/1_00c_scripts.gro: 28 files /opt/retropie/ports/samtfe/tfe/1_00c_Logo.gro: 1 files /opt/retropie/ports/samtfe/tfe/1_00c.gro: 2267 files /opt/retropie/ports/samtfe/tfe/1_00_music.gro: 55 files /opt/retropie/ports/samtfe/tfe/1_00_ExtraTools.gro: 58 files

Detecting input devices... joysticks found: 3 joysticks allowed: 3 joy 1: '8Bitdo SF30 Pro' 4 axes 16 buttons POV hat present joy 2: 'Xbox Gamepad (userspace driver)' 4 axes 13 buttons POV hat present joy 3: 'Xbox Gamepad (userspace driver) #2' 4 axes 13 buttons POV hat present

GfxLibrary: InitAPI GfxLibrary: OpenGL InitAPIs. Initializing sound... Trying load libvorbisfile.so.3 ... vorbisfile shared library loaded, ogg playing enabled amp11lib shared library loaded, mpx playing enabled Detected devices: 2 device 0: bcm2835 HDMI 1, bcm2835 HDMI 1 device 1: bcm2835 Headphones, bcm2835 Headphones

WARNING: Gamma, brightness and contrast are not adjustable!

Command line: '' WARNING: SeriousSam didn't shut down properly last time! joysticks found: 3 joysticks allowed: 3 joy 1: '8Bitdo SF30 Pro' 4 axes 16 buttons POV hat present joy 2: 'Xbox Gamepad (userspace driver)' 4 axes 13 buttons POV hat present joy 3: 'Xbox Gamepad (userspace driver) #2' 4 axes 13 buttons POV hat present Loading game library '/opt/retropie/ports/samtfe/tfe/Bin/libGame.so'... include "Scripts/Game_startup.ini"; (1): Cannot load script file 'Scripts/Game_startup.ini"': Cannot open file /opt/retropie/ports/samtfe/tfe/Scripts/Game_startup.ini' (No such file or directory) () SDL audio initialization ... opened device: SDL audio stream 11025Hz, 16bit, alsa parameters: 11025 Hz, 16 bit, stereo, mix-ahead: 0.2s output buffers: 2 x 2048 bytes mpx decode: 36864 bytes Cannot load variable from 'Data/Var/Sam_Version.var': Cannot open file/opt/retropie/ports/samtfe/tfe/Data/Var/Sam_Version.var' (No such file or directory) () Cannot load variable from 'Data/Var/ModName.var': Cannot open file /opt/retropie/ports/samtfe/tfe/Data/Var/ModName.var' (No such file or directory) () Serious Sam version: 1.10 Active mod: - T H E F I R S T E N C O U N T E R - unable to setup OpenGL settings list: Cannot open file/opt/retropie/ports/samtfe/tfe/Scripts/GLSettings/GLSettings.lst' (No such file or directory) () Reading levels directory... file 'Levels/01_Hatshepsut.wld' : 'Hatshepsut' spawn=0x0005000f file 'Levels/02_SandCanyon.wld' : 'Sand Canyon' spawn=0x0005000f file 'Levels/03_TombOfRamses.wld' : 'Tomb Of Ramses' spawn=0x0005000f file 'Levels/04_ValleyOfTheKings.wld' : 'Valley Of The Kings' spawn=0x0005000f file 'Levels/05_MoonMountains.wld' : 'Moon Mountains' spawn=0x0005000f file 'Levels/06_Oasis.wld' : 'Oasis' spawn=0x0005000f file 'Levels/07_Dunes.wld' : 'Dunes' spawn=0x0005000f file 'Levels/08_Suburbs.wld' : 'Suburbs' spawn=0x0005000f file 'Levels/09_Sewers.wld' : 'Sewers' spawn=0x0005000f file 'Levels/10_Metropolis.wld' : 'Metropolis' spawn=0x0005000f file 'Levels/11_AlleyOfSphinxes.wld' : 'Alley Of The Sphinxes' spawn=0x0005000f file 'Levels/12_Karnak.wld' : 'Karnak' spawn=0x0005000f file 'Levels/13_Luxor.wld' : 'Luxor' spawn=0x0005000f file 'Levels/14_SacredYards.wld' : 'Sacred Yards' spawn=0x0005000f file 'Levels/15_TheGreatPyramid.wld' : 'The Great Pyramid' spawn=0x0005000f file 'Levels/Deathmatch/DesertTemple.wld' : 'Desert Temple' spawn=0x000201ff file 'Levels/Intro.wld' : 'Intro and Flyover' spawn=0x00000000 file 'Levels/KarnakDemo.wld' : 'Karnak Demo' spawn=0x00050000 file 'Levels/TechTest.wld' : 'Technology Test Level' spawn=0x00010000 Reading demos directory... Levels/Intro.wld

All textures reloaded.

Automatic 3D-board preferences adjustment... Detected: Broadcom - V3D 4.2 - 2.1 Mesa 19.3.2 No matching preferences found! Automatic adjustment disabled! Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done. stopping game. Client 'Local machine' ordered to disconnect: Server stopped. Starting session: 'Levels\Intro.wld' level: 'Levels/Intro.wld' spawnflags: 0008ffff max players: 1 waiting: 0 network is off started. Adding player: '^oPlayer 0^r' done.

tx00100xt commented 1 year ago

Everything is fine. In order to interrupt the Intro and get to the menu you need to press the ESC key

Left or right click of the mouse scrolls through the Intro and Demo in a loop. I just didn't read it carefully yesterday.

striderhiryux99 commented 1 year ago

Tried the ESC key. The introduction still plays. I had to ssh to the Pi and sudo shutdown -r now to restart.

striderhiryux99 commented 1 year ago

I'm looking at my log again. Certain files seems to be missing. For example: 1) Cannot load variable from 'DefaultMod.txt': Cannot open file `/opt/retropie/ports/samtfe/tfe/DefaultMod.txt' (No such file or directory) ()

2) Cannot load variable from 'ModExt.txt': Cannot open file `/opt/retropie/ports/samtfe/tfe/ModExt.txt' (No such file or directory) ()

3) Loading game library '/opt/retropie/ports/samtfe/tfe/Bin/libGame.so'... include "Scripts/Game_startup.ini"; (1): Cannot load script file 'Scripts/Game_startup.ini"': Cannot open file `/opt/retropie/ports/samtfe/tfe/Scripts/Game_startup.ini' (No such file or directory) ()

4) Cannot load variable from 'Data/Var/Sam_Version.var': Cannot open file `/opt/retropie/ports/samtfe/tfe/Data/Var/Sam_Version.var' (No such file or directory) ()

5) Cannot load variable from 'Data/Var/ModName.var': Cannot open file `/opt/retropie/ports/samtfe/tfe/Data/Var/ModName.var' (No such file or directory) ()

Inside of /home/pi/RetroPie/roms/ports/samtfe/Scripts, I have Game_startup.ini. If I look in /home/pi/RetroPie/roms/ports/samtfe, I can see that the Data folder is there. It has the Sam_Version.var file in Data/Var. Perhaps if I move those into /opt/retropie/ports/samtfe/tfe/Scripts/ and /opt/retropie/ports/samtfe/tfe/Data/Var respectively, I'm guessing that might help me get to the menu screen.

As for DefaultMod.txt, ModExt.txt, and ModName.var, I don't see any of them. I don't think the PC version of the game I have includes them.

tx00100xt commented 1 year ago

Files DefaultMod.txt and ModName.var for game no needed. As the name implies, they are more related to Mods. The Scripts/Game_startup.ini file doesn't really affect anything. But it must be read by the game. The ModExt.txt file is needed only for the Second Encounter. Check file permissions just in case.

Solution: Open file /home/pi/.local/share/Serious-Engine/serioussam/Scripts/PersistentSymbols.ini in editor. Change string:

persistent extern user CTString sam_strIntroLevel="Levels\\Intro.wld";

to

persistent extern user CTString sam_strIntroLevel="";

Instead of playing the intro there will be an entrance to the menu.

Add the following lines to the end of the file:

persistent extern user CTString sam_strFirstLevel="Levels\\01_Hatshepsut.wld";
persistent extern user INDEX sam_bAutoPlayDemos=(INDEX)0;
striderhiryux99 commented 1 year ago

Thanks for the fix. I was able to start the first level where Sam enters through the portal. I'm going to try to configure the keyboard and joystick movements (8 Bit-do SFC Pro Controller). I'm going to also create folders in a similar manner for Serious Sam: The Second Encounter.