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

Username:   Password: 
 RegisterRegister   
 View.Set
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Scott




PostPosted: Fri Feb 27, 2009 7:45 pm   Post subject: View.Set

Hello, I am working on a game and have most of the mechanics worked out, jokes its far from. I am taking a break from it and have moved onto a graphical display for it. I want to use ASCII to display my game.

I have two questions which are probably simple but I never dealt with.

First
code:
View.Set ("graphics:800;640") .
I don't want to use pixels to set my screen width I want to go by characters

Second. How do I get Turing to output characters by giving it ASCII values?

Thanks to anyone who helps.
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Fri Feb 27, 2009 8:45 pm   Post subject: RE:View.Set

If you use "put" and "locate" it will work by character columns and rows. You can also change the mode to text with "View.Set ("text")", but I don't recommend it. I am actually not sure about your second question and I don't have Turing right now.
TheGuardian001




PostPosted: Fri Feb 27, 2009 10:28 pm   Post subject: Re: View.Set

Ascii values can be outputted to the screen using
Turing:

put chr(Ascii code)


as for setting by rows and columns, you can use
Turing:

setscreen("screen:rows;columns")


screen allows you to use both text and graphics, while still allowing you to set by rows/columns.
Scott




PostPosted: Sat Feb 28, 2009 2:34 pm   Post subject: Re: ASCII

Thanks for the help, but I tried that and it doesn't work for the extended ASCII.. Does Turing even support the extended?
BigBear




PostPosted: Sat Feb 28, 2009 6:05 pm   Post subject: Re: View.Set

You can see all the values of the keys in the F10 help documentation. What do you mean by extended
Scott




PostPosted: Mon Mar 02, 2009 5:50 pm   Post subject: Re: View.Set

Here this is what I am trying to get, look at the extended set of ASCII characters. http://www.asciitable.com/
TheGuardian001




PostPosted: Mon Mar 02, 2009 6:15 pm   Post subject: Re: View.Set

Ah, In that case, you will need to use View.Set("msdos"). This changes the characters from 128 on to the extended set, as opposed to the normal one.
Scott




PostPosted: Tue Mar 03, 2009 8:41 pm   Post subject: Re: View.Set

Thanks you that's exactly what I needed.
Sponsor
Sponsor
Sponsor
sponsor
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  [ 8 Posts ]
Jump to:   


Style:  
Search: