Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing run mode resolution
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
storm2713687




PostPosted: Mon Mar 04, 2013 8:58 pm   Post subject: Re: RE:Turing run mode resolution

Insectoid @ Mon Mar 04, 2013 8:26 pm wrote:
Pac-man is one of the harder ones, but you can certainly do Pong or Breakout or Asteroids.

I've never heard of Pong, Breakout, or Asteroids xD

Raknarg wrote:

or you can do what I did, I spent a bunch of time making a typical sidescrolling spaceship shooting game, which was a lot of fun to make (considering you get to do whatever you want, and put in what you like). Learning how graphics work was even better, though very time consuming. I'd spend hours hardcoding enemy ship drawings into turing.

You made the drawings yourself? Damn... I suck at drawing Sad
Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Mon Mar 04, 2013 9:28 pm   Post subject: RE:Turing run mode resolution

ITs really easy. It's basically just a bunch of boxes and lines.

The interesting part is when you throw in trigonometry and get moving parts. It's more time consuming than anything else... I compiled here some old sprites:

Turing:

setscreen ("offscreenonly")
var theta : real := 0
var rainbow : int
loop
    rainbow := Rand.Int (32, 80)
    Draw.FillBox (0, 0, maxx, maxy, black)

    %ENEMY 1
    Draw.FillArc (50, 50, 12, 6, round (-theta), round (-theta) + 90, green)
    Draw.FillArc (50, 50, 12, 6, round (-theta) + 180, round (-theta) + 270, brightgreen)
    Draw.ThickLine (50, 50, 50 + round (12 * cosd (theta)), 50 + round (6 * sind (theta)), 3,
        brightred)
    Draw.FillOval (50, 50, 3, 3, blue)

    %ENEMY 2
    Draw.ThickLine (100 + round (15 * cosd (theta * 2)), 100 + round (15 * sind (theta * 2)),
        100 + round (15 * cosd (theta * 2 - 180)), 100 + round (15 * sind (theta * 2 - 180)), 5, darkgrey)

    Draw.ThickLine (100 + round (15 * cosd (theta * 2)), 100 + round (15 * sind (theta * 2)),
        100 + round (10 * cosd (theta * 2 + 70)), 100 + round (10 * sind (theta * 2 + 70)), 4, darkgrey)
    Draw.ThickLine (100 + round (10 * cosd (theta * 2 + 70)), 100 + round (10 * sind (theta * 2 + 70)),
        100 + round (30 * cosd (theta * 2)), 100 + round (30 * sind (theta * 2)), 4, darkgrey)
    Draw.ThickLine (100 + round (30 * cosd (theta * 2)), 100 + round (30 * sind (theta * 2)),
        100 + round (13 * cosd (theta * 2)), 100 + round (13 * sind (theta * 2)), 4, darkgrey)

    Draw.ThickLine (100 + round (15 * cosd (theta * 2 - 180)), 100 + round (15 * sind (theta * 2 - 180)),
        100 + round (10 * cosd (theta * 2 - 110)), 100 + round (10 * sind (theta * 2 - 110)), 4, darkgrey)
    Draw.ThickLine (100 + round (10 * cosd (theta * 2 + 70 - 180)), 100 + round (10 * sind (theta * 2 + 70 - 180)),
        100 + round (30 * cosd (theta * 2 - 180)), 100 + round (30 * sind (theta * 2 - 180)), 4, darkgrey)
    Draw.ThickLine (100 + round (30 * cosd (theta * 2 - 180)), 100 + round (30 * sind (theta * 2 - 180)),
        100 + round (13 * cosd (theta * 2 - 180)), 100 + round (13 * sind (theta * 2 - 180)), 4, darkgrey)

    Draw.FillOval (100, 100, 5, 5, brightred)

    %ENEMY 3
    Draw.Line (150 + round (10 * cosd (theta)), 50 + round (10 * sind (theta)),
        150 + round (3 * cosd (theta + 45)), 50 + round (3 * sind (theta + 45)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 45)), 50 + round (3 * sind (theta + 45)),
        150 + round (10 * cosd (theta + 90)), 50 + round (10 * sind (theta + 90)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 90)), 50 + round (10 * sind (theta + 90)),
        150 + round (3 * cosd (theta + 135)), 50 + round (3 * sind (theta + 135)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 135)), 50 + round (3 * sind (theta + 135)),
        150 + round (10 * cosd (theta + 180)), 50 + round (10 * sind (theta + 180)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 180)), 50 + round (10 * sind (theta + 180)),
        150 + round (3 * cosd (theta + 225)), 50 + round (3 * sind (theta + 225)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 225)), 50 + round (3 * sind (theta + 225)),
        150 + round (10 * cosd (theta + 270)), 50 + round (10 * sind (theta + 270)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 270)), 50 + round (10 * sind (theta + 270)),
        150 + round (3 * cosd (theta + 315)), 50 + round (3 * sind (theta + 315)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 315)), 50 + round (3 * sind (theta + 315)),
        150 + round (10 * cosd (theta)), 50 + round (10 * sind (theta)), yellow)
    Draw.Fill (150, 50, yellow, yellow)
    for j : 1 .. 5
        Draw.Dot (150 + round ((Rand.Int (0, 10)) * cosd (Rand.Int (1, 360))), 50 + round ((Rand.Int (0, 10)) * sind (Rand.Int (1, 360))), white)
    end for

    %ENEMY 4
    Draw.Line (200 - 33, 150 - 9, 200, 150 - 15, white)
    Draw.Line (200, 150 - 15, 200, 150 + 15, white)
    Draw.Line (200, 150 + 15, 200 - 33, 150 + 9, white)
    Draw.Line (200 - 33, 150 - 9, 200 - 40, 150 - 3, white)
    Draw.Line (200 - 33, 150 + 9, 200 - 40, 150 + 3, white)
    Draw.Line (200 - 40, 150 + 3, 200 - 40, 150 - 3, white)
    Draw.Fill (200 - 5, 150, black, white)
    Draw.Line (200 + 1, 150 - 10, 200 + 1, 150 + 10, darkgrey)
    Draw.Line (200 + 1, 150 + 10, 200 + 10, 150 + 7, darkgrey)
    Draw.Line (200 + 10, 150 + 7, 200 + 10, 150 - 7, darkgrey)
    Draw.Line (200 + 1, 150 - 10, 200 + 10, 150 - 7, darkgrey)
    Draw.Fill (200 + 5, 150, darkgrey, darkgrey)
    %Gun
    Draw.FillBox (200 - 40, 150 + 2, 200 - 45, 150 - 2, darkgrey)
    Draw.Line (200 - 40, 150 + 2, 200 - 45, 150 + 10, darkgrey)
    Draw.Line (200 - 45, 150 + 10, 200 - 55, 150 + 6, darkgrey)
    Draw.Line (200 - 55, 150 + 6, 200 - 45, 150 + 8, darkgrey)
    Draw.Line (200 - 45, 150 + 8, 200 - 43, 150, darkgrey)
    Draw.FillBox (200 - 40, 150 - 2, 200 - 45, 150 - 2, darkgrey)
    Draw.Line (200 - 40, 150 - 2, 200 - 45, 150 - 10, darkgrey)
    Draw.Line (200 - 45, 150 - 10, 200 - 55, 150 - 6, darkgrey)
    Draw.Line (200 - 55, 150 - 6, 200 - 45, 150 - 8, darkgrey)
    Draw.Line (200 - 45, 150 - 8, 200 - 43, 150, darkgrey)
    %Fire
    Draw.FillOval (200 + Rand.Int (12, 15), 150, Rand.Int (3, 5), Rand.Int (4, 7), yellow)
    Draw.FillOval (200 + Rand.Int (12, 15), 150, Rand.Int (1, 4), Rand.Int (1, 5), white)

    %ENEMY 5
    Draw.ThickLine (250 + round (15 * cosd (theta * 4)), 50 + round (15 * sind (theta * 4)),
        250 + round (15 * cosd (theta * 4 - 180)), 50 + round (15 * sind (theta * 4 - 180)), 5, 19)

    Draw.ThickLine (250 + round (15 * cosd (theta * 4)), 50 + round (15 * sind (theta * 4)),
        250 + round (10 * cosd (theta * 4 + 70)), 50 + round (10 * sind (theta * 4 + 70)), 4, 19)
    Draw.ThickLine (250 + round (10 * cosd (theta * 4 + 70)), 50 + round (10 * sind (theta * 4 + 70)),
        250 + round (40 * cosd (theta * 4)), 50 + round (40 * sind (theta * 4)), 4, blue)
    Draw.ThickLine (250 + round (40 * cosd (theta * 4)), 50 + round (40 * sind (theta * 4)),
        250 + round (13 * cosd (theta * 4)), 50 + round (13 * sind (theta * 4)), 4, 19)

    Draw.ThickLine (250 + round (15 * cosd (theta * 4 - 180)), 50 + round (15 * sind (theta * 4 - 180)),
        250 + round (10 * cosd (theta * 4 - 110)), 50 + round (10 * sind (theta * 4 - 110)), 4, 19)
    Draw.ThickLine (250 + round (10 * cosd (theta * 4 + 70 - 180)), 50 + round (10 * sind (theta * 4 + 70 - 180)),
        250 + round (40 * cosd (theta * 4 - 180)), 50 + round (40 * sind (theta * 4 - 180)), 4, blue)
    Draw.ThickLine (250 + round (40 * cosd (theta * 4 - 180)), 50 + round (40 * sind (theta * 4 - 180)),
        250 + round (13 * cosd (theta * 4 - 180)), 50 + round (13 * sind (theta * 4 - 180)), 4, 19)

    Draw.FillOval (250, 50, 5, 5, brightblue)

    %ENEMY 6
    Draw.Line (300 + round (10 * cosd (theta * 1.5 - 45)), 100 + round (10 * sind (theta * 1.5 - 45)),
        300 + round (3 * cosd (theta * 1.5)), 100 + round (3 * sind (theta * 1.5)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5)), 100 + round (3 * sind (theta * 1.5)),
        300 + round (10 * cosd (theta * 1.5 + 45)), 100 + round (10 * sind (theta * 1.5 + 45)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 45)), 100 + round (10 * sind (theta * 1.5 + 45)),
        300 + round (3 * cosd (theta * 1.5 + 90)), 100 + round (3 * sind (theta * 1.5 + 90)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 90)), 100 + round (3 * sind (theta * 1.5 + 90)),
        300 + round (10 * cosd (theta * 1.5 + 135)), 100 + round (10 * sind (theta * 1.5 + 135)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 135)), 100 + round (10 * sind (theta * 1.5 + 135)),
        300 + round (3 * cosd (theta * 1.5 + 180)), 100 + round (3 * sind (theta * 1.5 + 180)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 180)), 100 + round (3 * sind (theta * 1.5 + 180)),
        300 + round (10 * cosd (theta * 1.5 + 225)), 100 + round (10 * sind (theta * 1.5 + 225)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 225)), 100 + round (10 * sind (theta * 1.5 + 225)),
        300 + round (3 * cosd (theta * 1.5 + 270)), 100 + round (3 * sind (theta * 1.5 + 270)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 270)), 100 + round (3 * sind (theta * 1.5 + 270)),
        300 + round (10 * cosd (theta * 1.5 - 45)), 100 + round (10 * sind (theta * 1.5 - 45)), rainbow)
    %Outside star
    Draw.Line (300 + round (15 * cosd (theta)), 100 + round (15 * sind (theta)),
        300 + round (3 * cosd (theta + 45)), 100 + round (3 * sind (theta + 45)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 45)), 100 + round (3 * sind (theta + 45)),
        300 + round (15 * cosd (theta + 90)), 100 + round (15 * sind (theta + 90)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 90)), 100 + round (15 * sind (theta + 90)),
        300 + round (3 * cosd (theta + 135)), 100 + round (3 * sind (theta + 135)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 135)), 100 + round (3 * sind (theta + 135)),
        300 + round (15 * cosd (theta + 180)), 100 + round (15 * sind (theta + 180)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 180)), 100 + round (15 * sind (theta + 180)),
        300 + round (3 * cosd (theta + 225)), 100 + round (3 * sind (theta + 225)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 225)), 100 + round (3 * sind (theta + 225)),
        300 + round (15 * cosd (theta + 270)), 100 + round (15 * sind (theta + 270)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 270)), 100 + round (15 * sind (theta + 270)),
        300 + round (3 * cosd (theta + 315)), 100 + round (3 * sind (theta + 315)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 315)), 100 + round (3 * sind (theta + 315)),
        300 + round (15 * cosd (theta)), 100 + round (15 * sind (theta)), yellow)
    Draw.Fill (300, 100, yellow, yellow)
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            Rand.Int (-15, 15))),
            white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 90 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            90 +
            Rand.Int (-15,
            15))), white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 180 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            180
            + Rand.Int (-15,
            15))), white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 270 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            270
            + Rand.Int (-15,
            15))), white)
    end for

    %ENEMY 7
    Draw.Line (350 - 33, 50 - 9, 350, 50 - 15, rainbow)
    Draw.Line (350, 50 - 15, 350, 50 + 15, rainbow)
    Draw.Line (350, 50 + 15, 350 - 33, 50 + 9, rainbow)
    Draw.Line (350 - 33, 50 - 9, 350 - 40, 50 - 3, rainbow)
    Draw.Line (350 - 33, 50 + 9, 350 - 40, 50 + 3, rainbow)
    Draw.Line (350 - 40, 50 + 3, 350 - 40, 50 - 3, rainbow)
    Draw.Fill (350 - 5, 50, black, rainbow)
    Draw.Line (350 + 1, 50 - 10, 350 + 1, 50 + 10, darkgrey)
    Draw.Line (350 + 1, 50 + 10, 350 + 10, 50 + 7, darkgrey)
    Draw.Line (350 + 10, 50 + 7, 350 + 10, 50 - 7, darkgrey)
    Draw.Line (350 + 1, 50 - 10, 350 + 10, 50 - 7, darkgrey)
    Draw.Fill (350 + 5, 50, darkgrey, darkgrey)
    Draw.ThickLine (350 - 25, 50, 350 + 4, 50, 4, white)
    Draw.ThickLine (350 - 22, 50 + 3, 350 + 1, 50 + 3, 3, grey)
    Draw.ThickLine (350 - 22, 50 + 3, 350 - 25, 50, 3, grey)
    Draw.ThickLine (350 + 1, 50 + 3, 350 + 4, 50, 3, grey)
    Draw.ThickLine (350 - 22, 50 - 3, 350 + 1, 50 - 3, 3, grey)
    Draw.ThickLine (350 - 22, 50 - 3, 350 - 25, 50, 3, grey)
    Draw.ThickLine (350 + 1, 50 - 3, 350 + 4, 50, 3, grey)
    %Gun - Piece 1
    Draw.FillBox (350 - 40, 50 + 2, 350 - 45, 50 - 2, darkgrey)
    Draw.Line (350 - 40, 50 + 2, 350 - 45, 50 + 10, darkgrey)
    Draw.Line (350 - 45, 50 + 10, 350 - 55, 50 + 6, darkgrey)
    Draw.Line (350 - 55, 50 + 6, 350 - 45, 50 + 8, darkgrey)
    Draw.Line (350 - 45, 50 + 8, 350 - 43, 50, darkgrey)
    Draw.FillBox (350 - 40, 50 - 2, 350 - 45, 50 - 2, darkgrey)
    Draw.Line (350 - 40, 50 - 2, 350 - 45, 50 - 10, darkgrey)
    Draw.Line (350 - 45, 50 - 10, 350 - 55, 50 - 6, darkgrey)
    Draw.Line (350 - 55, 50 - 6, 350 - 45, 50 - 8, darkgrey)
    Draw.Line (350 - 45, 50 - 8, 350 - 43, 50, darkgrey)
    %Gun - Piece 2
    Draw.Line (350 - 33, 50 + 9, 350 - 30, 50 + 20, grey)
    Draw.Line (350 - 33, 50 - 9, 350 - 30, 50 - 20, grey)
    Draw.Line (350 - 30, 50 + 20, 350 - 45, 50 + 15, grey)
    Draw.Line (350 - 30, 50 - 20, 350 - 45, 50 - 15, grey)
    Draw.Line (350 - 45, 50 + 15, 350 - 38, 50 + 15, grey)
    Draw.Line (350 - 45, 50 - 15, 350 - 38, 50 - 15, grey)
    Draw.Line (350 - 38, 50 + 15, 350 - 40, 50 + 3, grey)
    Draw.Line (350 - 38, 50 - 15, 350 - 40, 50 - 3, grey)
    %Fire
    Draw.FillOval (350 + Rand.Int (12, 15), 50, Rand.Int (3, 5), Rand.Int (4, 7), rainbow)
    Draw.FillOval (350 + Rand.Int (12, 15), 50, Rand.Int (1, 4), Rand.Int (1, 5), white)

    View.Update
    cls
    theta += 1
