Should i use sdl or some higher level framework?

Started by
13 comments, last by Misantes 9 years, 2 months ago

Hi, I'm interested in game development and I've beenplaying around with frameworks such as monogame, libgdx, etc. But I've found that sdl is widely used, and it allows me to write c code(may not be so apealing for other developers, but i actually like c a lot).

However, I'm in dobut with sdl because it seems too low level. I mean, you can understand it and it's not that hard, but if you start making a game with it, chances are you'll never finish it. I think this becuase sdl is used in a lot of big games like valve's ones, and other AAA games, but as an indie developer(and as a single-man team, at least at the moment) I don't know if using sdl will be productive.

What do you think, is SDL a waste of time(too low level to get something done)? should I continue with some higher level framework or SDL?

Advertisement

Maybe others would disagree with me, but I personally wouldn't consider SDL much lower than other similar libraries, especially considering all that it handles (window handling, input, etc). If you jump up much more from it you're kind of venturing into game engine territory.

I'd think your question more feels like whether you should use a fully fleshed out game engine or not, and that would depend on a ton of other variables. You gain a much quicker development speed at the expense of some control and whatever learning process that would apply to you. No one can really give you the right answer there, you kind of have to weigh productivity vs control, vs knowledge*.

*I recognize not everyone wants or needs to know the lower level stuff, or already knows it.

Beginner here <- please take any opinions with grain of salt

Is your goal to make a game? Use an existing game engine. Is your goal to learn as much as possible? Use SDL and make your own (simple) engine.

It's not quite as simple as that, I'm afraid. But in a lot of cases that's what it boils down to. Ten years ago I, being incredibly ignorant, decided to use SDL and make my own engine. I learned a ton from the process, but I paid dearly because it took a long, long time (several years) until we had a useful and stable engine that could do what we needed it to. My project would be years forward ahead of where it is if we used an existing engine.

Hero of Allacrost - A free, open-source 2D RPG in development.
Latest release June, 2015 - GameDev annoucement


Is your goal to make a game? Use an existing game engine. Is your goal to learn as much as possible? Use SDL and make your own (simple) engine.

Does using sdl mean that I'll be creating my own engine? Everybody says that, but you can actually write a simple game(2d, sidescroller) without making an engine. What's the difference between making a game with sdl and making an engine?


Is your goal to make a game? Use an existing game engine. Is your goal to learn as much as possible? Use SDL and make your own (simple) engine.

Does using sdl mean that I'll be creating my own engine? Everybody says that, but you can actually write a simple game(2d, sidescroller) without making an engine. What's the difference between making a game with sdl and making an engine?

Casually speaking, what you're referring to, there really isn't much of a difference. Often people use the term engine to refer to an existing or created framework (such as Unity or GameMaker) that you can use to create a game (Like a car engine, you can build any number of types of cars around it, but the engine itself does much of the work). The phrase "Make games, not engines" generally refers to coding really only what you need for a game, and not to focus on creating a standalone structure. I think it's sometimes misconstrued to mean you should be using pre-existing engines so you can focus on the game aspects of coding. So, in essence, it really means to build your code around what you need.

The term "engine" has a lot of casual uses. For simple games, a fully-featured "game engine" such as Unity, may often be far more than you actually need. In which case, instead using various libraries like SDL, you can create your window, program whatever physics you may need, render sprites, handle whatever game logic, input, and UI functions, and the resulting code would be your "engine." Many of which are easily handled with SDL. You can make things as complex or as simple as your specific game needs.

So, yes, you'd have to make your own engine (using the term loosely here), but that need not be terribly complex and ideally would just include the code to suit your game's needs. For a simple game, SDL would really be handling most of the legwork anyhow (window, input, rendering, etc), and you'd mostly need to just organize what/when you call the SDL functions, and then handle whatever other game logic is needed. But, again to reiterate, you'll want to decide for yourself whether it would be better to go this route, or use a pre-existing engine, by weighing the pros/cons of each approach.

Beginner here <- please take any opinions with grain of salt

thanks

I would HIGHLY recommend Unity in your situation. It provides all the framework you need to actually make a complete, playable game in a short amount of time. At the same time, it will teach you good programming habits and I can promise if you make a fully functional game with Unity, you can go back to using C and SDL and you will see things in a whole new light and have a much easier time.

But chances are, both GameMaker and Unity will provide everything you need and you really wouldn't have reason to change for the forseeable future.

I would HIGHLY recommend Unity in your situation. It provides all the framework you need to actually make a complete, playable game in a short amount of time. At the same time, it will teach you good programming habits and I can promise if you make a fully functional game with Unity, you can go back to using C and SDL and you will see things in a whole new light and have a much easier time.

But chances are, both GameMaker and Unity will provide everything you need and you really wouldn't have reason to change for the forseeable future.

The only problem with that is(don't throw me fruits please) that they are propietary software. I only use free(as in libre) software.

Perhaps take a look at Godot then, if you're interested in the engine route. It's opensource and free, and though I haven't personally used it past some initial toying with it, I hear good things, and its features seem abundant. It uses a python based scripting language, though I believe they include a c++ api as well, if you want to extend or optimize the engine (I don't believe there is support for C though, which you mentioned is your preferred language. But, I could be mistaken).

I think with many engines though, you often need to learn and use their scripting language. I'm unaware offhand of any open-source game engines for C, though I'm certain they're out there.

Beginner here <- please take any opinions with grain of salt

The only problem with that is(don't throw me fruits please) that they are propietary software. I only use free(as in libre) software.

It is a proprietary IDE and API , but uses plain old C# or Java. What you learn using Unity can be used anywhere you please.

If your primary concern is in fact productivity as a single developer it's hard to beat Unity or GameMaker. If productivity isn't your main concern, then by all means you can plug away with existing libraries and create your own tools. That really is the long and short of using "an engine" versus using libraries.

Just remember, even the great Valve started out using licensed, proprietary software because of the productivity advantages.

Don't limit yourself to any particular way of thinking or type of software because regardless of cost or license,the best language is the one that lets you complete a game.

This topic is closed to new replies.

Advertisement