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

Username:   Password: 
 RegisterRegister   
 Star Race
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
scholarlytutor




PostPosted: Mon Mar 27, 2023 11:38 am   Post subject: Star Race

This is an example of me taking a program from a Turing textbook and making improvements to it. As with other programs I've made, I've bundled a lot of components into procedures and tried to keep the "main" program as short as possible.

The program is essentially a random star race, using the * character rather than any pixel-based figures. Of course, if you keep the logic the same, it wouldn't be too difficult to change the * characters into tiny race cars and add in the necessary backgrounds (a road, grass, etc). However, note that I set the screen using rows and columns rather than pixels, so if the size of your cars is going to be constructed using pixels (i.e. boxes and a couple of ovals), you will probably want to set the screen in pixels to ensure that your program works the same on different computers.

I hope this is helpful for people learning how to make simple games with Turing! Try making some changes or improvements and posting them here.



Star Race.t
 Description:

Download
 Filename:  Star Race.t
 Filesize:  2.16 KB
 Downloaded:  56 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: