Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

The Wall

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-03-2010, 06:21 PM
Knows the basics
 
Join Date: Jul 2010
Location: St.Petersburg
Posts: 59
Default The Wall

Here's my endevour to reright a good old game, I'm facing some problems that I
cannot solve:
1 I don't know how to completely despose of bricks hit by the ball.
2 The ball often gives a number of short bounces instead of bounsing off the wall.
3 How to reduce the distance between the bricks?

If somebody cares to help me I will continue working on the game and repost it
edited.
Attached Files
File Type: zip Wall1.zip (61.8 KB, 55 views)

Last edited by Monsterman22 : 08-04-2010 at 12:40 PM.
Reply With Quote
  #2 (permalink)  
Old 08-04-2010, 09:18 AM
Newbie
 
Join Date: Oct 2007
Location: Melbourne, Australia
Posts: 5
Default

Your Zip file is empty??????
Reply With Quote
  #3 (permalink)  
Old 08-04-2010, 12:41 PM
Knows the basics
 
Join Date: Jul 2010
Location: St.Petersburg
Posts: 59
Default

Thanx, mate. Fixed.
Reply With Quote
  #4 (permalink)  
Old 08-05-2010, 01:13 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

There are a certain number of problems in your program:
- you should use images with the same size as the bitmaps in the program, your ball image size is 135*131 pixels and you sgrink it down to 10*10 pixels.

Quote:
1 I don't know how to completely despose of bricks hit by the ball.
- you check only the lower brick row for intersections, so you cannot dispose the bricks from the other rows.
Sub CheckIfIntersects
For n = 91 To 100

Quote:
2 The ball often gives a number of short bounces instead of bounsing off the wall.
you should check also the speed sign when hitting a brick.

Quote:
3 How to reduce the distance between the bricks?
you can reduce the space between the bricks in changing the values 24 and 12.
Left = Left + 24
Top = Top +
12

In the BuildWall routine there is no need to declare the Drawer
Drawer.New1("Form1",True)
for each brick !

Attached a modified version with quite some chages:
- numeric values replaced by variables
- check of brick height per column
- bricks drawn as rectangles instead of bitmaps and 100 rectangles
- changed player and ball bitmaps
- the ball bounces when hitting the 'playground' border

Best regards.
Attached Files
File Type: zip Wall_New.zip (4.9 KB, 45 views)
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beeting Head Against a wall bish0p Questions (Windows Mobile) 0 09-11-2008 03:19 PM


All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0