'Push' Game
Posted: Sat Oct 04, 2008 9:05 pm
Here is the game I was developing for Love. Unfortunately college has been a bit hectic and I have had zero time to do any coding at all. Too much Maths! I've decided I shan't be continuing with this game for a while, and if I do it will be on PSP. It was nice knowing you, Love.
This game is not finished and there isn't much to play. But I felt it was a massive waste of time if I just let it rot on my hard drive. And for some people it's nice to look at code of working games.
It's pretty modular too. Here's how levels are made.
zlib license.
This game is not finished and there isn't much to play. But I felt it was a massive waste of time if I just let it rot on my hard drive. And for some people it's nice to look at code of working games.
It's pretty modular too. Here's how levels are made.
Code: Select all
LEVEL.Category = "Yummy Custom Levels"
LEVEL.ID = 1
LEVEL.Name = "Level the first one"
LEVEL.Map = {
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,1,3,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
}
function LEVEL:Start()
Player:SetPos(2,2)
AddItem( 10, 7, "Crate" )
local light = AddItem( 5, 5, "Light" )
local tile = GetTile(5, 6)
function tile:OnPushOver( item, xdir, ydir )
if item.type == "Crate" then
light:TurnOn()
end
end
end