Computer Science Canada

First Thingette : Colors

Author:  MiX-MaztA-M8riX [ Fri Oct 22, 2004 11:42 pm ]
Post subject:  First Thingette : Colors

I dunno, this is a really craptacular thing, but you gotta start somewhere right?

code:

%Martin Borowiec
%Color Palette Thingey

setscreen ("position:center;center")
colorback (8)
cls

    var col : int

for a : 1 .. 255
    color (a)
    put "Color Number ", a, " -=- TESTING -=- "
    delay (100)
end for


and I need some help on the side, im trying to go for a space invaders type thing on this other game... its ugly though... help please?

code:

var x, y, button : int := 1



loop

    Mouse.Where (x, y, button)
    Draw.FillBox (x, 20, x + 12, 35, 18)
    cls
    if button = 1
            then
        for a : y .. 500
            Draw.FillOval (x, a, 5, 5, 79)
            Mouse.Where (x, y, button)
            Draw.FillBox (x, 20, x + 12, 35, 18)
            cls

        end for
    end if
end loop


barely got anything... but thats me..

Author:  Tony [ Sat Oct 23, 2004 12:24 am ]
Post subject: 

not sure what you were trying to do there... but this does it better Laughing
code:

var x, y, button : int := 1
var temp_x : int


loop

    Mouse.Where (x, y, button)
    Draw.FillBox (x, 20, x + 12, 35, 18)
    delay (10)
    cls
    if button = 1
            then
        temp_x := x
        for a : y .. maxy
            Draw.FillOval (temp_x, a, 5, 5, 79)
            Mouse.Where (x, y, button)
            Draw.FillBox (x, 20, x + 12, 35, 18)
            delay (10)
            cls

        end for
    end if
end loop

Author:  MiX-MaztA-M8riX [ Sat Oct 23, 2004 12:31 am ]
Post subject: 

Sweet Smile thx man .... Its like my first time using turing, so dont be hatin ! lmao, any other feed back would be helpful ... WAIT A TICK! THat makes it so the ball shoots out from where the mouse is Razz that wont work good for space invaderish type game play

Author:  Tony [ Sat Oct 23, 2004 1:03 am ]
Post subject: 

hey, its your code, not mine Rolling Eyes

try
code:

for a : 35 .. maxy

Wink

Author:  MiX-MaztA-M8riX [ Sat Oct 23, 2004 1:36 am ]
Post subject: 

DAMN! Neutral YOU ARE GOOD Razz To me anywayz... i dunno if that was a hard mistake or not, but im a noob turist Razz

Author:  MiX-MaztA-M8riX [ Sat Oct 23, 2004 2:55 am ]
Post subject: 

I just thought i might let you all know, I'm going to start to try and work on a D&D type game... with all Turing graphics, no exported images.... Wish me luck Smile or maybe some assistance...

Author:  Unreal_Origin [ Sun Oct 24, 2004 12:29 am ]
Post subject:  hey this could work

hey this is using view.update b/c it stops the flicking. hacker dans program doesn't stop this it looks that way b/c the delay is bigger

var x, y, button : int := 1

code:


loop

    Mouse.Where (x, y, button)
    Draw.FillBox (x, 20, x + 12, 35, 18)
    cls
    if button = 1
            then
        for a : y .. 500
            Draw.FillOval (x, a, 5, 5, 79)
            Mouse.Where (x, y, button)
            Draw.FillBox (x, 20, x + 12, 35, 18)
            cls

        end for
    end if
end loop

Author:  Tony [ Sun Oct 24, 2004 1:04 am ]
Post subject: 

Unreal_Origin : huh? Eh

Author:  Unreal_Origin [ Sun Oct 24, 2004 6:29 am ]
Post subject:  hey

hey with the program yopu mad if he wants to speed up the bullet it wstarts to flicker with mine it doesn't flicker

Author:  Cervantes [ Sun Oct 24, 2004 7:03 am ]
Post subject: 

eerrr.. I think you posted the wrong code Unreal. Your code flickers much more than tony's, and doesn't use View.Update like you said it did.
heh, either that or tony's playing a practical joke Laughing

Author:  Unreal_Origin [ Mon Oct 25, 2004 6:57 am ]
Post subject:  sry

this is the code that i meant to put on
code:

setscreen ("offscreenonly")

var x, y, button : int := 1
var x2 : int


loop

    Mouse.Where (x, y, button)
    Draw.FillBox (x, 20, x + 12, 35, 18)
    View.Update
    cls
    if button = 1 then
        x2 := x
        for a : y .. 500
            Mouse.Where (x, y, button)
            Draw.FillOval (x2, a, 5, 5, 79)
            Draw.FillBox (x, 20, x + 12, 35, 18)
            View.Update
            cls
        end for
    end if
end loop

Author:  the_short1 [ Mon Oct 25, 2004 10:25 am ]
Post subject: 

did u perpusely steal that avatar from someoen else?


either way... yea.. the updated code seems to flicker less.. at least for me..

thx for contributing..

Author:  gigaman [ Mon Oct 25, 2004 3:26 pm ]
Post subject: 

Unreal where did you get the code that was worse from? was it just unedited?


: