Game Help

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
GR00G0
Prole
Posts: 1
Joined: Sun Nov 06, 2016 2:48 pm

Game Help

Post 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?
User avatar
evgiz
Citizen
Posts: 83
Joined: Mon Aug 29, 2016 11:05 pm
Contact:

Re: Game Help

Post 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.
Computer science student and part time game dev! Currently working on Depths of Limbo! :cool:

Check out the game website DepthsOfLimbo.com! :ultrahappy:
And my personal website with all my projects evgiz.net! :megagrin:
Post Reply

Who is online

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