Sets the graphics mode for the screen. |
width = width of screen in pixels (640, 800, etc) height = height of screen in pixels (480, 600, etc) color depth = depth in bits (16, 24, or 32 bit - use 16 if possible!) mode = Video mode (see description); Optional |
Command Description:
This command sets Blitz into 'graphics' mode with the specified width, height, and color depth (in bits). This command must be executed before any graphic related commands can be used. Color depth is OPTIONAL and should be left blank if possible - Blitz will determine the best color mode automatically for the user's video card. Valid graphic width and height varies GREATLY from card to card so to be sure your users can display the mode you wish, use the GfxModeExists command to be sure before you try and set the mode yourself. Common resolutions that are probably safe are 640x480 and 800x600. Try to avoid odd screen modes like 640x400 as MANY MANY cards cannot display them. Chances are if you can set your Windows screen resolution to a particular resolution, then Blitz will behave in that resolution also. Remember, each step higher in resolution and color depth mark a large jump in system requirements and may be inversely proportionate to system performance. If you use the lowest resolution and depth possible to meet your desired game parameters, it will allow more people with lesser systems than your own still play and enjoy your game. This is why many games still support a 640x480 mode :) An extra parameter is used at the end of the command after the color depth. Here are the parameters: 0 : auto - windowed in debug, fullscreen in non-debug (this is the default) 1 : fullscreen mode 2 : windowed mode 3 : scaled window mode |
Example:
;GRAPHICS Example ; Set The Graphic Mode Graphics 800,600 ; Now print something on the graphic screen Text 0,0, "This is some text printed on the graphic screen (and a white box)! Press ESC ..." ; Now for a box Rect 100,100,200,200,1 While Not KeyHit(1) Wend |