Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] more examples #25

Open
lewislepton opened this issue Apr 26, 2015 · 63 comments
Open

[REQUEST] more examples #25

lewislepton opened this issue Apr 26, 2015 · 63 comments

Comments

@lewislepton
Copy link

the examples given are great, but only really go to a certain point.

SDL in itself is pretty big, and think that addressing things like, drawing shapes, working with and importing other lua files, and interaction are a good thing to have. really it could go on, but i think the main crux would be the have a few more examples for people to dive into further and to keep interested.
if you get me?

plus since there is not really any other info online for this, then would be more useful to others who are using this repo

cheers

@ghost
Copy link

ghost commented Apr 26, 2015

A simple benchmark would be welcomed!

@lewislepton
Copy link
Author

ive started to make some now. just tearing apart the ones given plus looking at other places. have done a pull request for using keyboard to move something round on screen.
just some small things, but hopefully useful as well

@ghost
Copy link

ghost commented Apr 26, 2015

I'd like to be able to get the fps and based on that make some simple benchmarks like displaying 5000 images and see how's the fps.

@lewislepton
Copy link
Author

what i would suggest just now until more come - is to go through some SDL2 stuff. some things are the same in context. it is just the change to lua thats one of the bigger things

@lewislepton
Copy link
Author

here is a link to a SDL2 tutorial series i came across. has helped as well. im dyslexic so reading can be just hard to do and understand, but videos are cool because you get to see what happening
also another im adding since its a deeper SDL2 tutorial

coding made easy
https://www.youtube.com/playlist?list=PLHJE4y54mpC5_eEz9gCqIkNpU-n_2eyNt

making games with ben. personal favourite since it build on making SDL engine. but good learning ;)
https://www.youtube.com/channel/UCL5m1_llmeiAdZMo_ZanIvg

@lewislepton
Copy link
Author

another to add to this list of possible looks at.
whilst love2d and lua-SDL2 are apart, its more thu lua side you need to look at. but good to know also ;)
though, i cant stand the guy talking, just waffles on about things which are not pretinent to the tutorial at hand. plus shouts. odd.

https://www.youtube.com/user/sockmunkeedevelopmen

@ghost
Copy link

ghost commented Apr 30, 2015

@lewislepton You have a long path till you can get to actually make games with lua-sdl.First of all you wont be able to make something bigger than a space invaders clone because of the performance.You need to make a simple sprite class or smt like this in C++ and from there render all your objects and use lua just for logic.I'll probably start doing this in the next days.

@ghost
Copy link

ghost commented Apr 30, 2015

But since I dislike C++ this will probably take a while ...

@lewislepton
Copy link
Author

i do some openframeworks/c++ tutorials, which i dont mind. though dont like c++ myself. have linked a lua addon with it, but its limited.

in my own game making wihh lua-sdl2 i dont want to do really big projects. really minimal 2d based just now. hopefully if more examples and also more info on lua-sdl2 come to light to help with more on it and for more bigger game things. then by time projects could become bigger.
but again, its all time really. its just unlearning things i know now to make way for these things.

but really if we wele to use c++ with sdl2 we would be in the same position

@Tangent128
Copy link
Owner

@Murii: by all means profile, but if you need sprite performance, keep in mind that you would probably want to let SDL manage the window but do the actual rendering with OpenGL.

As I understand it, SDL's built-in renderer is not strongly optimized and lacks batching support, since they assume people with performance needs will use OpenGL anyways.

@lewislepton
Copy link
Author

@Tangent128 a mix with openGL is most welcomed in my camp ;) plus in any of the tutorials or anything like that ive come across, openGl is quickly introduced
how would we get this with working with lua-SDL2?
more a future thing i guess. but if we would be able mix it up with openGL and lua-SDL2, then id love to know more ;)

@lewislepton
Copy link
Author

@Tangent128 but as you said, openGL would manage the graphical side, rendering etc. SDL is really is for the other stuff, like window mangament, joysticks, input etc

@lewislepton
Copy link
Author

actually did just come across this. which has recently been updated
http://luagl.sourceforge.net/

though again, mac users seem to be left in the dark. but would think this would work since it can build on linux. mac and linux do have some, some build similarites

@lewislepton
Copy link
Author

did just contact one of the guys who puts the downloads up and takes care of it. just to ask in how to build on mac. since it seems active just for windows/linux users.

but if this works. then i wouldnt see how having these 2 would be a problem. wait and see

@lewislepton
Copy link
Author

actually just working with the guy who built luaGL to do a mac build. since it has the same thing of not locating lua off the bat from the usr/local/etcetcetc

so hopefully have that up and running soon. which should in turn be good with working in lua-SDL2 for handling

there is however a LuaRock, but it is different - in that it has not been updated in about a year. and LuaGL had just been updated about 5 or 6 days ago

here is the original luaGL location
http://luagl.sourceforge.net/

here is the LuaRock location, which does link the above link. i have contacted the luaRock guy to ask if it will be updated to the newer build. have not heard anything back yet
https://luarocks.org/modules/luarocks/luagl

never worked with LuaRocks before, but really tempted now, but dont want to use something which is older than the source, even if it is easier to install

@lewislepton
Copy link
Author

got luaGL to build, but getting it into to work is more than just dropping it in the folder with /usr/local/lua/etcetc

but its getting near, will keep posted. but if this works with SDL, which it should. then this will answer that performance question. leave SDL for the file managment, inputs etc and use OpenGL for the graphics and other heavy stuff

@ghost
Copy link

ghost commented May 1, 2015

There must be a better solution! try using glew or smt?

@lewislepton
Copy link
Author

what way though. because everything that i have seen that uses SDL also uses opnGL

when i get luaGL working that will answer a lot for me. plus can just get on with maing things. true ill more than likely have to do some other coding to get things working properly, but thats what you get if youre using something like sdl and opengl

if its quick coding and getting stuff done in lua, why notook into love2d or even moonscript?

@ghost
Copy link

ghost commented May 1, 2015

Let us know if you manage to make luaGL to work!

@lewislepton
Copy link
Author

@Murii will do. but as the guy has said to me, it should build fine in linux and also windows. just mac seems to be the problem for some reason. but think its the same as to what it was when building Lua-SDL2

but its getting close. just needs to find the .dylib to start running, but thats the only trouble

@lewislepton
Copy link
Author

but once we get these solved a new update will go up that should fix everything for all platforms

@lewislepton
Copy link
Author

BOOM. working now. have not gone into the nitty gritty and made something. BUT, it works through using sublime to build. the guy will more than likely be doing a new download and build soon. but this problem was with mac, so think linux users and windows are fine from what i know

here is a screenshot just to show it building. will do a simple thing to show it working soon
screen shot 2015-05-01 at 19 11 21

@lewislepton
Copy link
Author

forgot to metion, it also uses luaglu as well as luagl

@ghost
Copy link

ghost commented May 1, 2015

nice,nice! I'm looking forward to see a simple example!

@lewislepton
Copy link
Author

just now finished making a dirty auto complete for it, just to help. so will now try making something

@ghost
Copy link

ghost commented May 1, 2015

OK

@lewislepton
Copy link
Author

ill have something soon. i really have just started with luaGL, but it so different, since it does not deal with some things. so really am getting it to talk to SDL nicely.

will have something just not quickly ;)

@lewislepton
Copy link
Author

just having a little trouble due to the examples are using different video out, not SDL. so just figuring that out now. but will continue in the morning since its late
http://luagl.sourceforge.net/examples/

@lewislepton
Copy link
Author

have not been able to get something running with luaGL, just so different really. it has not ran into any problems with errors. just getting something off the groud is more hard. the examples for luaGl are using something else for window management, but even changing things to lua-SDL2 have been some what crap and do error.

i need to really stick with lua-SDL2 more right now. but really i feel that luaGL is working, though i cant get something right now.
ill keep pressing on and trying when i feel up to it. but for now, just want to try and learn SDL more because that initially what i was after.

sitll having some trouble in getting some of that to run, even if i am changing the syntax to what it should be, still trouble. but have to press on.
ive even gone to using love2d a little bit because i love the layout and coding style. sadly lua-SDL2 is not that straight forward but hey. would be best to actually make functions to call up with lua-SDL2 and make your own kind of language to suit needs i think

@lewislepton
Copy link
Author

ive tried the state it was in a while back on my ipad, which is still 0.9.2, but that was a major hack and not something that is currently built in. its not a deal breaker for me. what breaks it for me is that code is not safe within your application if you want it to be right away. anybody can easily grab it. not to say my code is worth hiding, but i like it if things arent out in the open as much as what love currently has

