Cannon
Cannon
It's a cannon, nothing more. You open it, you click to decide the angle and you watch this little circle bouncing. Any suggestion?
- Attachments
-
- Cannon.love
- 0.8.0
- (1.46 KiB) Downloaded 251 times
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Cannon
Stuff to knock down angry bird style! And upgrades for the cannon/cannon ball! Many levels, multiplayer head to head levels. Would be so awesome.
Re: Cannon
I thought this game would have become a game in which you simply have to launch the ball as furthest as possible, with obstacles and springs (? I hope it's the right word), but your idea of making it an angry-birds style game is not bad... The former is simpler, the latter is better but I'd need help to make it, since I don't know how to use HardonCollider, love.physics or other physics libraries, and I still can't understand OOP...
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Cannon
Think that penguin flying game is hard to beat. An angry-bird style game you only need love.physics and it would do most of the work for you, not that hard to learn . And what about OOP don't you understand?
Re: Cannon
Pretty much anything more than
Code: Select all
table.function(table) is equal to table:function()
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Cannon
Just added a quick restart option so you don't have to quit and start the game every time after you've launched the ball.
Code: Select all
function restart()
love.load()
end
Code: Select all
function love.keypressed(key, unicode)
if key == "return" and ball.launched then
restart()
end
end
- Attachments
-
- Cannon_restart.love
- (1.49 KiB) Downloaded 175 times
Re: Cannon
That's what love.load exixts for, I think... Thanks, Viking, I didn't ever think to use love.load like this
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Cannon
Here's a quick example of this game using OOP and love.physics. Love.physics does so much of the work for you . I hope you can understand it, I didn't comment much so pm me if you have any questions.
I went a bit further and implemented an enemy box you have to hit with enough force. The force calculation for the collision still needs to take into account the angle of the impact (a glancing hit should do less damage) but that seems like a pretty difficult calculation.
Use hump.camera to readd the camera system, add some obstacle blocks and you basically have angry birds!
I went a bit further and implemented an enemy box you have to hit with enough force. The force calculation for the collision still needs to take into account the angle of the impact (a glancing hit should do less damage) but that seems like a pretty difficult calculation.
Use hump.camera to readd the camera system, add some obstacle blocks and you basically have angry birds!
Re: Cannon
Ok, I rewrote it (I was reading yours during the rewriting though, so it may look very similar to it) and created a basic editor. First you open the editor, then you place some block (be careful, they'll still fall) and save (you can find instructions by holding down F1 or H in the editor); then you run Cannon and load the map.
EDIT: But, without the attachments, you don't really care, I think...
EDIT: But, without the attachments, you don't really care, I think...
- Attachments
-
- Editor.love
- Editor! 0.8.0
- (2.4 KiB) Downloaded 177 times
-
- hump.class.cannon.love
- Cannon! 0.8.0
- (6.18 KiB) Downloaded 183 times
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Cannon
Nice work with the editor! See, OOP is rather simple no? Would love to see this project completed. I haven't seen an online multiplayer versus mode for this type of game before.
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests