Pages: [1]
Author Topic: Some stupid question  (Read 322 times)
Offline (Unknown gender) fervi
Posted on: November 07, 2016, 06:58:58 PM
Joined: Feb 2013
Posts: 75

View Profile Email

It's a topic for stupid people to learn anything :P

I wonder whether it is better to use SDL. In general, what exactly it is SDL etc.

It seems to me that the SDL is a library that allows you to write code that runs everywhere (games) - from Windows on the Linux or Android.

It seems to me that if one code can do the same thing everywhere, because it is the layer between the programmer and game. I think I could solve the problem for example. Gamepads (which go under Windows, but Linux does not) if he could make the game appeared on Android.

Is such a move make sense? Ew. how the SDL and acted like Enigma

Offline (Male) Garo
Reply #1 Posted on: November 08, 2016, 12:54:31 PM

Location: Szczecin, Poland
Joined: Sep 2014
Posts: 22

View Profile
SDL is basically a framework to allow the creation of multimedia apps on the platforms it supports. You could use it for example as a backend to power ENIGMA on the graphics front. Besides graphics, you can use it to access stuff for audio and input devices (keyboard, mouse, joystick...)
« Last Edit: November 08, 2016, 12:57:59 PM by Garo » Logged
Offline (Unknown gender) TheExDeus
Reply #2 Posted on: November 09, 2016, 03:05:46 PM

Joined: Apr 2008
Posts: 1886

View Profile
ENIGMA is a game engine, while SDL is a framework. ENIGMA could *use* SDL actually. And it has been tried before. The engine I am slowly working (kind of a rewrite of ENIGMA) actually uses SDL for the windowing, input and some more things.
Offline (Male) Goombert
Reply #3 Posted on: November 14, 2016, 11:35:15 AM

Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2983

View Profile
That's not a stupid question fervi, we actually talked about doing it before. SDL is an abstraction layer/API. I think in one of fundies forks he even has an SDL platform, but he stopped using ENIGMA. I think GameMaker uses SDL for a lot of its windowing stuff too. Being realistic, SDL would not bring much to the table when we already have native Win32, it's just better to use that directly that another layer in between (Josh argues this and it's true when it comes to performance). Being practical even more, our windowing code between Windows, Mac, and Linux is so convoluted and inconsistent that having a single SDL platform would solve all of those problems. The joystick codes could have been written a single time in ENIGMA. So I am not ruling out the potential for ENIGMA to just dump all of its platform code and use a single SDL platform. That would be one way to address a lot of those issues but SDL really should have been used from the beginning. It's really just a big tradeoff.
Pages: [1]