Page 1 of 1

Simulation Games

Posted: Fri Oct 26, 2012 3:21 pm
by tomshreds
Hi everybody,

After having passed a week playing with Löve, I now feel comfortable to start building a game with it.

Without throwing away 100% of my idea, it's about enterprise simulation. You'd have to create products, sell them, advertise, and make sure that you make money at the end of the line to be able to proceed in the game.

Such a game wouldn't have that much graphics, but much more complex logic in it. I'm here for suggestions, what do you think would be the most important part of building a simulation game?

I'm starting to think about a table structure that would contain all the games data, and to save and load I'd use "Save Table To Tile" http://lua-users.org/wiki/SaveTableToFile for this part.

I'd like to know the best way to create menus with controls in them, any other ideas are welcome! Resources, questions, suggestions, everything!

Thanks and have a nice day!

/tommy

Re: Simulation Games

Posted: Sat Dec 08, 2012 7:27 pm
by Lafolie
The love.filesystem is highly recommended over standard lua io, so I'd look into using a löve-specific way to save tables (psssh, there's some at Category:Libraries).

As for making menus, I would use a class implementation and create instances of a menu object as required. You could start out with a function that displays a window with the specified text (perhaps even using some 'fancy' texture atlas if you want resize-able windows with borders) and build it up from there. Give your menu class some callbacks for mouse or key events and you can easily manipulate them from within your gamestates (assuming you use them).

Re: Simulation Games

Posted: Sat Dec 08, 2012 8:06 pm
by Codex
I don't know if it's the best way, but a quick and easy way is to just store the menu values in a table. If player is scrolling over menu selection set the table value to true. ie. menu_table = {button1 = false, button2 = false, button3 = true}

Hope that helps.