[QUOTE=ElTacoLad;32948223]I've tried to use dt, but I just get errors because it doesn't know what dt is.[/QUOTE]
Are you using it from inside love.update(dt)?
Can anyone give some hints on how to have the ball bounce left the closer it is on the left of the paddle, and vise versa for the right side?
Code is a mess currently, I'll probably rewrite it all after the deadline.
I like particle effects.
[video=youtube;3xvwVznpY2o]http://www.youtube.com/watch?v=3xvwVznpY2o[/video]
[QUOTE=nath2009uk;32949455]Can anyone give some hints on how to have the ball bounce left the closer it is on the left of the paddle, and vise versa for the right side?
Code is a mess currently, I'll probably rewrite it all after the deadline.[/QUOTE]
Get the world coordinate of the exact location the collision happened.
Get the center of the paddle in world coordinate.
XAmount = 1st.x - 2nd.x
At least that's how i did it with the physics system and the collision information.
[QUOTE=ElTacoLad;32948223]I've tried to use dt, but I just get errors because it doesn't know what dt is.[/QUOTE]
It's the [b]d[/b]elta[b]t[/b]ime between frames bud
Yeah, I'm going to wait until the weekend to finish this because there is no way I'm going to finish this with school simply because I suck at coding and don't want to be rushed.
[IMG]http://puu.sh/7xGG[/IMG]
Yay Breakout \:D/
Made in XNA. I have absolutely no clue how to get bricks, so I'm not really gonna add them.
Does my Diabetic Pong count? I made it a while back, thinking about improving it.
[url]http://dl.dropbox.com/u/4992578/Diabetic%20Pong.zip[/url]
So I've been very busy with a different game i've been creating but i managed to scratch some time up and re-make my old Breakout! clone... its very simple and feel free to check out the totally documented well written ( insert sarcasm ) code.
[img]http://i.imgur.com/knQVv.png[/img]
[img]http://i.imgur.com/wvluE.png[/img]
Even though it says not to add the bricks... i might do it anyway. I'm such a rebel.
[url]http://dl.dropbox.com/u/15805077/Breakout.zip[/url]
[editline]25th October 2011[/editline]
Oh yeah, a simple menu system goes something like this:
[code]
function Menu()
function love.draw()
end
function love.update(dt)
end
function love.keypressed(key)
if key == 's' then
Playing()
end
end
end
function Playing()
function love.draw()
end
function love.update(dt)
end
end
function love.load()
-- all the shit you do in load
Menu()
end
[/code]
Or something like that...
I gave this assignment a try: [url]http://dl.dropbox.com/u/8226262/prg/gwilty1_2.love[/url].
I've never used Lua nor LÖVE before so this required some learning. LÖVE is surprisingly easy to work with.
[QUOTE=sim642;32955642]I gave this assignment a try: [url]http://dl.dropbox.com/u/8226262/prg/gwilty1.love[/url].
I've never used Lua nor LÖVE before so this required some learning. LÖVE is surprisingly easy to work with.[/QUOTE]
Nice. The drag on the paddle was an interesting touch, I'm not so sure I like it - it certainly made it a lot more challenging to get the swing of things at the start. Once I'd bounced the ball a few times, it flickered white then went solid red... then got stuck in the ceiling, just bounced from left to right with the top 3-4px off the screen. Not sure what happened there.
[QUOTE=mechanarchy;32955717]Nice. The drag on the paddle was an interesting touch, I'm not so sure I like it - it certainly made it a lot more challenging to get the swing of things at the start. Once I'd bounced the ball a few times, it flickered white then went solid red... then got stuck in the ceiling, just bounced from left to right with the top 3-4px off the screen. Not sure what happened there.[/QUOTE]
When the ball reaches high speeds then collision detection breaks since it doesn't take the balls speed into count. I should probably fix it somehow because it gets quite annoying.
[QUOTE=DrLuke;32942374]I only see one flaw in there: Where do you get an undressing girl from?[/QUOTE]
...The internet?
Ok, so I fixed the collision bugs. Instead of negating ball's velocity on collision I'm now setting it through math.abs(). That doesn't create conditions where the velocity will be negated back and forth causing the ball to get stuck. Hopefully it works: [url]http://dl.dropbox.com/u/8226262/prg/gwilty1_2.love[/url]
[QUOTE=HeroicPillow;32945151]Improved it: [url]http://www.pixellegacy.com/extremeballbouncing.love[/url]
Changelog:
-Fixed a glitch where the ball and/or paddle would destroy themselves (i still don't know how it did that)
-Background music added, along with a info file with info about it.
-Sound effects added but i doubt you can hear them over the background music.
-Threw in one of the default particle systems because i don't want to modify one at the moment, but i did minorly tweak it
-BGcolor is amazing now. (can't see it in the screenshot)
-You get 50 points per block broken, and 1 point each time you bounce the ball off of the paddle
Still broken:
-Sometimes the ball goes through bricks
[t]http://img197.imageshack.us/img197/8541/screenshot2011102415362.png[/t][/QUOTE]
Fixed the only thing that was still broken. I also added a music mute button (M) as I stated in a previous post.
The link for the game is still the same url as before.
My first time doing something with LÖVE, and it's surprisingly easy to work with.
I think it turned out not bad and I'm mostly done with it.
[img]http://imgur.com/AgE0n.png[/img]
Controls:
Left, Right arrow key: Move paddle
Space: Start game
[url]http://dl.dropbox.com/u/43446280/breakout.love[/url]
[img]http://dl.dropbox.com/u/13824718/ZScreen/2011-10/Screenshot-2011-10-25_22.39.19.png[/img]
It's like the game realised it was literally impossible for it to win and gave up.
So sad I discovered this so late, but between my own business setup with insurance and licensing, my first attempt at web development and the new SA DF LP I would've had no time anyway. Maybe in excercise 2
[QUOTE=BlkDucky;32963367][t]http://dl.dropbox.com/u/13824718/ZScreen/2011-10/Screenshot-2011-10-25_22.39.19.png[/t]
It's like the game realised it was literally impossible for it to win and gave up.[/QUOTE]
It looks like I made the purple blocks spawn too frequently.
I fixed this now ans I also made them a bit weaker and increased the starting size of the paddle. The link is the same.
[QUOTE=BlkDucky;32963367][img]http://dl.dropbox.com/u/13824718/ZScreen/2011-10/Screenshot-2011-10-25_22.39.19.png[/img]
It's like the game realised it was literally impossible for it to win and gave up.[/QUOTE]
Looks like your game is turning into Team Fortress 2.
[QUOTE=All0utWar;32964196]Looks like your game is turning into Team Fortress 2.[/QUOTE]
hopefully he'll add hats next patch. Also, nerf those damn red blocks.
Also, my submission.
[IMG]http://dl.dropbox.com/u/2606190/breakout.jpg[/IMG]
[url]http://dl.dropbox.com/u/2606190/Breakout%20clone%20lol.love[/url]
Please, look at my submission and give me a rating for a first program.
Here's mine.
[IMG]http://dl.dropbox.com/u/2140545/breakout.PNG[/IMG]
Very basic but the source is pretty organized, I'd say. It could have been done better but this is my first experience with LUA and love.
.love file: [url]http://dl.dropbox.com/u/2140545/shit.love[/url]
source: [url]http://dl.dropbox.com/u/2140545/main.lua[/url]
[QUOTE=ana-r3x3a;32965468]hopefully he'll add hats next patch. Also, nerf those damn red blocks.
Also, my submission.
[url]http://dl.dropbox.com/u/2606190/Breakout%20clone%20lol.love[/url]
Please, look at my submission and give me a rating for a first program.[/QUOTE]
The only winning move is not to play.
Here's a video of my clone in it's current state:
[media]http://www.youtube.com/watch?v=vojcVvNy00E[/media]
As you can see about halfway through it, it still has a weird bug where it will just plow through large sections of blocks after the restart. I also accidentally unmuted the music right afterwards too. :v:
Okay, so whats the next challenge?
I've got to mark gwilty's work before the next assignment
[QUOTE=garry;32973444]I've got to mark gwilty's work before the next assignment[/QUOTE]
Will we get to see it?
I'm pretty pleased with it so far. I'm not in the office tomorrow so I think I've got an extension till Friday.
DEUCES STRIKES AGAIN!!!
Instead of doing important things in school like homework:
[video=youtube;MngERy9-MQQ]http://www.youtube.com/watch?v=MngERy9-MQQ[/video]
Making the ball bounce of the bricks would require me to find out which side of the brick I hit. I dont feel like figuring that out.
Also, the 'ball' is an image of a ball. But it just draws that square the size of an image. I have this:
[CODE]ballImg = love.graphics.newImage("ball.png")
function love.draw()
love.graphics.draw(ballImg, ball.X, ball.Y)
end[/CODE]
The image is a png which I thought was fine. Do I have to do something else?
Heres the source if anyone wants to use it: [url]http://dl.dropbox.com/u/19301242/main.lua[/url]
Sorry, you need to Log In to post a reply to this thread.