View Full Version : Shoot Things update
arekkusu
2004.07.20, 05:31 PM
I've posted a release candidate (http://homepage.mac.com/arekkusu/SW/ShootThings.dmg) of Shoot Things (Day 22). Please try it out and post your results in this thread!
(Day 22) is a compatibility and optimization update to the original (Day 21) release:
* Fixed "black screen" problem that happened on certain NVIDIA video cards.
* Fixed crash on 10.2 systems with QuickTime 6.3. QuickTime 6.4 or later is required.
* Worked around hardware bug that caused artifacts on Radeon 7000 video cards.
* Removed requirement for hardware GL acceleration. Runs on original iMac (very slowly.)
* Improved support for systems with more than one display.
* Added support for systems with more than one video card.
* Optimized all drawing by changing texture filtering.
* Optimized geometry submission.
* Optimized animated texture generation.
* Optimized random number generation.
* Optimized sound effect generation.
* Added support for 16 bit fullscreen modes, which may be faster on slow systems.
* Added frameskipping to maintain game speed at 30 fps on slow systems.
* Made a few minor gameplay tweaks.
[Edit: update link to RC4 dmg, no more debug symbols]
Mazilurik
2004.07.20, 09:45 PM
A minor bug: The first time I start the game, it draws in the lower left corner of the screen, presumably in a 1024x768 rectangle (my monitor is set to 1280x1024), but on subsequent runs it correctly draws full-screen. It seems that the game is getting the correct resolution and writing it to the preferences file (deleting the prefs causes the same partial drawing to occur), but still running at the default resolution because nothing was previously specified in the preferences.
Other than that, the game works perfectly.
arekkusu
2004.07.20, 11:37 PM
Mazilurik, thanks for catching this. But the frame in the preferences file isn't related to the fullscreen resolution at all-- it's only for restoring the window position. That frame also should only be written to prefs if you move or resize the window.
Shoot Things has semi complex rules for picking the fullscreen resolution; it should only end up switching resolution if your default one isn't at 60Hz AND that resolution doesn't have a 60Hz mode AND you do have another resolution in the same aspect ratio at 60Hz. On my CRT here that's the case for 1152x864 (only at 75Hz) which switches to 800x600@60. But, this works for me, the viewport is the correct size.
The fullscreen viewport size is set via a regular window setFrame: call, but I wonder if (again, only on some cards) this doesn't force a GL reshape to occur. Naturally most of the Macs in the Apple lab are using LCD displays where this isn't an issue. *sigh*
I've made a one line change to force that reshape, and put in some debug dumping in case it still doesn't work. The link at the top of the thread now points to RC2, could you try that out? Thanks...
aaronsullivan
2004.07.20, 11:50 PM
it's almost playable on my wife's iBook 500Mhz. :)
I finally finished it, too. There's a glitch(?) that has been annoying me. The final cavern sometimes closes down before I get there and sometimes doesn't close at all. Also, if you hold the firing button down when you die... it won't start shooting again when you return. More importantly, if you hold down the firing button and die, the movement keys sometimes don't work and sometimes you return in the middle of rock and die. :) Also, there is this flying saucer... ;)
I love how it exaggerates the problem with those 80's shooters like Gradius... if you die... just start over because you have no chance. :lol:
I still really love the game. It's a great homage. Plan any control pad support? :D
(P.S. why did ATI have to go and get Apple (Steve) angry at them... all these nVidia cards are causing problems! :rolleyes: :lol: )
arekkusu
2004.07.21, 12:13 AM
Thanks for the feedback-- a 500Mhz G3 iBook is still a bit too slow but it should be better than (Day 21).
In the cavern where two sections close in on you-- do you mean that they don't close _together_? Or they don't move at all? Not closing together is OK-- the cavern is randomly generated so the top and bottom sections can be different widths and offset from each other. Sometimes there will be a gap you can fly though, sometimes not. Same with the bit just before the rotating section-- sometimes it's _really_ tight, sometimes it is easy.
Now, the behavior when you die and zoom back in is not good, I agree. It stops you shooting/moving, but I'm not going to change this for (Day 22). Maybe for some future release ;)
Options for input device config (regular keyboard, control pads etc) as well as music/sound volume, difficulty level, etc are all good ideas but not for this update.
(Most of my bugs are actually on ATI cards... so neither side is perfect.)
aaronsullivan
2004.07.21, 08:20 AM
I thought I remembered that the very last gap in the caverns (right before the flying saucer) clamped down on you, but it sounds like they are just randomly generated. That's why I thought they were closed sometimes and not others. The section in the middle of the cavern area always clamps down and that's fine.
phydeaux
2004.07.21, 08:31 AM
Love the 'boss' of the demo.
Mazilurik
2004.07.21, 11:54 AM
RC2 exhibits the same behavior. This is the console output for the first run (after deleting the preferences):
2004-07-21 09:52:55.875 Shoot Things[817] best mode = <CFDictionary 0x13b9f0 [0xa01900e0]>{type = immutable, count = 11, capacity = 11, pairs = (
0 : <CFString 0xa35eac80 [0xa01900e0]>{contents = "kCGDisplayBytesPerRow"} = <CFNumber 0x13b9e0 [0xa01900e0]>{value = +5120, type = kCFNumberSInt32Type}
1 : <CFString 0xa35eac90 [0xa01900e0]>{contents = "kCGDisplayModeIsSafeForHardware"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
2 : <CFString 0xa35eac40 [0xa01900e0]>{contents = "SamplesPerPixel"} = <CFNumber 0x13b9b0 [0xa01900e0]>{value = +3, type = kCFNumberSInt32Type}
3 : <CFString 0xa35eac50 [0xa01900e0]>{contents = "RefreshRate"} = <CFNumber 0x13b9c0 [0xa01900e0]>{value = +0.0, type = kCFNumberFloat64Type}
4 : <CFString 0xa35eac30 [0xa01900e0]>{contents = "BitsPerSample"} = <CFNumber 0x13b9a0 [0xa01900e0]>{value = +8, type = kCFNumberSInt32Type}
5 : <CFString 0xa35eac70 [0xa01900e0]>{contents = "UsableForDesktopGUI"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
6 : <CFString 0xa35eac20 [0xa01900e0]>{contents = "BitsPerPixel"} = <CFNumber 0x13b990 [0xa01900e0]>{value = +32, type = kCFNumberSInt32Type}
9 : <CFString 0xa35eabf0 [0xa01900e0]>{contents = "Width"} = <CFNumber 0x13b960 [0xa01900e0]>{value = +1280, type = kCFNumberSInt32Type}
10 : <CFString 0xa35eac00 [0xa01900e0]>{contents = "Height"} = <CFNumber 0x13b970 [0xa01900e0]>{value = +1024, type = kCFNumberSInt32Type}
14 : <CFString 0xa35eac60 [0xa01900e0]>{contents = "IOFlags"} = <CFNumber 0x13b9d0 [0xa01900e0]>{value = +7, type = kCFNumberSInt32Type}
16 : <CFString 0xa35eac10 [0xa01900e0]>{contents = "Mode"} = <CFNumber 0x13b980 [0xa01900e0]>{value = +11, type = kCFNumberSInt32Type}
)}
2004-07-21 09:52:55.959 Shoot Things[817] best mode = <CFDictionary 0x13b9f0 [0xa01900e0]>{type = immutable, count = 11, capacity = 11, pairs = (
0 : <CFString 0xa35eac80 [0xa01900e0]>{contents = "kCGDisplayBytesPerRow"} = <CFNumber 0x13b9e0 [0xa01900e0]>{value = +5120, type = kCFNumberSInt32Type}
1 : <CFString 0xa35eac90 [0xa01900e0]>{contents = "kCGDisplayModeIsSafeForHardware"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
2 : <CFString 0xa35eac40 [0xa01900e0]>{contents = "SamplesPerPixel"} = <CFNumber 0x13b9b0 [0xa01900e0]>{value = +3, type = kCFNumberSInt32Type}
3 : <CFString 0xa35eac50 [0xa01900e0]>{contents = "RefreshRate"} = <CFNumber 0x13b9c0 [0xa01900e0]>{value = +0.0, type = kCFNumberFloat64Type}
4 : <CFString 0xa35eac30 [0xa01900e0]>{contents = "BitsPerSample"} = <CFNumber 0x13b9a0 [0xa01900e0]>{value = +8, type = kCFNumberSInt32Type}
5 : <CFString 0xa35eac70 [0xa01900e0]>{contents = "UsableForDesktopGUI"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
6 : <CFString 0xa35eac20 [0xa01900e0]>{contents = "BitsPerPixel"} = <CFNumber 0x13b990 [0xa01900e0]>{value = +32, type = kCFNumberSInt32Type}
9 : <CFString 0xa35eabf0 [0xa01900e0]>{contents = "Width"} = <CFNumber 0x13b960 [0xa01900e0]>{value = +1280, type = kCFNumberSInt32Type}
10 : <CFString 0xa35eac00 [0xa01900e0]>{contents = "Height"} = <CFNumber 0x13b970 [0xa01900e0]>{value = +1024, type = kCFNumberSInt32Type}
14 : <CFString 0xa35eac60 [0xa01900e0]>{contents = "IOFlags"} = <CFNumber 0x13b9d0 [0xa01900e0]>{value = +7, type = kCFNumberSInt32Type}
16 : <CFString 0xa35eac10 [0xa01900e0]>{contents = "Mode"} = <CFNumber 0x13b980 [0xa01900e0]>{value = +11, type = kCFNumberSInt32Type}
)}
about to setFrame for fullcreen
about to reshape for fullcreen
reshape to 1280.000000 x 1024.000000
reshape to 1280.000000 x 1024.000000
reshape to 1190.000000 x 952.000000
reshape to 1190.000000 x 952.000000
And here's the output for a working run:
2004-07-21 09:59:29.765 Shoot Things[825] best mode = <CFDictionary 0x145250 [0xa01900e0]>{type = immutable, count = 11, capacity = 11, pairs = (
0 : <CFString 0xa35eac80 [0xa01900e0]>{contents = "kCGDisplayBytesPerRow"} = <CFNumber 0x144710 [0xa01900e0]>{value = +5120, type = kCFNumberSInt32Type}
1 : <CFString 0xa35eac90 [0xa01900e0]>{contents = "kCGDisplayModeIsSafeForHardware"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
2 : <CFString 0xa35eac40 [0xa01900e0]>{contents = "SamplesPerPixel"} = <CFNumber 0x1446e0 [0xa01900e0]>{value = +3, type = kCFNumberSInt32Type}
3 : <CFString 0xa35eac50 [0xa01900e0]>{contents = "RefreshRate"} = <CFNumber 0x1446f0 [0xa01900e0]>{value = +0.0, type = kCFNumberFloat64Type}
4 : <CFString 0xa35eac30 [0xa01900e0]>{contents = "BitsPerSample"} = <CFNumber 0x13b070 [0xa01900e0]>{value = +8, type = kCFNumberSInt32Type}
5 : <CFString 0xa35eac70 [0xa01900e0]>{contents = "UsableForDesktopGUI"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
6 : <CFString 0xa35eac20 [0xa01900e0]>{contents = "BitsPerPixel"} = <CFNumber 0x13b060 [0xa01900e0]>{value = +32, type = kCFNumberSInt32Type}
9 : <CFString 0xa35eabf0 [0xa01900e0]>{contents = "Width"} = <CFNumber 0x13b030 [0xa01900e0]>{value = +1280, type = kCFNumberSInt32Type}
10 : <CFString 0xa35eac00 [0xa01900e0]>{contents = "Height"} = <CFNumber 0x13b040 [0xa01900e0]>{value = +1024, type = kCFNumberSInt32Type}
14 : <CFString 0xa35eac60 [0xa01900e0]>{contents = "IOFlags"} = <CFNumber 0x144700 [0xa01900e0]>{value = +7, type = kCFNumberSInt32Type}
16 : <CFString 0xa35eac10 [0xa01900e0]>{contents = "Mode"} = <CFNumber 0x13b050 [0xa01900e0]>{value = +11, type = kCFNumberSInt32Type}
)}
reshape to 1190.000000 x 952.000000
2004-07-21 09:59:29.865 Shoot Things[825] best mode = <CFDictionary 0x145250 [0xa01900e0]>{type = immutable, count = 11, capacity = 11, pairs = (
0 : <CFString 0xa35eac80 [0xa01900e0]>{contents = "kCGDisplayBytesPerRow"} = <CFNumber 0x144710 [0xa01900e0]>{value = +5120, type = kCFNumberSInt32Type}
1 : <CFString 0xa35eac90 [0xa01900e0]>{contents = "kCGDisplayModeIsSafeForHardware"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
2 : <CFString 0xa35eac40 [0xa01900e0]>{contents = "SamplesPerPixel"} = <CFNumber 0x1446e0 [0xa01900e0]>{value = +3, type = kCFNumberSInt32Type}
3 : <CFString 0xa35eac50 [0xa01900e0]>{contents = "RefreshRate"} = <CFNumber 0x1446f0 [0xa01900e0]>{value = +0.0, type = kCFNumberFloat64Type}
4 : <CFString 0xa35eac30 [0xa01900e0]>{contents = "BitsPerSample"} = <CFNumber 0x13b070 [0xa01900e0]>{value = +8, type = kCFNumberSInt32Type}
5 : <CFString 0xa35eac70 [0xa01900e0]>{contents = "UsableForDesktopGUI"} = <CFBoolean 0xa0190b90 [0xa01900e0]>{value = true}
6 : <CFString 0xa35eac20 [0xa01900e0]>{contents = "BitsPerPixel"} = <CFNumber 0x13b060 [0xa01900e0]>{value = +32, type = kCFNumberSInt32Type}
9 : <CFString 0xa35eabf0 [0xa01900e0]>{contents = "Width"} = <CFNumber 0x13b030 [0xa01900e0]>{value = +1280, type = kCFNumberSInt32Type}
10 : <CFString 0xa35eac00 [0xa01900e0]>{contents = "Height"} = <CFNumber 0x13b040 [0xa01900e0]>{value = +1024, type = kCFNumberSInt32Type}
14 : <CFString 0xa35eac60 [0xa01900e0]>{contents = "IOFlags"} = <CFNumber 0x144700 [0xa01900e0]>{value = +7, type = kCFNumberSInt32Type}
16 : <CFString 0xa35eac10 [0xa01900e0]>{contents = "Mode"} = <CFNumber 0x13b050 [0xa01900e0]>{value = +11, type = kCFNumberSInt32Type}
)}
about to setFrame for fullcreen
reshape to 1280.000000 x 1024.000000
about to reshape for fullcreen
reshape to 1280.000000 x 1024.000000
reshape to 1280.000000 x 1024.000000
reshape to 1280.000000 x 1024.000000
I'm not sure where it's getting the 1190x952 from; according to System Preferences it's not a supported resolution on my monitor (I'm using an Apple 17" LCD).
Just for the sake of completeness, here are the contents of the preferences file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Aspect Ratio</key>
<real>1.25</real>
<key>NSWindow Frame Shoot Things</key>
<string>40 28 1190 974 0 0 1280 1002 </string>
</dict>
</plist>
arekkusu
2004.07.21, 12:35 PM
The 1190x952 is the window frame. It's getting set after going fullscreen, somehow. Very weird, I thought you were on a CRT. I've tested with several 17, 20, 22, 23 inch Apple LCDs, including run by Geforce 3/4Ti/FX, in the lab and this never happened. I ought to be able to track it down from the logs tho, thanks.
arekkusu
2004.07.21, 02:09 PM
OK, it's hard to debug this when I can't repro the problem and I can't set breakpoints in fullscreen contexts :( but I suspect the problem was that I was calling makeKeyAndOrderFront after toggling fullscreen, and on your system the delayed notification was causing the viewport size to be set back to the window frame.
I've reordered it a bit, and added more debug logs. Link up top is updated to RC3, hope this works? Thanks for all the testing...
skyhawk
2004.07.21, 02:36 PM
can you get ahold of XCode 2.0 with the remote debugging?
Mazilurik
2004.07.21, 02:44 PM
RC3 fixes the problem; everything works perfectly now. :)
arekkusu
2004.07.21, 05:30 PM
Excellent. I've removed the debug code, rebuilt as deployment, repackaged as a .dmg (for 10.2 folk) and updated the link up top. I'll leave it here for a bit in case anyone finds more problems but hopefully this is the release.
skyhawk-- I'm a paid ADC member so I have Tiger sitting here, but remote debugging doesn't do me any good without a second Mac to debug from. :/
aarku
2004.07.21, 05:39 PM
can you get ahold of XCode 2.0 with the remote debugging?
If not, wouldn't ssh and gdb suffice?
-Jon
arekkusu
2004.07.21, 08:13 PM
Again, second machine to ssh from. What I did though is force a break via printf("%d", *(int *)0); which kills the app and releases the screen. Then I could look at the backtrace for each reshape event and see that the wrong ones in Mazilurik's log were coming from resize notifications. Lo-tech but it worked...
aaronsullivan
2004.07.22, 02:59 PM
Okay, I'll bite.
How exactly does:
printf("%d", *(int *)0);
kill an app?! :shock:
skyhawk
2004.07.22, 03:23 PM
you are dereferencing the NULL pointer
aaronsullivan
2004.07.22, 04:00 PM
Gotcha. Funny, that. :)
arekkusu
2004.11.03, 01:31 AM
Resurrecting this thread to say that I've posted a release candidate (http://homepage.mac.com/arekkusu/SW/ShootThingsDay23RC1.dmg) of Shoot Things (Day 23). No, this isn't a uDevGames entry, it's just another bugfix/optimization update. But please test it out and post any problems in this thread!
Changes include:
* Fixed intermittent sound effect problem that happened under certain OS versions.
* Fixed Rage 128 redraw problem exiting fullscreen when paused.
* Fixed fullscreen cursor visibility problems.
* Optimized collision buffer readback.
* Optimized sound effect generation.
* Added support for 640x480 modes on Rage 128 systems.
* Made gameplay easier by adapting the difficulty to the player's powerups.
JustinFic
2004.11.03, 04:59 PM
If you die right at the part when the cavern starts to close together, and it closes with no gaps to go through, you're guaranteed to die again. The slow speed + short invincibility time makes it impossible to haul over to the other side of the wall.
Also, is the UFO meant to not take my shield away? Having my shield basically doubles my lives at the boss.
Are you planning any additional levels? I'd really like to see the Shoot Things take on the Escape-from-the-exploding-enemy-facility-while-dodging-closing-doors level. (I think there's a federal law somewhere requiring every shmup to have one of these.)
arekkusu
2004.11.03, 06:58 PM
Thanks for the input.
The cavern closing bit is randomized; the top and bottom sections are in slightly different horizontal locations every time. It is even possible for them to close and still leave a gap to fly through. So, yes, it's possible that you could get into a forced death situation there, but that's nothing new. See: any Konami shooter.
The UFO takes away all powerups except shield, correct. That is an incentive to use your bombs before getting there, to protect your shield. It makes it a lot easier to face the boss, but that's your reward for preserving your shield. (Actually, there is a way to cheat and take out the boss very easily, but I'll let people find it on their own...)
There are three additional levels planned: fire, water, and tech, plus a rework of the first level (which was supposed to have the escape-from-the-exploding-asteroid-while-dodging-collapsing-walls-and-the-whole-screen-shakes-and-rotates part.) However this is delayed due to a couple of factors:
1) core technology needs to be developed (glAArg stipple, arbitrary animated texture application, fractal animation system, new sfx core)
2) my musician is busy with Real Life and scoring a movie
3) I'm exceedingly lazy
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.