Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Window size change

Why hello there :D
What i'm looking for is a window change. Not a resolution modification, but a script that changes the window size.
I quickly made this in paint (lol):

25fokef.png

Thats what i'm aiming for.
The 640 x 480 area is still there, only with an extra 'x' x 480 area added to the right.
You shouldnt have to mess around with the tilemap, if you just draw a rectangle or something to the right of the screen to hide the blank area.

The Chat windows are drawn as part of the Scene_Map class. Called through there, anyway. Will this affect anything?
Is this possible?
 
I know that in VX that is super simple. It is
Code:
 

Graphics.resize_screen(width, height)

However, in XP, its something nearly the exact same but not. I will keep searching, but I know I have seen it and done it before as well. Its super simple.
 
Thanks, you're a legend Gubid! :D
With the VX thing, I dont want the character to be put into the middle of the window though. I'm aiming for the character to be in the middle of the map scene (to the right), so i can have the extra area for the chat, without it colliding with the map.
 
Thanks Gubid, works perfectly!
what would be the best way to hide things that are outside the screen? I have some scripts that draw things before they go onscreen (like they slide in from the left or right etc.) and they are visible in the aditional space.

What would be the best way to go about drawing a covering box over the blank area to hide things that are ment to be hidden?
This box must be there for all scenes, too.
 
[rgss]viewport_mask = viewport.new(640,0,x,480) #where x = the width
viewport_mask.z = y # where y equals a z higher than anything you want to hide, but lower than your chat
mask_sprite = Sprite.new(viewport_mask)
mask_sprite.bitmap = Bitmap.new(x,480)
mask_sprite.bitmap.fill_rect(0, 0, x, 480, Color.new(0, 0, 0))
[/rgss]

just add the above code before Main, make sure to replace x with the width of the extra area and y with the desired z as explained in the code. this will fill it with black, if you want a different color, just change the three '0's at the end. also, if you want an image there instead, just change the last two lines to mask_sprite.bitmap = Bitmap.new('name_of_image')
 
Thanks for all the help guys!
I get this though.

Hm.
undefined method 'viewport', line 1
$viewport_mask = viewport.new(640,0,960,480)

?

EDIT: Never mind, just gave it a capital. All good!

EDIT: 1 more thing, actually.
It all works excellent, but when you go into fullscreen, it changes the window size back to default, and removes the extra area.
How do I prevent that from happening?
 
Tried that, and it didn't work.
It's ok, I guess i'll have to go without it.
Thanks anyway for helping Gubid and Goldaryn!
But does this mean that those custom resolution scripts don't work in fullscreen too?
 
You actually have to disable fullscreen. There is a way to do it, Cremno created a dll that disables alt+enter, F1, and F12. It is included in my resolution kit, it would be the easiest way to get the dll. once you have the 'nof12.dll' just add the following code to the end of the script above:

[rgss]NoAltEnter = Win32API.new('NoF12', 'NoAltEnter', 'L', nil)
NoAltEnter.call(1)
[/rgss]

This will effectively disable Alt+Enter from triggering fullscreen. Also, custom Resolutions normally do work in fullscreen, but only if the monitor/video card supports the resolution. I believe the resolution you are trying to use would not be supported by any monitor/video card that I know of, so the best bet would be to disable fullscreen completely.

-Draycos Goldaryn
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top