android
  #1  
Old 02-11-2010, 05:38 AM
DanTheLegoMan DanTheLegoMan is offline
Junior Member
 
Join Date: Feb 2010
Posts: 38
Default BatBallWall (aka Breakout) Game - Version 1.2 (16th Feb 2010)

Attached is a simple game of BatBallWall (a Breakout clone). Gives players the choice to use the Zen's accelerometers to control the bat (simply tilt the device left and right), or use the touch screen.

Version 1.2

Improved the way ball bounces off edges of bat
Fixed bug where ball's speed was not constant
Added Easy and Hard modes
Accelerometer game tweaks (larger bat, slower ball)
Added Sound on/off switch to main-menu
Added pause feature (touch the top half of the screen to pause, touch anywhere to resume)

Version 1.1

Added choice of Accelerometer Game or Touch Game
Added a main menu (with AI player running in the background)
Removed set volume call (mucks with device's volume)
Fixed bug to do with X-axis velocity modification when ball hits bat

Version 1.0

Known Issues :

Player's 'idle shutdown' can kick in while playing. This is likely due to the fact that the player believes no one is using the device because you don't touch the screen while playing (it's 100% accelerometer driven).

You can either increase the Idle Shutdown Time, or turn it off, or keep touching the screen every minute or so while playing ;0)


Feeback Requested - is it too easy / too hard / missing a feature etc...

Dan

Screenshot:
Attached Files
File Type: zip BatBallWall.zip (7.7 KB, 730 views)

Last edited by DanTheLegoMan; 02-16-2010 at 05:12 AM. Reason: New Version
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 02-11-2010, 06:23 AM
JJLoke JJLoke is offline
Junior Member
 
Join Date: Jan 2010
Posts: 87
Default

u can disable the idle shutoff in the system menu
Reply With Quote

  #3  
Old 02-11-2010, 10:40 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Tried it, and it works. You could make the graphics better in later versions, as it is now you can't really see the size of the blocks even.

As for responsiveness, I'm not sure how exact the accelerometer is. What orientation should you hold the player for best performance? Should the screen face upwards or 90 degrees from the floor, if you understand what I mean.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #4  
Old 02-11-2010, 10:59 AM
erik dankmeijer erik dankmeijer is offline
Junior Member
 
Join Date: Jun 2008
Location: nederland
Posts: 8
Default

This is a nice game-----This is a fun game it reminds me Arcenoid
I would love it if you make a option for playing with the touchscreen

Thanks for this GAME !
Reply With Quote

  #5  
Old 02-11-2010, 02:25 PM
DanTheLegoMan DanTheLegoMan is offline
Junior Member
 
Join Date: Feb 2010
Posts: 38
Default

You could make the graphics better in later versions, as it is now you can't really see the size of the blocks even.

I was going for a retro look This is a game I used to play on my BBC Model B 8bit computer back in the 80s! Back when memory was measured in kilobytes not gigabytes.

I'm hopeless at art, but if someone wanted to draw some pretty graphics I'll happily update the code to use them.

So, to anyone who might be interested ...

The Ball is a circle of radius 4 pixels (actually to look right it is more like an ellipse with maximum height of 6 pixels and maximum width of 8 pixels)

Bricks are 40 x 12 pixels. There are 7 different colours at the moment. 5 represent normal bricks, 1 is a special brick that has to be be hit twice to be destroyed, and the last is a special unremovable brick that you just have to avoid.

Finally, the Bat is 40 x 5 pixels (this could easily change - but should be roughly this size)

The Screen is 400 x 240 in case you want to have a graphical background rather than just black.

What orientation should you hold the player for best performance? Should the screen face upwards or 90 degrees from the floor, if you understand what I mean.

I usually hold the screen so that it is facing me (rotated 90 degrees from facing upwards). The bat moves left when you lower your left hand or raise your right, and vice versa.

would love it if you make a option for playing with the touchscreen

I did have that code originally - but I found that my fingers got in the way of the screen, so I couldnt' see what I was doing.

Thanks for the comments so far.

Dan
Reply With Quote

  #6  
Old 02-11-2010, 03:51 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by DanTheLegoMan View Post
You could make the graphics better in later versions, as it is now you can't really see the size of the blocks even.

I was going for a retro look This is a game I used to play on my BBC Model B 8bit computer back in the 80s! Back when memory was measured in kilobytes not gigabytes.

I'm hopeless at art, but if someone wanted to draw some pretty graphics I'll happily update the code to use them.

So, to anyone who might be interested ...

The Ball is a circle of radius 4 pixels (actually to look right it is more like an ellipse with maximum height of 6 pixels and maximum width of 8 pixels)

Bricks are 40 x 12 pixels. There are 7 different colours at the moment. 5 represent normal bricks, 1 is a special brick that has to be be hit twice to be destroyed, and the last is a special unremovable brick that you just have to avoid.

Finally, the Bat is 40 x 5 pixels (this could easily change - but should be roughly this size)

The Screen is 400 x 240 in case you want to have a graphical background rather than just black.

Dan
If I get some time over from my robot programming tomorrow I will give this a shot and make some nice, but still retro, graphics. So the graphics you use right now are images, correct? Even the ball and paddle? (Just asking because in Pong it isn't images I think. Could easily check it from the app folder and code, but meh. Asking anyway)
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #7  
Old 02-11-2010, 05:11 PM
Tmd Tmd is offline
Junior Member
 
Join Date: Feb 2010
Posts: 15
Default

wow nice work on the breakout clone game :-) the accelerometer works pretty smooth considering this is the first app to take advantage of it.

All i can say is smaller blocks, have the ball speed up when it bounces off the top of the screen and the blocks below like on the old atari breakout.

good job on the game this had to be time consuming to write
Reply With Quote

  #8  
Old 02-11-2010, 09:48 PM
badazzmofo badazzmofo is offline
Junior Member
 
Join Date: Dec 2009
Posts: 75
Default

this would be pretty sweet with a touchscreen option. it's sort of unplayable with the accelerometer.

i love the score countdown....very nice.

would be nice to a see a super breakout version of this.
Reply With Quote

  #9  
Old 02-12-2010, 03:37 AM
DanTheLegoMan DanTheLegoMan is offline
Junior Member
 
Join Date: Feb 2010
Posts: 38
Default

I will give this a shot and make some nice, but still retro, graphics. So the graphics you use right now are images, correct? Even the ball and paddle?

That sound's great. Currently there are no images at all - it's all just rectangles and lines (for the ball). So, the code will have to be updated to load and display images instead of drawing shapes (won't be hard, as long as the X-Fi2 can draw that many images in a frame).

Looks like a few people would prefer a touch driven interface - so I'll add support for that too.

Dan
Reply With Quote

  #10  
Old 02-12-2010, 04:26 AM
badazzmofo badazzmofo is offline
Junior Member
 
Join Date: Dec 2009
Posts: 75
Default

i cant see how images would be more retro than drawing it out.

the atari had no images.
Reply With Quote

  #11  
Old 02-12-2010, 04:28 AM
fzbm123 fzbm123 is offline
Junior Member
 
Join Date: Jan 2010
Posts: 49
Default

everytime i turn this game on, the volume of my song always change to a fixed one, can u stop tat from happening? THX
Reply With Quote

  #12  
Old 02-12-2010, 04:41 AM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by badazzmofo View Post
i cant see how images would be more retro than drawing it out.

the atari had no images.
It could save code-lines while still allowing for more modern interface modifications. I was planning to make it as simple as possible, checking old games and such.

But true, when I check the image posted in here of an old game the blocks are indistinguishable from each other, looking like solid lines. I was thinking to perhaps make them with separators so you could distinguish individual blocks. Would that be something you would want, or would it destroy the retro feeling of the app?
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #13  
Old 02-12-2010, 07:44 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

If you are going to add touch screen support, then please make it optional, I love using the accelerometer!
Reply With Quote

  #14  
Old 02-12-2010, 02:13 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

I love the version 1.1 with the touch option and main screen and all. Also the graphics are growing on me. They are quite good as it is. Even though it might be fun with a similar game with more advanced graphics just for those who don't know about Atari =P

And you could make an easy/hard choice on the touch version, and in the hard use a similar delay on the paddle as in Pong.

And one more thing you might want to implement from pong is that the ball bounces off of the paddle in different angles depending on where you hit. That gives you the option to actually aim and not just hope that it will eventually bounce into all blocks.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #15  
Old 02-12-2010, 02:38 PM
Les23 Les23 is offline
Junior Member
 
Join Date: Jan 2010
Location: Rome
Posts: 38
Default

Quote:
Originally Posted by Habhome View Post
And one more thing you might want to implement from pong is that the ball bounces off of the paddle in different angles depending on where you hit. That gives you the option to actually aim and not just hope that it will eventually bounce into all blocks.
I agree with this update :O
Reply With Quote

  #16  
Old 02-12-2010, 02:48 PM
LordXenos's Avatar
LordXenos LordXenos is offline
Junior Member
 
Join Date: Dec 2009
Location: Louisville, KY, USA
Posts: 94
Default

Fantastic Game!!! (worth all 3 exclamation points)

The updates suggested by Habhome would encourage me to give it more exclamation points.
__________________
If you have a question, please ask. I am more than happy to help.

Cheers,
Your friendly neighborhood
Dark Lord
Reply With Quote

  #17  
Old 02-12-2010, 07:22 PM
badazzmofo badazzmofo is offline
Junior Member
 
Join Date: Dec 2009
Posts: 75
Default

Quote:
Originally Posted by Habhome View Post

And one more thing you might want to implement from pong is that the ball bounces off of the paddle in different angles depending on where you hit. That gives you the option to actually aim and not just hope that it will eventually bounce into all blocks.
that's a really important feature for gameplay. in pong that's the only way to defeat the computer.
Reply With Quote

  #18  
Old 02-13-2010, 04:07 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Quote:
Originally Posted by badazzmofo View Post
that's a really important feature for gameplay. in pong that's the only way to defeat the computer.
Definately agree, we need this feature in the next update. Otherwise you have to wait for the ball to bounce off the left/right wall for it to change direction...
Reply With Quote

  #19  
Old 02-13-2010, 04:09 AM
bzdbbb's Avatar
bzdbbb bzdbbb is offline
X-Fi2 Development Moderator
 
Join Date: Dec 2009
Location: Gloucestershire, UK
Posts: 94
Default

Quote:
and one more thing you might want to implement from pong is that the ball bounces off of the paddle in different angles depending on where you hit. That gives you the option to actually aim and not just hope that it will eventually bounce into all blocks.
This isn't hard to do :P You just need to work out the difference in x positions between the ball and bat when there's a collision and then add that to the angle, multiplied to a level where it looks natural
Reply With Quote

  #20  
Old 02-13-2010, 04:38 AM
DanTheLegoMan DanTheLegoMan is offline
Junior Member
 
Join Date: Feb 2010
Posts: 38
Default

Actually you can affect the x-axis velocity in the current version by hitting the ball at one side of the bat or the other. I'm guessing that the effect is a little to subtle though! I'll make it more obvious in the next update.

Thanks for all the feedback.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:14 AM.