actually just caught wind of NON yesterday. looks nice. its pretty much just like love, even the guy has said its just like it. few differences

known about libgdx for a while, but would prefer to stick to lua. but ill look at it. but really would like to stick to lua-SDL.

@ghost
Copy link

ghost commented May 2, 2015

The hiding aspect of the whole src,assets it's something in Love but
not many people will actually understand what you have done there. I
mean not everyone is a programmer.

On Du, mai 3, 2015 at 2:44 , leòdhas lepton notifications@github.com
wrote:

ive tried the state it was in a while back on my ipad, which is still
0.9.2, but that was a major hack and not something that is currently
built in. its not a deal breaker for me. what breaks it for me is
that code is not safe within your application if you want it to be
right away. anybody can easily grab it. not to say my code is worth
hiding, but i like it if things arent out in the open as much as what
love currently has

actually just caught wind of NON yesterday. looks nice. its pretty
much just like love, even the guy has said its just like it. few
differences

known about libgdx for a while, but would prefer to stick to lua. but
ill look at it. but really would like to stick to lua-SDL.


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

true. but personally i just dont like seeing code out in the open. its one pet peeve i have about love. i would actually use it all the time if i knew how to build aplications properly that hid code. but have never found info on the subject

@lewislepton
Copy link
Author

but in all honesty i have been tempted by NON though. because you can work with love files you have made, you can kind of protect things also by locking them. plus you can export to iOS/android

im going to give it a deeper look. annoying i have to install JDK, dont like having java stuff nor flash on my computer ;)

@ghost
Copy link

ghost commented May 2, 2015

:O Java ftw

On Du, mai 3, 2015 at 2:55 , leòdhas lepton notifications@github.com
wrote:

but in all honesty i have been tempted by NON though. because you can
work with love files you have made, you can kind of protect things
also by locking them. plus you can export to iOS/android

im going to give it a deeper look. annoying i have to install JDK,
dont like having java stuff nor flash on my computer ;)


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

to lastly say on a lua based platform of game making. there is MOAI as well.

though my experience is slightly tattered. not much documentation or really any, no commented examples and kind of poorly shown what it can do, apart from people who have used it well. though it is is fast, plus it does export to desktops and touch devices

www.getmoai.com

@ghost
Copy link

ghost commented May 3, 2015

It works on Web,phones,desktop and it's faster than Libgdx which is
quite a big wow.You can go to their irc on freenode - /join #moai

On Du, mai 3, 2015 at 12:09 , leòdhas lepton
notifications@github.com wrote:

to lastly say on a lua based platform of game making. there is MOAI
as well.

though my experience is slightly tattered. not much documentation, no
commented examples. though it is is fast, plus it does export to
desktops and touch devices

getmoai.com


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 3, 2015

I've worked with it for 2-3 weeks but I don't like all the
MoaiClass.function stuff.

On Du, mai 3, 2015 at 12:09 , leòdhas lepton
notifications@github.com wrote:

to lastly say on a lua based platform of game making. there is MOAI
as well.

though my experience is slightly tattered. not much documentation, no
commented examples. though it is is fast, plus it does export to
desktops and touch devices

getmoai.com


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

it was ok for myself, but really getting any kind of thing made was an annoyance for myself. also the same as yourself, the functions stuff was annoying.
biggest probably for me was the documentation

i guess in some small stretch love2d would be good, then use NON to convert to touch platforms. but that in one way is the easiest of the bunch. the coding style is lovely i think. but as said before, the security of files is pretty crap. but then again, lua code is not secure in its own right

i may give love2d another big bash. i did enjoy coding on it. sitll want to do lua-SDL2 as well, but it really needs more examples and ways of explaining things in a game making type of way

@lewislepton
Copy link
Author

also as well there is openframeworks. whilst it is a c++ framework, you can use add-on to extend it. its actually better than c++ since its a bunch of frameworks, libraries etc to make coding easier. its not really meant for games off the bat, but is possible.

an add-on i use frequently is ofxLua, and the syntax is just openframeworks one, but put in a love2d type of way.
so to draw a circle it would be of.circle(stuff), where as in openframeworks it is ofCircle(stuff)

@lewislepton
Copy link
Author

bt things like controllers are not supported, plus if you use other add-ons with ofxLua, you have to use SWIG to bind them. though have not done that yet

@ghost
Copy link

ghost commented May 3, 2015

hm

