Resurrected Entertainment

Black Art of 3D Game Programming

September 20, 2009 12:13 am

Black Art of 3D Game Programming So you're an aspiring game writer, now what are you going to do about it? You could get a job as a summer intern at a local game company and work for free doing all sorts of tedious tasks no one else wants to do. Or you could hit eBay and do yourself a huge favor and find this text. Before you write back about the publication date, yes it was published in 1995. No, it does not talk about OpenGL or DirectX. Phew, now that we have that out of the way, let's talk about what this book can teach you.

This book's greatest strength is how it dabbles in a number of good topics without being totally useless. A number of texts provide a lot of information about too many topics, while not providing enough material to do something fun or useful. That exercise is often left to the reader. Ha! A book like that in my house will pay a little visit to the recycling bin or get banished to the library, never to be read again. Other books tend to steam roll over you with too much theory of the mathematical kind. While I'm all for roots and quadratics, aspiring young programmers wanting the enter the field of game development shouldn't necessarily want to go whole hog on their first book.

That being said, they will need some basic skills to get started, and matrix math is a fundamental skill for playing around in 3D. Fortunately for the junior programmer, it's not the most difficult skill to learn. One of the black arts the book teaches you is how to master 2D and 3D transformations using matrix algebra. It doesn't go into quaternions for gimble-lock free rotations, but since the reader is probably just starting out, it doesn't really matter either. They will be able to make do without all of the fancy topics getting in the way of actually learning something useful.

The book does show its age in some chapters where the topic of conversation is how to take control of various video modes, but I think it's still a worth while read. You can still do this kind of programming if your recreational operating system of choice is FreeDOS or some other version of DOS, even on a modern PC. You could even use Windows 95 or 98 for that matter, just get it to boot using the version of DOS which ships with all of that GUI crap. Trust me, you'll be better off in the long run, plus you can wow your friends with your amazing latch register skillz.

Once Upon Atari…

September 13, 2009 10:41 am

I recently watched a documentary series produced and distributed by Scott West Productions. It is hosted by Howard Scott Warshaw, who is perhaps best known for the game Yars Revenge. The content of the DVD is a series of interviews with a few of the major players at Atari during the golden years. Most of the discussions centered around the popular talent, work environment, their rather low opinion of marketing, burn out, and a number of other typical questions they probably get asked numerous times per year. It's an enjoyable series and one which should not be missed by fans.

Interviewees: Carla Meninsky, Jum Huether, Nolan Bushnell, Tod Frye, George Kiss, Jerome Domurat, Rob Fulop, Larry Kaplan, Bob Polaro, Alan Murphy, Eric Manghise, Rob Zdybel, Suki Lee, and Dave Staugas.

Zen of Graphics Programming (2nd Edition)

September 11, 2009 11:49 pm

Zen of Graphics ProgrammingThere are certain books on my shelf which I will never give up. I donate many to the library but some have a staying power I don't often see and tend to covet when I do. Michael Abrash's aforementioned text is one of those books. It's  a technical book cover to cover, there are a lot of hairy details which are fun to read about and you would be hard pressed to find code listings your mother could understand (unless she too is a programmer, lucky you!).

The book was written in 1996  for a whopping retail price of $62.99 (CAN). That was a lot of money for a young man who was entering his second year of university. Like many people, I bought the book during a time when browsing the table of contents on the Internet was simply not an option. Most of the time, I couldn't even look inside a physical copy because my book store simply didn't stock the books I was interested in buying. I often needed to special order these texts using a behind the scenes method, that is, if I was lucky enough to find a distributor in their corporate directory. I fondly remember spelling out the book titles carefully since the nice women working behind the counter didn't have a clue what I was talking about. Most of the time they must have thought I was speaking a foreign tounge because they would often ask me to repeat it, or reply seconds later with a vaguely stunned expression.

What I needed to rely on, was the opinions and recommendations of graphics and games programmers who posted comments through various Usenet news groups, BBS systems, and the very rare in face to face conversations. This particular book was published by The Coriolis Group and featured a wealth of information on programming computer graphics using an Intel microprocessor and a video card sporting multiple video modes, including compatibility with the elusive and fabled Mode X.

