## UnLöve: Zombie Survival [Alpha?!?!]

Lafolie
Inner party member
Posts: 804
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

### Re: Unlove: Zombie Survival

TsT wrote: Just for you information load() is a standard lua function.
You should not overwrite it
Right you are! I'm not the best programmer around... I'm relatively new to Lua, or I wouldn't have done this. Easy to fix though, there's only 2 references to it.

Right now the game has some new features and I'm working on others:
• Rename that function. Done
• Simple title screen. Glowing text and control displays. Done
• Music can be toggled on/off with F1 key. Done.
• Blood can be set to either permanent (current implementation), fade (no framebuffers) or none (for squeamish aka wimpy people). I'm gonna study the framebuffer test code thingy from that thread so see how they test for framebuffers. I'm thinking they used exception handlers or something. Mostly done (need to add the fade.. atm they just disappear). EDIT: Probably gonna leave it like this for a while.
• More intelligent collision between player <> zombilinskipoofsiesquares-ah. Specifically, a non-glitchy/annoying one.
• Proper management of player HP. Needs a complete rewrite. Need and invincibility period.
• Other weapons/items. Including the stabby axe !
• High scores list. Local, of course. But if I ever get my webserver back I'll experiment with some kind of SQL thing here (long-run stuff, just an idea).
• Not allow zombiesznznznznnddsnsnsndfhds to spawn in/on the player.
• Considering changing the perspective from top-down to an angled side-view thing.... just an idea, I'll definitely try it out though.
• More audio. Title music? And a sound effect for getting hit, one for picking up an item and one for pressing enter on menus.
• Consider adding sprites. Although I've grown attached to the squares, the graphics will probably echo the current look alot.

Anything else I should add? Suggestions?
Edit: this list isn't mission-critical. Most of it has been implemented anyway.....
Last edited by Lafolie on Sun May 01, 2011 8:45 am, edited 1 time in total.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.

TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

### Re: Unlove: Zombie Survival

I made some changes to allow playing even framebfuffer are not supported.
By this way I was able to play to your game, and I like it !

Code: Select all

--- unlove006.1/draw.lua
+++ unlove006.2/draw.lua
@@ -10,7 +10,7 @@

--blood
love.graphics.setColor(255, 255, 255, 255)
-               love.graphics.draw(blood_buffer, 0, 0)
+               if blood_buffer then love.graphics.draw(blood_buffer, 0, 0) end

--items
for _, i in ipairs(item_stack) do
@@ -58,7 +58,10 @@

--blood!
bloodshed = {}
-       blood_buffer = love.graphics.newFramebuffer()
+       local ok, newfb = pcall(love.graphics.newFramebuffer)
+       if ok then
+               blood_buffer = newfb
+       end
blood_data = love.image.newImageData(love.graphics.getWidth(), love.graphics.getHeight())
blood_raster = nil

diff -ruBb unlove006.1/update.lua unlove006.2/update.lua
--- unlove006.1/update.lua
+++ unlove006.2/update.lua
@@ -13,7 +13,9 @@
end

--draw more blood!
+               if blood_buffer then
love.graphics.setRenderTarget(blood_buffer)
+               end
if blood_raster then
love.graphics.setColor(255, 255, 255, 255)
love.graphics.draw(blood_raster, 0, 0)
@@ -24,8 +26,10 @@
love.graphics.setRenderTarget()
--raster blood if needed
if # bloodshed > 10 then
+                       if blood_buffer then
blood_data = blood_buffer:getImageData()
blood_raster = love.graphics.newImage(blood_data)
+                       end
bloodshed = {}
end


My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)

Lafolie
Inner party member
Posts: 804
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

### Re: Unlove: Zombie Survival

That's fantastic!

I've already changed the blood render code somewhat since the last upload, but you've done something similar to what I plan to do next. Thanks for that, it'll help me out
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.

ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

### Re: Unlove: Zombie Survival

instead of using a frame buffer could you please use SpriteBatch? i used them in my zombie game for LOTS of spatter WAAAY more than your pictures depict and they work just fine. Sprite Batches are efficient enough for almost every purpose.

Lafolie
Inner party member
Posts: 804
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

### Re: Unlove: Zombie Survival

ishkabible wrote:instead of using a frame buffer could you please use SpriteBatch? i used them in my zombie game for LOTS of spatter WAAAY more than your pictures depict and they work just fine. Sprite Batches are efficient enough for almost every purpose.
Yeah, I should look into doing this. I've not used spritebatch before. If it doesn't support native rectangles though it would mean a bit of extra work and would have to wait because of how lazy I am
The framebuffers can be turned off for the time being anyway, so it's not super urgent. I'd prefer to add more features and develop the game a little first. Although saying that, the sooner I fix this, the better really.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.

ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

### Re: Unlove: Zombie Survival [Big Update]

it's not that hard to change, just make a square image and add it to the SpriteBatch. not that hard.

BarnD
Prole
Posts: 49
Joined: Wed Jun 16, 2010 1:23 pm
Location: Australia
Contact:

### Re: UnLöve: Zombie Survival [Big Update]

Awesome!
Could you add a best score, so that it shows your best score so its easier to remember what score of yours to beat.

Lafolie
Inner party member
Posts: 804
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

### Re: UnLöve: Zombie Survival [Big Update]

BarnD wrote:Awesome!
Could you add a best score, so that it shows your best score so its easier to remember what score of yours to beat.
Yep! The code for this is half-finished right now. You can type your name in at the Gameover screen and it will store it.... although I have an idea for trading highscores with other people (This would not require network code... it's a bit strange, I'll unveil it if it works )
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.

BarnD
Prole
Posts: 49
Joined: Wed Jun 16, 2010 1:23 pm
Location: Australia
Contact:

### Re: UnLöve: Zombie Survival [Big Update]

Lafolie wrote:Yep! The code for this is half-finished right now. You can type your name in at the Gameover screen and it will store it.... although I have an idea for trading highscores with other people (This would not require network code... it's a bit strange, I'll unveil it if it works )
Ah yeah, Sounds awesome, and I should of read you list of features to come list, rather than just saying.

Lafolie
Inner party member
Posts: 804
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

### Re: UnLöve: Zombie Survival [Big Update]

BarnD wrote:Ah yeah, Sounds awesome, and I should of read you list of features to come list, rather than just saying.
It's cool man! I've uploaded a new version anyway. It has the half-implemented highscores (you can type your name, and it will attempt to load a file but it it doesn't save/display the scores yet haha. Just need to write the file handling bits and do a print of the data). I'll work on finishing that now

EDIT: I'm actually writing a menu system so you can customise the controls and use joypads xD I'll do the highscores after, I swear
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.

### Who is online

Users browsing this forum: No registered users and 5 guests