SDL

Pages: 123
There are valid reasons to use SDL or a similarly simple library rather than an existing engine. For example, all the engines you mentioned are huge, with huge guts runtimes. Using a full-fledged engine for some games is akin to swatting flies with SAMs.
Hmm, thats considerable. But there are other small engines and frameworks. Such as Cocos2d-x.

And if the game is too small. Still a framework is considerable. Since most probably game will aim for multiple platforms(SDL and SFML sometimes causes problems for some platforms etc IOS, Also they dont have support for WP).

Still i accept what i said about killing was harsh *Hands up*.
Last edited on
Ceset wrote:
If you are learning how to game programming, SDL is a crucial library to learn as some companies(etc. Valve) uses it. Since you already know sfml you wont have to learn all the basics.
You'll still have to learn the library.

Also learning Qt(used by EA at some places) and OpenGL might be needed. As for SDL a small abstraction could be needed, just classes. Also c++11 features removes that need too. A few lines of codes will be enough if you are familiar with them.
Learning Direct3D is probably your better option instead of OpenGL. OpenGL is pretty much only available on Windows and *nix boxes. OpenGL ES is pretty different (but close at the same time) than Desktop OpenGL, so you're going to have to have a separate codepath, anyway.

No consoles use OpenGL at all.

You should be using Direct3D when you don't need to use OpenGL, and OpenGL when needed. If you have plans on porting to an OpenGL only platform, then still keep a Direct3D renderer backend for Windows. Your users will thank you.

If you are trying to make a game with SDL from scratch. Just kill yourself and whoever gave you that advice. It is just waste of time and unnecessery pain. Just use an engine according to your needs as there are many good ones(etc. Unreal, CryEngine, Unity). Also some game frameworks can be used if necessery.
What? Using an engine isn't always the best option. This is just extremely ignorant to say.

And lastly, learning all these libraries shouldnt fear you, since most of them are similar learning becomes easy after a few.
I have to disagree with you.

SFML, SDL, Qt, and OpenGL are vastly different. You're more or less going to learn a completely new library each time.
Last edited on
Well, i laughed a lot @Avilius. Since you disagree with me at almost everything. Let me explain.

For learning SDL, i actually said "go and learn". Sorry if i couldn't express myself properly.

Yes, you are absolutely right. Learning Direct3D is a better option. I have nothing to say.

About engines. Most newbies(just like i did) tries to make big games with SDL. This is nonsense. Also even in small games a higher framework is considerable. Just wanted to point that. And i sorry for talking ignorant.

Well, i don't know what to say. I know they are different at some aspects. But they just felt like easier to learn as i learned more. Sorry if thats not what it is.
PS4 uses OpenGL.
Android uses GLES.
iOS uses GLES.
Nintendo 3DS uses GLES.
Windows uses OpenGL.
Linux uses OpenGL.
Mac uses OpenGL.
HTML5 uses WebGL.

Windows uses DX.
XBox uses DX.

Make your choice.
Last edited on
Ceset wrote:
About engines. Most newbies(just like i did) tries to make big games with SDL. This is nonsense. Also even in small games a higher framework is considerable. Just wanted to point that. And i sorry for talking ignorant.
There's nothing stopping it. What's holding newbies back is just a lack of experience.

EssGeEich wrote:
PS4 uses OpenGL.
No it doesn't. It uses a proprietary API, and uses a shading language similar to HLSL.

If anything:
PS4 uses OpenGL DX.


Android uses GLES.
iOS uses GLES.
Nintendo 3DS uses GLES.
I wrote:
OpenGL ES is pretty different (but close at the same time) than Desktop OpenGL, so you're going to have to have a separate codepath, anyway.
OpenGL ES is NOT Desktop OpenGL.

Windows uses OpenGL.
It has [iffy] support for it. The driver quality for OpenGL varies greatly, so if you're developing on Windows it's a much better option to use D3D.

Linux uses OpenGL.
Mac uses OpenGL.
I wrote:
You should be using Direct3D when you don't need to use OpenGL, and OpenGL when needed. If you have plans on porting to an OpenGL only platform, then still keep a Direct3D renderer backend for Windows.


HTML5 uses WebGL.
This is irrelevant. If you're going to go into web development then you're going to learn a completely different language anyway.

The inferior debugging tools can also be hell.
Last edited on
OpenGL ES is pretty different (but close at the same time) than Desktop OpenGL, so you're going to have to have a separate codepath, anyway.

OpenGL ES is actually very similar to OpenGL... so much so that an OpenGL ES application should work on a platform with OpenGL 4.1 support (but not necessarily in reverse). The code path may or may not be different depending on your goals. OpenGL Next plans to remove the differences from my understanding of it.

It has [iffy] support for it. The driver quality for OpenGL varies greatly, so if you're developing on Windows it's a much better option to use D3D.

What do you base this on? This is so full of shit, it's not even funny. Probably 90% of the games on Steamplay use OpenGL exclusively and work fine. SFML, SDL, Qt have exclusive support for OpenGL and work fine.

This is irrelevant. If you're going to go into web development then you're going to learn a completely different language anyway.

What language would that be?

The inferior debugging tools can also be hell.

What tools might you have used that you would consider inferior?
NoXzema wrote:
What do you base this on? This is so full of shit, it's not even funny. Probably 90% of the games on Steamplay use OpenGL exclusively and work fine. SFML, SDL, Qt have exclusive support for OpenGL and work fine.
How is this full of shit? OpenGL drivers on Windows aren't exactly on par to Direct3D ones. Often times when working with older systems the OpenGL equivalent of a D3D program simply wouldn't run due to the half-ass drivers given by driver developers.

Also, SDL2 uses DirectX as a backend on Windows. The reason for this is the exact same reason as I stated above ( https://forums.libsdl.org/viewtopic.php?t=9008&sid=8a0803062d5aae98ed110baeb43ca85a ). SFML is pretty much an OpenGL exclusive API for whatever reason as stated by the creator, and I'm not exactly sure about Qt.

You might not notice it (but sometimes you may) on small indie steam games, but it can add up when you're trying to push thousands of triangles to the GPU. There's a reason why AAA games don't ship with OpenGL.

What language would that be?
Javascript.

What tools might you have used that you would consider inferior?
Relative to D3D tools, the OpenGL tools aren't great.

In Visual Studio (the industry standard for C++ development), has built in integration for the Direct3D debugger. This isn't the same for OpenGL.

The Direct SDK comes with samples and tutorials, which greatly reduces the stress that comes along with learning pretty much any API. OpenGL pretty much only has a wealth of outdated tutorials with a handful of modern tutorials, each varying greatly in quality.

The best OpenGL debugger, gDebugger, hasn't been updated since 2010 according to the website. GLIntercept is Windows only.
Last edited on
You haven't heard of BuGle or apitrace? Both are far more robust than gDebugger as far as obtaining the information an OpenGL developer would need. I will at least give you that the learning curve of OpenGL is stupid. GLSL is also stupendously ugly and weird (especially to me). I'm hoping for a redesign of GLSL or at least some other language that can carry on the pace of which Cg used to hold for OpenGL (Cg supports up to OpenGL 2.1... which is pathetic, it might as well not support it at all).

AAA games *do* ship OpenGL. The entire movement for games on Linux is because of OpenGL. Every single game that is even half decent looking must run on OpenGL. The Catalyst driver runs far better on Windows than it does on Linux and nVidia, up until this year, had on par OpenGL performance on Windows. We can easily assume these games would have worked just fine on Windows under OpenGL. Hell, Valve even did a test with OpenGL which states the exact opposite of what you're saying right now.
Last edited on
PS4 actually supports OpenGL. Uses it ot not, developer"s problems.
GLES is a subset of OpenGL. WebGL is also a subset of OpenGL.
They are defined in line with the OpenGL standard.
Be it C, be it Javascript, it's part of the OpenGL standard.
OpenGL support has been really improved lately: You should expect 4.3 contexts to be on your target user's pc (not on Mac: Apple's stuck on either 3.3 or 4.1 based on your card).
It's like requiring DirectX 11 to be installed on your system, you only do it once, and your card may not support it yet.
Let me remember you AMD is at 4.4 and NVidia is at the latest, 4.5. Intel is at 4.3.
What's wrong with the triangle count? VALVe itself ported L4D2 to OpenGL, and on the same Windows system it even gained performance - No excuses for DX to be faster, more supported or whatever. About debugging tools, I hope you will have an easier time debugging your program twice: One time for DX, one for GL, since you just will have to. (Note: there ARE gl debuggers, they are just less known).
May SDL2 use DirectX, Both SDL2 AND SDL1 use OpenGL, including also their Linux and Mac counterparts (Anyhow you use something as portable as SDL to be using DX - sounds good)

You as a developer can make your choice: You either choose DX, keep being a MS guy, buy MS office and pay for everything that you need... Or you choose OpenGL, in the hope that everyone will slowly ditch MS, use OpenOffice, and get most of that "everything" for free.

Edit: Visual Studio is *not* the industry's standard. I do believe A LOT more people are using GCC or CLANG.

@NoX: Do you mean the old glsl? I feel really confident with the actual 4.x glsl.
Last edited on
NoXzema wrote:
AAA games *do* ship OpenGL.
Some do. They're seriously in the minority. OpenGL in gaming is almost non-existent.

The entire movement for games on Linux is because of OpenGL. Every single game that is even half decent looking must run on OpenGL.
Wut?

The Catalyst driver runs far better on Windows than it does on Linux
Just because drivers are better relative to Linux doesn't say much. Optimizing Windows drivers more than Linux drivers make the best sense from a business standpoint.

Are their OpenGL drivers on Windows as good as their DirectX ones? That's the real question.

and nVidia, up until this year, had on par OpenGL performance on Windows.
Do you have any statistics?

We can easily assume these games would have worked just fine on Windows under OpenGL.
Sure, they'll work fine. But the relative instability and poor quality of OpenGL drivers can make or break an application.

Heck, some code that runs on some GPUs wont even run on others.

Hell, Valve even did a test with OpenGL which states the exact opposite of what you're saying right now.
Valve uses OpenGL 2.1 and Direct3D 9 in it's engine (not modern versions my any means). What this proves is that OpenGL 2.1 is faster than Direct3D 9 in the Source Engine, which really isn't saying much tbh.

EssGeEich wrote:
PS4 actually supports OpenGL. Uses it ot not, developer"s problems.
Citation?

Even if you're right, if something isn't used at all on a platform then there's always a reason.

GLES is a subset of OpenGL. WebGL is also a subset of OpenGL.
They are defined in line with the OpenGL standard.
Be it C, be it Javascript, it's part of the OpenGL standard.
I never said it wasn't. But I doubt you'll want to limit yourself just to stick with a small subset.

Chances are you wont be porting your game over to a browser any time soon.

OpenGL support has been really improved lately: You should expect 4.3 contexts to be on your target user's pc (not on Mac: Apple's stuck on either 3.3 or 4.1 based on your card).
It's like requiring DirectX 11 to be installed on your system, you only do it once, and your card may not support it yet.
Let me remember you AMD is at 4.4 and NVidia is at the latest, 4.5. Intel is at 4.3.
It improved in newer models*

What's wrong with the triangle count? VALVe itself ported L4D2 to OpenGL, and on the same Windows system it even gained performance - No excuses for DX to be faster, more supported or whatever.
See my response to NoXzema.

About debugging tools, I hope you will have an easier time debugging your program twice: One time for DX, one for GL, since you just will have to. (Note: there ARE gl debuggers, they are just less known).
Debugging OpenGL on one platform is enough for me. I don't need that extra stress in my life.

May SDL2 use DirectX, Both SDL2 AND SDL1 use OpenGL, including a their Linux and Mac counterparts (Anyhow you use something as portable as SDL to be using DX - sounds good)
I honestly have no idea what you're saying here.

You as a developer can make your choice: You either choose DX, keep being a MS guy, buy MS office and pay for everything that you need... Or you choose OpenGL, in the hope that everyone will slowly ditch MS, use OpenOffice, and get most of that "everything" for free.
...

That's typical Free Software hippie nonsense (no offence).

We pay for proprietary software because it works. I don't give a damn about whether the source code of the program is open or not, as long as it gets the job done the best way possible. Most of the free software you download you probably don't even browse the source code. Almost all free software alternatives compared to proprietary ones seriously lack quality.

Writing software is a profession, and Free Software doesn't play nicely with that. Microsoft is a company that is looking to maximize their profits, like pretty much every cooperation on this planet. Commercial "Free Software" sounds good on paper, but doesn't work good in practice. Sort of like communism.

Microsoft isn't evil and Linux isn't good. The world isn't as black and white as that. It's quite childish to look at it like that.

I also hate it when people choose OpenGL because it's "open." Just stop. OpenGL isn't any more open than DirectX is. Literally the only reason why DirectX isn't on any other platform is simply because Free Software enthusiasts haven't made their own implementation. If you really want DirectX on *nix then just make your own. Microsoft already stated that they wont take any legal action for re-implementing their APIs. DirectX is only an interface, just like OpenGL.

Edit: Visual Studio is *not* the industry's standard. I do believe A LOT more people are using GCC or CLANG.
Are you talking about gamedev or no? Either way my point still stands, OpenGL doesn't have debugging integration in modern IDEs AFAIK.

@NoX: Do you mean the old glsl? I feel really confident with the actual 4.x glsl.
GLSL is a joke compared to HLSL, but I don't want to discuss that right now.
Last edited on
Hey, the hippie part was just for fun.
http://blogs.valvesoftware.com/linux/faster-zombies/

edit: waitwaitwait, so you expect to be running a DX11 game on PCs that do not support OpenGL 4.1?
Last edited on
EssGeEich wrote:
http://blogs.valvesoftware.com/linux/faster-zombies/
I wrote:
Valve uses OpenGL 2.1 and Direct3D 9 in it's engine (not modern versions my any means). What this proves is that OpenGL 2.1 is faster than Direct3D 9 in the Source Engine, which really isn't saying much tbh.


edit: waitwaitwait, so you expect to be running a DX11 game on PCs that do not support OpenGL 4.1?
No, I'm not saying that at all. I'm saying the driver quality between the two greatly differs.
Now if I please can ask you for (recent) sources about that...
Also: http://www.phoronix.com/scan.php?page=news_item&px=MTg0Mzk
edit: http://www.phoronix.com/scan.php?page=news_item&px=MTU3Mjg
Their official compiler is LLVM's Clang
but GCC also works at a slower speed.
Last edited on
For statistics, Phoronix benchmarks show that the nvidia OpenGL driver for Linux performs better on Linux than it does on Windows. You can look for them yourself.

And no...

Brutal Legend, Borderlands 2, every single Valve game, every single Double Fine game, Dead Island are to name just a few that are high end titles that use OpenGL.

That's typical Free Software hippie nonsense (no offence).

So when a bunch of developers try and make an API that is usable across platforms to lessen the burden on developers, that's "Free Software hippie nonsense".

Nobody wants DirectX without explicit mention from Microsoft as to what their stance is on that idea. Microsoft has a bad track record of pulling the feet from under driver implementations and costing everyone money Because(tm). Having a non-legal statement that they won't take legal action isn't enough. It's the same with Mono which up until very recently has been in the grey zone, which is one reason people avoided it like a plague. How would you feel implementing something and investing a few hundred thousand dollars funding something then being told you cannot release it despite their supposed "statement"? Also a reason why WINE and ReactOS is in the grey zone...

Also, you're blanket statement that free software alternatives are poor is plain wrong. Linux, HHVM, GCC, LLVM, most console emulators, most virtual machines, Unreal Engine 4. I also have no problem with selling software while still opening the source up. There's no reason you cannot release source and fund it by a company as well. Facebook is a great example of this with HHVM which happens to be free and open-source. .NET is surprisingly a good example of this which is now being released under the MIT license to help its adoption across all platforms.

EDIT: Also, Valve actually stated this in the blog post they made. However, what makes you think developers who put more time into a DirectX implementation aren't going to have a worse OpenGL impelementation because they put less time and resources into it?
Last edited on
EssGeEich wrote:
Now if I please can ask you for (recent) sources about that...
I'm still awaiting a citation from you, however the UniEngine benchmarks should show what I mean.

NoXzema wrote:
For statistics, Phoronix benchmarks show that the nvidia OpenGL driver for Linux performs better on Linux than it does on Windows. You can look for them yourself.
I tried downloading the benchmark, but there are no binaries?

And no...

Brutal Legend, Borderlands 2, every single Valve game, every single Double Fine game, Dead Island are to name just a few that are high end titles that use OpenGL.
I did not know that these were the only AAA games on the market.

It's also worth noting that these games use Direct3D on Windows.

So when a bunch of developers try and make an API that is usable across platforms to lessen the burden on developers, that's "Free Software hippie nonsense".
There's nothing inherently platform specific about DirectX, aside from context creation (which is platform specific for OpenGL, too).

I also never called the Khronos Group "Free Software hippies." They're not really associated with the Free Software Movement.

Nobody wants DirectX without explicit mention from Microsoft as to what their stance is on that idea. Microsoft has a bad track record of pulling the feet from under driver implementations and costing everyone money Because(tm). Having a non-legal statement that they won't take legal action isn't enough. It's the same with Mono which up until very recently has been in the grey zone, which is one reason people avoided it like a plague. How would you feel implementing something and investing a few hundred thousand dollars funding something then being told you cannot release it despite their supposed "statement"? Also a reason why WINE and ReactOS is in the grey zone...
But can they be sued? Isn't Linux a re-implementation of Unix? I do not see any legal issues for writing your own code that simply shares an interface with a proprietary alternative. I'm no lawyer, however.

Also, you're blanket statement that free software alternatives are poor is plain wrong. Linux, HHVM, GCC, LLVM, most console emulators, most virtual machines, Unreal Engine 4.
I wrote:
Almost all free software alternatives compared to proprietary ones seriously lack quality.


.NET is surprisingly a good example of this which is now being released under the MIT license to help its adoption across all platforms.
This was proprietary until recently. It wasn't developed from the ground up by the "Free" Software guys.

I also was not aware that Unreal Engine was "free."

EDIT: Also, Valve actually stated this in the blog post they made. However, what makes you think developers who put more time into a DirectX implementation aren't going to have a worse OpenGL impelementation because they put less time and resources into it?
Can you rephrase this? I don't understand the question.
Last edited on
All of the games I listed can run via the OpenGL renderer on Windows. You can test for yourself if they are inferior.

There's nothing inherently platform specific about DirectX, aside from context creation (which is platform specific for OpenGL, too).

I never said DirectX was platform specific. There's a legality issue though that needs to be addressed and then there's support from Microsoft that's required to assert that changes that aren't going to be platform-specific are made. DirectX's goals are different from that of OpenGL... one actively strives to be platform-independent while the other makes no guarantee.

But can they be sued?

It doesn't matter if somebody can be sued or not. It's a clear risk that someone shouldn't even chance and a potential loophole that gives the company that power. Linux *has* gone through issues with being Unix-like. There's been a couple of claims on the source code even (all of which have failed to my knowledge).

Can you rephrase this? I don't understand the question.

If a company has to develop a game and all they care about is DirectX, why would their OpenGL renderer be on par with DirectX?

Yeah, Unreal Engine isn't free but I do support it because it's open-source. As a matter of fact, I think it does the Right(tm) thing through and through. It shows that a company can strive while releasing but selling a source code to a product (EDIT: Well, their terms of use and licensing is really the main reason. You'd have to read them as they're pretty close to what I think would be ideal on legally preventing distribution of source code while allowing binary distribution without a lot of hassle. I also had no problem with their expensive licensing costs before but their explicit lack of taking in contributions from developers and others Because(tm) was depressing) (EDIT 2: One thing I am afraid of with Epic is that they'll change the licensing and pricing without warning or pull a Microsoft on everyone which is within their potential legal right to do so. All current source releases under the terms still apply but you wouldn't get updates and there would be no way for community development anymore so you'd be stuck with an inhouse version of UE4 that you probably can't do anything with yourself. Anyone who modifies the source distributed by someone else must have a license or subscription to the source code and if the pricing becomes unaffordable, there's no way for that to happen.... *GASP FOR AIR*. Anyways, if the licensing restricted them from doing this, I would be happier but it's a step forward for sure).

This was proprietary until recently.

You seem to have ignored all of the other examples I provided.
Last edited on
NoXzema wrote:
All of the games I listed can run via the OpenGL renderer on Windows. You can test for yourself if they are inferior.
They can, sure. But there's a reason why a DirectX renderer was also included. If it wasn't needed then it'd just be a waste of time (and time = money) to write a D3D renderer.

If a company has to develop a game and all they care about is DirectX, why would their OpenGL renderer be on par with DirectX?
You're essentially going to send.

Yeah, Unreal Engine isn't free but I do support it because it's open-source. As a matter of fact, I think it does the Right(tm) thing through and through.
Wut?

According to Google:
Google wrote:
denoting software for which the original source code is made freely available and may be redistributed and modified.
It's not exactly Open Source. It isn't available for everyone.

You seem to have ignored all of the other examples I provided.
I didn't. I just quoted something I said earlier. Check again.
Last edited on
According to Google:
Google wrote:
denoting software for which the original source code is made freely available and may be redistributed and modified.
It's not exactly Open Source. It isn't available for everyone.

That's false. Open Source != Free. Here's a good reference: http://opensource.com/resources/what-open-source

I didn't

Then why no comment on HHVM or any of the various emulators? A lot of people do not have the original funding to accomplish what they want. That doesn't mean that their goal is never met. It's also not the majority case. There is a *ton* of open-source and free software that people provide that has no alternative. I'm not saying that money doesn't help and it doesn't really matter to me if something starts as proprietary. The point is there's no reason for something to stay proprietary and your association of Good and Proprietary but Free/Open-Source and Bad is just plain dumb and insulting.
NoXzema wrote:
Then why no comment on HHVM or any of the various emulators? A lot of people do not have the original funding to accomplish what they want. That doesn't mean that their goal is never met. It's also not the majority case. There is a *ton* of open-source and free software that people provide that has no alternative.
Because I have nothing to say. If there is no proprietary alternative, then what can I argue? Note that I said "alternatives." It's not an alternative if there isn't anything like it.

I'm not saying that money doesn't help and it doesn't really matter to me if something starts as proprietary.
But you can't use a proprietary product to support your point if no one else but the company who wrote it committed to the code.

The point is there's no reason for something to stay proprietary and your association of Good and Proprietary but Free/Open-Source and Bad is just plain dumb and insulting.
I didn't. I explicitly stated it isn't black and white.
Last edited on
Pages: 123