end loop


That's just simple spacial logic, knowing where things are and how they go together. Anyone could do it. Realistically though, most people would do this stuff in paint and then import it. I like the flexibility and accuracy however.
storm2713687




PostPosted: Tue Mar 05, 2013 11:48 am   Post subject: Re: RE:Turing run mode resolution

Raknarg @ Mon Mar 04, 2013 9:28 pm wrote:
ITs really easy. It's basically just a bunch of boxes and lines.

The interesting part is when you throw in trigonometry and get moving parts. It's more time consuming than anything else... I compiled here some old sprites:

Turing:

setscreen ("offscreenonly")
var theta : real := 0
var rainbow : int
loop
    rainbow := Rand.Int (32, 80)
    Draw.FillBox (0, 0, maxx, maxy, black)

    %ENEMY 1
    Draw.FillArc (50, 50, 12, 6, round (-theta), round (-theta) + 90, green)
    Draw.FillArc (50, 50, 12, 6, round (-theta) + 180, round (-theta) + 270, brightgreen)
    Draw.ThickLine (50, 50, 50 + round (12 * cosd (theta)), 50 + round (6 * sind (theta)), 3,
        brightred)
    Draw.FillOval (50, 50, 3, 3, blue)

    %ENEMY 2
    Draw.ThickLine (100 + round (15 * cosd (theta * 2)), 100 + round (15 * sind (theta * 2)),
        100 + round (15 * cosd (theta * 2 - 180)), 100 + round (15 * sind (theta * 2 - 180)), 5, darkgrey)

    Draw.ThickLine (100 + round (15 * cosd (theta * 2)), 100 + round (15 * sind (theta * 2)),
        100 + round (10 * cosd (theta * 2 + 70)), 100 + round (10 * sind (theta * 2 + 70)), 4, darkgrey)
    Draw.ThickLine (100 + round (10 * cosd (theta * 2 + 70)), 100 + round (10 * sind (theta * 2 + 70)),
        100 + round (30 * cosd (theta * 2)), 100 + round (30 * sind (theta * 2)), 4, darkgrey)
    Draw.ThickLine (100 + round (30 * cosd (theta * 2)), 100 + round (30 * sind (theta * 2)),
        100 + round (13 * cosd (theta * 2)), 100 + round (13 * sind (theta * 2)), 4, darkgrey)

    Draw.ThickLine (100 + round (15 * cosd (theta * 2 - 180)), 100 + round (15 * sind (theta * 2 - 180)),
        100 + round (10 * cosd (theta * 2 - 110)), 100 + round (10 * sind (theta * 2 - 110)), 4, darkgrey)
    Draw.ThickLine (100 + round (10 * cosd (theta * 2 + 70 - 180)), 100 + round (10 * sind (theta * 2 + 70 - 180)),
        100 + round (30 * cosd (theta * 2 - 180)), 100 + round (30 * sind (theta * 2 - 180)), 4, darkgrey)
    Draw.ThickLine (100 + round (30 * cosd (theta * 2 - 180)), 100 + round (30 * sind (theta * 2 - 180)),
        100 + round (13 * cosd (theta * 2 - 180)), 100 + round (13 * sind (theta * 2 - 180)), 4, darkgrey)

    Draw.FillOval (100, 100, 5, 5, brightred)

    %ENEMY 3
    Draw.Line (150 + round (10 * cosd (theta)), 50 + round (10 * sind (theta)),
        150 + round (3 * cosd (theta + 45)), 50 + round (3 * sind (theta + 45)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 45)), 50 + round (3 * sind (theta + 45)),
        150 + round (10 * cosd (theta + 90)), 50 + round (10 * sind (theta + 90)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 90)), 50 + round (10 * sind (theta + 90)),
        150 + round (3 * cosd (theta + 135)), 50 + round (3 * sind (theta + 135)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 135)), 50 + round (3 * sind (theta + 135)),
        150 + round (10 * cosd (theta + 180)), 50 + round (10 * sind (theta + 180)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 180)), 50 + round (10 * sind (theta + 180)),
        150 + round (3 * cosd (theta + 225)), 50 + round (3 * sind (theta + 225)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 225)), 50 + round (3 * sind (theta + 225)),
        150 + round (10 * cosd (theta + 270)), 50 + round (10 * sind (theta + 270)), yellow)
    Draw.Line (150 + round (10 * cosd (theta + 270)), 50 + round (10 * sind (theta + 270)),
        150 + round (3 * cosd (theta + 315)), 50 + round (3 * sind (theta + 315)), yellow)
    Draw.Line (150 + round (3 * cosd (theta + 315)), 50 + round (3 * sind (theta + 315)),
        150 + round (10 * cosd (theta)), 50 + round (10 * sind (theta)), yellow)
    Draw.Fill (150, 50, yellow, yellow)
    for j : 1 .. 5
        Draw.Dot (150 + round ((Rand.Int (0, 10)) * cosd (Rand.Int (1, 360))), 50 + round ((Rand.Int (0, 10)) * sind (Rand.Int (1, 360))), white)
    end for

    %ENEMY 4
    Draw.Line (200 - 33, 150 - 9, 200, 150 - 15, white)
    Draw.Line (200, 150 - 15, 200, 150 + 15, white)
    Draw.Line (200, 150 + 15, 200 - 33, 150 + 9, white)
    Draw.Line (200 - 33, 150 - 9, 200 - 40, 150 - 3, white)
    Draw.Line (200 - 33, 150 + 9, 200 - 40, 150 + 3, white)
    Draw.Line (200 - 40, 150 + 3, 200 - 40, 150 - 3, white)
    Draw.Fill (200 - 5, 150, black, white)
    Draw.Line (200 + 1, 150 - 10, 200 + 1, 150 + 10, darkgrey)
    Draw.Line (200 + 1, 150 + 10, 200 + 10, 150 + 7, darkgrey)
    Draw.Line (200 + 10, 150 + 7, 200 + 10, 150 - 7, darkgrey)
    Draw.Line (200 + 1, 150 - 10, 200 + 10, 150 - 7, darkgrey)
    Draw.Fill (200 + 5, 150, darkgrey, darkgrey)
    %Gun
    Draw.FillBox (200 - 40, 150 + 2, 200 - 45, 150 - 2, darkgrey)
    Draw.Line (200 - 40, 150 + 2, 200 - 45, 150 + 10, darkgrey)
    Draw.Line (200 - 45, 150 + 10, 200 - 55, 150 + 6, darkgrey)
    Draw.Line (200 - 55, 150 + 6, 200 - 45, 150 + 8, darkgrey)
    Draw.Line (200 - 45, 150 + 8, 200 - 43, 150, darkgrey)
    Draw.FillBox (200 - 40, 150 - 2, 200 - 45, 150 - 2, darkgrey)
    Draw.Line (200 - 40, 150 - 2, 200 - 45, 150 - 10, darkgrey)
    Draw.Line (200 - 45, 150 - 10, 200 - 55, 150 - 6, darkgrey)
    Draw.Line (200 - 55, 150 - 6, 200 - 45, 150 - 8, darkgrey)
    Draw.Line (200 - 45, 150 - 8, 200 - 43, 150, darkgrey)
    %Fire
    Draw.FillOval (200 + Rand.Int (12, 15), 150, Rand.Int (3, 5), Rand.Int (4, 7), yellow)
    Draw.FillOval (200 + Rand.Int (12, 15), 150, Rand.Int (1, 4), Rand.Int (1, 5), white)

    %ENEMY 5
    Draw.ThickLine (250 + round (15 * cosd (theta * 4)), 50 + round (15 * sind (theta * 4)),
        250 + round (15 * cosd (theta * 4 - 180)), 50 + round (15 * sind (theta * 4 - 180)), 5, 19)

    Draw.ThickLine (250 + round (15 * cosd (theta * 4)), 50 + round (15 * sind (theta * 4)),
        250 + round (10 * cosd (theta * 4 + 70)), 50 + round (10 * sind (theta * 4 + 70)), 4, 19)
    Draw.ThickLine (250 + round (10 * cosd (theta * 4 + 70)), 50 + round (10 * sind (theta * 4 + 70)),
        250 + round (40 * cosd (theta * 4)), 50 + round (40 * sind (theta * 4)), 4, blue)
    Draw.ThickLine (250 + round (40 * cosd (theta * 4)), 50 + round (40 * sind (theta * 4)),
        250 + round (13 * cosd (theta * 4)), 50 + round (13 * sind (theta * 4)), 4, 19)

    Draw.ThickLine (250 + round (15 * cosd (theta * 4 - 180)), 50 + round (15 * sind (theta * 4 - 180)),
        250 + round (10 * cosd (theta * 4 - 110)), 50 + round (10 * sind (theta * 4 - 110)), 4, 19)
    Draw.ThickLine (250 + round (10 * cosd (theta * 4 + 70 - 180)), 50 + round (10 * sind (theta * 4 + 70 - 180)),
        250 + round (40 * cosd (theta * 4 - 180)), 50 + round (40 * sind (theta * 4 - 180)), 4, blue)
    Draw.ThickLine (250 + round (40 * cosd (theta * 4 - 180)), 50 + round (40 * sind (theta * 4 - 180)),
        250 + round (13 * cosd (theta * 4 - 180)), 50 + round (13 * sind (theta * 4 - 180)), 4, 19)

    Draw.FillOval (250, 50, 5, 5, brightblue)

    %ENEMY 6
    Draw.Line (300 + round (10 * cosd (theta * 1.5 - 45)), 100 + round (10 * sind (theta * 1.5 - 45)),
        300 + round (3 * cosd (theta * 1.5)), 100 + round (3 * sind (theta * 1.5)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5)), 100 + round (3 * sind (theta * 1.5)),
        300 + round (10 * cosd (theta * 1.5 + 45)), 100 + round (10 * sind (theta * 1.5 + 45)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 45)), 100 + round (10 * sind (theta * 1.5 + 45)),
        300 + round (3 * cosd (theta * 1.5 + 90)), 100 + round (3 * sind (theta * 1.5 + 90)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 90)), 100 + round (3 * sind (theta * 1.5 + 90)),
        300 + round (10 * cosd (theta * 1.5 + 135)), 100 + round (10 * sind (theta * 1.5 + 135)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 135)), 100 + round (10 * sind (theta * 1.5 + 135)),
        300 + round (3 * cosd (theta * 1.5 + 180)), 100 + round (3 * sind (theta * 1.5 + 180)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 180)), 100 + round (3 * sind (theta * 1.5 + 180)),
        300 + round (10 * cosd (theta * 1.5 + 225)), 100 + round (10 * sind (theta * 1.5 + 225)), rainbow)
    Draw.Line (300 + round (10 * cosd (theta * 1.5 + 225)), 100 + round (10 * sind (theta * 1.5 + 225)),
        300 + round (3 * cosd (theta * 1.5 + 270)), 100 + round (3 * sind (theta * 1.5 + 270)), rainbow)
    Draw.Line (300 + round (3 * cosd (theta * 1.5 + 270)), 100 + round (3 * sind (theta * 1.5 + 270)),
        300 + round (10 * cosd (theta * 1.5 - 45)), 100 + round (10 * sind (theta * 1.5 - 45)), rainbow)
    %Outside star
    Draw.Line (300 + round (15 * cosd (theta)), 100 + round (15 * sind (theta)),
        300 + round (3 * cosd (theta + 45)), 100 + round (3 * sind (theta + 45)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 45)), 100 + round (3 * sind (theta + 45)),
        300 + round (15 * cosd (theta + 90)), 100 + round (15 * sind (theta + 90)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 90)), 100 + round (15 * sind (theta + 90)),
        300 + round (3 * cosd (theta + 135)), 100 + round (3 * sind (theta + 135)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 135)), 100 + round (3 * sind (theta + 135)),
        300 + round (15 * cosd (theta + 180)), 100 + round (15 * sind (theta + 180)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 180)), 100 + round (15 * sind (theta + 180)),
        300 + round (3 * cosd (theta + 225)), 100 + round (3 * sind (theta + 225)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 225)), 100 + round (3 * sind (theta + 225)),
        300 + round (15 * cosd (theta + 270)), 100 + round (15 * sind (theta + 270)), yellow)
    Draw.Line (300 + round (15 * cosd (theta + 270)), 100 + round (15 * sind (theta + 270)),
        300 + round (3 * cosd (theta + 315)), 100 + round (3 * sind (theta + 315)), yellow)
    Draw.Line (300 + round (3 * cosd (theta + 315)), 100 + round (3 * sind (theta + 315)),
        300 + round (15 * cosd (theta)), 100 + round (15 * sind (theta)), yellow)
    Draw.Fill (300, 100, yellow, yellow)
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            Rand.Int (-15, 15))),
            white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 90 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            90 +
            Rand.Int (-15,
            15))), white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 180 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            180
            + Rand.Int (-15,
            15))), white)
    end for
    for j : 1 .. 5
        Draw.Dot (300 + round ((Rand.Int (0, 20)) * cosd (theta * 2 + 270 + Rand.Int (-15, 15))), 100 + round ((Rand.Int (0, 20)) * sind (theta * 2 +
            270
            + Rand.Int (-15,
            15))), white)
    end for

    %ENEMY 7
    Draw.Line (350 - 33, 50 - 9, 350, 50 - 15, rainbow)
    Draw.Line (350, 50 - 15, 350, 50 + 15, rainbow)
    Draw.Line (350, 50 + 15, 350 - 33, 50 + 9, rainbow)
    Draw.Line (350 - 33, 50 - 9, 350 - 40, 50 - 3, rainbow)
    Draw.Line (350 - 33, 50 + 9, 350 - 40, 50 + 3, rainbow)
    Draw.Line (350 - 40, 50 + 3, 350 - 40, 50 - 3, rainbow)
    Draw.Fill (350 - 5, 50, black, rainbow)
    Draw.Line (350 + 1, 50 - 10, 350 + 1, 50 + 10, darkgrey)
    Draw.Line (350 + 1, 50 + 10, 350 + 10, 50 + 7, darkgrey)
    Draw.Line (350 + 10, 50 + 7, 350 + 10, 50 - 7, darkgrey)
    Draw.Line (350 + 1, 50 - 10, 350 + 10, 50 - 7, darkgrey)
    Draw.Fill (350 + 5, 50, darkgrey, darkgrey)
    Draw.ThickLine (350 - 25, 50, 350 + 4, 50, 4, white)
    Draw.ThickLine (350 - 22, 50 + 3, 350 + 1, 50 + 3, 3, grey)
    Draw.ThickLine (350 - 22, 50 + 3, 350 - 25, 50, 3, grey)
    Draw.ThickLine (350 + 1, 50 + 3, 350 + 4, 50, 3, grey)
    Draw.ThickLine (350 - 22, 50 - 3, 350 + 1, 50 - 3, 3, grey)
    Draw.ThickLine (350 - 22, 50 - 3, 350 - 25, 50, 3, grey)
    Draw.ThickLine (350 + 1, 50 - 3, 350 + 4, 50, 3, grey)
    %Gun - Piece 1
    Draw.FillBox (350 - 40, 50 + 2, 350 - 45, 50 - 2, darkgrey)
    Draw.Line (350 - 40, 50 + 2, 350 - 45, 50 + 10, darkgrey)
    Draw.Line (350 - 45, 50 + 10, 350 - 55, 50 + 6, darkgrey)
    Draw.Line (350 - 55, 50 + 6, 350 - 45, 50 + 8, darkgrey)
    Draw.Line (350 - 45, 50 + 8, 350 - 43, 50, darkgrey)
    Draw.FillBox (350 - 40, 50 - 2, 350 - 45, 50 - 2, darkgrey)
    Draw.Line (350 - 40, 50 - 2, 350 - 45, 50 - 10, darkgrey)
    Draw.Line (350 - 45, 50 - 10, 350 - 55, 50 - 6, darkgrey)
    Draw.Line (350 - 55, 50 - 6, 350 - 45, 50 - 8, darkgrey)
    Draw.Line (350 - 45, 50 - 8, 350 - 43, 50, darkgrey)
    %Gun - Piece 2
    Draw.Line (350 - 33, 50 + 9, 350 - 30, 50 + 20, grey)
    Draw.Line (350 - 33, 50 - 9, 350 - 30, 50 - 20, grey)
    Draw.Line (350 - 30, 50 + 20, 350 - 45, 50 + 15, grey)
    Draw.Line (350 - 30, 50 - 20, 350 - 45, 50 - 15, grey)
    Draw.Line (350 - 45, 50 + 15, 350 - 38, 50 + 15, grey)
    Draw.Line (350 - 45, 50 - 15, 350 - 38, 50 - 15, grey)
    Draw.Line (350 - 38, 50 + 15, 350 - 40, 50 + 3, grey)
    Draw.Line (350 - 38, 50 - 15, 350 - 40, 50 - 3, grey)
    %Fire
    Draw.FillOval (350 + Rand.Int (12, 15), 50, Rand.Int (3, 5), Rand.Int (4, 7), rainbow)
    Draw.FillOval (350 + Rand.Int (12, 15), 50, Rand.Int (1, 4), Rand.Int (1, 5), white)

    View.Update
    cls
    theta += 1
end loop


That's just simple spacial logic, knowing where things are and how they go together. Anyone could do it. Realistically though, most people would do this stuff in paint and then import it. I like the flexibility and accuracy however.

So those are basically Turing drawn pictures?
Raknarg




PostPosted: Tue Mar 05, 2013 4:53 pm   Post subject: RE:Turing run mode resolution

Yup. You draw ovals, boxes and lines, and fill the spaces with fills.

Learning the sprite class can make this simpler I think, though. This is a really arduous solution.
storm2713687




PostPosted: Tue Mar 05, 2013 8:48 pm   Post subject: Re: Turing run mode resolution

Oh gawd... drawing things on Turing is still so confusing Razz
Raknarg




PostPosted: Wed Mar 06, 2013 7:57 pm   Post subject: RE:Turing run mode resolution

There's probably a tutorial somewhere. Or you can just ask. It's practically the same in every language, you treat the screen like a number grid, and you draw objects on certain points or fill in certain boundaries.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 21 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: