Blitz Max Game Framework Demo!

Community Forums/Showcase/Blitz Max Game Framework Demo!

Grey Alien(Posted 2006) [#1]
So what is it? Well, it's a demo game, "Attack of the Mutant Greys", (for Windows PCs) written using my new Blitz Max Game Framework.




***Get it here***
http://www.greyaliengames.com/aotmg/aotmg5.zip (4.06Mb)

Also this new scrolling demo:
********
http://www.greyaliengames.com/misc/scroller.zip (629kb)
********

It's not a proper game, so don't expect it to play like one. It's just showing off the Game Framework.

Here are some keys:

How To Play
-----------

Just move left and right and shoot the UFOs with Z, that's it for now...

Press <Esc> to quit the game.
Press <F> to toggle full screen/windowed mode.
Press <V> to toggle VSync on/off.
Press <D> to bring up the debug display
Whilst in debug mode, press <T> to toggle full speed.
Whilst in debug mode, press <L> to toggle slow motion.
Whilst in debug mode, press <I> to toggle Flip modes.
Whilst in debug mode, press <A> to toggle anti-lag fix.
Press <P> to pause the game.
Press <S> to toggle sound on/off.
Press <M> to toggle music on/off.
Press <-> and <=> to adjust sound volume.
Press <F12> to take a screenshot.
Press <Ctrl+X> to exit the game instantly.


The Game Framework is a couple of files that you can use in your games to ensure that they have everything you'd expect from a professional game such as: dynamic full-screen/windowed mode, totally smooth fixed rate logic timing, proper mouse cursor handling, ini file support etc. There's tons of stuff in it; take a look at the readme in the codebox at the end of this post.

I've spent countless boring and painful hours researching, programming and testing all the things that I think are important for a professional game to have and included them in this Game Framework so that you don't have to go through the same hassle I did! I'll be using this Game Framework for my next match-3 game, commissioned by an American company, which will be on all the major portals.

I'm selling this framework for $39 (U.S. Dollars) for a royalty free commercial licence. You can use the source code as you see fit for as many games as you like but you mustn't make it public. The Game Framework source code is well commented and I'll give you the source code for this demo as well which shows you how to use it. I'll answer support questions on this forum so everyone can benefit from the answers. Also I'll send free upgrades to customers as I enhance it over the next few months.

To buy it, send an email to info @ greyaliengames dot com and I'll tell you what to do next. (Please fix that email address first! I've put it like that to avoid spam bots grabbing my address. Or click on my user name and use the address in my profile.)

Here are some things to try out in the demo:

1) Notice how the UFOs, ship and bullets move totally smoothly in full-screen mode. Note: You might get vertical tearing if you have switched Vsync Off in your video card drivers.
2) Press F to dynamically switch to windowed mode. Notice how everything is still smooth and the same speed. If you see any vertical tearing, this is a BlitzMax/DirectX/OpenGL issue that Skidracer is looking into. It is only really noticeable on sideways moving fast objects, most games won’t have these.
3) Press D to checkout the debug display.
4) Press L for slow motion mode, then try T for Fast (max speed). Please post your FPS!
5) Notice how the title bar has an icon, so does the Alt+Tab task switching window, so does the task bar.
6) Notice how you can move the mouse in and out of the window seamlessly and also use the buttons on the title bar (this is NOT standard Blitz Max behaviour)
7) Try minimising the game, notice how the gameplay and music pauses until you refocus the game.
8) When you exit the game and reload it, it will have saved your settings in an ini file.
9) It does loads more stuff too, have a look at the frameworkreadme.txt.

Here's some more detail about the Game Framework; check it out, it does loads of cool stuff!



Please check out the demo and tell me how it works for you and let me know if you find any problems. Thanks in advance!


GfK(Posted 2006) [#2]
Cool. Attack of the Bowler Hats! ;)

Will have a look when I've got my decent PC on tomorrow.


Grey Alien(Posted 2006) [#3]
groovy, I better state that I didn't make the graphics (except for the logo), they were free (for all uses) from an Internet site. The music is mine though, I made it 12 years ago on an Amiga :-)


dmaz(Posted 2006) [#4]
is Mac compatibility planned?


Kuron(Posted 2006) [#5]
How about a different fee (or even free license) for those of us who only make freeware games?


xlsior(Posted 2006) [#6]
FPS between 770 and 870

What do you do to make a saucer blow up, like in your screenshot?


Shambler(Posted 2006) [#7]
Sorry to say it doesn't scroll smoothly in full screen mode for me =/

At a very regular interval, I'd say every 0.8 ish seconds the saucers moving right jump left a bit and the saucers moving left jump right a bit...then they return to their correct positions and continue moving.

The players ship also shows this glitch when moving, every 0.8 seconds you see a sort of ghost image where the ship jumps back to where it was a fraction of a second ago then returns to the correct position and continues moving until the next interval.

Lovely and smooth in windowed mode, I wish someone could crack this for full screen because I can never reliably get a smooth scroll in full screen mode with BMax.

I've lost interest in BMax completely because I can never get it to consistently scroll smoothly.

FPS maxed out around 1600 and everything else in the demo works fine.


Damien Sturdy(Posted 2006) [#8]
When logging file access the other day I noticed the ATI driver I had seem to access a file of some sort (Wierd name) about every "0.8" seconds too. perhap's its causing a halt in fullscreen? (Far-shot guess)


Grey Alien(Posted 2006) [#9]
dmaz: Yes Mac compatibility is planned because my next game will be released on Macs too. This may be in around 2 months. However, I cannot 100% make promises because it will be a technical challenge and I need to get hold of a Mac for a start! For now the Game Framework is Windows PC only.

Kuron: Thanks for your input, I can't give it away for free unfortunately. I've priced it so that it's good value for commercial games. If someone had offered me this code before I started, I'd have paid $200 dollars for it just because time is money, and it took a lot of time! If people want their freeware games to look good, then the code is good value, if they are not worried then fine.

Xlsior: sorry, that was dumb of me, I've edited the post. Use arrow keys to move and press Z to shoot!

Shambler: Thanks for your input. I'm disappointed to find that it's not behaving properly on your PC. I wish I could see it in action. It sounds like the video card is doing something odd like rendering the previous frame. Certainly there is nothing in the code to make them skip backwards! Glad it's OK in windowed mode. What video card do you have? Also do you have VSync turned on or off in your drivers?

Cygnus: Hmm, that's interesting, perhaps the shapes are not skipping back but merely the game is hanging for a split second thus displaying one frame for longer. The game logic should catch up however and move the sprites a bit further the next frame to compensate.


Shambler(Posted 2006) [#10]
Hi Cygnus,

I have a Geforce6800GT here.

The graphics are definitely not just stalling, they flicker backwards to a previous frame.

Vsync is set to 'Application controlled' in the drivers and pressing V in the demo does turn it on and off.

I'll have a look at all the drivers settings and see if there is something that solves it.

I would love to buy a framework like this, hope we can get it to work on my PC!

[Edit] I can confirm that the game logic does compensate correctly for the glitch...also there is no disk activity which is in sync with the glitch...looking at driver settings again.


Grey Alien(Posted 2006) [#11]
Shambler, OK good info thanks. So it's not an ATI problem nor a Vsync problem and you have a good video card.

Glad you like the framework, and thanks for the info that the game logic catches up.

Hmm. Here's an interesting test, try blowing things up and see if mid explosion the explosion every goes back to a previous frame (i.e. becomes bigger). This might be hard to spot because the explosions stay on the same frame for a while before moving onto the next one, unlike the moving sprites, which always move each frame.

Ooh, one more thing, if you press D for debug mode and then L for slow motion, do you still see the glitch?

So I'm correct in thinking that ALL the sprites jump at the same time, yes? I wonder if it's anything to do with the anti-input lag code which forces DirectX to catch up on the rendering, it shouldn't be, but who knows?

I'll post another exe in a minute with horizontal and vertical movement and with no anti-input lag fix...


Damien Sturdy(Posted 2006) [#12]
Shambler; Use "FileMon" (Download it from somewhere) and check there's really no access going on.

Wierdly enough I get similar stuttering on my 6800 with normal games *but* i havent tried this framework on it yet. I'll let you know later :-)


Shambler(Posted 2006) [#13]
I only see the effect in the horizontal movement of both player and enemy ship.

The effect comes and goes too, it will be smooth for a few seconds then go back to jerky.

I can see that the enemy ships have different speeds, sometimes even the fastest onces have really rock steady smooth as glass movement but then they will go really jerky...you can see they are being moved 4 or more pixels at once and jumping back to a previous position just before they lurch forwards.

It isn't based on how may ships are on screen either, sometimes the screen is full of ships and the movement of them is really smooth.

The players ships missiles move to fast to make any judgement about graphical glitches, they appear to move several pixels at a time but I see no problems with the explosions...explosions are always smoothly animated.

[Edit] looking for filemon now...and I only get this stuttering with any program written in BMax, everything else performs as you would expect with a 6800GT.


Grey Alien(Posted 2006) [#14]
Shanbler: OK, great info thanks. Interested to hear you input too Cygnus.

Someone else with this spec: 2.0 pentium M, 1 gig ram, 256mb geforce 6800, said this:

"The stuttering seems like a refresh type issue...
The enemy ships will move and occassionally, for a split second, you'll see a jump in their position. Its one of those slight things your eyes seem to notice..."

"Turned vertical sync on (its normally application controlled by default for my card) and it still has a refresh problem...I could be describing this wrong.

Don't worry about it though :)"


Thing is I DO worry about it :-(

Anyway here is a new .exe. http://www.greyaliengames.com/misc/frameworktest.zip (584kb)

Just unzip this to a new folder. It just has two UFOs one horizontal and one vertical. The Lag Fix is on by default. Try pressing A to switch if off and watch the movement for a while. When you first press A, it will jump a teeny bit, but should be smooth after that ...

This appears to be a 6800 problem at the moment. Let's see what others say ...


Shambler(Posted 2006) [#15]
Filemon is showing alot of this happening while the demo is running,

10:16:05 explorer.exe:1376 QUERY INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS Attributes: A
10:16:05 explorer.exe:1376 QUERY INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS Attributes: A
10:16:05 explorer.exe:1376 OPEN C:\WINDOWS\System32\shell32.dll SUCCESS Options: Open Access: All
10:16:05 explorer.exe:1376 QUERY INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS Attributes: A
10:16:05 explorer.exe:1376 SET INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS FileBasicInformation
10:16:05 explorer.exe:1376 READ C:\WINDOWS\System32\shell32.dll SUCCESS Offset: 0 Length: 12
10:16:05 explorer.exe:1376 QUERY INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS Length: 8450560
10:16:05 explorer.exe:1376 QUERY INFORMATION C:\WINDOWS\System32\shell32.dll SUCCESS Length: 8450560
10:16:05 explorer.exe:1376 CLOSE C:\WINDOWS\System32\shell32.dll SUCCESS



Trying new demo now...


Damien Sturdy(Posted 2006) [#16]
I'll imagine that stuff's required for the framework right Grey? It was worth checking on the off-chance though since I linked a stutter with the drivers loading a file. Why would a GFX driver need to access the hard drive every second anyway?


Grey Alien(Posted 2006) [#17]
Shmbler, thanks for your help testing this. It would be great to resolve this issue, BUT it might be a BlitzMax issue :-(.

I predict the new demo will still show the problems. I just tried the game on a laptop I have, it's a P4 2.8 with 512MB RAM and a crappy built in Sis M650 video card. In full screen mode I get jerky movement as described. I wouldn't say it's skipping back a frame, just pausing on one for a while It happens on ALL the objects. Yet the FPS counter is not showing any dropped frames. The new demo is the same with Anti-Lag fix on or off.


Shambler(Posted 2006) [#18]
Well Grey, new demo appears to work!

Initially the movement of both ships is jerky.

After pressing A the movement is smooth, sometimes there are tiny stalls but the compensation makes the ships catch up and there is no flickering.

Can you do another demo like this but with lots of ships on screen?


Kuron(Posted 2006) [#19]
If someone had offered me this code before I started, I'd have paid $200 dollars for it
You would have paid $200 for code nicked from the code archives & various threads?

I could care less as I don't use BMax (still too buggy), but based on a weeklong email conversation about you, I thought I would ask so I could prove a point.


Grey Alien(Posted 2006) [#20]
Shambler: I'm surprised by that, but yeah sure I'll add some more ships. Maybe my laptop can't handle hardly any ships. btw, it's totally fine in windowed mode here too (except for the occasional bit of vertical tearing)


Damien Sturdy(Posted 2006) [#21]
Why is this place becoming so volatile???

Grey; Seems to work dandy at work here, which is a *good* thing considering it's a 600mhz p3, intel 80810 gfx, 256mb ram.


Grey Alien(Posted 2006) [#22]
Kuron: I would have paid the money to save the countless hours I've spent collating information, researching and testing NEW code and reporting NEW Bugs to Blitz Research etc. You might be able to piece together a framework like this from the forum posts (esp. now I've added a lot of information to them) but it would take you a long time. If you run a business there is no point reinventing the wheel if you can get a ready-made, ready-tested game framework. That's my view anyway. Do you moan at Sswift or Indiepath for writing modules that others could write too given enough time and patience? There is nothing special about a sprite module or a sound module, but if it saved me time, it certainly could be worth buying. However, I might make those things myself if I wanted to do something in a special way.

but based on a weeklong email conversation about you, I thought I would ask so I could prove a point.
What the hell is that supposed to mean?


Grey Alien(Posted 2006) [#23]
Cygnus: Good info thanks, glad it's OK on that dodgy old PC ;-) Any chance you can press D for debug mode and report the FPS? thanks.
So it's OK in windowed mode and full-screen mode, yes?


Shambler(Posted 2006) [#24]
Grey, I would love to see a demo using your framework with a large tiled backdrop which is scrollable with the cursor keys.

I think this would be the definative test to see if BMax can be tamed on my PC ^^

I have tried this on several occasions and now and then it appeared to be working but then I would fire up my PC the next day and the scrolling had gone back to the usual flickering/stuttering unacceptable behaviour.

[Edit] Second demo fine in fullscreen and windowed(with a little tearing) reaches 2900fps.


Grey Alien(Posted 2006) [#25]
Kuron: couple more things. When I finished with BlitzPlus I gave away FOR FREE all my common code and libaries that I used with Easter Bonus as a way of giving back to the community. Also, I always try help out in the Blitz Plus forum. Furthermore, if people ask how to solve stuff in the BMax programming forum and I have the answers, I'll post them. I'm not going to withhold information but I'm not going to give away my entire Game Framework for free (yet). Why the hostility anyway, send me an email and explain if you like...


Damien Sturdy(Posted 2006) [#26]
Seems fine but will only run in windowed when i've got the desktop at *21* bit.

FPS: Showing up at ~30 [edit] ran again and got about 80. [/edit] which isn't *too* bad considering this system stuggles to drag windows :)


Grey Alien(Posted 2006) [#27]
lol @ 21 bit. Well that's because the code looks for full-screen 32-bit first, then 16-bit and failing that defaults to widowed mode and it won't allow full-screen.


Kuron(Posted 2006) [#28]
I have tested the demo quite a bit. IMHO, I think this and Swift's sprite routines are neck and neck for the BEST user-made contribution to BMax (not counting Ants engine since I am not a fan of 3D).


Damien Sturdy(Posted 2006) [#29]
I ran it again, gets about 70-80fps. The 21-bit-windowed only thing is a bit odd though, but i always had those issues with my old i80810.


TartanTangerine (was Indiepath)(Posted 2006) [#30]
*Sniff*


Grey Alien(Posted 2006) [#31]
Indiepath: lol, is that sniff as in a dog finding something interesting or sniff as in upturned nose? Oh I get it, not getting a mention re: "user-made contributions"...

Kuron: That's an interesting turn around. However Indiepath has made some major additions to BlitzMax including various fixes. His work is also technical but is more graphics-based than my stuff which is more framework/windows based. I don't have a proper sprite system or anything (yet) so SSwift's or ZSprite would certainly be a good addition if it was compatible.


Damien Sturdy(Posted 2006) [#32]

*Sniff*



Watch it, You'll be wanting to eat Large Bacon if you're not careful.


Grey Alien(Posted 2006) [#33]
Shambler: Here is another test. http://www.greyaliengames.com/misc/frameworktest2.zip

This one has many UFOs, you can increase or decrease UFO count with - and + (well =) and see if the jerks appear at any certain point. Also Y will change from flip -1 to flip 1 (this doesn't make any difference on my laptop, nor does the lag fix). What else, ah yes, on my laptop (which has a slow graphics card) if I boost up the number of UFOs and then press D (for Debug) and V for VSync Off, it actually goes pretty damn smooth. Try it on yours if possible. Thanks for your help btw. I'll look into a tile map now.


Yan(Posted 2006) [#34]
Haha...That's made my day... |oD


Grey Alien(Posted 2006) [#35]
Shambler: Try this is BlitzMax:

Strict

Graphics 800,600,32,60

Local s =100

Local x=0-s
Local y = 300
Local Sync = -1

While Not KeyHit(KEY_ESCAPE)
	Cls
	DrawRect x,y,s,s
	DrawText "Flip "+Sync,0,0
	Flip Sync
	
	x=x+5
	If x > 800 Then x = 0-s
	
	If KeyHit(KEY_SPACE) Then
		Sync = Sync + 1
		If Sync = 2 Then Sync = -1
	EndIf
	
Wend


It's smooth on my PC, but jerky on the laptop. This proves the jerking is BlitzMax/Driver issue not my engine (phew). If you are moving at one pixel per frame it should be perfect, but it is not, how strange!


Grey Alien(Posted 2006) [#36]
Ian: That's a funny smiley "|oD" what does it mean?


Grey Alien(Posted 2006) [#37]
More results: This BlitzPlus code:
Graphics 800,600,32,1

Local s =100

Local x=0-s
Local y = 300
Local Sync =1

While Not KeyHit(1)
	Cls
	Rect x,y,s,s
	Text 0,0,"Flip "+Sync
	Flip Sync
	
	x=x+5
	If x > 800 Then x = 0-s
	
	If  KeyHit(57) Then
		Sync = Not sync
	EndIf
	
Wend

is smooth on my PC but not on the laptop. However if I change the last Graphics flag to 2 (for windowed mode) it is smooth.

BUT if I change the BlitzMax code sample to run in windowed mode: i.e. Graphics 800,600,0,60 It's still jerky. If I remove the 60Hz off then end: Graphics 800,600,0 it's still jerky. And finally if I do this in BlitzMax:

Local DesktopRefreshRate = GetDeviceCaps(GetDC(0),VREFRESH)
Graphics 800,600,0,DesktopRefreshRate 


It' STILL jerky. What gives?


Robert Cummings(Posted 2006) [#38]
I don't think jerkiness has anything to do with blitzmax. It's probably your timing out of sync with the hz of the display.


Grey Alien(Posted 2006) [#39]
One Eye Jack: Let me explain a bit ... My timing routines in the main demo are Refresh Rate Independent and work perfectly smoothly (on the right video card) no matter what the refresh rate. It's been designed that way. The jerkyness we are seeing on these 6800s and my laptop appears even with that extremely simple code sample I posted above where the object moves a set (non variable) amount each frame (an integer number, not even a float!). Now if the frames are rendered in sync with the display (which BlitzMax/BlitzPlus is supposed to do for you) there shouldn't be any jerkyness but there is on some PCs and not on others. So somehow BlitzMax is not syncing with the display on all PCs, don't know why. In a sense you are right, the timing is out with the sync of the hz of the display, but in that simple example it's not "my timing" it's just a very simple method that should be fine.


Grey Alien(Posted 2006) [#40]
Shambler: Do you have a TFT screen or CRT?


Shambler(Posted 2006) [#41]
Grey,

the latest multi ufo demo works just like the single ufo, i.e. movement is smooth after pressing A.

Debug mode says DeskHz 100 and GameHz 60 but my monitor has switched to 60Hz..not sure if that is how it should work?


if I boost up the number of UFOs and then press D (for Debug) and V for VSync Off, it actually goes pretty damn smooth. Try it on yours if possible.



Everything moves so fast if I do this but from what I can tell yes it is smooth.

Incidentally when I press A and the movement is smooth and my PC runs quietly, but when I press A again to see the non smooth movement the fan speeds dip and the PC sounds like its under a bit of stress ^^

The blitzmax code example:
flip 0 shows massive tearing ( as expected )
flip 1 and flip -1 smooth movement and nothing to distinguish visually between them.

[edit] CRT screen usually running at 1024*768 100Hz


Grey Alien(Posted 2006) [#42]
wow, great info thanks. So the anti-lag code is causing jerkiness on your screen. GREAT :-(. I'll have to try out Indiepath's alternative anti-lag code. When the Fix Lag =1 is when you have jerks, right? And that is when the video card is forced to quickly render all the frames in it's pipeline. It more likely the difference in fan speed is the graphics card fan or CPU fan speeding up actually not slowing down (unless you've checked this with that SpeedFan program (or similar)).

Btw, it's not a bug that the Desktop and Game Hz are different, it just records the desktop Hz beforehand and then switches to 60Hz for the game.

So you have a CRT, that blows up my TFT theory (sorta) but I know that smooth movement is probably going to look dodgy on TFTs anyway from what I've read.

OK so the code sample works fine, it has no anti lag code. When A is pressed (LagFix=0) do you still get the odd little skips though? or is it rock solid?

Right, hmm what next ... I'm not sure I can do a scrolling test right now as this has taken up tons of time. But watch this space, I'll be doing one soon for sure.


Shambler(Posted 2006) [#43]

When the Fix Lag =1 is when you have jerks, right?



Yes that's right.


When A is pressed (LagFix=0) do you still get the odd little skips though? or is it rock solid?



I can see very minute skips now and then. Compare this to Torque2D, now on my PC that is rock solid as far as scrolling the screen is concerned I've never seen it skip at all.


Grey Alien(Posted 2006) [#44]
Hmm Torque2D is solid hey, that's interesting. Sound like it should be possible to fix Max (or my demo) for your card then. Were there any jerks (minor ones etc) in the code smaple with the white square that were like the UFO demo?


Murilo(Posted 2006) [#45]
I'm tempted by Torque2D myself Shambler. Which do you prefer, BlitzMax or Torque2D?


Shambler(Posted 2006) [#46]
As far as I can see the white square demo is rock solid.


Shambler(Posted 2006) [#47]
Hi Jimmy,

I prefer BlitzMax since I don't like anything getting in between me and my code ;)

I found Torque2D felt like a half way house between a programming language and a game engine and don't feel comfortable with it.

I will look at T2D again in the future when more of the bugs have been ironed out and the documentation is improved...bit like BMax ;)


Grey Alien(Posted 2006) [#48]
Shambler: OK thanks.


Murilo(Posted 2006) [#49]
Thanks Shambler.


Kuron(Posted 2006) [#50]
Kuron: That's an interesting turn around.
No turn around, was offering an honest opinion of the example provided. I rank it right up there with swifts sprite routines.

However Indiepath has made some major additions to BlitzMax including various fixes.
He has done a lot to clean up bugs and its appreciated. Any of the free or for sale mods he has mentioned really do not interest me, although I could see them being beneficial to others.


Grey Alien(Posted 2006) [#51]
OK some new info: I've tested the Game Framework on 6 varying office PCs with mostly crap video cards, and some with CRTs and some with TFTs. Here are my conclusions:

1) On two 19" TFTs the demo was perfectly smooth in full-screen mode. One had a slight vertical tearing every so often.

2) On all PCs, windowed mode had vertical tearing. This is a Blitz Max issue which has been posted in the bugs forum. However, it should be noted that the demo ran smoothly with no jerks.

3) I tested on a PC with a 15" and a Geforce Ti4200. This card is the previous generation to the 6800 I believe. Anyway, it exhibited symptoms that sound very like Shamblers i.e. smooth but with big jerks about every 0.8 seconds or so. In windowed mode it was perfectly smooth but with some vertical tearing.

So it looks like Shambler's issue is a Geforce issue and this is not the same issue as older TFTs showing jerkiness (like my laptop). Dumbly I didn't test the demo where the Lag Fix can be turned off on the Geforce Ti4200, but will do ASAP to see if it helps.

So as for jerkiness on old TFTs, there is really nothing than can be done about this esp. as it works fine on newer TFTs. If some TFTs show the odd bit of vertical tearing in full-screen mode, again this is a driver issue and can't be fixed.

I'm going to look into the lag fix problem some more because it may be solvable. At the moment it a case of lag or jerks, both are not good! I'm wondering if it occurs because the logic loop does a whole load of rendering that never makes it to the screen, then the lag fix suddenly catches up of some cards, thus making a jerk.

If anyone else can test this demo, I'd really appreciate it. Thanks :-)


Grey Alien(Posted 2006) [#52]
Kuron: yeah that's the point, this framework is pretty much useful to everyone making games in Max as is a decent sprite routine. Some of Indiepath's graphics ones are more useful for specific types of games/applications like Aurora is. Other modules of Indiepath's, like sound and delta timing, are useful to everyone though, I'd have thought. However, fixed rate logic is more reliable for collision detection that delta timing unless you program special workarounds using delta timing - not easy.


big10p(Posted 2006) [#53]
I get tearing and some jerkiness - not too bad, though. However, pressing F to swap modes simply didn't work. I was permanently stuck in windowed mode. Oh, and the music/SFX was buggered of course, as I'm on win98.


Grey Alien(Posted 2006) [#54]
Big10p. Thanks so, basically your card doesn't want to do 800x600 in 32 or 16 bit and it defaulted to windowed mode, strange. My Bonus games ran in full-scren mode for you though didn't they? So music sound FX still messed up in 98 hey, this really must be sorted in BMax, before any 3D module I say.


big10p(Posted 2006) [#55]
My card does fullscreen 800x600 in both 16/32-bit fine. :)

Not really sure what the prob is, TBH. When I press F, the screen tries to change mode, but instantly returns to windowed mode. Pressing F after this, nothing at all happens.

Your app is 800x600 and so is my desktop (32-bit). I don't know if that is causing a problem for some reason? Try setting your desktop to 800x600 and see what happens.


Grey Alien(Posted 2006) [#56]
Yeah, sorry I'm sure your card can handle 800x600 in both modes, I wasn't clear enough. What I mean is for some reason it doesn't want to supply those modes for my BlitzMax framework.

Basically it has some BlitzMax code that checks to see if 800x600x32 @ 60Hz exists in your graphics card drivers, and if not, it looks for 16 bit, and failing that it does windowed mode. Then it sets a flag that stops you from trying again. When you say it tries to change mode, what it does is end the current graphics window, then runs the checks and goes, "oh can't change" and just makes the graphics window again. It could not destroy it until it knows better I guess, but that's minor compared to why it doesn't work in 800x600 on your card which should support it. I'll post a test exe in a minute that DOESN'T check for the mode first, it just goes straight into it. If you can test that it'd be great thanks.

Btw, I've tested it with an 800x600 desktop it's fine.


Grey Alien(Posted 2006) [#57]
here you go 800x600x32bit no test. It should show a line of text and then you press escape to quit.

http://www.greyaliengames.com/misc/big10p.zip


Grey Alien(Posted 2006) [#58]
OOH another thing Big10p, if you are feeling helpful and want to get to the bottom of this.

download this:

http://www.greyaliengames.com/misc/graphicsmodes.zip

and run it.

It will made a file in the same folder called modes.txt hat lists all you available graphics modes (as BMax sees it anyway). Please see if list contains 800x600x32bit @ 60Hz or not. Thanks.


big10p(Posted 2006) [#59]
OK, big10ptest.exe worked fine.

The output from graphicsmodes.exe follows. Seems to be OK except the Hertz is listed as 0 for all modes, for some reason:
0 Width: 320 Height: 200 Depth: 16 Hertz: 0
1 Width: 320 Height: 240 Depth: 16 Hertz: 0
2 Width: 400 Height: 300 Depth: 16 Hertz: 0
3 Width: 480 Height: 360 Depth: 16 Hertz: 0
4 Width: 512 Height: 384 Depth: 16 Hertz: 0
5 Width: 640 Height: 400 Depth: 16 Hertz: 0
6 Width: 640 Height: 480 Depth: 16 Hertz: 0
7 Width: 720 Height: 480 Depth: 16 Hertz: 0
8 Width: 720 Height: 576 Depth: 16 Hertz: 0
9 Width: 800 Height: 600 Depth: 16 Hertz: 0
10 Width: 848 Height: 480 Depth: 16 Hertz: 0
11 Width: 960 Height: 720 Depth: 16 Hertz: 0
12 Width: 1024 Height: 768 Depth: 16 Hertz: 0
13 Width: 320 Height: 200 Depth: 32 Hertz: 0
14 Width: 320 Height: 240 Depth: 32 Hertz: 0
15 Width: 400 Height: 300 Depth: 32 Hertz: 0
16 Width: 480 Height: 360 Depth: 32 Hertz: 0
17 Width: 512 Height: 384 Depth: 32 Hertz: 0
18 Width: 640 Height: 400 Depth: 32 Hertz: 0
19 Width: 640 Height: 480 Depth: 32 Hertz: 0
20 Width: 720 Height: 480 Depth: 32 Hertz: 0
21 Width: 720 Height: 576 Depth: 32 Hertz: 0
22 Width: 800 Height: 600 Depth: 32 Hertz: 0
23 Width: 848 Height: 480 Depth: 32 Hertz: 0
24 Width: 960 Height: 720 Depth: 32 Hertz: 0
25 Width: 1024 Height: 768 Depth: 32 Hertz: 0


P.S. My 'strange' monitor ONLY works at 60Hz.


Grey Alien(Posted 2006) [#60]
lol, ok that will be why my code didn't bother trying to set those modes then. Hmm so maybe I shouldn't test for the mode and should just go for it after all as if any card can't support 800x600x32 maybe it won't play the game any good anyway.

What card is it anyway?


big10p(Posted 2006) [#61]
I have a mighty, throbbing GeForce2 GTS 32MB.

I know, I know - you're well impressed. :P


Grey Alien(Posted 2006) [#62]
They were good once. Anyway I'll have to rethink my test for mode before setting it stategy, I thought it was cool, maybe it isn't...


Daz(Posted 2006) [#63]
Just wanted to add my test results.

I tried running the framework 1 and framework 2 examples.

Framework example 1:
When initially loaded in full screen mode it was a little bit jerky.

If I press F to switch to windowed mode there is a jerkiness/flickering effect for a few seconds and then everything is smooth.

If I then switch back to full screen mode things go a bit wrong. There are terrible problems with jerkiness and there is a considerable slowdown. In fact, it gets so bad that I would describe the output as a line which goes up the UFO sprite as it is being redrawn. I guess the nearest thing I can think of as an example is when you see a monitor being refreshed at 60Hz on a TV show wbere the TV is refreshing at 50Hz.

In all the above, toggling the anti-lag value didn't seem to do anything.


Framework 2:
Pretty much the same as framework 1 with two exceptions:

1. Full screen mode wasn't quite as jerky compared to when running framework 1.

2. Toggling the anti-lag button i.e. setting this value to 0, did seem to make things a little bit better.

My spec : AMD Athlon 64 (3200), 1gig of RAM, nVidia 6600 (256 megs ram).

My desktop resolution is set to 1280x1024 32 bit colour depth at a refresh rate of 60Hz.


Grey Alien(Posted 2006) [#64]
Daz, many thanks for your test results, very thorough. So anti-lag made a difference on framework 2. Weirdly it should ahve made a difference on both frame works, the only difference between the two frameworks is the number of UFOs, nothing else changed! This shows an inconsistancy or randomness with the Geforce cards.

So when LagFix is off (0) you say it was a little better, this means you still had some problems? People with Geforce so far have reported perfectly smooth once LagFix is off and when on (1) ALL the UFOs seem to jerk at once, around once per second. Was yours like this?

Also the line moving up the screen is a classic Vsync problem. How is Vysnc set up in your Geforce drivers, always off by any chance? Thanks again.


Damien Sturdy(Posted 2006) [#65]
Thats exactly what mine was like :-)


Grey Alien(Posted 2006) [#66]
what like Daz's or like how I described it i.e. the one per second jerk type thing?


Daz(Posted 2006) [#67]
Hi Grey,

Vertical sync is set to application - controlled. In fact, all the basic driver settings are application controlled except for System performance which is set to high.

As a test, I first switched the Vertical sync setting to On. In both framework examples (and with both at anti-lag set to 0 and 1) I didn't noticed any improvements.

I then switched the vertical sync setting to off. There was still quite a lot of jerkiness in full screen mode, with anti-lag set to both 0 and 1, but it didn't seem quite so severe. Windowed mode seemed a bit smoother though.

In answer to your other question, regarding all UFOs jerking at the same time, the answer is no. In framework 2, for example, most of the UFOs were fairly smooth; only some were affected. Same thing with the Vsync problem - only two or three out of all the UFOs displayed the Vsync issue at any one time.

As mentioned in your original post, it does indeed seem like the Vsync problem is more likely to occur on the faster moving UFOs.

Forgot to mention I am using a 17inch TFT screen. Also my display driver is version 8.4.2.1 dated 09/03/2006. I am not sure if these demos are using DirectX or the OpenGL driver - but I am running Feb 2006 DirectX.


Grey Alien(Posted 2006) [#68]
Daz. More great info thanks. So if Vsync isn't off we know that's not the problem for you.

Regarding not all UFOs jerking at once, the Vsync "line" is only at one place on the screen and it often moves around so it will only affect a few UFOs, and mainly the faster ones as you have correctly identified.

Regarding them not all jerking at once, I wonder if it's just the faster onces and the jerking is a TFT issue this time. I'm sure getting confused now for sure, but thanks for testing.

Oh yeah the demos are DirectX driver, that's why I've got the lag fix in there because it's a DirectX only issue. I daren't make my game OpenGL only as LOTS of PCs won't run it properly.


ashmantle(Posted 2006) [#69]
Grey: works beautiful on my machine. More impressed by trying it than by just reading about it :)

Intel 3.2ghz 64bit HT, radeon x1800xt, 2gb ddr2, directx9.0c, soundblaster x-fi fatality and so forth.


Grey Alien(Posted 2006) [#70]
cool. Maybe my text didn't inspire people. It is lush and smooth isn't it!


ashmantle(Posted 2006) [#71]
hehe, thats not what I meant.

Anyway, Im on skype later if you wish to talk - e.g. spill your heart out ;)


Grey Alien(Posted 2006) [#72]
retro.hack: Sorry I was away all weekend, I'm back now though. Maybe chat later.

Meanwhile the jerking problem on Geforce cards has been resolved.

Shambler, if you read this, any chance you can run this:

http://www.greyaliengames.com/misc/frameworktest4.zip

and press A to turn of Fix lag. Is it still smooth? I hope so.


Shambler(Posted 2006) [#73]

Is it still smooth? I hope so.



Your hope is not in vain!

Silky smooth with FixLag on 0 or 1.

Nice one =)


Grey Alien(Posted 2006) [#74]
yes! Result. Thanks Shambler.


Steve Elliott(Posted 2006) [#75]
Not so fast Grey...


Grey, I would love to see a demo using your framework with a large tiled backdrop which is scrollable with the cursor keys.

I think this would be the definative test to see if BMax can be tamed on my PC ^^




Grey Alien(Posted 2006) [#76]
hmm, don't really I have time, but I'll see if I can knock something up quickly ... maybe.


Steve Elliott(Posted 2006) [#77]
I'd have thought people wishing to buy your Framework System would require a more thorough test example Grey.


Grey Alien(Posted 2006) [#78]
Steve: they'll get a full-on platform game in time... Anyway you may have missed the point of the framework, it's about getting your game to behave as a pro-game should in terms of window functions, mouse, sound/music, lots of stuff of which the timing functions are only a small part.

Anyway, here is a scrolling example (pretty basic but you get the idea). Use arrow keys to scroll, and + - to change scroll speed. Z still fires pointlessly. D for debug. F for full-screen/window toggle.

It should be really smooth now in full-screen mode. Windowed mode will show some tearing.

Let me know how you get on :-)

********
http://www.greyaliengames.com/misc/scroller.zip (629kb)
********


Steve Elliott(Posted 2006) [#79]
Both demos run silky smooth here.


Grey Alien(Posted 2006) [#80]
cool, whe you say both, you mean the original one and the scrolling one right?


Steve Elliott(Posted 2006) [#81]
That's right.


Shambler(Posted 2006) [#82]
Yep smooth here too.


Grey Alien(Posted 2006) [#83]
Well there you go Shambler, you've seen a scrolling demo in BlitzMax working properly. I like to deliver :-)

I've just been adding splash screen capability with fade in/out including sound. Also the ability to show a separate splash screen for publishers/portals.

Oh and I've added a Boss Key now to auto minimise/pause even in full-screen mode.


Grey Alien(Posted 2006) [#84]
Here's a new demo with some new sound fixes by Skidracer. Hopefully the sound will be better on Windows 98. Can anyone test this please?

http://www.greyaliengames.com/aotmg/aotmg.zip (3.93Mb)

You'll also notice the framework shows splash screens and a loading screen now. It also has a boss key now - try pressing B to see what happens.


Boiled Sweets(Posted 2006) [#85]
Grey,

could I 'steal' your pointer.png?

In fact how did you create this?


Grey Alien(Posted 2006) [#86]
It's the pointer that Quicksilva made for Easter Bonus. I made it into a proper alpha channel png in Gimp. I got a normal pointer and cut it out and pasted on a transparent background. Then I used the fill tool (paintpot) set to 50% opacity and filled in the shadow. Then saved as PNG with full 8-bit alpha channel. It was that easy! Oh and obviously I'm using SetBlend AlphaBlend to draw it.

OK, you can have the pointer royalty free for commercial use, but don't give it away to anyone please. Maybe you can do me a mini favour one day ;-)

Did you like the Framework demo?


Boiled Sweets(Posted 2006) [#87]
Not too sure it's of any use to me but will be for newcomers to MAX.


QuickSilva(Posted 2006) [#88]
Boiled Sweets, incase you want to know the pointer was drawn by hand in ProMotion and not prerendered. I was going for a nice clean cartoony look.

Jason.


big10p(Posted 2006) [#89]
Grey: I got your email and tried the new version. Sorry, no difference - both music and sound FX are still crackly.


Daz(Posted 2006) [#90]
Hi Grey,

I am going to be a right royal pain in the backside.

I just tried out your latest aotmg example. While playing in full screen I noticed that things started to get very very jerky. This jerking effect doesn't seem to have any kind of time pattern associated with it.

I thought the jerkiness in full screen was a bit odd as you seemed to iron out those issues with the tests from the weekend.

I ran task manager. What I noticed is when your demo runs in full screen the CPU usage goes up to 96% - 97%. Also, maybe every now and again there is an ever so slight pause/stutter in the music. This stutter last for a second or two at the most.

Upon switching to windowed mode (or running from scratch in windowed mode) CPU usage for the demo is at a max of 10% (averages at about 6%). Also, in windowed mode, there is no stuttering effect of the music i and the screen refresh is always nice and smooth.

I have run the demo several times to make sure this happens every time.

Is the something which is common with BlitzMax games?

Maybe some of the others who have tested your demo could look for this behaviour too.

Edit - Thought I would mention it. I am running Windows XP 32-bit edition, but my CPU is a AMD Athlon 64bit. Not sure if that may be causing this issue.

Edit 2 - @Grey. As another test, I ran your framework4 demo from the weekend and that didn't generate the constant 97% CPU usage problem this new aotmg example exhibits.


Shambler(Posted 2006) [#91]
Only problem I see here is that if the game is in fullscreen and you press 'B' it quits back to windows and when you click the taskbar to restore it, it comes back in windowed mode.

No problems with graphics or sound here.


Grey Alien(Posted 2006) [#92]
Daz: Your not a pain. Input is good as it makes for a better engine. The problem is, my engine's timing is simple and effective. All the problems we are seeing are the way the BMax is interacting with different hardware.

OK re: the CPU thing and stuttering, I have a theory! The CPU use is only 50% on mine (P4) but someone commented that on AMD CPUs you need to put in a Delay(1) (or more) or something to allow the CPU to do stuff for Windows. Maybe your Windows is desperately trying to do something in its 3% CPU timeslot and when it finally gets the CPU it grabs it for too long thus resulting in stuttering.

As for why the Framework4 works and the new AOTMG one doesn't hmm, it uses the same lag fix code, did you switch that on (with A) on Framework 4 to compare because it's always on in AOTMG? Maybe the lag fix code is maxing out the AMD CPU? Also AOTMG is doing a bit more (drawing a background and score etc) but I'm not sure this is enough to mess it up BUT it is playing music. Press M to kill the music. Does this improve the stuttering? Try exiting and going back in (the music will remain off due to the ini file) and see if it's better. Any help you can offer is really appreciated. I'll look into the delay thing.

Shambler, that's intentional actually, because it HAS to go to windowed mode before it can minimise. However, I could change the behaviour if it threw you off kilter...someone else mentioned this once before so that's two people now.


Boiled Sweets(Posted 2006) [#93]
Seems to me that BlitzMax is just not ready to develop games.


Grey Alien(Posted 2006) [#94]
well that's not quite true, I might add in "professional" to that sentence. but Inca Quest did OK and Indiepath made a couple of games as have others. What worries me is that it's not great for *smooth* action games on all PCs, some yes, others no. However, I keep on testing and posting bugs and people *are* coming up with solutions inc. BRL. So that's positive. I'm really puttin Bmax to the test at the moment.


big10p(Posted 2006) [#95]
Grey: Did you see my post?


Daz(Posted 2006) [#96]
Grey - here are the results of my the tests you ask me to do:

In framework 4, switching the fix lag code value doesn't alter the CPU usage at all in either full screen and windowed modes. In fact, the CPU usage is fairly constant at around 10% for both. There are a few spikes every now and again where it jumps up to around 30% usage but it very quickly goes back down again.

With AOTMG, there is no noticable difference when switching off the music. In full screen mode there is an initial drop of about 20% CPU usage when initially turning off the music but it soon shoots back up to 97% again.

Again, with AOTMG in windowed mode the CPU usage is a tiny fraction compared to full screen mode.

What you may find interesting (then again, possible not!!) is when AOTMG is showing those initial splash/intro screens there CPU usage doesn't shoot up to 97%. It only does that once the main game starts.


I kind of agree with Boiled Sweets. I think the lesson is don't buy BlitzMax at the moment if you are a AMD Athlon 64, nVidia 6xxx GFX card owner!! LOL. Just kidding. Seriously though, as Grey says, it seems people are giving BlitzMax a good going over and all the issues are now starting to come out. Once they are ironed out, everything will be really cool.


Shambler(Posted 2006) [#97]

Seems to me that BlitzMax is just not ready to develop games.



I would agree and I'm just glad that we have people like Grey to thrash out the issues that I don't have the time nor dedication to myself ;)


Shambler, that's intentional actually, because it HAS to go to windowed mode before it can minimise. However, I could change the behaviour if it threw you off kilter...someone else mentioned this once before so that's two people now.



That's OK, I just wanted to make sure it was a feature and not a bug ;)


Grey Alien(Posted 2006) [#98]
Big10p: Seen it now, sorry I messed it and thanks for testing! EVen if the results were crap, grr...

Daz: Great, thanks for testing so switching the music off doesn't improve the jerkiness?

Shambler: No worries, keep telling me anything cos it might be important. I'll keep thrashing away at Max cos I really need it to work properly.


Grey Alien(Posted 2006) [#99]
YES! No more vertical tearing in windowed mode. Skidracer has gone and supplied me with a Vwait command! Check it out in this new demo. Go to windowed mode with F and marvel at the lush smoothness with no vertical tearing. If you do see any then your system is crap ;-) no, seriously, let me know. Thanks.

www.greyaliengames.com/aotmg/aotmg.zip


Shambler(Posted 2006) [#100]
Still tears on my crappy Geforce6800GT.


Daz(Posted 2006) [#101]
Running the new AOTMG in windowed modes gives me the same results as running the old version in Windowed mode, except in a slightly more erratic manner.

Before running the new version, my PC is running at 5% PC usage. As soon as I run the new AOTMG in windowed mode the CPU jumps up to around 95% It then seems to continually jump between about 85% and 100% CPU usage. So, in terms of the CPU usage graph which task manager generates I am seeing a succession of mountain peaks.

What I have also noticed in this new version is if I toggle the music key, after about a second of pressing M, there is a very short pause and then a major jerk as if the screen update is trying to catch up. My guess this behaviour may be down to the fact it is running at close to 100% CPU usage.

As soon as I close it down, my PC goes back to 5% CPU usage.

Running the new version in full screen mode still has the effect of running the old version i.e. constantly at about 97% CPU usage.


ImaginaryHuman(Posted 2006) [#102]
Where is the code for the VWait, or where can we get it? And how are you using it?


Grey Alien(Posted 2006) [#103]
Oh dear, so still tearing on two people's PCs, but at least not on mine :-)

AngelDaniel:
' -----------------------------------------------------------------------------
' ccVWait by Skidracer
' -----------------------------------------------------------------------------
Function ccVWait()
	'Only works in DirectX graphics mode
	PrimaryDevice.ddraw.WaitForVerticalBlank DDWAITVB_BLOCKBEGIN,0
End Function

This is for DirectX on PCs only. Stick ccVwait() before you flip calls, *only* in windowed mode though.


Grey Alien(Posted 2006) [#104]
Update: Win98 sound issues fixed! Everyone say YAY!


Amon(Posted 2006) [#105]
How much does your framework code cost Grey? I'd rather not reinvent the wheel so if it can benefit my game in any way ie. fixed frame rate and other usefull additions I'll buy it. IF the price is right that is. :)

[edit] Didn't bother to read the entire thread so if I missed anything I apologise. :)


Grey Alien(Posted 2006) [#106]
Amon: Thanks for the enquiry. $39 so around £21.50 (inc. VAT). This is to save you countless hours of research, testing and coding to get a professional looking app from the start. I'll give you all the source to make my AOTMG demo, plus you'll get future updates, and I'll answer support questions in this forum.

If you want to buy it, go here http://www.greyaliengames.com/contact.php and click the Paypal donate button and enter £21.50. When I get it, I'll email you the source. Remember not to spread the source, but you can use it royalty free in any of your projects.

You might want to read my essay on Vertical Tearing and Jerking in the main thread. I say this because my framework is Perfect on some PCs and not on others. However, this is not the fault of the framework (in fact I've increased the range of PCs it will work on with many tweaks), but rather the inherent problems many PCs have with keeping a rock steady display.

Remember that it's not cross platform ... yet.

Have you tried the framework out yourself on your PC yet? How is it?


Robert Cummings(Posted 2006) [#107]
Update: Win98 sound issues fixed! Everyone say YAY!


We spoke too soon. There is now a final latency issue to deal with?


Grey Alien(Posted 2006) [#108]
yeah, I couldn't see this for myself as the 98 I tested it on was a 166 and it had no display, but I could hear it. I should have paid attention to when pressing the keys how soon the sound comes out.


boomboommax(Posted 2006) [#109]
max aint that hard man


Grey Alien(Posted 2006) [#110]
Ongoing development has brought many improvements, check out the current list of features:

*Timing*

- Extra smooth Fixed Rate Logic (an alternative to Delta Timing).
  Your game will run the same speed on all systems regardless of
  refresh rate/VSync and in windowed or full-screen mode.
- If anything occurs which causes a big delay, such as loading
  music or changing screen mode or dragging the window etc., the
  Fixed Rate Logic will reset its timing variables to avoid any
  skipping caused by the time delay.

*Full-Screen/Windowed Mode*
- Switch between full-screen and windowed mode easily on-the-fly.
- Automatically chooses graphics mode.  Will reduce from
  full-screen 32-bit to 16-bit, then to windowed mode, and
  will finally error nicely if nothing is supported.
- DirectX rendering lag has been fixed.
- Option to prevent vertical tearing in windowed mode (on some
  systems).
- Windowed mode has minimise button.
- Windowed mode has a working close button.
- The window is automatically centred on the desktop.
- When game is minimised or focus is lost (even in full-screen
  mode) the game and music are paused, yet the screen will still
  redraw to avoid Windows overwriting it.  The game and music
  will resume when the window is restored or refocused.
- Moving the mouse onto the title bar will show the default
  Windows cursor so that you can click on minimise and close etc.
  This is NOT default Blitz Max behaviour!

*Icon*
- Icon will show on title bar, task bar, and when alt+tabbing.
- Exe can have icon built in (needs some external work)

*Ini File*

- Important variables are stored in an auto-generated,
  auto-repairing ini file.  This means that you can save options
  such as Full Screen On/Off, Music and Sound volumes, Particle
  Quality etc. and have them load in each time the game is run.
  The ini file is automatically updated whenever a user changes
  an ini variable, such as when they change screen mode or
  volume etc.

*Debug*

- Display Debug variables anywhere on-screen, including:
	- Logic Time
	- Draw Time
	- FPS
	- Desktop Hz
	- Game Hz
	- Fixed Rate Logic Ticks
	- VWait on/off
	- Slow Motion
	- Memory Allocated
	- Music Volume
	- Sound Volume
- FPS Counter.
- Fast on/off toggle.  Good for testing maximum frame rate.
- Slow Motion mode. Runs at 25% (or user-defined speed), good
  for testing movement and animation.

*Functionality*

- Screenshot with F12.
- Quick Exit key for developers.
- Boss Key automatically minimises and pauses game and music, even
  in full-screen mode.
- Sound on/off hot keys.
- Adjust music volume and sound volume separately.
- Pause Key.  Also pauses and resumes music (if any is playing).
- Protection against two copies of game running at once.

*Other Useful Types*
- TMousePointer handles loading a cursor, getting mouse values
  once per logic loop (to ensure constant coords and button
  readings), supports offsets for where point is not in top left,
  and slides the game cursor smoothly off the edges of the window
  instead of leaving it at the last known position.
- TSprite includes animation capability.
- TButton with mouse-over graphic, sound and management code.
- TGameSound incorporates name, pitch and volume.
- TSoundBank for easy storage and retrieval of sounds.
- TGameImage incorporates name, width and height.
- TImageBank for easy storage and retrieval of images.

*Splash screens*
- Splash screen with fade image and sound in/out functionality.
- Support for a publisher/portal splash screen.

*Loading screen*
- Loading screen with a loading bar supported.
- After Loading is complete, the loading bar is optionally
  replaced with a "Click here to play" button.