State manager

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
fanzo
Prole
Posts: 2
Joined: Fri Oct 28, 2016 9:46 pm

State manager

Post by fanzo »

I don't know if you guys can help me to how to make a state manager, i know how to make one in Java but in Lua the things are different because this is not a OOP language but i want to change to love because the things are more simple and easy to do and i will try my best to learn :cry:
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: State manager

Post by raidho36 »

You can emulate classes using metatables; there are class implementation libraries for Lua.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: State manager

Post by kikito »

My recommendation would be slowing down and starting by learning Lua a bit more (maybe giving a look at Programming in Lua, it's free. Or maybe Learn Lua in 15 minutes, if you are really in a hurry). Once you spend some time with the language, you will probably be able to figure out how to implement your own state manager easily (you will probably use tables).

Trying to "do what you did in other languages" quickly without learning the new language first will result in a lot of frustration.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests