Archive

Posts Tagged ‘Game Programming’

Managed DirectX 2.0

December 14th, 2005 Comments off

After spending far to long engineering the Inspire engine and just playing with 2D I decided I needed to get back to more interesting things and thus have put the Inspire engine on the backburner for a while. I’ve decided that I needed a refresher on Direct 3D as its been almost 2 years since I first learnt it so have started reading Managed DirectX 9 Kick Start by Tom Miller. It’s a good book though unfortunately it is getting slightly out of date.

Today Microsoft released the December 2005 DirectX SDK; among the many exciting additions is a new version of Managed DirectX (MDX) 2.0 that is supported by VS 2005 and the free (until late next year) Express Editions. This evening I decided to update all the examples I have created whilst going through Tom Millers book. Below is a more comprehensive list of changes thanks to ZBuffer, however first of all I will go through some things that tripped me up.

  • MDX 2.0 is now in just one assembly as opposed to the 8 seperate assemblies.
  • MDX 2.0 is a bit pickier about Resource disposal, ensure you dispose devices, vertex buffers, textures etc or your application will not shut down correctly.
  • You now set the data in buffers by locking it and modifying the returned Graphics Buffer instead of using the SetData method.

ZBuffer’s Article Series on MDX 2.0

Hopefully by the end of next weekend I’ll have had a chance to go through and comment all the samples I have created to date and then I shall put them up to help other people with the Transition.

I also have a C# version of XInput that I will put up, whilst XInput is now included in MDX 2.0 it is only available to .NET 2.0 (whereas mine will work with either) and not particularly Object Oriented (which mine is). Also I don’t want the 2 days I spent playing with it to be a complete waste.

Depth of Field, Motion Blur and Filters

December 10th, 2005 Comments off

There’s an interesting article over at bit-tech discussing the new effect Valve are adding to the source engine to make games feel more cinematic. They recently added High Dynamic Range (HDR for short) Rendering support and are show-casing it in the recently released Day of Defeat and new Counter-Strike levels.

Motion Blur

Motion Blur

The article discusses (with the aid of some very nice screenshots and videos) how they have added Depth of Field and Motion Blur effects, and also Film Grain and Color Correction filters, to the source engine. The end effect makes for very impressive viewing however I doubt the usefullness of some of these techniques outside of cutscenes. The film grain used in the final movie looks great to watch but would get annoying very quickly in game and I fail to see how the depth of field would work in-game, how does the computer actually know what on the screen you are looking at?

I guess, just like HDR, that if the effects are used carefully they will improve the experience of single player games, I just hope HDR Bloom and Motion Blur don’t become the new lens-flare. However no matter how great these effects look if they impair a players skill in a multiplayer game they will be turned off by the hardcore players to give them a slight advantage.

OpenGL under Mono.Windows.Forms

September 23rd, 2005 Comments off

This morning on my way to work I was thinking about how I was going to integrate the OpenGL Renderer into Inspire under Linux (yeah walking to work without my iPod is boring). For everything else so far I have used winforms and I would really like to keep it that way.

And as if by magic! Jonathon Chambers wrote an excellent blog entry yesterday on how to get OpenGL working under Mono’s WinForms implementation. Once I’ve reinstalled grub on my booting hard drive I’ll have to boot into linux and give it a try. I’ll hopefully get a chance this weekend but who knows… life has been rather hectic recently.

One of the reasons I haven’t had much time to work on Inspire is that I’ve been working on the Content Mangement System for this website. The backend now uses the excellant xinha, a wysiwyg html(link) editor and has full support for editing news, articles, menu layout and images. From the visitors side the most noticable change is the new comments system. This will soon be upgraded to use xinha as well once I’ve had a chance to lock the editor down a bit to stop malicious people breaking things.

This isn’t the only website that uses my Content Management System, apart from the (under development) Inspire website, Saving the World and Other Stories also uses it. This is a website run by a friend of mine and contains his film reviews and any political or existential rants. It’s been useful having a non computer person to test my CMS to find all the bugs and help me improve the user interface.

Start of Summer

May 25th, 2005 Comments off

It’s supposed to be the end of Spring and the start of summer… Seems to be raining more than it’s sunny at the moment. Had a day off work on Monday as I had a Chest Infection (or something like that). I haven’t completely recovered yet so I am getting very little sleep and look half dead in the mornings.

Done some more work on Inspire, managed to refactor the renderer section and its a lot neater now. I’ve also started work on the input section and have pointing devices working fine and have done most of the work for keyboards. Once I have these two parts working I can get back to the Windowing Toolkit and get some actual interaction with it working.

