Antone ever heard of Dark Basic

Discussion in 'Web Programming' started by zellfaze, Feb 16, 2007.

Antone ever heard of Dark Basic
  1. Unread #1 - Feb 16, 2007 at 1:20 PM
  2. zellfaze
    Referrals:
    0

    zellfaze Guest

    Antone ever heard of Dark Basic

    Im sorry that im not that great at prgmin. All i know is a little bit of C++, Perl, Perl TK, And the BASIC langudges. That said the only ones of those that i know well are Dark BASIC, Libeerty BASIC, TI BASIC, and QBASIC. Im just wonderin if you guys have heard of Dark BASIC.
     
  3. Unread #2 - Feb 16, 2007 at 2:21 PM
  4. Xaltic
    Joined:
    Feb 15, 2007
    Posts:
    70
    Referrals:
    0
    Sythe Gold:
    0

    Xaltic Member
    Banned

    Antone ever heard of Dark Basic

    Never heard of it...
     
  5. Unread #3 - Feb 16, 2007 at 2:36 PM
  6. zellfaze
    Referrals:
    0

    zellfaze Guest

    Antone ever heard of Dark Basic

    ok i was just wondering. Its actually really neat.
    Heres some sample code for a encoder/reader

    ` This code was downloaded from The Game Creators
    ` It is reproduced here with full permission
    ` http://www.thegamecreators.com

    `Encoder Example
    `By Jonathan Skinner

    `Encoder Example
    `By Jonathan Skinner

    dim nums(3)
    nums(0) = 7634773
    nums(1) = 67476347
    nums(2) = 81818181
    nums(3) = 272717171

    dim words$(1)
    words$(0) = "jhasdjhjadfjkasdfjasdjk"
    words$(1) = "ahajahsge3712uaah"

    newnum1$ = bin$(nums(0))
    newnum2$ = bin$(nums(1))
    newnum3$ = bin$(nums(2))
    newnum4$ = bin$(nums(3))

    wordval = val(words$(0))
    wordval2 = val(words$(1))

    strword1$ = bin$(wordval)
    strword2$ = bin$(wordval2)

    if file exist("encodedfile.ini") = 1 then delete file "encodedfile.ini"
    open to write 1,"encodedfile.ini"
    write string 1,strword1$
    write string 1,strword2$
    write string 1,newnum1$
    write string 1,newnum2$
    write string 1,newnum3$
    write string 1,newnum4$
    close file 1

    open to read 1,"encodedfile.ini"
    read string 1,read1$
    read string 1,read2$
    read string 1,read3$
    read string 1,read4$
    read string 1,read5$
    read string 1,read6$
    if read1$ = strword1$ then Print words$(0)
    if read2$ = strword2$ then Print words$(1)
    if read3$ = newnum1$ then Print nums(0)
    if read4$ = newnum2$ then Print nums(1)
    if read5$ = newnum3$ then Print nums(2)
    if read6$ = newnum4$ then Print nums(3)
    wait key
    end
    `Code is pretty much useless


    Its not very usefull this piece but it still is a neat langugde. This might be a bit more fun.

    [​IMG]

    ` This code was downloaded from The Game Creators
    ` It is reproduced here with full permission
    ` http://www.thegamecreators.com

    ` WaterSnake by Neil Houlden
    ` I haven't finished this yet, but take a look:

    `Show the title screen:
    center text screen width()/2,6, " __ ____ ___ __ "
    center text screen width()/2,18, "========== / / /_/ / /_ /_/ =========="
    center text screen width()/2,30, "========== /_/_/ / / / /__ / | =========="
    center text screen width()/2,40, " "
    center text screen width()/2,50, " ###### ## ## ### ## ## #######"
    center text screen width()/2,60, "## ## ### ## ## ## ## ## ## "
    center text screen width()/2,70, "## #### ## ## ## ## ## ## "
    center text screen width()/2,80, " ###### ## ## ## ## ## #### #######"
    center text screen width()/2,90, " ## ## #### ######### ## ## ## "
    center text screen width()/2,100, "## ## ## ### ## ## ## ## ## "
    center text screen width()/2,110, " ###### ## ## ## ## ## ## #######"
    center text screen width()/2,120, " "
    center text screen width()/2,130, " ============================================= "
    center text screen width()/2,150, " By Neil Houlden www.neilsdemo.tk "
    center text screen width()/2,170, " ============================================= "
    center text screen width()/2,280, "Use you're mouse to control the Water Snake."
    center text screen width()/2,290, "Press any key to Continue"
    center text screen width()/2,400, " - [email protected] -"
    wait key
    cls
    input "enter the length of the snake (I usually use 300): " ,bodylength


    `set Frame Rate
    sync rate 20

    `hide the mouse
    hide mouse

    `make ground (So I can see how fast I'm going)
    make object plain 1,100,100
    xrotate object 1,90
    set object wireframe 1,1

    `make the head
    make object sphere 2,4
    color object 2,rgb(0,255,50)

    `Prepare to make body parts
    t=3
    partcolor=1

    `The body part making loop
    for t=3 to bodylength
    `Make a body part
    make object sphere t,3
    ` color it
    if partcolor=1
    partcolor=2
    color object t,rgb(0,100,0)
    else
    partcolor=1
    color object t,rgb(0,255,50)
    endif
    next t


    ` game loop
    do
    `Control the way the head faces by moving the mouse
    yrotate object 2,object angle y(2)+ (mousemovex()/2)
    xrotate object 2,object angle x(2)+ (mousemovey()/2)
    if object angle x(2)<-90
    xrotate object 2,object angle x(2)-object angle x(2)
    xrotate object 2,-90
    endif
    if object angle x(2)>90
    xrotate object 2,object angle x(2)-object angle x(2)
    xrotate object 2,90
    endif

    ` position the bits
    t=bodylength
    for a=4 to bodylength
    position object t,object position x(t-1),object position y(t-1),object position z(t-1)
    t=t-1
    next a


    `this want's to be outside the loop because the last body part has to be attatched to the head.
    position object 3, object position x(2),object position y(2),object position z(2)

    `move the head in the direction it's facing
    move object 2,1
    `put the camera in the right place.
    set camera to follow object position x(2),object position y(2),object position z(2),object angle y(2),50,object position y(2)+10,5,1
    point camera object position x(2),object position y(2),object position z(2)
    loop

    You can do some neat stuff with that snippet.
     
< Need to know.... | [Python] Your First Piece Of PyCake. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site