OS/2, eCS & ArcaOS - Technical > Programming

Compiling a SDL Game (2023)

(1/6) > >>

Martin Iturbide:
Hello

I would like to compile an SDL (SDL1 or 2) application under ArcaOS as a learning activity and with a long term to try to re-compile some SDL open source games that were compiled long ago, that the DLL dependencies changed with time and now are difficult to run.

My question are:
1) Any recommendation on what can I compile first, so I can tune/test my build environment.
2) Is there some "full screen" feature/library for games working today on OS/2?

Regards

Dave Yeo:
I just compiled git head of Rocks'n'Diamonds, compiled cleanly.

--- Code: ---git clone https://git.artsoft.org/rocksndiamonds.git

--- End code ---
Needs Perl, SDL2_image, SLD2_mixer, SLD2_net, SLD2 and zlib. And the usual GCC environment.
Only problem is lack of mod support in SDL2_mixer. Not set up to test joystick support. Full screen works fine from the settings-->graphics.

--- Code: ---K:\work\rocksndiamonds>rocksndiamonds.exe
[WARN] cannot read music file 'K:\work\rocksndiamonds/music/mus_classic/mod.apoplexy': Unrecognized audio format
[WARN] cannot read music file 'K:\work\rocksndiamonds/music/mus_classic/mod.chiptune': Unrecognized audio format
[WARN] cannot read music file 'K:\work\rocksndiamonds/music/mus_classic/mod.cream_of_the_earth': Unrecognized audio format

--- End code ---

Martin Iturbide:
Thanks Dave.

I started by installing the following on my development enviroment:
- yum install SDL2-devel SDL2_image-devel SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel perl zlib-devel pthread-devel libcx-devel

I cloned from here, seems to be same:
- https://github.com/ArtsoftEntertainment/rocksndiamonds

And I did a
- make 2>&1 |tee make.out

It compiled fine and it runs just like you described. The game seems playable and sound works. 
I got the same log that you described.

I don't know if something else can be done to at least start minimized the console that shows the errors.

Regards

Dave Yeo:
Well, best would be to fix SDL2_mixer to use lib-libxmp, which builds fine using cmake or OpenWatcom and makefile.os2, haven't tested if the OW DLL is compatible with GCC.
I just tried that,but SDL2_mixer wants to dynamically load modplug_dll.a instead of modplug1.dll or the planned xmp4.dll. I must have built and installed modplug last year and forgot about it :)
Seems SDL2_mixer is hard coded for modplug
Another option is to create a rocksndiamonds.def declaring it a PM app and link it in.
Quick fix is to do,

--- Code: ---K:\work\rocksndiamonds>exehdr /PMTYPE:PM rocksndiamonds.exe
--- End code ---

Martin Iturbide:
Hello

The same author has another SDL game called MirrorMagic. It also worked.It is a reflection game, you have to move mirrors to destroid things on the screen.

I had created this package with a readme file, please let me know if it works on your side and if it decent enought to call it a release and upload it to hobbes.

Regards

Navigation

[0] Message Index

[#] Next page

Go to full version