ENIGMA Forums

General fluff => General ENIGMA => Topic started by: fervi on November 07, 2016, 06:58:58 pm

Title: Some stupid question
Post by: fervi on November 07, 2016, 06:58:58 pm
Hello

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

Fervi
Title: Re: Some stupid question
Post by: Garo on November 08, 2016, 12:54:31 pm
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...)
Title: Re: Some stupid question
Post by: TheExDeus on November 09, 2016, 03:05:46 pm
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.
Title: Re: Some stupid question
Post by: Goombert on November 14, 2016, 11:35:15 am
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.