I want to offer an option to change the screen res before the 1st level starts(I would like to keep all the 2D menus at one resolution so I want to change it to the users specified res before anything containg 3D starts), if I do it before the level starts the collisions stop working, if I do it during a level I get an error, any tips on how to get this working?
Problem when changing screen res during a game
Blitz3D Forums/Blitz3D Beginners Area/Problem when changing screen res during a game I have never tried this before but I would think either an old fashioned GOTO command would reload all your collisions etc. OR possible restating the COLLISION matrix. Off the top of my head.
Someone will probably have a better idea. I am going to go and try that change thing now...
-RZ
Someone will probably have a better idea. I am going to go and try that change thing now...
-RZ
Any use of the Graphics3d Command will clear all your object data from memory.
I would recommend setting/changing the resolution at the very beginning, using a scaling function to scale 2D menus up/down by the necessary amount.
I would recommend setting/changing the resolution at the very beginning, using a scaling function to scale 2D menus up/down by the necessary amount.
while game=1
run_menu_system()
if graphics_changed then
scale2d_graphics_to suit()
end if
if play_game_selected
set_graphics_3d()
load_world_and_object_data()
play_game()
end if
wend
OR
while game=1
run_menu_system()
if play_game_selected
set_graphics_3d_to_selected_res()
load_world_and_object_data()
play_game()
end if
wend
WRONG:
Set_graphics3d
load_world_and_object_data()
while game(1)
overlay_2d_menu_graphics()
if play_game_selected
change_res_to_user_spec()
play_game()
end if
wend
the last one will reset your world when you reset the graphics res so dont do it :)
run_menu_system()
if graphics_changed then
scale2d_graphics_to suit()
end if
if play_game_selected
set_graphics_3d()
load_world_and_object_data()
play_game()
end if
wend
OR
while game=1
run_menu_system()
if play_game_selected
set_graphics_3d_to_selected_res()
load_world_and_object_data()
play_game()
end if
wend
WRONG:
Set_graphics3d
load_world_and_object_data()
while game(1)
overlay_2d_menu_graphics()
if play_game_selected
change_res_to_user_spec()
play_game()
end if
wend
the last one will reset your world when you reset the graphics res so dont do it :)
Or, your menu could be in a window (keeping your 2D images scaled the same), then the game runs fullscreen.