Pages

Tuesday, November 22, 2011

Doom 3 id Tech 4 Game Engine Source Code Released

It is awesome to see the Doom 3 id Tech 4 Game Engine source code released and available at https://github.com/TTimo/doomhttp://www.blogger.com/img/blank.gif3.gpl. This does not include the Doom 3 assets, but is awesome to see all the code on GitHub.

Looking at the source code, a few similarities show up with other engines.

Curl for HTTP requests (common in a few engines).
OpenAL for audio (nice to see, also fairly common).
Ogg Vorbis format for sounds (used in a few places).
DirectX SDK requirement (for Windows).
JPEG (version 6) for images.

Some other notes at a glance:

Custom UI code.
MayaImport tools.
Tools for dialogs, material editors, particles and more.

It is awesome to see this, and many thanks to John Carmack and the id Tech team for sharing. I will definitely be looking at this further and will be anxious to see what the gaming community mods and comes up with, using this code.

I will be certain to be reading more of the code which looks in general to be of quite a high quality. There are not a lot of comments (which would be nice to have) but overall the functions and classes are clearely named and look to be a pleasure to read. Also, in a number of the external libraries are the custom documentaion, like Curl, OpenAL etc. so that is nice to see how those APIs are being used, and what else can be extended.

Lots of fun, I have been busy recently, but will certainly have to devote some time to this.

Cheers,
Michael Hubbard
http://michaelhubbard.ca

Saturday, November 12, 2011

Adobe not supporting Flash on Android and mobile devices.

It is always interesting to see how some of the larger companies move. In this article http://www.businessinsider.com/adobe-engineer-heres-why-we-killed-flash-for-mobile-2011-11 it shows that Adobe is not going to focus on supporting Flash for mobile devices. This was a hot topic between Apple and Adobe, with the iPhone not supporting Flash, but it looks like Adobe is deciding to agree.

With things like Googles Swiffy http://www.google.com/doubleclick/studio/swiffy/ which converts SWF to HTML5, it is good to see Adobe is jumping onto that and not letting Google runaway with what is still (I believe) their proprietary format. While I have not spent a lot of time working with Flash, it is still interesting to think that HTML5 will be an exact replacement for it. I think when people suggest this, they are looking at the end product, rather then the tool that Flash is (a timeline, with various tweens, staging etc). HTML5 may be able to do everything that Flash does (in terms of visuals), but the tools to create the content is what made people adopt Flash over something else (like Java Applets, or Javascript and animated .gifs).

I think Flash will still be around in some form, maybe it will create HTML5 instead of swfs, or maybe it will generate something else... time will tell if something can fill that 2D content that is relatively fast to implement on the web, but I am sure both Adobe, Google, Apple (and Microsoft) will all be playing close attention.

I am sure by the iPhone 6 there will still be something else important that separates the mobile devices :P

Cheers,
Michael Hubbard
http://michaelhubbard.ca

Saturday, November 5, 2011

Book Review: Head First Design Patterns

Head First Design Patterns by Eric and Elisabeth Freeman is a fun read. I always was curious about what kind of content some of these books by O'Reilly that seemed so different would be like (lots of pictures, jokes, crossword puzzles etc.) but it turned out to be both entertaining and informative. The book really does try to tackle a number of important issues, and doing an "arm chair discussion" where two design patterns talk (and argue) about their differences, is both funny and some of the most useful insights into distinguishing patterns I have seen.

The Freemans really do create a useful intro to design patterns, with a number of entertaining examples that will make you enjoy reading each page, and is certainly a breath of fresh air for anyone used to very academic and "serious" books. I felt the content was great, and the format was excellent for an introduction book.

While I don't normally go for books based on Java, this was more of a theory book, and while the source code examples are in Java, it should not be difficult for anyone to follow along (outside of maybe some of the Remote Proxy examples which leverage Java's Remote Method Invocation).

The main patterns covered include: Strategy, Observer, Decorator, Factory, Singleton, Command, Adapter, Facade, Template, Iterator, Composite, State, Proxy and Compound Patterns. There is also an appendix that contains a number of other patterns. I would have prefered to have seen a chapter on Flyweight or Builder instead of Singleton, but whether or not Singleton is an Anti-Pattern is still up for debate.

One of the most interesting approaches in the book is to break apart a Model-View-Controller paradigm into separate patterns. The Model becomes and Observer pattern (allowing state information to be passed back to the View or the Controller (allowing it to be independent of the View and Controller). The View becomes a Composite (likely a collection of widgets or something similar). The Controller implements the Strategy pattern, which configures the View with a strategy and changes the state of the Model as necessary. This explanation fits well (especially the Model using an Observer) which I think is one of the nicest ways to implement the MVC design.

While I have read a few books on Design Patterns already, I think as an intro, unless you are looking for a specific language implementation or the original Design Patterns book by the Group of Four, I think this is a good intro and an overall fun read.

Bye for now,
Michael Hubbard
http://michaelhubbard.ca

Thursday, November 3, 2011

Character Creation: How Much Customization?

In the new game trailer for Soul Calibur 5 http://www.gametrailers.com/video/character-creation-trailer/723519 they show the awesome character customization ability. This is quite well done, and while not exactly the same as something like Spore, where appendages and weight changes, it is nevertheless still quite impressive.

While it is amazing technological work for a two player game, currently this type of extreme customization wouldn't work in an MMORPG. Not to say you couldn't have customization in an MMORPG, it happens all the time, but even then 100s or 1000s of characters in a town would likely bring even the best gaming computers to a crawl as every texture and separate geometry tried to get rendered. Sure, there are tricks that can be done (different level of detail, texture resoultion sizes, combining as many pieces into a single draw call, replacing similar pieces into one piece, etc.) most of these however have the distinct chance of making all the other characters look similar and simplified (which is not what extreme customization is about).

There will likely be a time when every character, tree, rock, brick, stone and even blade of grass is unique, but until then, one of the main problems I have seen with game designers (and developers) going down the customization path is knowing where to draw the line. It is very important (crucial) to establish how much customization can be allowed by the player and whether it can be supported. If you want to go the Second Life route, you will have to make sure the engine was designed with that specifically in mind. If you find yourself worrying about how to render each character's belts, earrings, shoelaces, cufflinks, ties and shirt pins you have likely gone too far (perhaps even off the deep end).

Computer games (and graphics) are mostly a series of tricks, but you would need a whopper to trick the graphics card and cpu into rendering outrageous customizations in an MMORPG without it running like a screen saver. Still, the Soul Calibur customization sure is pretty, and it will only be a matter of time before someone tries to do that with 100s of characters (hopefully the computers in the future will be that much better).

Best of luck,
Michael Hubbard
http://michaelhubbard.ca