----------------------------------- apomb Fri Feb 27, 2004 10:34 am little game of chance ----------------------------------- This is probly the most primitive and non-good looking game ever, but i was just playing around with different speeds and angles when the ball bounces off the wall... just for fun! %Adrian Pomber % The "wallgame" program. View.Set ("graphics, nooffscreenonly") var x : int var y : int var speed, speed2 : int var top, left, bottom, right : int := 0 put "Set initial speed: ".. get speed speed2 := speed+2 put "Enter starting position: " put "x: " .. get x put "y: " .. get y loop exit when x >maxx or x = 1 and right >= 1 and left >= 1 then put "You hit all walls!!" end if ----------------------------------- shorthair Fri Feb 27, 2004 3:31 pm ----------------------------------- nice and fun , i had to imrove it before i played it to make it cooler, but your made a very entertaining game ----------------------------------- Paul Fri Feb 27, 2004 5:15 pm ----------------------------------- Is it just me, or does it speed up? Oh and it hit the bottom wall and went thru, and disappeared. Then It said I hit the bottom wall 450 times. ----------------------------------- Cervantes Fri Feb 27, 2004 5:44 pm ----------------------------------- Yes I'm getting the same problem with the bottom wall. Hit it 538 times :P is that supposed to happen? Where is the game aspect? :think: ----------------------------------- shorthair Fri Feb 27, 2004 5:46 pm ----------------------------------- hence , the " i had to change some thing to make it cooler , " ----------------------------------- apomb Fri Feb 27, 2004 6:59 pm ----------------------------------- well i just sorta threw it together last night and thought it would be entertaining for poeple to do ... and improve if you wanted. ----------------------------------- Paul Fri Feb 27, 2004 10:33 pm ----------------------------------- I'd give you bits if you can make a flower or something popup wherever it hits on the wall. ----------------------------------- the_short1 Sat Feb 28, 2004 12:24 am ----------------------------------- good job there compwizz... good for a one nighter.... (i made my rock paper scissors in like 2 days... cuz some guy was playing that with his hands in my comp sci class...).... here i added a impact identifier... ....yea... point cervantes.... someone above asked for one with an impact identifier... so i did it for compwizz ----------------------------------- Cervantes Sat Feb 28, 2004 11:43 am ----------------------------------- um, how's that better than what he had? all you did is draw a huge oval when it hits the wall and add a small delay... ----------------------------------- apomb Sat Feb 28, 2004 3:20 pm ----------------------------------- Well , is this one better? ... theres no cls ... it shows you where you hit the wall with a STAR. %Adrian Pomber % The "wallgame" program. View.Set ("graphics, nooffscreenonly") var x, y, j, k, i, h, q, w, r, e, t, u, z, b, n, m, s, d : int := 0 var speed, speed2 : int var top, left, bottom, right : int := 0 colorback (black) cls color (white) Text.Locate (10, 32) put "Set initial speed: " .. get speed speed2 := speed + 2 Text.Locate (11, 32) put "Enter starting position: " Text.Locate (12, 32) put "x: " .. get x Text.Locate (13, 32) put "y: " .. get y loop exit when top > 2 or bottom > 2 or right > 2 or left > 2 or (top >= 1 and bottom >= 1 and right >= 1 and left >= 1) Draw.FillOval (x, y, 10, 10, 42) drawfillstar (j, h, k, i, yellow) drawfillstar (q, w, r, e, yellow) drawfillstar (t, u, z, b, yellow) drawfillstar (s, d, n, m, yellow) View.Update delay (10) View.Update cls x += speed y += speed2 if (x) = maxx - 10 then speed := -speed - Rand.Int (1, 5) right += 1 q := x - 20 w := y - 20 r := x + 20 e := y + 20 drawfillstar (q, w, r, e, yellow) sound (1000, 50) end if if (y) = maxy - 10 then speed2 := -speed2 - Rand.Int (1, 5) top += 1 s := x - 20 d := y - 20 n := x + 20 m := y + 20 drawfillstar (s, d, n, m, yellow) sound (1000, 50) end if end loop cls put "You hit the top wall ", top, " times" put "You hit the bottom wall ", bottom, " times" put "You hit the left wall ", left, " times" put "You hit the right wall ", right, " times" if top >= 1 and bottom >= 1 and right >= 1 and left >= 1 then delay (1000) cls colorback (black) cls color (white) Text.Locate (10, 32) put "You hit all the walls!!" .. end if ----------------------------------- programer007 Sun Mar 07, 2004 5:51 pm ----------------------------------- thats a cool program... it reminds me of 'Bounce' program from book, only that one was for text...this is graphics... here +2 bits..