Closed ghost closed 7 years ago
Accelerated sprite-batching would probably be better suited to a separate, smaller module. Lua-SDL2 focuses on simply making the SDL2 API available to Lua. I am uncomfortable extending it into a game engine itself, because everybody wants different things from their game engines.
What you probably want is to use SDL to open a window with an OpenGL context, and draw the sprites via OpenGL. IIRC attribute arrays let you batch sprites fairly efficiently.
The current state of OpenGL libraries for recent Lua versions is a bit dry, but there aren't many functions you need to bind for drawing sprites, so rolling your own is feasible. (I have some primitive code I could try to get into a publishable state later.)
i always saw lua-SDL2 as the starting board for game making, or really whatever else, but with work etc can make it more through scripting in lua. so really just tapping into SDL, as @Tangent128 said, it just grabs things from the API. still leaving an openness too it
it would be awesome to see more openGL inside lua-SDL2, that would be super cool. but think again it should stay the same as the way SDL is talking to lua and back and forth. so its left open-ended, so still it needs figuring out and working on your own thing, but its at least there. pretty much it can tap into it
as far as c++ IDE, woof. in linux there are a few code::blocks
off the top of my head, and also eclipse
aye, if you have code @Tangent128 for such things, id love to see it
And do you tested it with Lua or LuaJIT?
could anyone please explain to me how to get opengl 3+ working with luasdl2? i have tryed with 2 opengl libaries but i can't seem to get it to work...i'm trying to make a very simple 3d game for educational purposes
Which OpenGL libraries, and which Lua version? The state of OpenGL bindings for Lua is not very impressive right now.
https://github.com/vrld/G4L might be your best bet, and it's a bit old (OpenGL 3.3, not 4.5)
i will try this lib again... it didn't work on my last distro also i tried the glua lib and my results
but i will try again on debian jessie (crunchbang is basically debian wheezy)
Ok,as usually when I want to start learning a new game frameworks or engine the first thing I do it's to test it's performance.The same thing I did with luasdl2 and I got scared by the results.Very very bad fps when only drawing 500 images(47fps). Check my code here: http://www.pasteall.org/58070/lua Luckly I have the solution for this.I was thinking that we need an simple c++ class system for entities or something where all the drawing is taken care of and just the logic is made in lua.For that I'd want to hear from you guys some IDEs for C++,because I'd like to start playing around!