FAQ  •  Register  •  Login

QMB Engine goes crossplatform via SDL

Moderator: Inside3D Admins

<<

Labman

Posts: 62

Joined: Fri Nov 05, 2004 2:39 am

Location: Cambridge, United Kingdom

Post Sat Apr 14, 2012 7:22 am

QMB Engine goes crossplatform via SDL

Source available at: https://github.com/DrLabman/QMB

Using the SDLQuake source (http://www.libsdl.org/projects/quake/) I managed to get QMB working on Linux using the SDL libraries. SDLQuake originally only supported SDL for software rendering but I created an OpenGL version of the SDL video code for QMB.

Important information:
  • I've only tested building this on Linux (Fedora 16)
  • Networking isn't working yet
  • Compiling (before porting to SDL) was tested on windows using MinGW + MSYS (not Visual Studio)
  • Compiling (after porting to SDL) has not been tested on windows
  • Expect issues?

If you give it a go let me know if it works. If you have issues post here or on github, whichever you feel like.
Last edited by Labman on Sun Apr 15, 2012 5:13 am, edited 2 times in total.
<<

r00k

Posts: 908

Joined: Sat Nov 13, 2004 10:39 pm

Post Sat Apr 14, 2012 7:28 am

Re: QMB goes crossplatform via SDL

Nice to see you back working on your engine!
<<

Spike

Posts: 2070

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Sat Apr 14, 2012 8:08 am

Re: QMB goes crossplatform via SDL

regarding networking... don't use sdlnet - it doesn't work for protocols which are not inherantly nat-safe (ie: might work for QW, but for NQ you'd have to entirely rewrite at least net_dgram.c). you're probably better off using #ifdefs to hide the bsd/win sockets api differences, or retain specific platform versions of sockets code, and depend upon net_null.c or whatever it is for weird systems.
FTE uses a single .c file for all platforms (win+lin+bsd+mac+droid). The only platform which doesn't really work for that is google's nativeclient stuff, where there's no udp support at all anyway. Yes, winsock does have some differences, but an #ifdef _WIN32 covers those, mostly with just #defines in a header file. Disclaimer: I've not made an ios port, which doesn't seem to be legally possible anyway, nor a wii/psp/etc, all of which generally require jailbreaking.
<<

Labman

Posts: 62

Joined: Fri Nov 05, 2004 2:39 am

Location: Cambridge, United Kingdom

Post Sat Apr 14, 2012 11:30 am

Re: QMB goes crossplatform via SDL

Thanks for the advice on the networking, hopefully I'll get around to that once I fix all the bugs that seem to have turned up after I thought things were working... :)
<<

Baker

User avatar

Posts: 3182

Joined: Tue Mar 14, 2006 5:15 am

Post Sun Apr 15, 2012 1:53 am

Re: QMB goes crossplatform via SDL

At first I was thinking the "QMB particle engine" and kind of confused that isn't platform locked.

Now it sunk in and I understand that you mean the QMB engine like as "Flying something pan" where something is something I can't quite remember. Sauce?
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Labman

Posts: 62

Joined: Fri Nov 05, 2004 2:39 am

Location: Cambridge, United Kingdom

Post Sun Apr 15, 2012 5:14 am

Re: QMB Engine goes crossplatform via SDL

I guess is should have been more specific that it's the QMB Quake Engine that has gone crossplatform :)

Current site is still at: http://qmb.gluonporridge.net/
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Sun Apr 15, 2012 6:42 am

Re: QMB Engine goes crossplatform via SDL

Welcome back :) looking forward to a new QMB loved your old one.
Productivity is a state of mind.
<<

szo

Posts: 106

Joined: Mon Dec 06, 2010 4:42 pm

Post Sun Apr 15, 2012 1:19 pm

Re: QMB Engine goes crossplatform via SDL

Labman wrote:I guess is should have been more specific that it's the QMB Quake Engine that has gone crossplatform

I can't see crosss-platform character in this: you can't even link because the makefile doesn't know about case sensitivity for -lglee, which makes me wonder how it was compiled without issues on a fedora linux setup. Not to mention the mingw, msys and dxsdk funnies still being passed to gcc when not compiling for win32. Needs some _serious_ work, for sure.
<<

Spirit

Posts: 853

Joined: Sat Nov 20, 2004 9:00 pm

Post Sun Apr 15, 2012 4:25 pm

Re: QMB Engine goes crossplatform via SDL

I could compile it on Archlinux with only minor code changes (paths and one function).
<<

szo

Posts: 106

Joined: Mon Dec 06, 2010 4:42 pm

Post Sun Apr 15, 2012 4:51 pm

Re: QMB Engine goes crossplatform via SDL

Spirit wrote:I could compile it on Archlinux with only minor code changes (paths and one function).

Well, of course you can: after wrestling with the makefile which is one major incompatible element in that git repo (didn't bother looking for further.) Upon seeing something labeled as "cross platform", one would (possibly naively) expect something that really is, at least something that really compiles as advertised. Well, whatever.
<<

Spirit

Posts: 853

Joined: Sat Nov 20, 2004 9:00 pm

Post Sun Apr 15, 2012 5:41 pm

Re: QMB Engine goes crossplatform via SDL

I never touched the makefile, maybe I should have, no idea. Here is all I did https://github.com/DrLabman/QMB/issues/1
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Sun Apr 15, 2012 7:53 pm

Re: QMB Engine goes crossplatform via SDL

if you want i have a version of your 1.19 source converted to use codeblocks should make the porting easier on linux (you still need to apply your sdl code).
it also has other fixes like fix for unsafe printf buffers (bsd version of vsnprintf) infintite view matrix and underwater warping (mh's) and i cleaned up the texture code a bit + added a much later version of the tga code which handles flipped tga's correctly and supports more formats.
With codeblocks you can avoid the makefile stuff alltogether as it also works on linux and you get a quite good editor also.

Let me know if you want it ?
Productivity is a state of mind.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Mon Apr 16, 2012 1:02 am

Re: QMB Engine goes crossplatform via SDL

http://code.google.com/p/realm/download ... z&can=2&q=

uploaded the source here in case you want a look.
Productivity is a state of mind.
<<

Labman

Posts: 62

Joined: Fri Nov 05, 2004 2:39 am

Location: Cambridge, United Kingdom

Post Mon Apr 16, 2012 8:32 am

Re: QMB Engine goes crossplatform via SDL

I'd prefer to stick with a makefile because it means, less dependencies for building. Builds are working for me, that's why I announced it, also I've only built it on one platform hence why I said 'expect issues'. There does seem to be a problem with GLee headers being in different places in different linux distributions. It's still a work in progress, but it should be minor things that need fixing not any major code changes to get a build working.
<<

reckless

Posts: 1637

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Mon Apr 16, 2012 10:52 am

Re: QMB Engine goes crossplatform via SDL

Thats ok :) allthough the only dependency you would need is codeblocks and packages exist for nearly every linux distro out there anyway. You can also make it spit out makefiles instead of doing them by hand, helps a great deal and when done you dont need codeblocks to build it. As for fixes the only one absolutely needed is the print buffer one as all newer gfx cards will crash unless this ones in (atleast on windows).
rest are just additions or updates.
Productivity is a state of mind.
Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft