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

Username:   Password: 
 RegisterRegister   
 how do i move a guy in turing?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
caldrium




PostPosted: Tue Jan 17, 2006 10:18 am   Post subject: how do i move a guy in turing?

im taking a turing class and we are doing an assingment, and im making a game but i dont know how to move or collide

how would i move up(on up arrow command),down,left,right and how do i do collissions (example if you run into something, this happens)
Sponsor
Sponsor
Sponsor
sponsor
Albrecd




PostPosted: Tue Jan 17, 2006 10:39 am   Post subject: (No subject)

code:
var input : array char of boolean
Input.KeyDown (input)
if input (KEY_UP_ARROW) then
CharacterY += 3 %Or whatever number depending on how far you want the character to move.


Put this in a loop and do the same for right, left, and down (you can use the same variable for each)
Delos




PostPosted: Tue Jan 17, 2006 10:41 am   Post subject: (No subject)

You start by reading the tutorials on Movement (specifically Input.KeyDown()) and collision detection. Check the Walkthrough for a complete list.

Then, you do some pseudo- and real- coding. Then, if you're still stuck, you come back here, post your code (using [code] or [syntax] tags), and we'll check it through to see if we can give you any pointers.

It's quite a simple process (both the one described above and what you intend to do). There are hundreds of examples of movement in [Source]. Look at a couple of those for inspiration if you need.
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 1  [ 3 Posts ]
Jump to:   


Style:  
Search: