Multiple levels

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
pactace
Prole
Posts: 38
Joined: Fri Jan 30, 2015 1:25 am

Multiple levels

Post 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
Very new programmer dont judge
User avatar
Doctory
Party member
Posts: 441
Joined: Fri Dec 27, 2013 4:53 pm

Re: Multiple levels

Post 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.
User avatar
rmcode
Party member
Posts: 454
Joined: Tue Jul 15, 2014 12:04 pm
Location: Germany
Contact:

Re: Multiple levels

Post 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.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Multiple levels

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

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests