OMG Entry: Retrovirus Testing

DDustin
Unregistered
 
Post: #1
http://wipproject.zapto.org/tmp/retrovirus.zip

Hi. I'm new to these forms but am participating in the OMG Cup contest. I believe this program should run on osx 10.4.2 with the default settings, but I have no way to tell for sure since this computer has all the proper libraries installed that I may have inadvertantly left a dependency to.

One thing that needs instruction: Some maps allow you to rotate the level by holding the right mouse button and moving the mouse. Its supposed to be completely intuitive but the tutorial that explains this point isn't done yet (aka hasn't been startedWink). If you have a one button mouse you'll have to hold the control button and click to provide the control.

If you could please give:
Your OSX version
Proccessor (click the apple and go to 'about this mac')
Memory (on the same window as Proccessor)
GFX Card (if not standard)
FPS at the main gui screen
Lowest FPS obtained during the first level
Highest FPS obtained during the first level
Median FPS obtained during the first level
(Median being the most common number seen)
Anything else you find important or would like to mention

Thanks in advance for testing it. In the (hopefully Rolleyes) off chance that the program crashes, if you could please describe what you were doing when the crash occured and provide the files log.txt and errors.txt that should be created in the working directory.

The program will also create a file named 'settings' in the working directory. You can modify this file by hand in a simple text editor to change various settings (like turn off particle effects if it runs too slow) or use the internal gui the change the common settings. If you do change the settings around, please mention this next to your FPS results.
Quote this message in a reply
Oldtimer
Posts: 832
Joined: 2002.09
Post: #2
Oh, God, NOOOO! Not a well-polish, crazy fun Snood clone! I don't have the time to get back into that addiction!

First off, crashes on quit:
Code:
0   retrovirus 0x00012d60 Bitmap::~Bitmap [in-charge]() + 20 (crt.c:355)
1   retrovirus 0x00012d70 Bitmap::~Bitmap [in-charge]() + 36 (crt.c:355)
2   retrovirus 0x0002d4bc Particle::cleanup() + 100 (crt.c:355)
Loosk like a double free to me - you shouldn't call the Bitmap's destructor from the bitmap. Wink

I love the music, love the graphics, love the spinning gameplay... I do not love the fact that my fiancée will hog my Mac and beat the hell out of me. The only thing I can't really approve of is the (Y)es/(N)o thing on quit - way to DOS for me. Wink

Stats:
10.4.3, G5 2.0 GHz, 1GB RAM, Radeon 9600, around 1200 FPS on main screen, around 900 in-game. Pretty stable thereabout, did hit 1100. You should VBL synch, because it kicks my fans into high gear.

Also, when balls disappear, there are white, translucent quads emerging from them. They look like they are particle effects without a loaded texture?

Keep this one going, pal, and I will have to kill you. Rasp Jokes aside, my finals this year are in danger.
Quote this message in a reply
DDustin
Unregistered
 
Post: #3
Quote:Also, when balls disappear, there are white, translucent quads emerging from them. They look like they are particle effects without a loaded texture?
Hm, yeah that sounds like what it is. It could be a buggy OpenGL implementation. We'll find out if thats the case if someone else has the same problem.

Quote:You should VBL synch, because it kicks my fans into high gear.
Ah yes I forgot about cpu yielding. Removed it for some reason and forgot to put it back in. Thanks.

Quote:First off, crashes on quit:
Hm.. this ones a toughy. ~Bitmap doesnt do much at all. It could be due to using full optimizations and this little 'trick':
Code:
while(itr != graphics.end())
        delete itr++->second;

Maybe its doing some weird unrolling the loop and messing up. Thats my best theory anyway, thanks for the report.

Quote:Keep this one going, pal, and I will have to kill you. Rasp Jokes aside, my finals this year are in danger.
I'm glad you like it Smile
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #4
Fenris Wrote:Oh, God, NOOOO! Not a well-polish, crazy fun Snood clone!
BUST A MOVE! Its a Bust A Move clone! Cry

Anywho, other than appearing on my desktop as a Unix executable, it seems to run fine.

Sound stuttered in places although the framerate was 200+.

Nice job.

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
Member
Posts: 268
Joined: 2005.04
Post: #5
Command-Q doesn't quit.

The rotating instead of ricocheting is interesting, but not at all intuitive. Not sure if it's an improvement over traditional Bust-a-Move.

I definitely don't like the ball respawning. In fact, I down right hate it. Especially when a ball spawns right where I'm aiming at during flight.

There's no indicator of which color is coming up next. Plus the spawning glow obscures the ball color for half a second which slows you down. Which is more time for those damn balls to respawn.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #6
it crashes with a huge stacktrace. Well, more like it freezes, then when I force quit it it crashes. It doesn't even bring up a window: it brings the icon up on the dock (without an arrow under it), and it just sits there.

Crash log:
Quote:Command: retrovirus
Path: ./retrovirus
Parent: bash [2907]

Version: ??? (???)

PID: 2912
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0 retrovirus 0x000a7e4c _unix_unlock_mutex + 0 (crt.c:355)
1 retrovirus 0x000a6a44 osx_signal_handler + 44 (crt.c:355)
2 libSystem.B.dylib 0x9012c84c _sigtramp + 96
3 libSystem.B.dylib 0x9002b8a8 semaphore_wait_signal_trap + 8
4 libSystem.B.dylib 0x90001980 pthread_mutex_lock + 424
5 libSystem.B.dylib 0x9004a6d8 NSAddImage + 40
6 ...ple.CoreServices.CarbonCore 0x90b1c868 GetDYLDEntryPointWithImage + 84
7 ...ple.CoreServices.CarbonCore 0x90b1c804 GetDYLDEntryPoint + 36
8 ...ple.CoreServices.CarbonCore 0x90b1c7b8 _updateSelector + 84
9 ...ple.CoreServices.CarbonCore 0x90b1a414 CLVVisitValuesForKey + 208
10 ...ple.CoreServices.CarbonCore 0x90b1c67c LazyGestaltResolver + 92
11 ...ple.CoreServices.CarbonCore 0x90b1a658 InvokeSelectorFunctionUPP + 24
12 ...ple.CoreServices.CarbonCore 0x90b19d2c Gestalt + 192
13 ...ple.CoreServices.CarbonCore 0x90b19c28 LMGetIntlSpec + 68
14 com.apple.HIToolbox 0x9317c9ac LNGLanguageToScript + 24
15 com.apple.HIToolbox 0x93188ab8 GetProcessScriptAndRegion(short*, short*) + 80
16 com.apple.HIToolbox 0x93188a28 GetApplicationTextEncoding + 56
17 com.apple.HIToolbox 0x931af31c GetAppTextEncoding() + 48
18 com.apple.HIToolbox 0x931af2a4 TThemeMetaFont::GetDefaultSize() const + 40
19 com.apple.HIToolbox 0x931af208 TThemeFont::GetFontSizeFromTextInfo(_HIThemeTextInfo const*) const + 48
20 com.apple.HIToolbox 0x931af1b0 TThemeMetaFont::Init(_HIThemeTextInfo const*) + 68
21 com.apple.HIToolbox 0x931af034 ThemeFontCreateFromStandardMetaFontID(_HIThemeTextInfo const*) + 192
22 com.apple.HIToolbox 0x931aef58 ThemeFontCreate(_HIThemeTextInfo const*) + 28
23 com.apple.HIToolbox 0x931aeee4 TThemeText::ConstructThemeFontWithFontID(__CFString const*, _HIThemeTextInfo const*) + 104
24 com.apple.HIToolbox 0x931aee64 TThemeText::Init(__CFString const*, _HIThemeTextInfo const*) + 28
25 com.apple.HIToolbox 0x931aedac TCoreTextEngine::Init(__CFString const*, _HIThemeTextInfo const*) + 120
26 com.apple.HIToolbox 0x931aebdc TThemeTextCache::Create(__CFString const*, _HIThemeTextInfo const*) + 236
27 com.apple.HIToolbox 0x931ae820 DataEngine::GetTextDimensions(__CFString const*, float, _HIThemeTextInfo*, float*, float*, float*) + 196
28 com.apple.HIToolbox 0x931ae710 HIThemeGetTextDimensions + 160
29 com.apple.HIToolbox 0x9332f16c HIMenuBarView::MeasureMenuTitle(MenuData*, unsigned char, float*, int) + 472
30 com.apple.HIToolbox 0x931ae018 HIMenuBarView::MeasureAppMenus() + 176
31 com.apple.HIToolbox 0x931ad6a8 HIMenuBarView::EnsureBarLayout() + 364
32 com.apple.HIToolbox 0x931b0838 HIMenuBarView::GetAvailableSpace(CGRect*) + 28
33 com.apple.HIToolbox 0x931b0800 HIMenuBarViewGetAvailableSpace(OpaqueControlRef*, CGRect*) + 84
34 com.apple.HIToolbox 0x931b0744 SetMenuBarLimits + 52
35 com.apple.HIToolbox 0x931a4350 ShowBar(unsigned char, unsigned char) + 188
36 com.apple.HIToolbox 0x931a4240 SetMenuBarObscured + 200
37 com.apple.HIToolbox 0x9320062c HIApplication::HandleActivated(OpaqueEventRef*, unsigned char, OpaqueWindowPtr*) + 212
38 com.apple.HIToolbox 0x931852b4 HIApplication::EventObserver(unsigned long, OpaqueEventRef*, void*) + 208
39 com.apple.HIToolbox 0x93181b00 _NotifyEventLoopObservers + 196
40 com.apple.HIToolbox 0x93184e04 AcquireEventFromQueue + 288
41 com.apple.HIToolbox 0x9318280c ReceiveNextEventCommon + 276
42 com.apple.HIToolbox 0x931826e0 BlockUntilNextEventMatchingListInMode + 96
43 com.apple.AppKit 0x93681904 _DPSNextEvent + 384
44 com.apple.AppKit 0x936815c8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
45 retrovirus 0x000a73b4 osx_event_handler + 2332 (crt.c:355)
46 retrovirus 0x0006e808 -[AllegroAppDelegate applicationDidFinishLaunching:] + 792 (crt.c:355)
47 com.apple.Foundation 0x928db018 _nsnote_callback + 180
48 com.apple.CoreFoundation 0x907844b8 __CFXNotificationPost + 368
49 com.apple.CoreFoundation 0x9077c594 _CFXNotificationPostNotification + 684
50 com.apple.Foundation 0x928c5420 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
51 com.apple.AppKit 0x93683db8 -[NSApplication _postDidFinishNotification] + 112
52 com.apple.AppKit 0x93683ca4 -[NSApplication _sendFinishLaunchingNotification] + 92
53 com.apple.AppKit 0x936837ec -[NSApplication(NSAppleEventHandling) _handleAEOpen:] + 264
54 com.apple.AppKit 0x93683394 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 92
55 com.apple.Foundation 0x928dc024 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 380
56 com.apple.Foundation 0x928dbe84 _NSAppleEventManagerGenericHandler + 92
57 com.apple.AE 0x914ab960 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*) + 208
58 com.apple.AE 0x914ab7fc dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 44
59 com.apple.AE 0x914ab654 aeProcessAppleEvent + 284
60 com.apple.HIToolbox 0x93185940 AEProcessAppleEvent + 60
61 com.apple.AppKit 0x93681adc _DPSNextEvent + 856
62 com.apple.AppKit 0x936815c8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
63 com.apple.AppKit 0x9367db0c -[NSApplication run] + 472
64 retrovirus 0x0006ec4c main + 696 (crt.c:355)
65 retrovirus 0x00002e0c _start + 340 (crt.c:272)
66 retrovirus 0x00002cb4 start + 60
System info:
Mac OS X 10.4.3
Dual 2.7 GHz G5
Radeon X800
1.5 GB RAM
Quote this message in a reply
DDustin
Unregistered
 
Post: #7
Quote:Anywho, other than appearing on my desktop as a Unix executable, it seems to run fine.
Hm, I would ask you how to make it more proffessional looking (the icon and such) but you'll probably just say use XCode.

Bachus Wrote:Command-Q doesn't quit.
Ah right thanks for reminding me. Its on my Todo list.
Bachus Wrote:The rotating instead of ricocheting is interesting, but not at all intuitive. Not sure if it's an improvement over traditional Bust-a-Move.
Theres a tutorial planned to help explain it. Hopefully when powerups are in you'll consider it an improvement Smile
Bachus Wrote:I definitely don't like the ball respawning. In fact, I down right hate it. Especially when a ball spawns right where I'm aiming at during flight.
Sorry to hear this. Hm, what if while the ball was in flight nothing would be allowed to spawn?
Bachus Wrote:There's no indicator of which color is coming up next. Plus the spawning glow obscures the ball color for half a second which slows you down. Which is more time for those damn balls to respawn.
The indicator is planned for the final release, as is a method to swap the next ball and the current ball so you have a choice to fire with and its not entirely ranom. The obscuration of the balls could be a problem I suppose. I think its more a matter of taste as it does add a little more challenge to the game. But if its frustraiting that definetely doesn't fit with the Casual Gaming market and we should consider changing it somehow.

Thanks for all the tips.

akb825 Wrote:it crashes with a huge stacktrace. Well, more like it freezes, then when I force quit it it crashes. It doesn't even bring up a window: it brings the icon up on the dock (without an arrow under it), and it just sits there.
Mm, thanks for the report. Your dual proccessor set up makes me want to blame that but it looks more like the function osx_event_handler is calling itself when it shouldn't be. This will definetely have to be fixed before the release.

By the way, does this happen every time or randomly? Do you do something to cause the crash? How far does the game get (do you get a LOADING screen? the main menu screen?)
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #8
It didn't do a single thing, and it did it every time. Weird thing is, today I tried it again just now for kicks, and it worked. Weird. Then it stopped working again. I re-downloaded in case you fixed the bugs above, but that's when it died. Beforehand, though, the explosions of balls showed up as untextured quads.

The easiest way to make it into a package is to use XCode. Believe me, it isn't painful to use. Even if you're stubborn and don't want to use XCode, it's still rather quick. Just make a new Cocoa application, remove the NIB file, dump all your files in, and build. Boom, there's your package. You can also set an icon through the target's get info screen.

Just out of curiosity, why are you so against XCode?
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #9
It worked again after a restart. However, after 2 more launches it stopped working. Anybody else having this happen to them when they start it up enough?
Quote this message in a reply
Apprentice
Posts: 19
Joined: 2005.06
Post: #10
the aiming feels kinda gooey, like the balls aren't going where I expect them to. Also, since there is no ricochet, it's really easy to get stuck and just not be able to do anything.
Quote this message in a reply
DDustin
Unregistered
 
Post: #11
Quote:the aiming feels kinda gooey, like the balls aren't going where I expect them to. Also, since there is no ricochet, it's really easy to get stuck and just not be able to do anything.
If you hold the right mouse button you can rotate the arena by moving the mouse. If you have a one button mouse you can simulate a right mouse button click by holding control on your keyboard while clicking.

This isn't very intutive I know Rasp. Eventually theres going to be a tutorial explaining everything.

Quote:It worked again after a restart. However, after 2 more launches it stopped working. Anybody else having this happen to them when they start it up enough?
The problem has to do with mutexes and recursion. Its probably just happening randomly. It might be happening only to you cause your computers so fast. I have a grasp of what the problem is (thanks to the backtrace you providedSmile) so I'll get this fixed asap.

Quote:Just out of curiosity, why are you so against XCode?
It takes time to learn how to use an IDE. I tried to just open it up and guess its usage but gave up after a few hours. I decided that using the makefile I already had set up for windows and unix would be much less work, which it was.

I'm sure XCode's very nice, its just that I've already done what I would need it to do for me ages ago, in my makefile. I just needed to make a small change to the linking command.

Thanks for all the testing! It was a big help Smile.
Quote this message in a reply
Oldtimer
Posts: 832
Joined: 2002.09
Post: #12
To add an icon, you have to create a bundle and put your app into it. There is an article on http://developer.apple.com, but I can't find it right now. It's called "The Anatomy of a Bundle" IIRC...
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #13
DDustin Wrote:The problem has to do with mutexes and recursion. Its probably just happening randomly. It might be happening only to you cause your computers so fast. I have a grasp of what the problem is (thanks to the backtrace you providedSmile) so I'll get this fixed asap.
Wow, that's the second problem I've had because of my computer being too fast. First time was when I made my fractal drawing program, it didn't like my loops to wait for information from the other processes I spawned. I ended up just having to sleep for a quarter of a second each time. Otherwise, it would mess up some of the time when compiled in debug mode, all the time in release mode.

If you send me the code when you finish and an image you want as an icon, I can compile it as a bundle for you. Tomorrow, I'll be available around 11-2, 3-6, and after 9. (pacific) If you tell me specifically where your code is for opening the files (or if they're obvious enough, I can find them myself), I can also make it so it truly puts the log and setting files in the current directory rather then always your home directory. (in OS X, if you open an app, it doesn't automatically change the current working directory to the directory you launch the app from) I suggest that if you continue with Mac programming after this, you do learn how to use XCode. It has quite a few nice features that both help you code as well as make your application more user friendly.

I also noticed that your log file says I have a little endian machine, but PPC processors are big endian. Either you mixed up the terminology, or your messed up your checker, but I'm guessing it's the former since your images and music work correctly. Rasp It doesn't really pose an issue now, but it might pose some trouble in future projects if you mix the two up.
Quote this message in a reply
DDustin
Unregistered
 
Post: #14
akb825 Wrote:I also noticed that your log file says I have a little endian machine, but PPC processors are big endian. Either you mixed up the terminology, or your messed up your checker, but I'm guessing it's the former since your images and music work correctly. Rasp It doesn't really pose an issue now, but it might pose some trouble in future projects if you mix the two up.
Mm good to know. The program doesnt actually use the endian detection for anything usefull. Its just there in case I need it later.

Can you see what I'm doing wrong?
Code:
bool endian::isLittle()
{
    static short s = 255;
    static char *p = reinterpret_cast<char*>(&s);
    
    return (p[0] << 8) | p[1];
}
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #15
Since you aren't assigning or typecasting, I think (p[0] << 8) evaluates as an int, in which case the above will always return true. Also, I think you wanted to switch the indices. Here's a similar approach that is more straightforward:
Code:
bool endian::isLittle()
{
    static short s = 1;
    static char *p = reinterpret_cast<char*>(&s);
    
    return p[0];
}
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Consider using libstem for your uDevGames entry! ThemsAllTook 2 4,990 Jul 1, 2011 02:10 PM
Last Post: stevejohnson
  Entry OK? pinguoren 8 5,483 Mar 4, 2009 03:51 PM
Last Post: pinguoren
  Long lost uDev entry.. Johan 8 5,440 Jan 29, 2009 02:46 AM
Last Post: Johan
  OMG entry: "Fylakas" testers and feedback dfmoore 19 8,948 Dec 12, 2005 09:05 PM
Last Post: dfmoore
  What should I do for my second entry? stevejohnson 10 6,127 Nov 24, 2005 08:40 AM
Last Post: BeyondCloister