Code Monkey home page Code Monkey logo

Comments (4)

z33ky avatar z33ky commented on July 30, 2024

I only tried freeglut and SDL for creating an OpenGL context. I don't remember why, but I ditched freeglut pretty fast.

SDL is certainly more "battle hardened" than glfw, but on a quick glance glfw seems like a decent choice as well. It certainly tackles less stuff and thus is a lighter dependency, although I would expect SDL is already installed on many gamer's computers anyway.

SDL covers many more platforms than glfw does, so I'm unsure what you mean by "deal[ing] with OpenGL in a slightly more cross platform way".

For controller support, there's a sort of database that maps plenty of different controllers to a uniform interface. I've heard good stuff about it, but I can't find a decent source atm.

I'm pretty sure that SDL is more widely used and it has a good reputation, so it would be my first choice. Also because Ryan Gordon, one of SDL's main authors, is a hero for pretty much all Linux gamers ;)
But I wouldn't really mind glfw either.

from sh3redux.

Quaker762 avatar Quaker762 commented on July 30, 2024

Very true, it probably is better to run SDL considering there is a lot more support for it, though we're probably only going to be using it for GL, events and Windowing (we need OpenAL for audio). I'm pretty sure Carmack himself used it for Quake 1, 2 and 3...

SDL covers many more platforms than glfw does, so I'm unsure what you mean by "deal[ing] with OpenGL in a slightly more cross platform way".

Might've just been some buzzwords on the GLFW site, apparently it looks to include some GL stuff for you, making it a lot easier to port stuff without having to set include directories, but this is pretty much a moot point now that I think about it.

The only real reason I saw to use it was what I considered to be a superior method of event handling, though IIRC you said you had an event dispatcher or something along those lines already written for SDL, but if not, we could probably map them using an std::map and function pointers.

from sh3redux.

z33ky avatar z33ky commented on July 30, 2024

I'm pretty sure Carmack himself used it for Quake 1, 2 and 3...

SDL wasn't around when Quake 1 & 2 were released ;)
And the ioquake3 fork uses SDL, but I'm 99% sure the original does not.

Some (all?) versions of the Unreal Engine have support for SDL though. Close enough, eh?

IIRC you said you had an event dispatcher or something along those lines

I have an input manager. To give you an idea, I snipped out some code where I used it: https://gist.github.com/z33ky/ac5ea29aab2e41a1b7813574d511dbc5
I have a partially cleaned up commit on a branch in my repo ("input"); Documentation is present.

from sh3redux.

Quaker762 avatar Quaker762 commented on July 30, 2024

SDL wasn't around when Quake 1 & 2 were released ;)

I must've misread this somewhere then haha, or perhaps I saw some port (perhaps toaruos, I think Kevin Lange uses the SDL port)

Some (all?) versions of the Unreal Engine have support for SDL though. Close enough, eh?

Hahahaha definitely close enough.

I have a partially cleaned up commit on a branch in my repo ("input"); Documentation is present

Awesome, this will be immensely useful. I can't wait to write some actual game code ;)

from sh3redux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.