The request is really odd and confusing, but nonetheless, possible.
The problem, however, is as the speed increases eventually the ball will have to either stop at a max speed or pass the height limit, eg:
Lets say the ball starts at a speed of 1 unit per bounce, and you set the height to be a maximum of 10 units.
After 5 bounces the ball is going at 5 units per bounce. All good right, but once it reaches 11 units per bounce it will bounce, you guessed it, 11 units in the air. 1 unit higher than the max, so as I said, you'll have to either set a max bounce speed, or maybe tell the user its game over when they get to the maximum height. ANYHOO.
Onto the pseudo-ness. Im going to use a 3d object in my explanation since I absolutely am t3h suxx0rz at anything and everything 2d. So, here's a basic beginning layout;
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
MAKE OBJECT SPHERE 1,10
POSITION CAMERA 0,0,-100
POINT CAMERA 0,0,0
DO
SYNC
LOOP
Right so we have a ball. Now lets begin by just moving it up and down at a constant rate with a maximum height;
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
MAKE OBJECT SPHERE 1,10
POSITION CAMERA 0,0,-100
POINT CAMERA 0,0,0
MaxHeight#=50
Speed#=1
DO
Y#=OBJECT POSITION Y(1)
IF Y# >= MaxHeight# THEN Speed#=-1
IF Y# <= 0 THEN Speed#=1
MOVE OBJECT UP 1,Speed#
SYNC
LOOP
Ok test that, then go get a caffienated beverage, when you've returned... Now we have a ball bouncing up and down at a constant rate, its time for the hard skat; we need to figure out if the ball has bounced, how do we do that? Well we check if it hit the ground, we already did that in the previous code checking if it's y was equal to or bellow 0. That'll do. So we just need to mod it a bit. First the code, then an explanation;
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
MAKE OBJECT SPHERE 1,10
POSITION CAMERA 0,0,-100
POINT CAMERA 0,0,0
MaxHeight#=50
Speed#=1
Rate#=.5
DO
Y#=OBJECT POSITION Y(1)
IF Y# >= MaxHeight# THEN Speed#=-Speed#
IF Y# <= 0 THEN Speed#=ABS(Speed#)+Rate#
POSITION OBJECT 1,OBJECT POSITION X(1),OBJECT POSITION Y(1)+Speed#,OBJECT POSITION Z(1)
SYNC
LOOP
Alright, so now the ball is bouncing at an increasing rate every time it hits the ground. Change the Rate# variable to be the speed it increases by, change the MaxHeight# variable to make its limits higher or lower. Basically when the ball hits the ground/bounces/is equal to or below 0, we change the Speed# variable to be Speed#+Rate#, we also use the Abs command to make the Speed# variable positive so it can move up again. When it reaches its limits/MaxHeight#/>=50, we just make Speed# negative so it moves down again.
Should work, I dont have Darkbasic right now as Im at school but Ill check back when I get home if Im not buisy to fix any errors I might've made.
Wow, just did a tutorial during period 3 class
Goodluck, RUC'