Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dukeofthebump

Pages: [1]
1
QB64 Discussion / Re: Basic question about window size
« on: November 15, 2018, 09:24:10 am »
I sn't this just a simple case of adding $RESIZE to the top of the code?

That lets the player resize the window with the mouse, but I need to be able to do it within the program itself.

2
QB64 Discussion / Re: Basic question about window size
« on: November 15, 2018, 07:08:21 am »
I didn't realize this would be such an involved process, and I really appreciate you taking the time to work this out. I thought I was just missing something obvious, but I guess I was over-estimating the flexibility of text mode. I tried your solution and it works perfectly, and at least so far I'm not noticing much of a speed hit, but that might change as the game gets more complex. It might be better in the long run to just build it from the ground up with graphical mode in mind, and fake text mode with a bitmapped font and limited palette.

Thanks again!

3
QB64 Discussion / Re: Basic question about window size
« on: November 15, 2018, 05:22:29 am »
Thanks so much for the quick response!

The problem is, I want to increase the size of the window but also scale the contents of the window, as if the user had resized it themselves. That is, I don't want a window with more characters, I want the characters to be larger.

It'll probably be easier to get with visual examples:

This is the basic screen mode 0 with no changes

This is that same window, stretched to approximately double-sized by the player

This is what I get when I try to double the screen size with SCREEN _NEWIMAGE(80, 50, 0). The window's bigger, but it's not actually scaling anything.

I'd like the look of example #2 without the player needing to physically resize the window with the mouse.

4
QB64 Discussion / Re: Basic question about window size
« on: November 15, 2018, 04:34:45 am »
Hey everyone, hopefully it's okay for me to bump this thread, but my problem pertains to the exact subject being discussed and I can't find an answer anywhere.

I'm making a text mode game and I'm having the same issue ZapJackson is - I'm actually using his source code to help with my project (thank you for sharing it, by the way) and he ended up just using the $RESIZE metacommand, which is fine, but I'd really like to be able to manipulate the size of the window in the program and I'm stuck. I know how to do this in graphical screen modes, and I know how to change the number of text columns with WIDTH, but I'd really like to be able to actually resize the window and I'm at a loss. I'd like the game to start in a larger window so the player doesn't have to resize it every time they start playing, and my eventual goal is to have a menu with different windowed/fullscreen options they can set. Basically I want to have the program perform the action of the player resizing the window, but with a specific resolution and without needing to use the mouse.

In the wiki it says "To automatically run in Qbasic fullscreen, use another Screen mode before using SCREEN 0." I don't want it to start fullscreen, but I thought it might work the same way with a window, so I tried this at the beginning of the program:

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(1280, 800, 32)
  2.  

It launches in a 1280x800 window, but after I press a key and it changes to screen 0 it goes right back to the default size. If anyone has any ideas I'd be very appreciative.

Edit: also, in the wiki entry for _FONT it says: "NOTE: SCREEN 0 can only use one font type and style per viewed SCREEN page. Font size may also affect the window size."

So I assume this means I can change the font size and the window will automatically scale to adapt to it, but I have no idea how to do this. :( I know it would be possible if I load a custom TTF, but is there a way to change the size of the default font 16?

Pages: [1]