Note: For friends I may have linked here who need help installing the game you must first download the Love platform installer from http://www.love2d.org. After it's installed download and open the latest version of the game from below. Welcome to playing with Love!
Hey all,
Before yesterday (Oct. 10th) I had never written a line of LUA in my life. I've written in a few other languages and something about Love2D really appealed to me. I had to try it out, and so far, it's been a whole boat load of fun. I've decided to write a side scrolling space shooter with my girlfriend (she's the "idea director" ) dedicated to our little pup beagle. I was hoping a few people would try it out and give any advice/pointers that I should keep in mind going forward.
Screenshot:
Tips
Try using the laser on the cat fliers
Missiles work best on the urples, try to time your attacks against their firing rate!
Final boss will reflect projectiles with his shield!
As with any project, I need to set some goals for myself. A point at which I will go, "Ok. This is done. I will not add another line of code to this." Frankly, if I don't, I will never stop working on something. Here are my goals:
Goals:
At least 15 types of enemies.
At least 6 levels.
One "super enemy" at the end of each level.
Interface for swapping projectile player is using.
Menu system and game over screen
Last edited by ninwa on Fri Oct 15, 2010 6:02 am, edited 22 times in total.
Ah just disregard that, it's probably from when I was playing around with getting Love packages to work. I will make sure that's not in there the next update I put out. I wrote a little batch file that just packages everything in my dev folder and makes the .love.
Thanks for checking it out and I'm glad you enjoyed it. And actually, the pups firing rate is something that was a lot slower earlier and I plan on modifying in the future.
I hope to add:
Enemies dropping Bones and their projectiles
Pressing 'r' will toggle projectiles with a small UI at the bottom
At least 10 levels and 20 different monsters
A soundtrack (going to compose it myself, or at least try, hehe)
A game menu that lets you choose which level you want to play after having unlocked it
If you're looking for some help with the soundtrack, I'd be happy to oblige. I'm not a musician by trade, but I do write my own brand of electronic music as a hobby.
Okay, so I notice you are using a lot of table indexing with numbers. And then referencing the next one using table#+1 and so on.
And then to compensate for the big loops that might come out of this, I saw you doing a cleanup function that checks for cases when everything is not visible.
You might want to look into using functions like "table.insert()" and "table.remove()" and then a "for i,v ipairs(table) do" for tables and set references that are off screen to nill. Lua has a garbage collector it calls itself.
TechnoCat wrote:Okay, so I notice you are using a lot of table indexing with numbers. And then referencing the next one using table#+1 and so on.
And then to compensate for the big loops that might come out of this, I saw you doing a cleanup function that checks for cases when everything is not visible.
You might want to look into using functions like "table.insert()" and "table.remove()" and then a "for i,v ipairs(table) do" for tables and set references that are off screen to nill. Lua has a garbage collector it calls itself.
This is exactly the kind of information I was hoping would come out of this. I KNEW there was a better way of doing that, but I rushed coding to get it to work. Once I had something that worked "well enough" I didn't bother reconsidering it. Thank you very much. There is actually a few things in the code that was limited by the way I was doing it (for example, multi-staged waves with tons of enemies) because after so long the tables become far too large (especially projectiles) and I consider that unacceptable.
spirulence wrote:If you're looking for some help with the soundtrack, I'd be happy to oblige. I'm not a musician by trade, but I do write my own brand of electronic music as a hobby.
Fantastic tracks, definitely a lot better than anything I will likely come up with. I plan on trying though. Just to say "I made everything here " I might bother you with some questions in the future.
function performCleanup()
-- Remove dead enemies, but only if
-- their fade timer (controls their death animation)
-- has expired.
for i,v in ipairs(enemies) do
if( (v["alive"] == false) and
(love.timer.getTime() - v["fade_timer"] > 3)
) then
table.remove(enemies,i)
end
end
-- Remove off-screen projectiles from
-- our projectile table.
for i, v in ipairs(projectiles) do
if( not(v[1] > -70) and
not(v[1] < 1000) ) then
table.remove(projecties,i)
end
end
end