Page 1 of 1

My first love (its zombies)

Posted: Fri Apr 06, 2012 7:50 am
by DumpOnIt
Hi all I made this zombie game as my first ever project in love lua! It's a really simple game with a top-down view where you can strafe around zombies and shoot them. It works with an xbox controller but also a little bit with the keyboard. I used some examples on the wiki but I don't remember the links because I made this a month ago but have fun playing with it! Also the code has instances of copy paste because I still didn't get to the OOP chapter in PIL so I pieced stuff together a bit :P ok enjoy

EDIT: Ok I read your guyses feedback and I made a newer version, so It is 1.1! Theres a menu and it looks better I think. :) But I didn't change the sounds. :x

EDIT 2: The Third (prob final) Version is a lot better than the second version because it has full xbox controller menu support, detects default input mode, pausing, and some other sounds and also fixed up UI things. I think after this i can be like "that was a fun first project" time to start another with new knowledge!! ^^

EDIT 3: Fix to make Love 0.8 Compatible

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 8:46 am
by Larsii30
Hey there :)

I like your game !
First I played with keyboard and thought, that the player moves to fast.
With the xbox controller the gameplay is a lot more like it should be because you can move as fast as you like.
The items you could collect a really helpful too.

May some things you could do better:

- The gunsound is more like a clown throw waterbombs in a game for kids 3+. :p
- The images you used aren't bad at all but I personally think the player and zombie images could be better. Like the TNT image, thats a better one.
- thetext in the score gamestate after you die should be centered.
- The menu needs some tuning. May a proper layout to make it feel more comfortable to read.
- the key in the menu with R , P and O feel a bit strange and i.e the screenmode switch option could be done with only one key.
- Add a border so the player can not leave the combat zone

overall its a cool game! Good work.

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 8:58 am
by DumpOnIt
Hehehe, yeah the gun sound is pretty funny. It was one of those things you intended to only have temporarily, but then just got too used to it and can't tell if it's even that good or that bad :shock: But thanks for the feedback, yo. I'm probably gonna continue reading that book this weekend, fix this thing up... That will be tight.

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 9:03 am
by GijsB
i can't play it because it's going to fast :P
you didnt 'fix' the movement : on slower computers it'll run slower, faster computers faster.
atleast that's what i think.. i didn't look at your code yet.

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 1:34 pm
by rokit boy
Didn't use dt...

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 4:23 pm
by josefnpat
Snazzy!

I looked at the code, and although everything was in the main.lua (use more `requires`!), it was still rather clean.

I ran this with love 0.7.2 and received this error:

Code: Select all

Error: [string "main.lua"]:157: bad argument #1 to 'abs' (number expected, got nil)
stack traceback:
	[C]: in function 'abs'
	[string "main.lua"]:157: in function 'update'
	[string "main.lua"]:356: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
This error goes away when I use love 0.8.0. Please tell us which version of love this game is meant to be played in.

Here are some things to consider:
  • Clean up your `main` screen and `game over` screen. A big dump of white basic text on a light grey scale background makes it hard to read.
  • Use one or two different fonts.
  • Change the font size of headers (e.g. "ZOMBIES!!!","==GAME INFO==","==STORY==")
  • Make a single key toggle between the two screen modes instead of using two keys for different modes.
  • Use buttons instead of the `r` key to change states.
  • Check out the love.graphics.printf() command
  • for main.lua:152-165,202-206,247-248, you ought to be passing dt through the update function so you can properly move the object instead of just moving it by axisDirX*5 (5px per frame).
It's a good start. You're using placeholders, and they seem to work well enough until you can get some real art down.

Keep up the good work!

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 10:00 pm
by DumpOnIt
Thanks for the feedback, everyone! I'll definitely look at using dt and fixing up the game's appearance.
josefnpat wrote:...
I ran this with love 0.7.2 and received this error:

Code: Select all

Error: [string "main.lua"]:157: bad argument #1 to 'abs' (number expected, got nil)
stack traceback:
	[C]: in function 'abs'
	[string "main.lua"]:157: in function 'update'
	[string "main.lua"]:356: in function 'update'
	[string "boot.lua"]:1: in function <[string "boot.lua"]:1>
	[C]: in function 'xpcall'
This error goes away when I use love 0.8.0. Please tell us which version of love this game is meant to be played in.
...
I wrote this using 7.2.2, but I think the problem may come from my poor control scheme picking code. If there was a controller in slot zero that wasn't an xbox controller the axisDir wouldn't be a number. I think it works in love 8 because controller index starts at one, so it would default to keyboard, assuming you were playing on the keyboard. In a new version I'll change how it works. :)

Re: My first love (its zombies)

Posted: Fri Apr 06, 2012 10:17 pm
by kesac
Hey nice job, I played for a few minutes and got up as high as 6800. I didn't have any issues with play speed. The sprites for the zombies really don't look like zombies... more like evil cabbages (which, incidentally, are just as fun to shoot at).

Re: My first love (its zombies)

Posted: Sat Apr 07, 2012 3:28 am
by DumpOnIt
I updated the zombie game to version 1.1 now. It has a new little menu system (no mouse-- use arrow keys and enter) and graphics. I changed the movement to use dt, but I'm still not sure if it works right for everyone.

Re: My first love (its zombies)

Posted: Sun Apr 08, 2012 12:20 am
by baconhawka7x
I love this game! I loooveee the art style. And the gui is seriously awesome.
The only tip I have is to add a new background. Or like, have a new area of playing every now and then(Or maybe you choose).
But seriously awesome game!:D