View Full Version : Crazy Indie Antics
Landon_Fox
01-03-2003, 04:50 PM
Have you ever had one of those situations that once you have it behind you you just have to laugh at yourself. This is one of those times for me and I thought you guys might get a kick out of it.
Here's the setup. I've just recovered from burn out and am programing with a vengence. Since I feel much more confident in my programming skill now, I'm diving into Direct3d. I must admit I absolutely love transparent, colored polygons. However, I was getting a really bad framerate. I tried everything I could think of to optimize the process. I built a profiler into my timing module (which didn't help at all). I read everything I could on how to make your game work with the acceleration. I experimented and experiminented, coded and recoded, for a couple hours, but despite all my work a paultry 1000 polygons per frame (75 frames per second target) test had my computer choking. On the verge of dispair, I tried one last test.
I changed the size of the polygons from about covering about 25% of the screen to the size you would expect from an in game model or animation.
Hmm, well would you believe that... Now I'm getting a really decent framerate...
Step 1: Bang head against table
Step 2: Lift Head back up.
Step 3: Goto Step 1
I feel much better now.
Well, that's my story. Anyone got any stories they'd like to share?
MirekCz
01-04-2003, 12:47 AM
hehehe,
I meet ppl doing exactly what you did all the time:-)
They all fell into card fillrate limits and wonder "why I have only 10fps with 100 polys?!?" :-)
There are of course few other problems that ppl have often like glbegin/end for each triangle, changing texture all the time etc:-)
Fenix Down
01-04-2003, 12:51 PM
Ok here's a great bug story I just went through. Originally I was loading one sound file, then I added code to load a second. All of a sudden one of the object's (that are on the screen) coordinates became corrupted. And all this just from loading a SOUND file! Anyway, I don't want to go into too many details but it turned out to be an uninitialized variable in a timing code class that I wrote almost a year ago.
Basically my motion code is time based, so I move objects at X pixels per second. To make the movement more smooth I take an average time per frame about every 30 frames. So what ended up happening apparently was that the loading of the sound slowed down the loading of the whole program. This in turn made an invalid value return from the timing code (which I use for movement) before it was reset to 0 (it gets reset to 0 every 30 frames, but it wasn't set to 0 before the first 30 frames passed).
So.. I was doing a lot of Step 1 for a while, Landon_Fox. :)
I was writing a game on the Amiga once when I had aspaceship on screen (a hardware sprite). I had just implemented basic flying around and shooting when I tested it out. I had a bug on one line which enabled the ship to fly off the top of the screen. That wasn't too bad until I fired. The bullet firing through the Amiga's unprotected memory not only crashed the program but shot my source code, and I hadn't saved my work (floppy only system made it a real pain).
Thinking about it now, I 'm not entirely sure why clipping didn't kick in. Maybe I generally sucked all round back then.
Siebharinn
01-04-2003, 01:53 PM
You have to admit though, that was a good shot. :)
Dexterity
01-04-2003, 03:33 PM
LOL! :)
princec
01-05-2003, 07:22 AM
I once had to write a server that received a queue of requests in a directory. After it had finished it did a deltree using a 3rd party library (it was Powerbuilder y'see) to get rid of the requests.
What the library didn't mention is that rather than returning a failure code to deltree when an invalid directory is passed in, by, say, someone not setting up an .ini file, like ME, it decides to delete the current working directory.
In this case it was the root of the shared source network drive everyone was using :(
The silence that followed when I yelled "****!" at the top of my voice in the besuited open-plan office was nothing compared to the cacophony that resulted when everyone noticed the entire development drive had been erased five seconds later. Thank god for daily backups.
Cas :)
Mark Fassett
01-05-2003, 07:51 AM
That's priceless!
Dexterity
01-05-2003, 08:28 AM
This is a fantastic thread... sort of like a bloopers reel for game development. Here's a story where the moral is, "be careful what you wish for." :)
In January 1994 I was pulling an all-nighter to finish some last-minute changes to a small retail arcade game collection. The gold master was due at noon, and it was around 5:30am. I felt like I could finish in time, except that one bug was really frustrating me. I thought I should be able to easily find and fix the bug if I was fresh, but my brain was overly fatigued, and I was worried that I might introduce new bugs if I wasn't careful. I thought to myself, "Argh! I just need a little more time."
Just then the room started shaking, the lights went out, and I was thrown into the air and then slammed on the floor. It was the Northridge earthquake, and I was 8 miles from the epicenter. Only a month earlier I had graduated from CSUN and moved out of an apartment that was less than a mile from the epicenter, across the street from the collapsed CSUN parking structure.
Power and phones were out for several days, and I ended up getting an extra week to finish the project, which was plenty of time to do the job right.
So I'm really sorry for all the damage and destruction.... :(
John Cutter
01-05-2003, 11:02 PM
All of a sudden one of the object's (that are on the screen) coordinates became corrupted. And all this just from loading a SOUND file!
After a long night of bug fixing I once told my wife: "Programming a computer is like changing the windshield wipers on your car... and suddenly the engine won't start."
Carrot
01-09-2003, 02:40 AM
I had a strange 'bug' a few years back...
I was working on scrolling background for a small demo back in the 8-bit days.
Due to speed/memory limits, the background was just a small pattern (like a check effect) that was tiled to cover the whole background layer. A cheap way of scrolling the background back then was to just scroll the pattern data and the effect was that the whole screen scrolled (this was a common practice in those days! the tile was just a user-defined character set).
The problem started during testing. When I ran the program the pattern seemed to be scroll in the opposite direction to what I wanted. I spend several hours trying to locate the problem with no luck, when my brother just happened to ask what the problem was (he heard my expletives in the other room).
I showed him the problem and explained that I couldn't figure out why the background was scrolling left-to-right instead of right-to-left as I wanted. He stopped me in the middle of my rant to explain that to him it actually was scrolling right-to-left!
Turns out it was an optical illusion and you could see it moving either way if you looked long enough (think: rotating helicopter blades)
I never did like those cheap effects anyway! :)
jhocking
01-11-2003, 10:25 AM
My best bug so far was involving AI for enemies. Long story short, I screwed up the memory management and then, when I tested the AI code, random objects started behaving like monsters. It was pretty funny (AARGH! I'm being attacked by a building!) and the silver lining was that the mistake demonstrated how well I had written the AI; that code was so well encapsulated it could be effortlessly applied to anything.