Please help test framework example.

BlitzMax Forums/BlitzMax Programming/Please help test framework example.

Grey Alien(Posted 2006) [#1]
Hiya, I've made an example title screen using my Grey Alien BlitzMax Game Framework and I wondered if anyone can help me test it on a wide range of PCs (from good to crappy).

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



This title screen uses a 1000x1000 background image and I'd be interested to hear if it doesn't draw properly on any cards.

You should see a UFO moving across the screen smoothly (unless your machine is overburdened with tasks).

You should hear music playing.

You can also try the various keys out (e.g. bring up the debug stats with D). Try pressing T to toggle the max FPS and try pressing F to toggle into windowed mode for example.

Please note: the title bar icon issue has now been resolved. Thanks.

Please report back your FPS and system specs and any findings. Thanks in advance to anyone who can help :-)

*** I've also included the main source code in the .zip so you can see how the framework is called. ***


Warren(Posted 2006) [#2]
Everything looked good. It reported 700 FPS which seems insane, but there you go.

And I did the windowed exit/restart test and the icon wasn't correct.

I have a GeForce 6800 Go in this laptop.


Grey Alien(Posted 2006) [#3]
Great thanks Warren! So hmm the icon doesn't work for you on your laptop, yet it works for me on my PC...

I get 512FPS in full-screen and 493 in windowed mode on my Radeon 9800XT, P4 3.2GHZ HT, 1GB RAM, XP SP2.


H&K(Posted 2006) [#4]
Ath64 3200+ Rad X850
DX 380fps
OpenGL 710FPS
EDit, just installed the new ati drivers, and now get
DX 350FPS
OpenGL 900Fps


xlsior(Posted 2006) [#5]
Athlon 2800+ Radeon 9600Pro, XP SP2

Windowed: DX 330, OpenGL 573
Full screen: DX: 355, OpenGL 635

The UFO icon does remain on my PC.


Cruis.In(Posted 2006) [#6]
gray,
I get

DX 529
OGL 970

catalyst before this one
p4 3.0HT
ATI X800 XT 256
1.5 gig ram


SpaceAce(Posted 2006) [#7]
I have an Athlon 64 X2 4600+ with two gigs of RAM and a junky graphics card. My operating system is Windows XP Home Edition. I get ~300 FPS with DirectX and low 200s with OpenGL. When I exit/restart in windowed mode I do not get an icon in the window bar.

SpaceAce


Grey Alien(Posted 2006) [#8]
thanks all. hmm this icon thing is perplexing, why should it work on some PCs and not others? It's just a standard windows API call...maybe I'll try another method.

btw, in OGL I get 865FPS in full-screen and windowed mode. Seems my old Radeon 9800XT is still OK.


Grey Alien(Posted 2006) [#9]
GAH, I've just spend 2 hours looking into the reason why the icon code doesn't work on all PCs and I'm getting nowhere fast. I'm using this code:

?win32
Extern "win32"
	Function ExtractIconA%(hWnd%,File$z,Index%)
	Function SetClassLongA%(hWnd%,nIndex%,Value%)
End Extern
?

' -----------------------------------------------------------------------------
' ccSetIcon
' -----------------------------------------------------------------------------
Function ccSetIcon(iconname$, TheWindow%)	
	?Win32
	Local icon=ExtractIconA(TheWindow,iconname,0)
	SetClassLongA(TheWindow,-14,icon)
	?
End Function


I'm obtaining the window handle with GetActiveWindow() (another win32 call).

Why would this not work on some PCs? Strange.

If I don't call ccSetIcon() I don't get an icon on the window title bar AND in the Task Swapper (Alt+Tab) dialog. If I call it, I get an icon in the Task Swapper, but not the title bar, which means it is working, but the window is just not showing it! Arg...I hate this stuff.


Grey Alien(Posted 2006) [#10]
WOOO, found out why but not the answer. I'm running my PC with the Windows Classic theme and my Laptop is on windows XP theme (i.e. big title bar). On classic theme the icon shows but it doesn't on XP theme! This must mean it can't find the right size icon to use I guess so what is the icon size in XP theme? And how do I make my icon have the correct info? Any ideas? Thanks.

I made my icon by saving a 32x32 image as a 32-bit icon file in Gimp. Then I used Jim Brown's guide to make a resource file to add in at compile time:

http://homepage.ntlworld.com/config/max/appiconguide.htm

obviously the icon or the resource file doesn't have the required info for the XP theme to pick up an use the correct icon :-(

Oh yeah, the weird thing, of course, is that if you flip to full-screen mode then back again, the icon is there! But that's because I'm actually setting the icon in full-screen mode anyway so that it appears on the task-switcher dialog.


Grey Alien(Posted 2006) [#11]
OK more info, seems I can size the XP theme title bar in advanced options to any size and the icon still doesn't work unless I go into full-screen where it get's set, then come back to windowed mode. Strange.


Dreamora(Posted 2006) [#12]
Don't need windows icons to be ico files which internal save 64x64, 32x32 and 16x16, not only a single size?


Grey Alien(Posted 2006) [#13]
I saved a 32x32 in Gimp, but Windows scales it in Explorer windows automatically (larger or smaller) and shows it fine on the title bar if the theme is windows classic (i.e. 16x16) it just can't handle the windows XP theme for some reason.

OK so how can I build a combo icon with different sizes to try that out? Any ideas?


Steve Elliott(Posted 2006) [#14]
I'll test this properly later - but OpenGL was near twice as quick as DirectX - on ATI and now with my Nvidia graphics card.

I find that a concern, because of the way things are going with Windows.


Grey Alien(Posted 2006) [#15]
hmm, I made a combo icon with 16x16, 32x32, 48x48 and still it doesn't show any icon in XP Theme. I also made an icon of just 24x24 and it still doesn't show, but does after setting it in full-screen mode (like before).

So am I using the wrong API calls? Or is this a BMax/XP bug/problem where the window created with graphics depth 0 in XP Theme cannot be set an icon at all?


Grey Alien(Posted 2006) [#16]
OK some test code posted here:

http://www.blitzbasic.com/Community/posts.php?topic=64150

seems like it must be a BMax windowed mode bug.


Dreamora(Posted 2006) [#17]
Steve: Thats common with Max2D because it uses a totally outdated DX version. There is a user created DX9 driver for Max2D which is >= in speed as OpenGL for most users and hopefully might become an official driver in the future ... Otherwise Max2D as it stands is a lot but not cross plattform as it is nearly useless on Windows. (50% of the pc use Intel chip which works as bad with DX7 as with OpenGL ... )


Grey Alien(Posted 2006) [#18]
Steve: Also it's because BMax/DX7 had that lag problem that my framework originally had a fix for but then BRL put it in the actual modules, and this reduces DX framerate by about a 3rd, but at least the mouse cursor keeps up now...


Kurator(Posted 2006) [#19]
550 OGl / 370 DX

Athlon XP2800 / Radeon X1600 Pro


Steve Elliott(Posted 2006) [#20]

...this reduces DX framerate by about a 3rd, but at least the mouse cursor keeps up now...



WTF! I'd rather have the speed! This really needs to be addressed.

And I'm not going to use unofficial modules until they're stable and complete.


Grey Alien(Posted 2006) [#21]
Really it wasn't worth having the speed as the games seemed unresponsive, it was horrible. Apparently that's all they can do to fix it until BMax is DirectX 9 compatible "officially". That will be nice but it may limit the potential customer base...


Dreamora(Posted 2006) [#22]
The DX9 driver is complete as it is only a driver, no module or anything.

If you want speed, go for opengl, dx7 drivers get worse and worse, now that Win98 is officially "dead" and thus DX8 is the minimum DX Version present.


Grey Alien(Posted 2006) [#23]
maybe our games need code to detect the installed DX version and if <9 can tell users to update it. Still, this would put a lot of customers off...


dwarf(Posted 2006) [#24]
Desktop
AMD Athlon 64 3000+ XP Fam 1Go Ram
Nvidia Gforce 6600GT

FullScreen (843 OpenGl / 477 Directx)
Windows (802 OpenGL / 440 Directx)


Pentium 4 2,4 Ghz 256 Mo XP Pro
Nvidia GeForce2 MX/MX400

FullScreen (146 OpenGl / 139 Directx)
Windows (105 OpenGL / 95 Directx)




NoteBook
Athlon XP Fam 1700+ (1,46 ghz) 192Mo Ram (64 video) Ati Radeaon IGP 320M

FullScreen (91 OpenGl / 70 Directx)
Windows (49 OpenGL / 42 Directx)



When I start the game in fullscreen and swap to window mode, the icon is here but if I toggle to other (opengl/directx) mode I see the window icon. I need to toggle again the (opengl/directx) mode to see the right icon.

When I start in Window mode, I don(t see the aotmg icon, I need to toggle twice the (opengl/directx).


Grey Alien(Posted 2006) [#25]
great stats and info thanks dwarf. That notebook is like "ouch" :-( And even the Geforce 2 is a bit under par really compared to the 6600GT.


Grey Alien(Posted 2006) [#26]
Dwarf: good spot on the OpenGL/DirectX toggling thing. That seems to have been fixed with the new icon setting code that I talked about in that other thread (I just tested it).