forums

TNT Basic Forums > Programming Q&A
re: screen sizes
< Last Thread     Next Thread >
Author
Thread        Post A Reply

03-23-2002 04:41

Posted by:
James Rhodes

Click Here to Email James Rhodes   Find more posts by James Rhodes

Is there any way to have a TNT Basic program automatically detect the user's screen size? This is very important with the different models of Macs out there...


Thanks
Jim

03-23-2002 12:26

Posted by:
yoc

Click Here to Email yoc   Find more posts by yoc

What about a window mode ? is it planned ?

03-23-2002 22:32

Posted by:
Mark Tully

Find more posts by Mark Tully

Window mode

We're planning a window mode for a future version of TNT Basic, it shouldn't be too difficult to implement.

James, what would you want to detect the screen size for? How would use want the information from TNT Basic and how would it affect your program?

Makr

03-24-2002 00:07

Posted by:
Chofritz

Find more posts by Chofritz

320x240

I want full screen 320 times 240 resolution but I can't get it, *almost crying*

BTW. When will TNT be able to read files? It's hard to write a rpg without being able to do that, ;)

03-24-2002 18:11

Posted by:
yoc

Click Here to Email yoc   Find more posts by yoc

320x240 is only available if you have an Atari ST ;-)
Today's computer can't do less than 640x480.

03-24-2002 18:47

Posted by:
James Rhodes

Click Here to Email James Rhodes   Find more posts by James Rhodes

clarification

no... I was talking about a command to automatically detect a user's resolution on their monitor or laptop screen. Reason is on my 300 MHz iBook, I can only go 800 x 600, so if something is higher than that I have to edit the code to open it up on my system. For a standalone game, it doesn't look like there is a command to automatically detect resolution settings.

Jim

03-27-2002 21:02

Posted by:
Mark Tully

Find more posts by Mark Tully

I see what you're getting at now. TNT Basic already chooses the best supported resolution for the request your program makes, but if you request a size larger than what is supported by the computer, TNT Basic will fail.

In the future we'll implement a choice dialog so that you can choose what resolution to fulfill the programs request with (you would have to choose a resolution which is equal to or larger than the requested size). The program would still fail if it tried to open graphics mode with larger than 800x600 on your iBook though.

Is that good enough or do you need more?

Mark

03-27-2002 22:35

Posted by:
James Rhodes

Click Here to Email James Rhodes   Find more posts by James Rhodes

good

That would be great, but I would also like to see a command to set up the screen size within a person's code to detect the best resolution on a person's monitor or LCD. This is so when you start up a compiled game, you can run it on older systems. :)

03-30-2002 10:03

Posted by:
Mark Tully

Find more posts by Mark Tully

Remember, there's two issues here, the screen resolution and the window size. When you call graphics mode, TNT Basic opens a window of the specified size, and chooses the screen resolution that will maximise that window size without stretching it.

If the window is smaller than the smallest available resolution it will be centred on the display.

If the window is larger than the largest available resolution then TNT Basic will return an error.

What I think you're requesting is a way to read the current resolution so that you can open your graphics mode window at that size? Is that correct?

Bear in mind that your game would then have to handle playing in all window sizes from 640x480 to 1000sx1000s (or whatever stupidly high rez these new flat screens run in).

Have I understood you correctly?

Mark

03-30-2002 10:07

Posted by:
James Rhodes

Click Here to Email James Rhodes   Find more posts by James Rhodes

:)

Yup... :D

04-19-2002 17:15

Posted by:
Jasoco

Click Here to Email Jasoco   Find more posts by Jasoco

Just do what other BASIC's have done (Visual Basic mainly)..

VB uses a "Screen.width" or "Screen.height" variable.

Just add a "Screen Width" and "Screen Height" command into TNTB that would return the current resolution. And how about a way to detect the Max and Min resolutions the monitor supports? Wo on an iMac the values returned would be

Screen Width = 1024
Max Screen Width = 1024
Min Screen Width = 640

Screen Height = 768
Max Screen Height = 768
Min Screen Height = 480

It most likely won't be too hard to implement. And would make it better for us. Say we want to program our games to have better detail on higher res screens. Just use the Screen Width command to see how big the screen size is and use that to your advantage. And if the Screen Width returns a smaller value than wanted, use it.

It would just be that cool.

But I do like the idea of a dialog at startup. As long as you make it so you can set it do skip next time (In other words, the same exact way OttoMatic does where it asks you every time unless you choose "Don't show" and to get to the dialog next time hold a key at startup)

04-19-2002 17:17

Posted by:
Jasoco

Click Here to Email Jasoco   Find more posts by Jasoco

Oh, and I really like the "Window Mode" idea'.

There are a lot of games out there that use windowed views. I'd like to do that. Make it optional in he game. So if someone wants, they can play the game while IMming people or something. Also set a value as to whether to pause the game when the window loses focus or not. THIS is crucial.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.