## Box Breaker

Show off your games, demos and other (playable) creations.
JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

### Box Breaker

Hello everyone-

This is my first LÖVE game - A breakout clone (because I love breakout...) using the LÖVE's Box2d physics engine. My goal was to make nice breakout clone while learning how to code in lua and LÖVE - It was a fun learning experience overall and I was impressed by by how quickly I was able to get this game working.

This demo includes 13 levels

Controls:
<Right Click> Launch Ball
<Left click> Fire Shots - When Shot powerup is enabled
<Esc> Quit Game
<Q> Release Mouse
<S> Sound Toggle
<P> Pause/Release mouse
(Alternatively, you may use a gamepad to play this game)

I developed this game on an old powerbook g4 running Debian - I am very glad to have found the LÖVE engine - since my gaming options are extremely limited on this old machine

source: https://github.com/jdfight/BoxBreaker
Attachments
BoxBreaker.love
Final Version - New map added
Last edited by JDFight on Sat Sep 24, 2011 5:21 pm, edited 15 times in total.

Taehl
Dreaming in associative arrays
Posts: 1024
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

### Re: Box Breaker

This is a pretty solid little game! I don't think it'll beat the next 'Call of Duty' in a popularity poll, but it's perfectly playable and seems to work just fine. You especially get points for making the Box2D stuff work - it's tricky, especially for new users. Good job.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: Box Breaker

Fun game! However, don't use love.graphics.setMode in love.load(), this causes lag on some systems (as the window is drawn twice quickly, which makes some graphics cards sad or whatever). Instead, use a conf.lua-file containing

Code: Select all

function love.conf(t)
t.screen.width=640
t.screen.height=480
end
See http://love2d.org/wiki/Config_Files for details

The file below works way better for me.
Attachments
boxbreaker.love

Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

### Re: Box Breaker

Incredibly neat!

Maybe you could add some sort of indication of how many lives the player has left?

JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

### Re: Box Breaker

@T-Bone - Thanks for the tip about the conf file - I completely missed that when I was going through the wiki pages! I updated my version to include your conf file.

@Robin - Oops - I completely forgot to add a lives indicator - I just updated the game to include one in the top right corner of the gameplay screen

appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

### Re: Box Breaker

I got to the end and won!

The trick is surviving until you get the "hundred balls everywhere" bonus. They'll attack the blocks from above, bouncing repeatedly; So many blocks will break you'll get more "hundred balls everywhere" bonuses. Combine it with the "explosive ball" bonus and you win!

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: Box Breaker

You added the conf, but you didn't remove the line love.graphics.setMode(..). It still lags just as much unless you comment out that line on the affected systems.

JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

### Re: Box Breaker

Oops! Thanks again - T-Bone - I removed the offending setMode command -

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: Box Breaker

JDFight wrote:Oops! Thanks again - T-Bone - I removed the offending setMode command -
Just want to make something clear: setMode can be very useful, and it doesn't cause lag if it's used in the middle of the game. It is just at the beginning (or if you use it twice in a row) that it causes issues. If you want to let your game toggle between a window and fullscreen, use it.

GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

### Re: Box Breaker

you may want to speed up your code a little with locals

example : BObjects.lua

### Who is online

Users browsing this forum: No registered users and 15 guests