sdl2 why does mx2 have that ?

Community Forums/Monkey2 Talk/sdl2 why does mx2 have that ?

GC-Martijn(Posted 2015) [#1]
MX2 does include sdl2 but why ?
I do like the idea that this is possible but now that it is possible I don't know if I need to use it and what it exactly is :S

My only target is: Desktop, ios, android (the latest versions)

Is it now better to only use SDL2 or ignore that ?
If I do use SDL2 than I can't use mojo2 canvas drawing things.

SDL2 says at the site:
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.


So it is lower then mojo, so then I have to code more but gives me more possibilities ?

My first thought was that mojo/monkey was using SDL2 and that's it.
(like the canvas class etc)


GW_(Posted 2015) [#2]
I don't want to speak for Mark, but I believe it was included as a early proof of concept that M2 could load sdl2 and cpp libraries as a module, a la Blitzmax.
The early pre-pre-alpha compiler that Mark released is not to be viewed in any way of the final language. Just a taste of the future as his design goals start to solidify into awesomeness. As the language matures, the game related modules will follow. I believe there will be a mojo/Max2d style module coming, but the core language is the primary focus for now. Patience is the key.
Apologies to Mark if I misrepresented anything.


GC-Martijn(Posted 2015) [#3]
Oke so just ignore SDL2, its only to show that it is possible to import something like that.
Just use/import mojo2 and use that for creating games.

I know that is a unstable release, but my hobby game will take ages before it is ready.
Thats why I start using this unready/unstable version to start with, within a year it will be stable.
(yes I maybe need to change things several times then)


marksibly(Posted 2015) [#4]
SDL is pretty much the same as GLFW - it handles opening windows, creating OpenGL contexts and reading keyboard/mouse/joystick etc. But it also works on more targets than GLFW (in fact, all the current monkey2 targets including android/ios) and has a few more features. With SDL_Mixer, it can even do multi-channel audio too. If I'm REALLY lucky, I'll be able to do mojo and/or mojo2 without writing a line of native code! But probably not...

But yes, you can ignore it if you want. It is likely that mojo/mojo2 will be built 'on top of' SDL instead of GLFW, but like the current GLFW targets in monkey1, you wont have to know anything about the SDL stuff behind the scenes.


GC-Martijn(Posted 2015) [#5]
cool, then I concentrate on the monkey/mojo stuff and you by removing the GLFW ;) ;)


Neuro(Posted 2015) [#6]
I'm wondering if SDL doesn't have that weird slow down issue that GLFW occasionally has on NVidia graphic cards.