Author Topic: Using SDL for platform abstraction  (Read 2160 times)

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Using SDL for platform abstraction
« on: June 14, 2012, 12:00:08 PM »
I thought I'd made a topic about this a couple of years back, but couldn't find it. Basically, I think that we should put work in standardising paintball to use SDL for input, sound, windowing and getting an OpenGL context, for all platforms, a la ioQuake3. Most of the code is already written and can be used optionally on linux already.

Pros:
  • Much less platform-dependent code.
  • Due to the above, porting to Mac etc. would be much easier.
  • Gets rid of the current calls to various 15 year old platform-dependent APIs and outdated driver functions
  • Gets rid of the whole qgl hack code and makes adding new OpenGL code easier and less messy.
  • Makes linux dependencies a lot simpler (just libsdl and its deps instead of about 10 libraries and theirs)
  • Sound on linux that actually works without fiddling around with a thousand drivers


Cons:
  • Any SDL problems become our problems. As SDL is widely used by commerical and noncommercial projects alike, this seems unlikely.
  • A fair amount of work, although some is done already in the linux code.


Thoughts? Jitspoe, T3RR0R15T, Payl?

payl

  • 68 Carbine
  • Posts: 365
Re: Using SDL for platform abstraction
« Reply #1 on: June 14, 2012, 01:23:19 PM »
My question is why?
This would be really great considering porting to other platforms. But, do we want to move on new platforms?

Quote
A fair amount of work, although some is done already in the linux code.
Who should do that? As you might know, Jitspoe is allways busy and not able to make too much.

This should be done, but there are really many things that should be done with paintball code. I don't think it's possible because this would take a lot of time and keep away Jitspoe from easier and more important things (and jitspoe still haven't done most of those)
In my opinion, this isn't needed as of now. When Jitspoe will plan to add Mac support or developing on Linux will became too hard, he will do that.

I approve your thinking ViciouZ, but i think that you want to much :P .

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Using SDL for platform abstraction
« Reply #2 on: June 14, 2012, 03:19:12 PM »
I can do it, I just want to know if my changes will be instantly reverted or not :P There may be some major factor I've overlooked.

payl

  • 68 Carbine
  • Posts: 365
Re: Using SDL for platform abstraction
« Reply #3 on: June 14, 2012, 03:26:26 PM »
I can do it, I just want to know if my changes will be instantly reverted or not :P There may be some major factor I've overlooked.
Well, then i have nothing to say in this matter as i'm not active on SVN in any form.
But tell us why do you plan to do that. What new platforms you want to develop?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Using SDL for platform abstraction
« Reply #4 on: July 18, 2012, 04:54:43 PM »
I would prefer not to.  There are lots of little hacks and tweaks that are done on the system-specific level.  Things like properly handling (disabling) mouse acceleration and other input oddities would likely break, and we'd lose support for gl mini drivers to support legacy hardware (as well as advanced debugging).  I have a feeling that if we did this, a number of people would start having issues or not be able to run the game any more.  It seems like every change causes an issue for somebody somewhere.  A big change like this is likely to cause a lot of problems.  I could be wrong, but I don't think it's worth the risk.

Edit: Also, I'm not a fan of adding a lot of overhead/bloat with libraries that do what's already being done.