Author Topic: Drop, Catch and Bounce (or miss)  (Read 2880 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 312
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Drop, Catch and Bounce (or miss)
« on: March 07, 2008 »
Stonemonkeys F1 game is classy - good to look at, hard to play.

I think I'll stick to something simple.

move the bat to hit the 'balls' back up - bat will grow when you do and smaller when you miss.
game will halt and score will show when bat is too small.

Code: [Select]
open window 640,512
blox=10
dim enx(blox),eny(blox),m(blox),go(blox)
for a=1 to blox
enx(a)=int(ran(600))+20
eny(a)=int(ran(300))
go(a)=ran(0.1)+0.1
next a
hmx=300
hmy=500
bt=30
hmm=0
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
hmm=0
c=peek("port1")
if and(c,128)>0 hmm=-10
if and(c,32)>0 hmm=10
hmx=hmx+hmm
if hmx<0+bt hmx=0+bt
if hmx>640-bt hmx=640-bt
setrgb 1,100,250,100
fill rectangle 0,0 to 640,512
for a=1 to blox
m(a)=m(a)+go(a)
eny(a)=eny(a)+m(a)
if eny(a)>520 then
bt=bt-0.5
m(a)=0
enx(a)=int(ran(600))+20
eny(a)=int(ran(20))-30
endif
if enx(a)>hmx-bt and enx(a)<hmx+bt and eny(a)>hmy then
score=score+1
bt=bt+1
m(a)=-m(a)*.9
eny(a)=hmy-10
endif
if bt<10 then
go(a)=0
m(a)=0
text 280,260,"score "+str$(score)
endif
setrgb 1,200,200,0
fill rectangle enx(a)-5,eny(a)-5 to enx(a)+5,eny(a)+5
setrgb 1,0,0,0
rectangle enx(a)-5,eny(a)-5 to enx(a)+5,eny(a)+5
next a
setrgb 1,200,100,0
fill rectangle hmx-bt,hmy-5 to hmx+bt,hmy+5
setrgb 1,0,0,0
rectangle hmx-bt,hmy-5 to hmx+bt,hmy+5
until (1=0)

Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Drop, Catch and Bounce (or miss)
« Reply #1 on: March 07, 2008 »
Neat idea sort of one player pong with gravity. The paddles grow when you bounce one too. Sweet

Challenge Trophies Won:

Offline Clanky

  • Laser Guided Memories
  • Amiga 1200
  • ****
  • Posts: 340
  • Karma: 16
  • kiss that sound that pounds your senses
    • View Profile
Re: Drop, Catch and Bounce (or miss)
« Reply #2 on: March 10, 2008 »
Nice one! Love the 'warm' colours.

Got my bat to the size of the width of the screen... :|
Didn't last long either ;)

Could you make it so their are levels? Once your bat gets a certain width, gain a level. Each level could increase speed, and maybe you could have special pick-ups: say, anti-gravity, increased bat speed... etc. And you could have penalty balls: say, balls which take away large amounts of bat, or maybe split your bat where it hits (you end up with the larger part of the bat, the smaller bit falls away)...

Great stuff :)
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..