Gaming on Haiku

You can see us also at FOSDEM in February (Brussels), or JDLL in April (Lyon). Or at Capitole du Libre next year!

Myself and someone else were working on no gravity (spacegirl) at some point (years ago I think?). I canā€™t recall exactly but I thought it was working and got put into haiku portsā€¦ my memory is hazy though. Just a hint that I do remember; itā€™s probably easier/faster to port the Linux SDL code than the old BeOS backend. Haiku is missing the BDirectGLWindow implementation (a Dano feature).

Unless Iā€™m mistaken, BDirectGLWindow would just be a BGLView attached to a BDirectWindow, which is the normal way of using OpenGL both on R5 and on Haiku, so it shouldnā€™t be too hard to replicate this.

Although i was thinking this, sdl might be just plug and compile if there are no specific code.
However, the BeOS folder has some values for paths and startup setup, in a quick peek at the code.

There was a Be newsletter with some brief info on the differences between BGLView and BDirectGLWindow [1]. It appears itā€™s about locking across multiple windows, but anyway it does look simple to use a BGLView instead (for simple use cases at least). However, porting the Linux SDL version probably requires even more minimal changes (I donā€™t remember exactly).

[1] https://www.haiku-os.org/legacy-docs/benewsletter/Issue5-13.html

Canā€™t not mention Cave Story !

Sure we are always interested to get our tutorials translated to every oter language.
The address to the tutorials are changed, because we create a new besly and the old one are switched to old.besly.de.

Hi, I found a retro digger game on Clasqm repository Iā€™m Trying use a game options from terminal. On game description writing: ā€œHere are the options when you start from Terminal: digger [[/S:]speed] [[/L:]level file] ā€¦ etc.ā€œ Nothing works. Maybe someone play that game and know how to use these options. Specially I wonā€™t run a ā€œ/U = Allow unlimited livesā€. Please, someone explain to me how it works.

I agree that we should promote gaming on Haikuā€¦butā€¦

this could become a boomerang due to the fact that Haiku is not ready to satisfy the general gamer. They could eventually come and be disappointed due, for example, lack of nowdays-standard 3d experience and soā€¦

I think itā€™s better to focus on some specific niches of gaming that we know runs ok in Haiku and could offer great experience. Adventures, for example.

ScummVM runs great I guess. We could eventually try to contact those guys at Thimbleweed Park to see if they are interested in porting a proof-of-concept (not a complete game, letā€™s be realistic). Others enthusiast fanmade adventures are ready to be played outside and so onā€¦

just an opinion :slight_smile:

Hi, Iā€™m the main original author of Dave Gnukem, glad to see the interest in it.
Would be nice to have it running on Haiku. Dave Gnukem has since reached ā€˜version 1ā€™:

