Since I just released Drag[en]gine 1.2 I merged master back into the haiku feature branch and finished up the package build script. I used as many libraries as possible from the haiku system (regular or haiku-ports).
I’m still not sure if the path I chose are all correct nor if I did mistakes with the packages. So before I create a receipt for it I would like you folks to have a look at the packages: dragengine-1.2-1-x86.hpkg, dragengine_devel-1.2-1-x86.hpkg
dragengine-1.2-1-x86.hpkg is what you use as “end user” (or gamer). There is no coding involved there. In contrary to other game engines which are bundled with each game (and stuck in time, with all their bugs) you have only one dragengine installation on your machine (which is constantly maintained and updated).
Games are shipped in the form of *.delga files. They contain no executable code so they are 100% OS independent, 100% secure (no virus infection possible) and easy to handle (one DELGA = one game or one patch). Right now there exists only the console launcher (delauncher-console) because I have not ported the GUI launcher yet (I want to use native BeOS API for this).
So as mentioned above if you want to test the engine that it is running you can look at the DEExamples above. These are test DELGAs you can run straight away. If you have MESA 17.1 you will most likely run into the depth-buffer problem. It would be nice to see if MESA 19.1 package does not have this problem anymore.
If you want to develop games many things can be done with the IGDE. This does though not yet run on Haiku since it uses FOX ToolKit.
So as common users you can test if the game engine works on Haiku. If you can install the package, download the mentioned DELGA files and use “delauncher-console run -f filename.delga” in a console and it comes up then this is the right way to go. Once this is working and the Haiku devs think my directory layout is in accordance with how Haiku wants it then I can make a HaikuPorts receipt for it. That’s the plan right now.
That said… I forgot something to ask Haiku developers. Is there a way I can assign an application to a file type like Linux of Windows has it? Is there some kind of file I can add to the build package? I would like to add two uses: “open” which runs the DELGA and “install” allowing to install it.
Hmm, it is not installable here on Haiku Beta2 64bit
somethig went wrong
The devel also has same problems
Maybe you built it for 32bit only?
Better ask some porter or developers in IRC chat for help
Figure out how this works with xres. Now the question is, how to assign a file pattern to a mime type? Otherwise how does Haiku know what mime type a *.delga is.
The important (and sommetimes annoying) thing is we don’t use the file extension at all for filetype identification. Instead we scan the file content and apply “sniffing rules” to it which are a simple pattern-matching. I say annoying because it’s common to have files being compressed or otherwise having a similar header structure, making it sometimes difficult to do this properly.
I’ve modified the package scripts. I thought I have to put things in with “/boot/system/” but it looks like I need to strip this part of the file path.
There is something I forgot mentioning. If you do not have MESA 19.1 chances are launching the engine fails with an OpenGL Error. In this case run it like this:
MESA_GL_VERSION_OVERRIDE=3.3 delauncher-console run -f DSTestProject.delga
That’s actually a different behavior than on BeOS in terms of MIME typing a file if it doesn’t have one. According to this awesome source of information on BeOS: BeOS Bible - Chapter Excerpts
Assigning a MIME Type Where There Is None When a new file arrives on your system without a MIME type (as happens when bringing files over to BeOS from other operating systems), the Tracker and the Registrar work together to assign it one.
The Registrar’s first recourse is to look for an extension on the end of the filename, like .jpg, .txt, or .html. If it finds one, it checks the FileTypes database to see whether you’ve connected that extension with any particular filetype. For example, you may have used the Extensions section of FileTypes to declare that files ending in .html were likely to be HTML documents, and that they should inherit the text/html filetype.
If no extension is found, the Tracker will actually read a small portion of the file with a “sniffer.” If it encounters plain text, it will assume that this is a text document and give it the appropriate MIME type. A similar process occurs with GIFs, WAVs, and other common filetypes. Because the extensions technique is more likely to be accurate, it’s run first. Assuming you’ve set up a few common extensions in your FileTypes database, BeOS can guess a file’s type accurately the vast majority of the time, with the vast majority of files.