1st, create a large room. The room is the level, and as such holds the WHOLE world/area, and you are interested in displaying a section of this. Think of it as an RPG, or Farmville. You have a large area, and want to allow the user to see a bigger view into this area.
So... create a room (say) 2048x2048. and put some stuff down in there.
2. Create a default view. X:0, Y:0,W:640,H:480 for both the view in the room and the port on screen.
Then tick "Enable the use of Views" and "Visible when room starts".
3. Next, create a new object and add it to the room.
This will control the resizing of the view/canvas. Put the D&D action in for "Change full screen mode". Set the action to "fullscreen"
Next add "execute a bit of code", and add this so we can detect a change:
global.g_ScreenWidth = window_get_width(); global.g_ScreenHeight = window_get_height();
Lastly... add this code into a STEP event.
if( (global.g_ScreenWidth != window_get_width() ) || (global.g_ScreenHeight != window_get_height() ) )
{
global.g_ScreenWidth = window_get_width();
global.g_ScreenHeight = window_get_height();
view_xview[0] = 0;
view_yview[0] = 0;
view_wview[0] = global.g_ScreenWidth;
view_hview[0] = global.g_ScreenHeight;
view_xport[0] = 0;
view_yport[0] = 0;
view_wport[0] = global.g_ScreenWidth;
view_hport[0] = global.g_ScreenHeight;
}
This should resize your "play area" without actually just scaling everything to fit.
You will have to take care with the amount you draw now though!!











