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

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Unlove: Zombie Survival

Post by Lafolie »

TsT wrote: Just for you information load() is a standard lua function.
You should not overwrite it :D
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? :neko:
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.
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: Unlove: Zombie Survival

Post by TsT »

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
diff -ruBb unlove006.1/load.lua unlove006.2/load.lua
--- unlove006.1/load.lua
+++ unlove006.2/load.lua
@@ -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 ...)
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Unlove: Zombie Survival

Post by Lafolie »

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.
User avatar
ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

Re: Unlove: Zombie Survival

Post by ishkabible »

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.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Unlove: Zombie Survival

Post by Lafolie »

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 :P
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.
User avatar
ishkabible
Party member
Posts: 241
Joined: Sat Oct 23, 2010 7:34 pm
Location: Kansas USA

Re: Unlove: Zombie Survival [Big Update]

Post by ishkabible »

it's not that hard to change, just make a square image and add it to the SpriteBatch. not that hard.
User avatar
BarnD
Prole
Posts: 49
Joined: Wed Jun 16, 2010 1:23 pm
Location: Australia
Contact:

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

Post by BarnD »

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.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

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

Post by Lafolie »

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 :P)
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.
User avatar
BarnD
Prole
Posts: 49
Joined: Wed Jun 16, 2010 1:23 pm
Location: Australia
Contact:

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

Post by BarnD »

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 :P)
Ah yeah, Sounds awesome, and I should of read you list of features to come list, rather than just saying. :rofl:
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

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

Post by Lafolie »

BarnD wrote:Ah yeah, Sounds awesome, and I should of read you list of features to come list, rather than just saying. :rofl:
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 :D

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 :D
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.
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests