Splitting the main.lua
Posted: Sat May 30, 2009 9:09 pm
Hello people,
I've fell in LÖVE today and started creating a game.
It goes well so far, but I am new into the "game developement process" (I've been programming only websites and Project Euler problems until now - or hey, I remember I played with Game Maker for a little while) and I don't know how to split the main.lua into more files.
At the moment everything is in main.lua and I feel my code is already "bloated". I've downloaded some examples and projects from other people, but I don't understand the process well.
My game is in the attachment, so explore the source freely... What I want to achieve is splitting the main.lua into intro.lua, menu.lua, etc.
Also, does anyone here have better idea of how to make separate "rooms" (yeah, I have this terminology surely from the Game Maker ) and blend between them? I am doing it by the "play" variable, which points to functions. Not ideal, I guess :/
Thanks in advance, LÖVE you all
Martin
I've fell in LÖVE today and started creating a game.
It goes well so far, but I am new into the "game developement process" (I've been programming only websites and Project Euler problems until now - or hey, I remember I played with Game Maker for a little while) and I don't know how to split the main.lua into more files.
At the moment everything is in main.lua and I feel my code is already "bloated". I've downloaded some examples and projects from other people, but I don't understand the process well.
My game is in the attachment, so explore the source freely... What I want to achieve is splitting the main.lua into intro.lua, menu.lua, etc.
Also, does anyone here have better idea of how to make separate "rooms" (yeah, I have this terminology surely from the Game Maker ) and blend between them? I am doing it by the "play" variable, which points to functions. Not ideal, I guess :/
Thanks in advance, LÖVE you all
Martin