On Du, mai 3, 2015 at 2:21 , leòdhas lepton notifications@github.com
wrote:

bt things like controllers are not supported, plus if you use other
add-ons with ofxLua, you have to use SWIG to bind them. though have
not done that yet


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 3, 2015

I've been using Libgdx for 2.4years and I like it.Try libgdx or
monogame or just stick with love and bother about how to hide the code
later.I remember josenpfhat(one of love's memebers) saying something
about a program which can obfuscate lua code.

On Du, mai 3, 2015 at 2:21 , leòdhas lepton notifications@github.com
wrote:

bt things like controllers are not supported, plus if you use other
add-ons with ofxLua, you have to use SWIG to bind them. though have
not done that yet


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

but i do think that if you want te get down and make something, probably love2d is best, then use NON to make it into touch device output, even desktop, since it uses java to secure it a little better.
i asked and they said it makes it readable but not editable, which is good in my book. better than just open in the open to be edited

@lewislepton
Copy link
Author

it is tempting. libgdx i mean. i just dont want to use another language right now. though did see LuaJ, but dont know about that, have not tried. if you know if just using lua with libgdx is good, then i might give it a go.

but true. stick to something then try later on. its the fact of making that should matter and other stuff comes later
but with this new NON, that looks like it will address some things for me, such a multiplatform output with both iOS and android
would be good if there was a proper built LOVE2D version, but hey

@lewislepton
Copy link
Author

monogame is also a good choice, but again, thats C#, not lua. id rather stick to a language i like. c# is alright but would prefer lua in all honesty

@lewislepton
Copy link
Author

also the cost of xamarin is ridiculous for mono. borderline retarded expensive. id just want to use xcode really, or at the least sublime

@lewislepton
Copy link
Author

i have just come across this. called lua power? never heard of it before. seems to be a collection of lua based modules
https://luapower.com/

look quite interesting

@lewislepton
Copy link
Author

i have just this minute come across this. not tried the examples since you need to build it. but looks good. may just give it a bash
https://bitbucket.org/tido/rainbow

@ghost
Copy link

ghost commented May 3, 2015

Wow,super cool! Thanks for that!

@lewislepton
Copy link
Author

aye, it looks promising indeed. plenty of features. reminds me of openframeworks, which is good since i like openframeworks. just dont like c++ ;)
so if i can use this, then id be happy. as long as i can build, run and do my thing im good

but, have already ran into a build problem with mac, but put up an issue with it. hopefully will be sorted soon ;)

@lewislepton
Copy link
Author

have not seen any demos with the examples online at all. cant find anything. but it looks damn powerful though.
plus its exports to most platforms. plus its lua. boom ;)

@ghost
Copy link

ghost commented May 3, 2015

I'll compile it and test the demos and let you know!

On Lu, mai 4, 2015 at 12:57 , leòdhas lepton
notifications@github.com wrote:

have not seen any demos with the examples online at all. cant find
anything. but it looks damn powerful though.
plus its exports to most platforms. plus its lua. boom ;)


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 3, 2015

Do you got Skype? You can add me here: vladmihail1997

On Lu, mai 4, 2015 at 12:57 , leòdhas lepton
notifications@github.com wrote:

have not seen any demos with the examples online at all. cant find
anything. but it looks damn powerful though.
plus its exports to most platforms. plus its lua. boom ;)


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

i dont, but i need to put it on ;)

@ghost
Copy link

ghost commented May 3, 2015

Sad :(

On Lu, mai 4, 2015 at 1:03 , leòdhas lepton notifications@github.com
wrote:

i dont, but i need to put it on ;)


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

ive just recently wiped my computer clean. clear crap off. only install things when i remember, or need them ;)

@ghost
Copy link

ghost commented May 3, 2015

Well if you install it you can add me anytime !

On Lu, mai 4, 2015 at 1:04 , leòdhas lepton notifications@github.com
wrote:

ive just recently wiped my computer clean. clear crap off. only
install things when i remember, or need them ;)


Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented May 3, 2015

I've started compiling it! Hopefully I'll work!

On Lu, mai 4, 2015 at 1:04 , leòdhas lepton notifications@github.com
wrote:

ive just recently wiped my computer clean. clear crap off. only
install things when i remember, or need them ;)


Reply to this email directly or view it on GitHub.

@lewislepton
Copy link
Author

aye, it looks and sounds like a nice framework. also like the coding style for lua, which is good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants