Typical usage of BlitzMax in a game

BlitzMax Forums/BlitzMax Programming/Typical usage of BlitzMax in a game

Brucey(Posted 2014) [#1]
I'm just curious how a typical game is put together with regards the graphics if you support fullscreen AND windowed modes.

Do you use MaxGUI for the window handling, or do everything in, say, Max2D?


I'm currently working on an SDL backend for BlitzMax which has very good support for window/screen creation across platforms, so it is interesting to know how people generally use the facilities available to them.

Valve have apparently been investing resources in SDL, and they are pushing it as their preferred backend for Linux games on Steam. Presumably because it is known to work predictably.

Anyhoo, I'd be grateful for any useful information from the game developers amongst you :-)


therevills(Posted 2014) [#2]
Since I normally use a heavily modified version of GAF (Grey Alien Framework) and that changes from fullscreen to window mode by using the Max2D commands.


GW(Posted 2014) [#3]
Your question is a little ambiguous, but I can say that for pure games, 99% of the time I use max2d only. I would only consider MaxGui for the windowing if I needed my main screen to work in beside gui components or multiple canvas'.

I personally like that max2d and maxgui have very minimal coupling.

what kind of details are you looking for?


Derron(Posted 2014) [#4]
I use maxgui only - I even do not "reload" images ... I just switch between the modes. Until now nobody had "garbaged" sprites or so.

MaxGUI should not be needed - although somebody suggested it, years ago, when I asked for advice how to handle "window movement" (moving windows on "Windows" - at least XP - halted the application for that time. So when dragging the window around for 10 seconds, the whole application stopped, which could be difficult when having to handle networking packets or measuring things from an connected hardware device). This was of course was about the time when MaxGUI still was sold.


Switching between Windowed/Fullscreen is surely "just" a question of context handling (images/pixmaps).


bye
Ron


LT(Posted 2014) [#5]
I don't know of anything to use besides Canvas if you want to do full screen and have a resizable window. I haven't got instant switching to work because shaders become invalidated somehow.


John G(Posted 2014) [#6]
My game(s) launch in a fixed MaxGui window at 1000x576 pixel size.
Press PLAY or choose screen res/graphics/options/modes/settings first.
Switch to Full Screen (no windows option) and use KeyBoard and Mouse (Pad).
ESC/PLAY toggles back and fourth.
See SteamTRAIN @ NostWare.com.


Brucey(Posted 2014) [#7]
John, is there are reason you have your settings stuff in a MaxGUI window, rather than doing it in a graphics window?

Wiebo's little game framework seems to handle context switching (window->fullscreen->window) rather well. (as an example of a working implementation of it).


John G(Posted 2014) [#8]
@ Brucey: First, I chose Full Screen game play for maximum performance and consistency between Mac and Windows versions. (ST4 near identical). Prior game versions (ST 1,2,3) had been Mac PPC only and had used fixed window size with menus. All option choices were from menus.

With BlitzMax, I looked at several "In-game" GUIs but was concerned about long term support as some seemed to have been abandoned. I chose the official Blitz MaxGUI partly because it was easy for me to understand. This does require the awkward jumping back-and-forth between MaxGUI and Full Screen but I've received few customer complaints.

The only Third-Party Modules I've relied on are OddBall's graphic extensions -- screen rotation, etc. Thanks for asking. What is 'Wiebo's little game framework' called?


GW(Posted 2014) [#9]
I think this is the framework with a game example. http://www.blitzbasic.com/Community/post.php?topic=103015&post=1239756
It's nice and compact from what I can tell.


zoqfotpik(Posted 2014) [#10]
I am very interested in this, Brucey, thanks for your hard work.