Coder Social home page Coder Social logo

Super bad fps about luasdl2 HOT 6 CLOSED

tangent128 avatar tangent128 commented on June 27, 2024
Super bad fps

from luasdl2.

Comments (6)

Tangent128 avatar Tangent128 commented on June 27, 2024

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.)

from luasdl2.

lewislepton avatar lewislepton commented on June 27, 2024

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

from luasdl2.

deathbeam avatar deathbeam commented on June 27, 2024

And do you tested it with Lua or LuaJIT?

from luasdl2.

subject546 avatar subject546 commented on June 27, 2024

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

from luasdl2.

Tangent128 avatar Tangent128 commented on June 27, 2024

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)

from luasdl2.

subject546 avatar subject546 commented on June 27, 2024

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)

from luasdl2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.