Note itā€™s not really a ā€˜portā€™ of Duke Nukem 1, as the game is quite different - the idea was to have ā€˜similar look and feelā€™ to DN1, but is more like a parody of DN1 (I didnā€™t want a strict clone for two reasons, firstly legal, secondly wanted something a bit original ā€¦ if anyoneā€™s hoping for DN1 on Haiku then something like DOSbox is probably better). Iā€™m new to Haiku and donā€™t know it but just by chance I was trying it out the other day in a VM (before I saw your post), as I like to follow alternative OSs, and of course I gave it a quick try to get Dave Gnukem running (in theory I donā€™t think it should be difficult), but I got stuck on a small issue unrelated to the game (following the instructions to try set up haikuports in order to try set up SDL I got some error where the latest haikuports git scripts seemed to say they needed Python 3 but Python 2.7 was what came installed with Haiku, or something like that, I didnā€™t see an obvious way to fix it so I gave up ā€¦ I have limited spare time but if someone wants to help get Dave Gnukem we could give it a go and I could try assist (eg if someone tries to get it building and you get C++ compile errors Iā€™d be glad to try help fix), or if someone knows how to easily fix my haikuports Python version problem I could give it another quick try in a VM.

The source code is relatively straightforward C++ make project which compiles on almost any Linux, basically just needs two dependencies (libsdl1.2-dev and libsdl-mixer1.2-dev) - then basically ā€˜git cloneā€™ the source code, git clone the data, then use ā€˜makeā€™ to compile (the project readme on github has instructions). The sound can be disabled with a simple compile option if libsdlmixer is a problem. I imagine there might be slight Makefile tweaks needed.

(Cross-posting to 2x threads, sorry.)

1 Like

You do not need HaikuPorts to install SDL libs, just install the devel packages using HaikuDepot or pkgman (pkgman install libsdl_devel sdl_mixer_devel for sdl 1.2). Most SDL based games compile pretty easily. I can give it a shot later today.

1 Like

There is an open source engine for Thimbleweed Park (though it is still work in progress). Alas, it doesnā€™t use SDL as backend but SFML which is not ported to Haiku yet. The engine to run Thimbleweed Park is called Engge and can be found on Github. I looked at the SFML code and it seems like it wouldnā€™t be too hard to port to Haiku. Iā€™ll give it a shot and if I can get a crude port done Iā€™ll try to get that Engge to work too, which would give us possibility to play Thimbleweed Park on Haiku.

When I tried this, it didnā€™t seem to install the libSDL .h files ā€¦ maybe I missed something, Iā€™ll try again.

EDIT I got it working :slight_smile: :slightly_smiling_face::slightly_smiling_face: ā€¦ using ā€œpkgmanā€ seems to have helped, as you mention, to install the two dependencies - thank you! That helped. Then as per the Gnukem readme instructions on github I did:
~> git clone GitHub - davidjoffe/dave_gnukem: Dave Gnukem is a cross-platform 2D scrolling platform shooter inspired by Duke Nukem 1
~> cd dave_gnukem
~/dave_gnukem> git clone GitHub - davidjoffe/gnukem_data: Game data subfolder for https://github.com/davidjoffe/dave_gnukem (important) data
~/dave_gnukem> make
~/dave_gnukem> ./davegnukem

Sound works too.

I had to make one change to the Dave Gnukem Makefile - the ā€œINCLUDEDIRS=ā€ line should read:
INCLUDEDIRS=sdl-config --cflags
(Edit4 Iā€™ve now committed a small update to the official Makefile that should detect Haiku automatically)

EDIT2 Of course now a more difficult part would be making a package (Someone mentioned this game had a BeOS port. It did as I recall in the past, but I was not involved with that at all ā€¦ doesnā€™t matter anymore.)

4 Likes

I was just about to post the same thing with almost same screenshot :smiley: About your instructions, you need to add ā€œsdl-config ā€”libsā€ to ldflags in makefile too.

1 Like

I never had to, not sure why.

Iā€™m a bit nervous to break builds on other platforms if I change the official Makefile, so I may commit a ā€œMakefile.haikuā€ to the github master, then the instructions would be ā€œmake -f Makefile.haikuā€, or somesuch ā€¦ thatā€™s my suggested approach ā€¦ or I could try add a couple of lines to detect haiku

Sorry, my mistake, that addition is not needed, the ldflags are fine as they are.

In theory that change is indeed ā€œmore correctā€ than how it is in my rather simple ā€˜officialā€™ Makefile, but Iā€™m a bit nervous to change the official Makefile as there are other ports to a few other platforms forked from it, some have their own custom pre-build patches onto this Makefile.

EDIT Iā€™ve added some detection code to the official Makefile now that should detect HaikuOS and use the correct settings - so the main official Makefile should now work ā€˜as isā€™, in theory.

One small issue Iā€™ve noticed, the audio seems to be delayed by a second or two. Not sure if thatā€™s a VirtualBox-related issue or a Haiku issue or a LibSDLmixer-on-Haiku issue. Never noticed that on any other platforms before.

You also have that?

Edit I see Dave Gnukem is in fact already in HaikuPorts:

I didnā€™t know that. I see there may be one or two other small patches.

1 Like

ResidualVM ver.0.4.0 for Haiku 64bit ported by 3Deyes
https://www.residualvm.org/

The new ResidualVM port is working nicely with:

Imgur
ā€œThe longest Journeyā€

available on Haiku Depot now!
other great games to play: Escape from Monkey Island 3D, Myst 3 Exile, Grim Fandango.
You need the original games to play!

3 Likes

There is already a working recipe for dave-gnukem: https://github.com/haikuports/haikuports/blob/1347978fe347902a177812b3b636053934f4c3bc/games-action/dave_gnukem/dave_gnukem-1.0.recipe :slight_smile:

1 Like