Page 1 of 2

Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 5:13 pm
by benny hill
Hi! I thought I'd show off my first LOVE project. I thought about what would happen if you took Space Invaders and mixed it with Breakout. This is what I came up with in around a week of work.

I'm really happy with Love. I also used the HUMP framework and cron.lua (though HUMP now has all the features of cron.lua so I'll be using that in the future).

I did all the artwork myself using a pixel editor. It was a fun little project. It may end up in a games cabinet my college's game dev club has set up, which is the main reason I made the high scores system.

Enjoy!

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 5:49 pm
by coffee
Very good mashup concept. I liked the artwork too. Also the need of protect the bases reminds me Missile Command. Good work.

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 5:51 pm
by josefnpat
Am I doing something wrong?

Code: Select all

seppi@seppi7:~/Downloads/love$ love LastDefense.love 
Error: [string "cron.lua"]:80: dt must be a positive number
stack traceback:
	[C]: in function 'assert'
	[string "cron.lua"]:80: in function 'update'
	[string "main.lua"]:49: in function '?'
	[string "hump/gamestate.lua"]:83: in function '?'
	[string "hump/gamestate.lua"]:76: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
AL lib: ALc.c:1818: alcCloseDevice(): deleting 1 Buffer(s)
seppi@seppi7:~/Downloads/love$ love-unstable LastDefense.love 
Error: invader.lua:19: attempt to call method 'setSize' (a nil value)
stack traceback:
	invader.lua:19: in main chunk
	[C]: in function 'require'
	main.lua:14: in main chunk
	[C]: in function 'require'
	[string "boot.lua"]:331: in function <[string "boot.lua"]:227>
	[C]: in function 'xpcall'

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 5:55 pm
by benny hill
That never happened to me, but it looks like for some reason the update parameter is negative... This was only tested on 0.7.2 though, so maybe that's the problem?

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 5:57 pm
by coffee
josefnpat wrote:Am I doing something wrong?

Code: Select all

seppi@seppi7:~/Downloads/love$ love LastDefense.love 
Error: [string "cron.lua"]:80: dt must be a positive number
stack traceback:
	[C]: in function 'assert'
	[string "cron.lua"]:80: in function 'update'
	[string "main.lua"]:49: in function '?'
	[string "hump/gamestate.lua"]:83: in function '?'
	[string "hump/gamestate.lua"]:76: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
AL lib: ALc.c:1818: alcCloseDevice(): deleting 1 Buffer(s)
seppi@seppi7:~/Downloads/love$ love-unstable LastDefense.love 
Error: invader.lua:19: attempt to call method 'setSize' (a nil value)
stack traceback:
	invader.lua:19: in main chunk
	[C]: in function 'require'
	main.lua:14: in main chunk
	[C]: in function 'require'
	[string "boot.lua"]:331: in function <[string "boot.lua"]:227>
	[C]: in function 'xpcall'
That only happens to me in 0.8.0 (with less error comment). All runs fine in my OSX 0.7.2 version.

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 6:37 pm
by josefnpat

Code: Select all

seppi@seppi7:~$ love --version
LOVE 0.7.2 (Game Slave)
seppi@seppi7:~$ love-unstable --version
LOVE 0.8.0 (Rubber Piggy)
It also happens in 0.7.2

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 6:50 pm
by Larsii30
for my part is it working.
Nice game mix :) It's fun to play, I think the bullets of the aliens could fly up faster after they hit the player.

Good work.

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 7:40 pm
by Nixola
Why do EVERYONE ignore PO2_Syndrome T.T

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 9:26 pm
by benny hill
Nixola wrote:Why do EVERYONE ignore PO2_Syndrome T.T
Haha, again, this is my first love game, so I didn't spend any time dealing with issues I personally didn't have. I'll be sure to worry about it for my next project.

Re: Last Defense--Retro space invaders/Breakout game

Posted: Sun Apr 01, 2012 11:26 pm
by josefnpat
I think I figured out your problem.

I am using an i7-920 and It started working a lot better when I was taxing my system with a lot of stuff in the background.

My system runs the love.update so fast, that it reads dt as zero.

To fix this issue, remove line 80 of cron.lua:

Code: Select all

--  assert(type(dt) == "number" and dt > 0, "dt must be a positive number")