Best way to handle multiple screens?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
theelitenoob
Prole
Posts: 7
Joined: Sun Dec 25, 2011 1:22 am
Location: Athens!
Contact:

Best way to handle multiple screens?

Post by theelitenoob »

Hi, i was wondering the best way to implement multiple screens in
a love2d game? For example, i would have say a Title intro screen with the name and title
of the game and some buttons, then when a button is pressed, i want it to
update and change the screen into the game itself, whats the cleanest and most efficient way to implement this?
hi, I'm The Elite Noob
User avatar
vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

Re: Best way to handle multiple screens?

Post by vrld »

You are looking for some sort of gamestate management. There are a number of approaches. This forum topic investigates some approaches.

There are also a number of libraries to tackle this problem. My favorite (because I wrote it) is hump.gamestate, but there is also bartbes dsm and kikitos stateful.lua. Just pick the one you like the most.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine
User avatar
theelitenoob
Prole
Posts: 7
Joined: Sun Dec 25, 2011 1:22 am
Location: Athens!
Contact:

Re: Best way to handle multiple screens?

Post by theelitenoob »

thank you, that serves and fixes my problem perfectly thank you!
hi, I'm The Elite Noob
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests