MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Andrew
Girl Watcher
Reged: 09/21/03
Posts: 5082
Loc: Boston, Mass.
Send PM


Dirty Coding Tricks
#200337 - 08/31/09 01:09 PM


http://www.gamasutra.com/view/feature/4111/dirty_coding_tricks.php



--
A story of one man and his obsession with the female anatomy.



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


lmao new [Re: Andrew]
#200615 - 09/03/09 05:12 AM


> http://www.gamasutra.com/view/feature/4111/dirty_coding_tricks.php

Don't know how many remember Force 21, but it was an early 3D RTS which used a follow cam to observe your current platoon. Towards the end of the project we had a strange bug where the camera would stop following the platoon -- it would just stay where it was while your platoon moved on and nothing would budge it. The apparent cause was random because we couldn't find a decent repro case. Until, finally, one of the testers noticed that it happened more often when an air strike occurred near your vehicles. Using that info I was able to track it down.

Because the camera was using velocity and acceleration and was collidable, I derived it from our PhysicalObject class, which had those characteristics. It also had another characteristic: PhysicalObjects could take damage. The air strikes did enough damage in a large enough radius that they were quite literally "killing" the camera.

I did fix the bug by ensuring that cameras couldn't take damage, but just to be sure, I boosted their armor and hit points to ridiculous levels. I believe I can safely say we had the toughest camera in any game.


S



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: lmao new [Re: Sune]
#200625 - 09/03/09 10:35 AM


From the comments...


My favourite comes from an N64 game. Rendering all the text in the debug menu was slowing the game to a crawl, making it hard to debug other issues. The number of characters being rendered each frame had to be reduced.

What could be more obvious? Only render every second letter! But alternate, so that on even numbered frames, you render even-numbered letters, and on odd-numbered frames, you render odd-numbered letters!

This leaves you a flickery, but fast and usable, debug menu.



GroovyMAME support forum on BYOAC



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: lmao new [Re: krick]
#200639 - 09/03/09 05:14 PM


Another good one from the comments...

Quote:



Back on Wing Commander 1 we were getting an exception from our EMM386 memory manager when we exited the game. We'd clear the screen and a single line would print out, something like "EMM386 Memory manager error. Blah blah blah." We had to ship ASAP. So I hex edited the error in the memory manager itself to read "Thank you for playing Wing Commander."




- Stiletto



keshbach1
Reged: 08/26/05
Posts: 1303
Send PM


Re: lmao new [Re: Stiletto]
#200663 - 09/03/09 11:12 PM


> Another good one from the comments...
>
> Back on Wing Commander 1 we were getting an exception from our EMM386 memory manager
> when we exited the game. We'd clear the screen and a single line would print out,
> something like "EMM386 Memory manager error. Blah blah blah." We had to ship ASAP. So
> I hex edited the error in the memory manager itself to read "Thank you for playing
> Wing Commander."
>
> - Stiletto

Wow I remember getting that message after playing Wing Commander. I just thought to myself "Wow that's an interesting touch to add to a video game".



Kevin Eshbach



JWallace
Steamrollered by cool things, and likes it that way
Reged: 09/22/03
Posts: 810
Send PM


Re: lmao new [Re: keshbach1]
#200736 - 09/04/09 06:39 PM


Yet another from the comments


Quote:


Working on a basketball game for Genesis. Its used a flash chip to store game data. Game was tested for months and everything was ready so publisher ordered 250'000 copies of the genesis cart. BUT no one for months had reset the flash chips on the test carts to make sure the flash init routines worked correctly or ordered a few hundred carts just for testing..


Turned out the flash init code was dead and the carts could not save games properly!!! Studio went into meltdown trying to figure out how to ship 250'000 broken carts. Suggestions of production lines adding extra resistors and other hacks to every cart were tried and failed , then some figured out if you played some games in a weird order the flash memory would sort of work. So i extra leaflet was added to every box explaining how to use this "feature".

Job done

Chris Kirby




Well, the game was NBA Jam TE, and I bought it at the time. Problem was, a number of the earlier UK batches were missing the leaflet, mine included. When I took mine back, the manager knew nothing, and we tried about 5 copies to try to find one that worked. He gave me a refund, and I eventually got the Saturn version years later on clearance.

Finally I know the truth, although searching for the game name seems to bring it up on most of the cheat sites now.



http://agemame.mameworld.info

AGEMAME HQ - was once a thing, now isn't really.



PiModerator
Allergic to life
Reged: 09/20/03
Posts: 6449
Loc: Room 101
Send PM


Re: lmao new [Re: keshbach1]
#200798 - 09/05/09 02:33 PM


> Wow I remember getting that message after playing Wing Commander. I just thought to
> myself "Wow that's an interesting touch to add to a video game".

I liked the Microprose F1GP (yes, the old one) touch, which told you how many hours you were playing it. I used to play one or two complete races in a championship (qualifying included) without pauses (pause? that's cheating.) The amusement I got when I ended the game and it told the time I spent on it was endless ^_^



Wound up, can't sleep, can't do anything right, little honey / Oh, since I set my eyes on you. / I tell you the truth.
I can't get it right / Get it right / Since I met you...



Moose
Don't make me assume my ultimate form!
Reged: 05/03/04
Posts: 1483
Loc: Outback, Australia
Send PM


Re: lmao new [Re: keshbach1]
#203707 - 10/09/09 02:55 PM


> > Another good one from the comments...
> >
> > Back on Wing Commander 1 we were getting an exception from our EMM386 memory
> manager
> > when we exited the game. We'd clear the screen and a single line would print out,
> > something like "EMM386 Memory manager error. Blah blah blah." We had to ship ASAP.
> So
> > I hex edited the error in the memory manager itself to read "Thank you for playing
> > Wing Commander."
> >
> > - Stiletto
>
> Wow I remember getting that message after playing Wing Commander. I just thought to
> myself "Wow that's an interesting touch to add to a video game".

LOL, yes, I rememeber this one as well. I played through Wing Commander and the 2 or 3 expansion sets that came out for it, and I sure remember seeing this and thinking the same thing.


>In every codebase I've worked in, you see the following lines:
>
>//@hack
>
>//@remove
>
>//@fixme!
>
>And, well... they almost never get changed

It is the projects that have hacks and don't label them as such that you want to avoid like the plague. At least if people acknowledge their hacks and add comments to explain what they have done, why, etc, you have a chance of getting around to fixing them ... one day ...



Moose



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: lmao new [Re: Moose]
#204087 - 10/14/09 08:16 PM


> It is the projects that have hacks and don't label them as such that you want to
> avoid like the plague. At least if people acknowledge their hacks and add comments to
> explain what they have done, why, etc, you have a chance of getting around to fixing
> them ... one day ...

Which is why the most fun you can have with your clothes on (unless you're really uptight about coding standards) is working on a piece of software you know will be terminal and never revved again.



AaronGiles
Galaxiwarrior
Reged: 09/21/03
Posts: 1343
Send PM


Re: lmao new [Re: R. Belmont]
#204116 - 10/15/09 04:52 AM


> Which is why the most fun you can have with your clothes on (unless you're really
> uptight about coding standards) is working on a piece of software you know will be
> terminal and never revved again.

== all non-MMO games...



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: lmao new [Re: AaronGiles]
#204153 - 10/15/09 04:22 PM


> > Which is why the most fun you can have with your clothes on (unless you're really
> > uptight about coding standards) is working on a piece of software you know will be
> > terminal and never revved again.
>
> == all non-MMO games...

Heh. Practically everything gets a sequel nowadays if it sells at all, and almost nobody starts from scratch in that case because Marketing wants it in stores a year or less after the first one. You definitely can't assume things won't come back to haunt you



GamesMaster
MAME Fan
Reged: 10/26/09
Posts: 12
Send PM


Re: lmao new [Re: AaronGiles]
#205072 - 10/26/09 05:39 AM


Can you emulate model 3 properly?



Heihachi_73
I am the Table!
Reged: 10/29/03
Posts: 1074
Loc: Melbourne, Australia
Send PM


Re: lmao new [Re: GamesMaster]
#205791 - 11/03/09 01:49 PM


> Can you emulate model 3 properly?

Can you get a clue? MAME doesn't port the games over just by adding them to the list of games.



Moose
Don't make me assume my ultimate form!
Reged: 05/03/04
Posts: 1483
Loc: Outback, Australia
Send PM


Re: Dirty Coding Tricks new [Re: Andrew]
#209246 - 12/23/09 06:14 AM


> http://www.gamasutra.com/view/feature/4111/dirty_coding_tricks.php

I was just going through some old articles and found this article and read it again. A really great read.

One company I used to work for had a guy I nicknamed "The Butcher" because he was so prone to taking beautiful, well designed code and adding nasty hacks to it (and without commenting them as hacks). He didn't mind me calling him this, in fact, he seemed to like it. Pretty soon, he started calling himself the "The Butcher" and the whole Dev team joined in as well. A nice guy, but he needed to stop for a few minutes and think of the best way to achieve something before diving in to coding nasty hacks.

In the comments below the above article, I especially love this comment:


  • The engine team at Gremlin used to keep a single glove in their office. When someone asked where it was, it was because they were about to type some really dirty code. It wasn't so much a case of not wanting to leave fingerprints as of not wanting to actually touch the dirtiest fixes.


I'm pretty sure The Butcher sure would have appreciated this as well, if we had a similar glove at our company back then ... We might as well have hung the glove near his desk, because he sure would be getting the most use out of it.



Moose


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 21 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 5910