Board Logo
« Christmas challenge »

Welcome Guest. Please Login or Register.
Jan 21st, 2018, 12:50am


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Please use the forums Search feature before asking.
Please post code using the code box described in Format Your Messages.
This will keep indentation, separate it better form the message and prevent gibberish.
If the code is too long for one post or additional files are needed, upload a ZIP archive to the Just BASIC Files Archive Site.

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Christmas challenge  (Read 886 times)
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Christmas challenge
« Thread started on: Dec 20th, 2014, 3:36pm »

Write a program to celebrate the current Christmas season.

The deadline is December 25th, 2014.

You will earn respect by the other members and plenty of fun during programming.

Merry Christmas wink
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Re: Christmas challenge
« Reply #1 on: Dec 20th, 2014, 3:39pm »

tsh73

Quote:
Here for starters:
Code:
nomainwin
open "It's Christmas!" for graphics_nsb_nf as #gr
#gr "trapclose [quit]"
#gr "down; fill black"

#gr "home"
#gr "posxy cx cy"   'for center
w=cx*2: h=cy*2
'stars
#gr "color white"
for i = 0 to 100
    x=w*rnd(1)
    y=h*rnd(1)
    #gr "set ";x;" ";y
next

'snow
#gr "color lightgray"
#gr "place 0 230"
#gr "boxfilled ";w;" ";h

'tree
for i = 0 to 4
    #gr "backcolor darkgreen"
    #gr "color black"
    y = 200-40*i
    #gr "place ";cx;" ";y
    a=30+i*10
    #gr "piefilled 200 100 ";a;" ";180-2*a
    'lights
    for j = 0-(4-i/2)+1 to (4-i/2)-1
        k=1-k
        colr$=word$("red white", k+1)
        #gr "place ";cx+j*20;" ";y+30+j*3
        #gr "color ";colr$;"; backcolor ";colr$;"; circlefilled 6"
    next
next

#gr "color darkgreen"
#gr "font times_new_roman 25 bold italic"
#gr "place 30, 280"
#gr "\Merry"
#gr "place 130, 300"
#gr "\Christmas!"

#gr "flush"
wait

[quit]
    close #gr
end
 
« Last Edit: Dec 20th, 2014, 3:41pm by Stefan Pendl » User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Re: Christmas challenge
« Reply #2 on: Dec 20th, 2014, 3:41pm »

tenochtitlanuk ( John F)

Quote:
Here's a quick adaptation of my vector drawing stuff- The image here is static, but when you run the program you get what I call 'StarFall'
User Image
Hope everyone has a great mid-winter holiday season!
Code:

    nomainwin

    WindowWidth  =830:     WindowHeight =650

    graphicbox #w.gb, 10, 10, 800, 600

    open "Display" for window as #w

    #w "trapclose quit"

    shape$ ="22,             1.48, 228.29," +_
                            "1.43,-189.10,     0.79, -57.28," +_
                            "0.58, 138.20,     0.99, -54.34," +_
                            "0.83, 140.33,     0.51, -89.29," +_
                            "0.80, 147.83,     0.97, -71.89," +_
                            "0.75,-206.32,     1.19, 247.81"

    #w.gb "home ; down ; fill 40 40 160 ; flush ; size 1"

    timer 500, [show]

    wait

[show]
     timer 0
     scale       =5 +30*rnd( 1)
     xPos        =800 *rnd( 1)
     yPos        =45 +20 *rnd( 1)
     rotn        =-90 +180 *rnd( 1)
     R =int( 256 *rnd( 1)): G =int( 256 *rnd( 1)): B =int( 256 *rnd( 1))
     col$        =str$( R) +" " +str$( G) +" " +str$( B)

    call display shape$, scale, col$, xPos, yPos, rotn
    #w.gb "getbmp scr2 0 0 4 600"
    #w.gb "getbmp scr1 0 0 800 600"

    #w.gb "drawbmp scr1 -1 4"
    #w.gb "drawbmp scr2 796 4"

    #w.gb "flush"

    scan
    timer 300, [show]
    wait

sub quit h$
    close #h$
    end
end sub

sub display shape$, scale, col$, x, y, angle
        noOfTerms =val( word$( shape$, 1, ","))
        for percentage =1 to 100 step 5
            #w.gb "up ; goto "; x; " "; y; " ; north"   ' EDIT  ; down"
            vAngle =val( word$( shape$, 3, ","))
            vStep  =val( word$( shape$, 2, ","))
            #w.gb "turn ";  vAngle +angle
            #w.gb "go ";    vStep *scale *percentage /100
            #w.gb "down ; color "; col$

            for i =3 to noOfTerms step 2
                vAngle =val( word$( shape$, i +2, ","))
                vStep  =val( word$( shape$, i +1, ","))
                #w.gb "turn ";  vAngle
                #w.gb "go ";    vStep *scale *percentage /100
                scan
            next i
        next percentage
        #w.gb "flush"
    end sub
 

The vector data is generated by the current version of my vector prog. Easily changed to angels, elk or w.h.y!
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3712
xx Re: Christmas challenge
« Reply #3 on: Jan 3rd, 2015, 03:08am »

So new years eve is already gone and the deadline declined without notice wink

Thanks for participating, wishing you all a happy new year.

BTW, consult the sticky thread on this board for how to submit a challenge.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls