Page 1 of 1

State manager

Posted: Sun Dec 25, 2016 10:20 am
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:

Re: State manager

Posted: Sun Dec 25, 2016 11:27 am
by raidho36
You can emulate classes using metatables; there are class implementation libraries for Lua.

Re: State manager

Posted: Sun Dec 25, 2016 11:46 am
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.