Page 2 of 5
Re: Unlove: Zombie Survival
Posted: Sat Apr 30, 2011 7:03 pm
by Lafolie
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.....
Re: Unlove: Zombie Survival
Posted: Sat Apr 30, 2011 8:17 pm
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
Re: Unlove: Zombie Survival
Posted: Sat Apr 30, 2011 8:37 pm
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
Re: Unlove: Zombie Survival
Posted: Sun May 01, 2011 4:01 am
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.
Re: Unlove: Zombie Survival
Posted: Sun May 01, 2011 8:43 am
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
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.
Re: Unlove: Zombie Survival [Big Update]
Posted: Sun May 01, 2011 4:30 pm
by ishkabible
it's not that hard to change, just make a square image and add it to the SpriteBatch. not that hard.
Re: UnLöve: Zombie Survival [Big Update]
Posted: Mon May 02, 2011 7:51 am
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.
Re: UnLöve: Zombie Survival [Big Update]
Posted: Mon May 02, 2011 11:31 am
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
)
Re: UnLöve: Zombie Survival [Big Update]
Posted: Mon May 02, 2011 12:32 pm
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
)
Ah yeah, Sounds awesome, and I should of read you list of features to come list, rather than just saying.
Re: UnLöve: Zombie Survival [Big Update]
Posted: Mon May 02, 2011 2:40 pm
by Lafolie
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