Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Change resolution #80719
07/08/06 14:17
07/08/06 14:17
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Is this a good command for switching the resolution ingame?

video_switch(8,0,0);

A friend of mine is using this commando, and he gets the following error:

< video_switch(8,0,0)>
TESTGAME.WDL 670:0 Error(0): Bad or missing parameter unknown function


The best games are the games you create yourself.
Re: Change resolution [Re: NL_3DGS_n00b] #80720
07/08/06 16:28
07/08/06 16:28
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
video_set(var width,var height,var depth,var screen)

Like video_switch, but the width and height can now be set individually, thus allowing arbitrary video resolutions not contained in the 12 supported modes.

Parameters:
width width of screen resolution
height height of screen resolution
depth color depth of screen resolution
screen fullscreen or window mode

Remarks:
In window mode, arbitrary video resolutions are supported as long as they fit on the desktop screen and sufficient video memory is available.

In fullscreen mode, only a few video resolutions are supported, dependent on the 3D card.

Speed:
Medium

Example:
Code:

// place the window at position (500,300) and remove the

bordervideo_window(vector(500,300,0),nullvector,1,NULL);

// But a small engine window at this position (to fake the eninge into another applictaion)
video_set(100, 100, 32, 0);



From the M A N U A L

Last edited by Michael_Schwarz; 07/08/06 16:29.

"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Change resolution [Re: NL_3DGS_n00b] #80721
07/09/06 04:08
07/09/06 04:08
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
I encountered a bug when doing this. Oddly enough, video_screen and video_depth must be defined as well before they even work, but they shouldn't produce any errors like that. Check the code around this instruction to make sure you don't have any missing semicolons somewhere and that you don't have any extra braces, the }. These are the most likely cases that cause this.

But yes, video_set should be the instruction to use to switch resolutions. Video_switch can be more problematic, especially when odd/unusual resolutions are used and only when in fullscreen mode.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Change resolution [Re: ulillillia] #80722
07/09/06 12:33
07/09/06 12:33
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline OP
Member
NL_3DGS_n00b  Offline OP
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
Problem solved;

Forgot to define the video_depth variable at the beginning of my script.


The best games are the games you create yourself.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1