This was going to happen eventually and you all know it. A flappy bird clone.
It's pretty minimal at the moment, But i think it plays nicely. You just have an infinite game loop, Press any key to start, And the player starts falling, press up, W or space to "flap". If/when you crash into one of the pipe things, You die and the game starts over.
Note that it uses a shader and a canvas. If your machine doesn't support those, Too bad. (If you really want to play this and don't support shaders/canvases, You can edit the code yourself, all the shader stuff happens in game:draw in game.lua)
Enough text, Here's screenshots: (Outdated)
You'll be seeing this alot
In case you couldn't tell the design is based off the old forum banner.
I do not recommend looking through the code. Might give you a headache. I wasn't exactly thinking straight while coding this. (if you know what i mean)
Latest version available on github.
Flappy löve (Works on android! (theoretically))
Flappy löve (Works on android! (theoretically))
- Attachments
-
- Flappy love.love
- Initial release (OUTDATED AS FUCK)
- (256.87 KiB) Downloaded 167 times
Last edited by veethree on Sat Feb 22, 2014 7:27 pm, edited 8 times in total.
Re: Flappy löve
I was just about to do this
Nice game.
Nice game.
Re: Flappy löve
Nice game.
Saw 2 bugs. When you lose and hit space bar the gravity won't work, obstacles don't spawn and score is being counted
The background has a small gap that keeps blinking when the screen moves.
Saw 2 bugs. When you lose and hit space bar the gravity won't work, obstacles don't spawn and score is being counted
The background has a small gap that keeps blinking when the screen moves.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Flappy löve
Can you FOSS this, so I can offer pull requests to make this an android game? ;)
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Flappy löve
Sure! What's FOSS?josefnpat wrote:Can you FOSS this, so I can offer pull requests to make this an android game?
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Flappy löve
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Flappy löve
You have to press a key (any) to start the game. And i fixed the score being counted, Latest version on github. (link in the OP)Zarty55 wrote:Nice game.
Saw 2 bugs. When you lose and hit space bar the gravity won't work, obstacles don't spawn and score is being counted
The background has a small gap that keeps blinking when the screen moves.
Re: Flappy löve (Works on android! (theoretically))
This is great! I've been playing around with your code a bit, and in the process of adapting it I've run into a little problem. I don't know if I'm better off asking in the help forum but my code is mostly based on yours so, I figured I'd just ask here.
For collision testing and debugging purposes I was trying to make the player change color while overlapping one of the walls but it doesn't seem to be working. I can make change the color upon collision, but then it doesn't revert to the original color when it is not colliding. Would you (or anyone else) mind taking a look? This is from main.lua
If I remove the else condition , the player will change color but not change back. With this else condition nothing happens.
For collision testing and debugging purposes I was trying to make the player change color while overlapping one of the walls but it doesn't seem to be working. I can make change the color upon collision, but then it doesn't revert to the original color when it is not colliding. Would you (or anyone else) mind taking a look? This is from main.lua
Code: Select all
-- collision, loop through walls
for i,v in ipairs(wall.array) do
for _,s in ipairs(v) do
if checkCollision(player.x, player.y, player.size, player.size, s.x, s.y, s.width, s.height) then
player.collision = true
else
player.collision = false
end
end
end
- Attachments
-
- Flap.love
- (1.84 KiB) Downloaded 80 times
Re: Flappy löve (Works on android! (theoretically))
Couldn't tell you why, But that logic doesn't usually work. Try something like this:Reef wrote:---
Code: Select all
player.collision = false
for i,v in ipairs(wall.array) do
for _,s in ipairs(v) do
if checkCollision(player.x, player.y, player.size, player.size, s.x, s.y, s.width, s.height) then
player.collision = true
end
end
end
-
- Party member
- Posts: 712
- Joined: Fri Jun 22, 2012 4:54 pm
- Contact:
Re: Flappy löve (Works on android! (theoretically))
@Reef, after finding a collision, you set the collision boolean, but then continue looping through the other values. So if there's any other value in the table where it doesn't collide, then the boolean is set back to false.
You could use a break command in the for loops, to jump out of the loops after the player.collision is set to true. Unless you need to call checkCollision on all tiles (even when you already know that it collided with one), then veethree's way is the best way to go.
You could use a break command in the for loops, to jump out of the loops after the player.collision is set to true. Unless you need to call checkCollision on all tiles (even when you already know that it collided with one), then veethree's way is the best way to go.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Who is online
Users browsing this forum: No registered users and 2 guests