Author Topic: Final Version of the Green Boxcopter Project  (Read 10387 times)

0 Members and 1 Guest are viewing this topic.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Final Version of the Green Boxcopter Project
« Reply #20 on: February 06, 2007 »
It would be nice to have a full blast effect in all directions I will try searchin the ezboard for that proggy. it would be a great addition to the "Look what I found" thread

Challenge Trophies Won:

Offline Clanky

  • Laser Guided Memories
  • Amiga 1200
  • ****
  • Posts: 340
  • Karma: 16
  • kiss that sound that pounds your senses
    • View Profile
Re: Final Version of the Green Boxcopter Project
« Reply #21 on: March 04, 2007 »
Ok, after realising that there was actually a really good explosion effect on the Ezboard Fourms, I decided to investigate and get the code! And, hey presto! - Here it is!!! It's small, and all that needs changing is the High Score display... so, it's all there! YAY!  :clap:  :updance:

This code: Originaly Coded by Jinx @ Ezboard Forums
link: http://p205.ezboard.com/fyabasicprogrammingfrm2.showMessage?topicID=283.topic
3rd Reply, 09/06/03, 3:57PM


Code: [Select]
open window 640,512
gosub setup

hi_score=int(ran(1000)+500) REM random high score

repeat
        clear window

        gosub fireworks

        setrgb 1,50,200,200
        text 320,195,"New High Score!","cc"
        text 320,210,str$(hi_score),"cc"

        gosub db
until(peek("port1") > 0)
end

label db                    REM - DOUBLE BUFFERING
setdispbuf draw             REM - FOR SMOOTH ANIMATION
draw =1-draw
setdrawbuf draw
return

label fireworks
        alow_fire=alow_fire-1
        setrgb 0,0,0,alow_fire/4
        if alow_fire<0 then
                new_fire=1
        fi

        for a=1 to num_part
                fire_x(a)=fire_x(a)+fire_vx(a)
                fire_y(a)=fire_y(a)+fire_vy(a) rem +.5
        next a

        if new_fire=1 then
                new_fire=0
                alow_fire=120
                fx=ran(640)
                fy=ran(200)

                color_r=ran(100)+155
                color_g=ran(100)+155
                color_b=ran(100)+155

                for a=1 to num_part
                        fire_x(a)=fx
                        fire_y(a)=fy

                        ang=ran(360)
                        fire_vx(a)=cosi(ang)*(ran(3)+.5)
                        fire_vy(a)=sine(ang)*(ran(3)+.5)
                next a
        fi

        col=alow_fire/120
        for a=1 to num_part
                sz=ran(3)+1
                setrgb 1,color_r*col,color_g*col,color_b*col

                fill rect fire_x(a),fire_y(a) to fire_x(a)+sz,fire_y(a)+sz
        next a
return

label setup
dim sine(361),cosi(361)
for a=0 to 361
        cosi(a)=cos(a*(pi/180))        REM - PRECALCULATE
        sine(a)=sin(a*(pi/180))        REM - SINE/COSINE
next

num_part=75

dim fire_x(num_part)
dim fire_y(num_part)
dim fire_vx(num_part)
dim fire_vy(num_part)
return

So, after Yah Spaced Invaders is finished, I will try and get Green Boxcopter done properly!!! Hopefully soon-ish. Also, I had a look at my Computer Crisis Clone - going back to the Ezboard days - and I believe that I can make it better (less code - using enemy_x(2) and so on, and fix the collisions and have power-ups!) So, when Green Boxcopter is done, I will go back to CC and try and get that good... finally get some finished games into my yabasic library:
    Green Boxcopter 1;        *finished*
    Green Boxcopter 2;        *alomost*
    Yah Spaced Invaders, and; *kinda*
    Computer Crisis II.       *done, but needs moding*


haha!
« Last Edit: March 04, 2007 by CLANKY »
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..