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

Username:   Password: 
 RegisterRegister   
 hey newby to turing Some of my work
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
duelpoint




PostPosted: Thu Jan 26, 2006 10:59 pm   Post subject: hey newby to turing Some of my work

hey guys my first cs class in like 2 weeks i am in grade 10 and i thought i would get a head start cuz i 2 hard subjects nex sem so it would help me alot if u can see some of my work and see and point out my errors
i did around 5 projects and heres the codes
this is my latest one i was bored i think i should have used the loop but not sure
code:
var name : string
var text2 : string
var text : string
put "Hello, whats your name ?"
get name
put "Hello ", name ,"do you like music? y/n"
get text
if text = "y" then
put "Here's my music and tell me if its good? okay"
play ("<+A")
        play (">8fdyjasgf")
        play ("<<1-a-b-c-d")
        play (">8sldyhlashdlkjashdasdkkkk")
        play ("<>8adcgagggb-b-a")
        play ("<>8asasjkjslkajsghdsksgadhkasdgfghdsfkkjashgdsgadhgkshfhgsfdhgkjas>jgasdasfdjhdgasdkashgdjgasdgklkasfdgaskd")
 
    put "could you tell me if it was good or bad? by saying good/bad? i get confused when you use big words :P"
    get text2
    if text2 = "good" then
    put "Thank you very much ", name," i am sure u are a good music composer too we should write a duet some time"
    end if
    if text2 = "bad" then
    put "well i bet you dont even know how to read music pshh what would a loser like you know about music"
    end if
    else
    put "I asked if my music is good or bad not if it was amazing or horrible... dont be a smarty pants and use big words"             
    end if
 


this was the first program i wrote Razz ( was so happy)

code:
var name : string
put "What is your name?"
get name
put "Hello ", name , "!"
var age : string
put "How old are you"
get age
put"I dont care how old you are ", name,"!"
var Placewhereyoustudy : string
put "Where do you study ", name,"."
get Placewhereyoustudy
put "A smarty pants eh well i dont care if your smarter than me ", name, " You cant be that smart because you are talking to a computer"


this is one of the projetc i did in the middle oh for this one how come the view.set() didnt work?
code:
var x,y :int
x := 100
y := 100

loop

var chars : array char of boolean
    Input.KeyDown (chars)
    if chars (KEY_DOWN_ARROW) then
        y := y-5
    end if
    if chars (KEY_UP_ARROW) then
        y := y+5
    end if 
    if chars (KEY_RIGHT_ARROW) then
        x := x+5
    end if
    if chars (KEY_LEFT_ARROW) then
        x := x-5
    end if   
    drawoval(x,y,10,10,green)
    drawfilloval(x,y,10,10,green)
    delay (5)

cls
end loop


yup theres most of my projects the rest are pretty similar so if u guys can point out on my improvements that would be much appreciated Smile
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Jan 26, 2006 11:07 pm   Post subject: (No subject)

two generic advices are to follow the Turing Walkthrough, and to see if you can make sence of all the [Turing Source Code] submissions Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Clayton




PostPosted: Thu Jan 26, 2006 11:17 pm   Post subject: (No subject)

eventually youll learn to compress your code a bit, but i mean, if this is just the beginning for you then wat else can be expected right? i also agree w/ tony, check the walkthrough, and go to the tutorial forum here and check it out. this is an extremely helpful thread and is normally explained decently well for beginners
duelpoint




PostPosted: Fri Jan 27, 2006 3:51 pm   Post subject: (No subject)

thanks guys
Rasta Fella




PostPosted: Fri Jan 27, 2006 4:26 pm   Post subject: (No subject)

Yeah, your code lines could get shorter...but it's your first time so that good then.
duelpoint




PostPosted: Sat Jan 28, 2006 12:36 pm   Post subject: (No subject)

thanks rasta
skootles




PostPosted: Sun Jan 29, 2006 12:14 am   Post subject: (No subject)

When I say I don't like music (obviously a lie, haha), it tells me not to use big words Sad

But those are pretty good for first tries Cool
bgmrk




PostPosted: Sun Jan 29, 2006 12:41 am   Post subject: (No subject)

when i type my name.... nd it says hello, there is no space between the name and "do".
Sponsor
Sponsor
Sponsor
sponsor
duelpoint




PostPosted: Sun Jan 29, 2006 10:23 am   Post subject: (No subject)

skootles wrote:
When I say I don't like music (obviously a lie, haha), it tells me not to use big words Sad
Cool



lol


code:
when i type my name.... nd it says hello, there is no space between the name and "do".


Yea i forgot to put one between the " and the name...


THanks on the comment guys
duelpoint




PostPosted: Sun Jan 29, 2006 10:34 am   Post subject: (No subject)

Umm hey guys i have a question i just didnt want to start a new thread soi thought i might post it here k any way i use 3d max photoshop and other programs and i make newby commercials in adobe premier for my tech class so could you insert any of these into turing ? like for example import 3d bats and ball and make 3d ping pong or volyball or brick ? many other games so if you can is it the same command as normal pictures?

like hers one of my pic made in 3d max

Posted Image, might have been reduced in size. Click Image to view fullscreen.

so i if i could i can make a maze game like zoom in and etc...
Delos




PostPosted: Sun Jan 29, 2006 11:17 am   Post subject: (No subject)

That's a nice picture you have there.

And in answer to your questions, yes all of that is possible. Now don't get too excited. Turing is notorious for being utterly terrible at 3D-type graphics. Why? Because it involves such a huge amount of processing and, well, Turing can only do so much.
I'm sure there are more technicaly reasons, but I neither know them nor would want to.

This is quite likely the single greatest 3D engine written in Turing. A fellow by the name of Catalyst also did some amazing work a while back.

If you can look at any given section of that code and intuitively know what zylum was trying to say - then you're using the wrong programming language.
Go teach yourself Ruby or something, Turing is far too limiting.
I should really take my own advice sometimes. This is actually a great idea! Yeah, Ruby!
duelpoint




PostPosted: Sun Jan 29, 2006 9:49 pm   Post subject: (No subject)

thanks delos i will check it out but one thing it isnt running when i press run ? so how do i make it work? sorry for the newby question but like how do u run a hige game that has a diff rent engine like rpg games and this one thanks
Delos




PostPosted: Sun Jan 29, 2006 9:53 pm   Post subject: (No subject)

Uh, what are you trying to run...and with what? Please be a little more specifc. Contrary to popular belief, I'm only partly clairvoyent.
As for your second question... Question is about all I can say Very Happy.
[Gandalf]




PostPosted: Mon Jan 30, 2006 3:47 am   Post subject: (No subject)

It's not running when you press "run" because you have to tell the framework that zylum made to do something. You'll have to read up on classes and how to use them to utilize zylum's engine. But, before you do that, read up on the Turing Walkthrough.

Ha! So much for clairvoyency!
duelpoint




PostPosted: Mon Jan 30, 2006 7:31 am   Post subject: (No subject)

kk Thanks guys!
Thanks anyways delos, but gandalf answered the question.
I shoud be a little more specific Razz from next time.
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 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: