
-----------------------------------
slender0123
Sat Sep 14, 2013 7:04 pm

My very first game !! XD
-----------------------------------
Hello there everyone! This is my very very first game that I finished for turing! Its difficult at first, but once you get the drift of it, it gets reletivly easy.. 

Goal.
Keep the ball in the air!!

Use the left and right arrows to move the line to make the ball bounce! (I will change the line to a rectangle once i get familier with the collision of a rectangle!)

the ball will surprise you sometimes where it spawns.
here it is

If its too fast (it probibly will be, my com lags a little (I found out when i ran another jump based program i made from my com at my school, i could hardly make it it was waay to fast lol)) so if its too fast, nerf the delay by 6 or 7, it should make it go the needed speed.


var keys : array char of boolean %my variables and constants
var x, y, y2 := 25
var x2 := 125
var X, Y := 100
var y_velocity := 0
const gravity := 2
var bounce := 0
var try : string
var ch : char
setscreen ("graphics:500;400, offscreenonly")

proc intro
put skip
 put "The Bouncing Game!"
put skip
 put "How many times can you make the ball bounce?"
  put "I managed to get 67 bounces!"
 put "Good luck!"
put "Press any key to start!"
drawline (x,y,x2,y2, black) %Objects and end loop
Draw.FillOval(X, Y, 15,15, blue )
View.Update
Input.Pause

end intro

procedure game
loop
Input.KeyDown (keys) %Line movements
  if keys (KEY_RIGHT_ARROW)  and x2 < maxx then
    x2 += 20
    x += 20
  end if
  if keys (KEY_LEFT_ARROW) and x > 0 then
    x2 -= 20
    x -= 20
  end if

y_velocity -= gravity  %Ball gravity effect 
Y += y_velocity  

if Y 