I’ve also completed the design for the Inspire Website, though I wont be releasing that until I have some decent screen shots and perhaps the first game. I’ve also fixed a bug which had me stuck with the Inspire Studio project. This means I can get some work done on that.

I’m planning on taking a couple of days off at the beginning of June to do some major work on Inspire. As I’ve spent quite a while working on it I’m gonna try and complete a simple game with it as something for people to download. It’ll probably be either a tetris or pacman style game.

One final thing, if you haven’t come across it yet you should really check out Reiner’s Tilesets they’re brilliant whilst also being cost and royalty free!

DirectX 9.0 SDK Update (April 2005) Released

April 20th, 2005 Comments off

With their new update schedule (that almost matches the update schedule of this site) Microsoft have released the April 2005 update to the DirectX 9.0 SDK. This version includes improvements in the following areas…

  • UVAtlas API – API to generate a unique UV texture mapping for an aritary mesh.
  • Reduced memory footprint for D3DX effects files with new flag D3DXFX_NOT_CLONEABLE
  • DXSetup documentation updated
  • DirectX GUI is now seperated from the core framework and thus optional
  • Updates to PIX tools

The updated SDK can be downloaded from http://msdn.microsoft.com/directx/

Personal Update

April 11th, 2005 Comments off

The last month at work has been pretty hectic and it concluded with two visits to Nijmegen in The Netherlands. The first was for almost 2 weeks and was over the Easter Bank Holiday Weekend whilst the second was a rather tiring single day trip.

Nijmegen is a lovely town, a reasonable size to explore on foot and lots of interesting back alleys to explore. Caroline flew out to stay with me for the Bank Holiday weekend and we did more exploring and took a day trip to Amsterdam. While Amsterdam got nicer the further from the center you got, Nijmegen is a lot nicer city. No where near as touristy.

Haven’t had much time to work on the Inspire Engine though I have splitted the Inspire Tools into a seperate section entitled Inspire Studio. This will ultimately contain editors for Sprites, 2D and 3D maps and the Resource Files. The Renderer section of Inspire requires a small re-design to make it more adaptable and for it to interface correctly with the Input section.

Inspire Progress

February 17th, 2005 Comments off

After about 2 months of beating my head against a brick wall I have finally had a break through with drawing Sprites and Fonts using Managed DirectX. That means the 2D side of my graphics engine is now feature complete. I’m going to make sure I post the solution under my DirectX Tips section as it had me stuck for ages.

Now that I have completed my 2D graphics engine I have started work on porting my Windowing Toolkit from C++ to C#. As a lot of the base code is already written this seems to be going quite quickly, we’ll see how long that lasts for though…

Once I’ve got some examples of the Toolkit completed I’ll finally get round to updating the Inspire Project page with information about the different sections of the engine and some screen shots.

New DirectX SDK

February 11th, 2005 Comments off

Microsoft’s DirectX team has released the February 2005 version of the DirectX 9 SDK. Changes in this version include…

  • Windows 2000 no longer supported
  • Enhancements to PIX
  • D3DX is now a dynamically linked Library rather than static
  • D3DX Maths Library is now optimised for 64 bit processors

It can be downloaded at the MSDN DirectX Page, a word of warning though, Microsoft’s Download Page is now requiring Validation of your version of Windows before you can download. This requires installation of an ActiveX plugin (so no downloading in Firefox or Opera) and you entering your CD Key.

EA Games Work Practices

November 16th, 2004 Comments off

Some interesting articles have appeared on the web regarding work practices at EA (Electronic Arts) Games. It’s an accepted practice in the computer games industry that at the end of projects people work extra hours in order to get the product out of the door. It seems that EA is having these ‘crunch’ times all the time.

The first article is from a disgruntled spouse of an EA employee (who goes under the name ea_spouse, to protect her husband) and can be found here. Here is an excerpt:

Now, it seems, is the “real” crunch, the one that the producers of this title so wisely prepared their team for by running them into the ground ahead of time. The current mandatory hours are 9am to 10pm — seven days a week — with the occasional Saturday evening off for good behavior (at 6:30pm). This averages out to an eighty-five hour work week.

The second article is a posting from an ex-EA employee who after reading the previous journal entry decided to post his story. It can be found here. Here is an excerpt:

It was a suprise — I did what they asked, and was yelled at for it. I was “supposed” to have completed every little thing extra. And, both the HR guy and my supervisor lied that that was what had been discussed at the last meeting. I couldn’t believe the bold faced lie, so I capitulated saying that I must’ve misunderstood and apologized.

Due to these article it appears that EA is now facing a class-action law suite. Hopefully this can stamp out these sweat shop style work practices.

Makes me glad I didn’t go into the Computer Game Industry.