Being a book on graphics programming in 1990's, it centers around producing efficient drawing code. It tackles the more basic primitives and how to decompose the traditional rendering algorithms into something which could execute very quickly, and then review that optimized code progressively to try and squeeze out even more cycles from your overworked CPU. One of the best features of the book, is that it's mostly a book on algorithmic optimization, instead of code optimization, which is why it has staying power even today. For those interested in the past-time of code reduction, the author has written another book called The Zen of Assembly Language which is freely available as a digital download (or was the last time I looked).

Three dimensional computer graphics was a popular topic at the time and still is to this day, although advances in this area of computer science have rendered (pun intended) some of the earlier topics almost obsolete. Of interest to those studying the rendering pipelines used by classic games like Doom and Quake are topics around the interpretation and optimization of BSP trees. BSP is a fancy acronym standing for Binary Space Partitions, which is another fancy way of describing how to carve up space into optimal chunks, and then placing those chunks into a data structure like a binary tree. The reason Doom ran as fast as it did was not because the developers wrote some of their modules in assembly language, it was because the BSP compilers produced an optimally pruned set of data. Less data to process, meant more cycles to render those beautiful walls, ceilings and stairs we have all come to love and adore.

I find this book to be especially useful, however, when you need to return to the fundamentals. With the advent of small, portable devices, programmers working on these products have needed to return to their roots, or if they are new in the industry, to open their minds and think about the construction of 2D & 3D engines in a way they never thought of before. Most of the engines used by nubile programmers entering the field of computer graphics will be wrappers around this functionality; abstracting the core mechanics and shielding the developer from the tedious and structural bits of the engine.

Indeed, this is probably for the best, most of the time, if productivity is what your company needs. It never hurts to return to your roots every now and then, and let your mind flourish in an area rarely experienced by most technical professionals.

Xbox 360 DvD Drive Woes

August 1, 2009 12:32 am

Our 360 optical drive is stuttering and causing the video playback to freeze sometimes. It doesn't always do it, but once it gets going, it won't stop. We always need to turn it off and hope for the best the next time we use it. It may be a dirty lens, since I have never cleaned it the entire time we have owned it (around 5 years). Does this sound like the problem? Has anyone ever tried to replace the drive?

How to fry Bacon on your Lap

June 28, 2009 3:15 pm

Here I am in an air conditioned house on a Sunday morning playing a nice game of Contra III on my Macbook Pro and I'm sweating. Why? Because my Macbook Pro runs only slightly cooler than the surface of the sun. Ok, that's an exageration, since the sun only run at 9800 degrees Fahrenheit, so my apologies to any astronmony group members out there who might have been offended.

I would love to know is if the new Macbook models (2009) run any cooler than the original Macbook Pro models sporting the Core 2 Duo 1.X GHz processors? Also, since I don't have the money to drop on a new Macbook right now, I would love to hear more information about a store which allows trade-ins of used Mac hardware in Canada. Any ideas?

Racing the Beam

May 16, 2009 1:22 pm
Racing the Beam

Racing the Beam

I just finished another great book the other day, entitled Racing the Beam: The Atari Video Computer System by Montfort and Bogost. It's an inside book about some the development challenges and solutions when writing games for the Atari VCS. This is a unique machine and is often considered one of the most difficult machines for a programmer to cut their teeth on. With 128 bytes of RAM and an average ROM size of 2, 4, or 8K, you must fight tooth and nail of every byte used by your software. What lengths do some programmers go to skimp and save on bytes? Ever thought about using the same byte for both an opcode and a piece of data? Ever thought about using the opcodes and operands found in the code segment of your program as data, which gets fed a pseudo-random number generator or to produce a rendering effect because you didn't have the spare space in ROM to place this stuff into the data segment? Well, neither did I until I read this text. Along with little gems like this, the book has a number of interesting tips and tricks into the how and why of software development for the Atari 2600.

The book centres itself around the idea of a platform, and how the constraints and peculiarities of a system can affect how a game is presented. Game adaptation, especially when you're trying to port software from one hardware architecture to another, is a very important topic when you're trying to maintain the look or feel of a game. Sometimes, neither is possible and you're forced to go your own road and come up with something completely different.

A word of caution, though. This book will not teach you how to write software for the 2600 system. It is not a technical reference by any means, nor does it advertise itself as one. However, I would heartily recommend this title to anyone thinking about producing a game for that system, or those of us with an inner geek needing to be satisfied.

I love the idea behind this series of "platform" books as I have often wished for such books to be written and have even contemplated writing one myself just to fill the void. One of the most useful parts of this book is the reference section which can lead you to all sorts of new and interesting articles, books, or projects. I do hope the next book contains a bit more technical detail while keeping thevarious bits of historical data and interesting character references which really helps to tie the why and the how of the topics together.

Street Fighter II: 3rd Strike

March 28, 2009 11:31 pm

Amazing video of "The Beast" vs. Justin Wong at California State Polytechnic University. It was during the EVO Championship Series fighting tournament in 2004. It's been a while since that contest, but anyone who has ever picked up a controller and played one of the Street Fighter games, or who was lucky enough to have a local arcade centre, should be able to recognize the skill involved in playing this game and others like it. I found a decent feed on YouTube.

Friday 13th Remake

February 22, 2009 2:03 am

Friday 13thSo, I went to see the 2009 version of Friday the 13th tonight. Before you think this is just going to be another remake, there are a few surprises in store for fans of the original, which can always add drama to any horror movie. It seems our leading villain has acquired a couple of new skills, while he has been toiling away at Crystal Lakes building and maintaining his electrical flood light system. Don't worry, I'm sure he probably took a couple of correspondence courses on electrical safety before he set up the small power grid.

In most of his movies, he'll usually make use of whatever tree stump or gardening tool happens to be lying around to take care of business, but most of the time he'll prefer to use his machete, since he seems to be relatively proficient with it and it adds a +2 bonus to his attack roll. Well, he has decided to spread those proficiency points across a couple of weapons. No longer is he stuck using a bladed weapon for all of his social calls. You can now add a bow and arrow to his list of effective artillery. Spoiler: He was able to target a young man driving a boat at high speed with one shot (I guess he could have missed a few off screen), although his skill may have been enhanced by the Cobalt Blue Carbon Bow of Deadly Yearning (+1) he was using. But I doubt it.

Do you remember how sluggish and zombie like his movements were in the originals? Well, maybe you should watch them again. Sheesh. Anyway, it seems he traded his boots in for some Reeboks (probably pumps) and is now able to run his quarry down at high speeds. Jason must have been a track and field all-star by the way he can move over rough terrain, and the film cements that fact with a couple of short trophy shots (just in case you found it hard to believe that a unstoppable killing machine couldn't shoot or run). The chase scenes do tend to lose some of the original build-up around a murder sequence, so you may want to watch them slow motion.

But don't let his new skills turn you off, the movie was still enjoyable, even if they were a little skimpy on the gratuitous nudity.

DOOM II: Let the obsession begin. Again.

December 23, 2008 2:23 pm

[Taken from the back of the box]

The wait is over. In your hot little hands, you hold the biggest, baddest Doom ever - DOOM II: Hell on Earth! This time, the entire forces of the netherworld have overrun Earth. To save her, you must descend into the stygian depths of Hell itself!

Battle mightier, nastier, deadlier demons and monsters. Use more powerful weapons. Survive more mind-blowing explosions and more of the bloodiest, fiercest, most awesome blastfest ever!

The 3-D modeling and texture bit-mapping technologies push the envelope out to the max. The graphics, animation, sound effects and gameplay are so virtually realistic, they're unbelievable!

Play DOOM II solo, with two people over a modem, or with up to four players over a LAN (supporting IPX protocol). No matter which way you choose, get ready for adrenaline-pumping, action-packed excitement that's sure to give your heart a real workout.

It must be tough to keep reading - what with your hands trembling in shear anticipation. So we'll stop talking now to let you take this box to the counter.

DOOM II. It's time to get obsessed again.

Computer Virus Research

December 21, 2008 4:22 pm

As part of being a well-rounded programmer, I dabble in all sorts of technical things. One of my areas of interest is computer virus research. In the last thirty years, I have witnessed a large number of changes to this industry, and I find myself compelled to write a little bit about it today after reading about a couple of courses offered at the University of Calgary.

As it exists today, computer virus defense is wide collection of software programs and support networks which are offered to companies and users for the sole purpose of protecting their data from loss, damage, or theft from a myriad of small computer programs called computer viruses. These programs must have the ability to replicate (either a copy of themselves or an enhanced version) and which often carry a payload. The means by which a computer virus can replicate are complicated and often involve details of the operating system. In addition to preventing virus outbreaks from occurring, anti-virus software is also used to help prevent service outages and ensure a general level of stability. In other words, they are selling security or at least one form of security, since security in general is a very large net which cannot be cast by only one program. As an aside note, please be aware of the tools you are using for anti-virus protection. With some research and a little education, it's often not necessary to purchase these programs in the first place.

I am currently reading Peter Szor's book entitled, The Art of Computer Virus Research and Defense (ISBN-10: 0321304543). I am almost finished the text and I have found the book to be incredibly informative; filled with illustrations and summaries for all sorts of computer virus deployment scenarios, technical information about individual strains, and historical pieces of information as to how the programs evolved and mistakes made by both researchers and virus writers.

Even though I have the skills and the opportunities to do so, I have never written a computer virus for the purposes of deployment, nor do I ever wish to do so, but I can tell you that writing an original computer virus is challenging work; writing a simple virus is easy. Isolating, debugging, and analyzing the virus is also interesting work, albeit somewhat more tedious. Both jobs require similar skill sets, detailed knowledge of and low level access to a specific system.

I used to posit that the best virus writers would be the people who have taken it upon themselves to write the anti-virus software. After all, the best way to ensure the success of a business built on computer virus defense is to construct viruses that can be easily and quickly disarmed by your software. Much to the disappointment of conspiracy theorists, this is probably not the case, since fellow researchers would easily link a pre-mature inoculation with a future virus outbreak if it happened too often to be mere coincidence. However, if your business was based on quick and successful virus resolutions, then timely outbreaks followed by timely cures would seem to solidify the business model. Personally, I think anti-virus researchers are kept busy enough with "naturally" occurring strains to necessitate a manual jump start of the industry. Although that could change as users and technology platforms become more advanced, although the more probably route is the disappearance of the anti-virus industry; we live in a messy world and there may be opportunities for those wanting to leave their mark, even in the face of futuristic technology gambits.

Computer virus writers are plagued, somewhat ironically, by numerous problems with deploying their masterpiece. A computer virus can be written generically so that it can spread to a wider variety of hosts, or it can be written for a specific environment, which can include requirements on the hardware or software being used. Dependencies on software libraries, operating system components, hardware drivers and even specific types of hard-disks are all liabilities and advantages for a virus. They are liabilities because dependencies limit the scope of infection so the virus spreads more slowly, but at the same time, they often enable the virus to replicate, since the virus may be using known vulnerabilities or opportunities within these pieces to deliver the payload or as as means to allow for it to spread.

Virus research, writing, and defense is a fascinating topic. Unfortunately, I find the pomposity, and to some degree the absurdity, in various branches of the industry to be laughable and a little scary at times. In case you haven't heard, the University of Calgary is offering a course on computer virus research. While I find this to be a refreshing take on education, my hopes are quickly dashed when I read the requirements and the Course Lab Layout (warning PDF monster). Do they think their students are secret agents working in a top secret laboratory? Of course they do, why else would there be security cameras installed in the room, and why do they restrict access to the course syllabus? Well, I've got news for the committee who approved the layout of the lab, and who probably approves the students who can attend the course: computer viruses are just pieces of software. That's right, they're just software. They don't have artificially intelligent brains, they can't get into your computer by the power lines, and they are quite a bit less complicated than your average word processor. This means that any programmer with the desire and a development environment can write a virus, trojan, or any other form of malware. They don't need to take your course and they don't need access to your Big Brother Lab.

The absurdity of protecting information which is already publicly available and has been for decades makes me want to laugh out loud and strangle someone at the same time. It's rather disturbing and I really don't like the idea of closing doors on knowledge, even if the attempt is futile. The University of Calgary's computer science department should be ashamed at perpetuating such ignorance within a learning institution, and I am truly disappointed how bureaucratic such systems have become.

Update 12-29-20008: To respond to a verbal conversation I had with a couple of people: I understand why the university placed the security restrictions in the program; they want to validate the program and make it appear legitimate to the community and their peers. That's fine, but at the same time, it must be acknowledged that the secret to mounting a successful defense against viral software and Internet based attacks is shared knowledge and open avenues for information. Understandably, this information will go both ways, but the virus writer will gain nothing they do not already possess (except the knowledge that we know what they are doing), while the general public may be a little more aware of the problem than they would be without this information.

Indeed, using viral kits and small customization programs can make viral programming easy for the layman or immature programmer, but we shouldn't be locking away information about these techniques or programming practices simply because the result is something undesirable or easy to dispense. There are real opportunities to learn and disseminate this knowledge today, and the bigger the audience, the larger the opportunities for successful anti-viral software and general consumer awareness which will combine to create the most effective vaccine of all: knowledge.