Page 1 of 1

Multiple levels

Posted: Sat Feb 14, 2015 4:40 am
by pactace
Hello all,
I am making a 2D platformer and it has multiple levels Im trying to make it so that there is a screen with all the levels and when you click on one it loads it

Re: Multiple levels

Posted: Sat Feb 14, 2015 7:03 am
by Doctory
i dont get whats so hard here, you could just simply have buttons which will load the level.
please describe probem more, i dont really understand what is the problem here.

Re: Multiple levels

Posted: Sat Feb 14, 2015 3:18 pm
by rmcode
pactace wrote:Hello all,
I am making a 2D platformer and it has multiple levels Im trying to make it so that there is a screen with all the levels and when you click on one it loads it
You will need some kind of UI - at least a button that detects wether the mouse is over it or not and runs a function when it is clicked. I suggest you take a look at some of the projects people post here to see how buttons can be created.

Alternatively you can use a library like love frames.

Re: Multiple levels

Posted: Sat Feb 14, 2015 7:28 pm
by s-ol
pactace wrote:Hello all,
I am making a 2D platformer and it has multiple levels Im trying to make it so that there is a screen with all the levels and when you click on one it loads it
...and your question is? You are saying what you want to.do, but that is not a question. I can of course read the implicit question of (how do I do this?) But that is such a broad question than noone can answer it really.

Questions that I would consider "valid":
  • how do I detect clicks on a button - plenty a thread covers this topic, go look around
  • what UI-library should I use? - whichever you want, if one at all. For your case love.graphics regular capabilities are more than enough.
Also I would recommend trying to come up with something yourself - anything that works - and then turning to the community when you get stuck. Considering that you haven't managed to run a löve file yet, I suppose you haven't tried writing something yourself.
If you cannot come up with anything on your own then stop bothering the community and pick up a book on lua or löve, you are not at a stage where you profit from single answers from random people.