Page 1 of 1

Game Help

Posted: Sun Nov 06, 2016 3:36 pm
by GR00G0
Hello!
I am currently making a game like lifeline, so far every worked great.

For the story i wanted to store it like story["1.1"] all text related stuff and a string like "2.2" when you klick the first button. But for some reason it doesnt work.

I want it to always draw gamestate. And when you klick the button it should change the gamestate to for example "2.2" but i always grt an error and i dont understand it. Do any of you have an idea how to make a game like lifeline, or know how to fix this problem?

Re: Game Help

Posted: Sun Nov 06, 2016 4:43 pm
by evgiz
It's quite difficult to help you without any of your code. Could you perhaps upload a .love file for us to look at?

Implementing game states is quite simple if you know Lua. The way I do it is using 30log, a very simple OOP library. I then create a class "GameState" with functions for loading, drawing and updating the game state. Each game state then extends this class.
If you don't want to create your own system then you could look for a gamestate libary, there are quite a few in this forum.

PS: This probably belongs in the Support and Development section of the forum! Good luck on your game.