Categories
Uncategorized

Wait on Windows Vista

I got a laptop with Windows Vista last week. It wasn’t by choice, that was the only option offered. I got the laptop so I would be able to present my game to publishers in-person.

The first problem was that Visual Studio 2005 is not compatible, and simply won’t run. I downloaded Visual Studio 2008 Express. It wouldn’t install either, crashing during the install of the .net framework 3.5. I’m not sure why this is required, as I don’t use the .net framework, but at that point I was out of options.

I formatted the harddrive with XP instead. The problem now was that HP, the manufacturer of the laptop, doesn’t release video card drivers for my 128MB NVIDIA GeForce 8400M GS for XP. The Vista drivers won’t install. So I’m stuck with <1 FPS even for browsing the web with Firefox, and I’m sure my game won’t work either.

I put a clean install of Vista again and am going to try to install the .net framework again. If it doesn’t work I’m formatting it entirely and putting Ubuntu on it instead.

Even if Vista works I’m not happy about it because of the DRM.

http://www.theregister.co.uk/2006/12/27/windows_drm_monstered/
http://www.techweb.com/wire/software/167101037

Another thing is Vista is closed source and the current goverment does not have much respect for civil liberties. I would not be surprised if there were backdoors in Vista allowing the goverment to spy and intrude on people. Until Ron Paul gets elected, I would rather stick to open source.

Categories
Game Development

D3DX Math functions very fast

I ran across this
http://cache-www.intel.com/cd/00/00/01/76/17699_code_zohar.pdf which is a math library using SSE2 to do fast math operations. I spent a lot of time upgrading his code to be more suitable to games, such as doing a transpose for an inverse of a orthonormal matrix. But after profiling I found his code was slower than the equivalent D3DX math functions, even for matrix multiply.

D3DXMatrixMultiply 10000000 times:
diffGP=564 milliseconds diffDX=396 milliseconds

Bleh.

I also tried this: http://www.cs.nmsu.edu/CSWS/techRpt/2003-003.ps

It appears that D3DX already does better than this as well:
Theirs=695 milliseconds Mine=801 milliseconds

However, the version without scaling was 100 milliseconds faster. However, that is such a special case it’s not worth leaving in.

So Kudos to Direct3D because their math functions are very fast!

By the way, this is something I was able to figure out while experimenting. In every library I’ve ever used, except the one at The Collective, this was very unclear. I think they used to always store the matrices transposed to make them easier to use or something.

[code]
inline D3DXVECTOR3 * GetAtVec(D3DXVECTOR3 *out, D3DXMATRIX *in)
{
out->x=in->_13;
out->y=in->_23;
out->z=in->_33;
return out;
}
inline D3DXVECTOR3 * GetUpVec(D3DXVECTOR3 *out, D3DXMATRIX *in)
{
out->x=in->_12;
out->y=in->_22;
out->z=in->_23;
return out;
}
inline D3DXVECTOR3 * GetRightVec(D3DXVECTOR3 *out, D3DXMATRIX *in)
{
out->x=in->_11;
out->y=in->_21;
out->z=in->_31;
return out;
}
inline D3DXVECTOR3 GetAtVec(D3DXMATRIX *in)
{
return D3DXVECTOR3(in->_13,in->_23,in->_33);
}
inline D3DXVECTOR3 GetUpVec(D3DXMATRIX *in)
{
return D3DXVECTOR3(in->_12,in->_22,in->_23);
}
inline D3DXVECTOR3 GetRightVec(D3DXMATRIX *in)
{
return D3DXVECTOR3(in->_11,in->_21,in->_31);
}
[/code]

Categories
Game Development

Smart Pointer System

I’ve taken a liking to smart pointers lately. The overhead is negligible and it’s vastly easier than having to keep track of pointers all over the place.

I read a bit about the std smart pointer. I don’t understand why the articles on smart pointers are so long or complicated, or why the boost library made a smart pointer. To me this seems the easiest thing in the world. Perhaps I don’t understand all the issues involved?

Smart Object

Smart Pointer

To use it, just derive your class from RakSmartObj. When instantiating your class, assign the pointer to an instance of RakSmartPtr. When all instances of RakSmartPtr are deleted or assigned to 0, then the class instance is automatically deleted.

Categories
Uncategorized

Thinking about Rak3D

RakNet is nearing completion. About the only thing it doesn’t have is a cross-platform lobby system. I’m not really equipped for consistent cross-platform development, but I think this will be a good next feature.

After that I’m considering writing Rak3D, an easy to use 3d graphics engine in the same spirit as RakNet. There’s a lot of graphics engines out there already, but as I’ve seen they are all deficient in at least one of these 3 ways:

1. Too low level such that unless you are a graphics programmer already you won’t be able to exploit the best features
2. Lacking in integrated tools, or the tools already there suck
3. Slow

The best designed of the ones I’ve used is http://irrlicht.sourceforge.net/, in many ways it reminds me of RakNet, though it lacks the features of Ogre 3D.

The goal of my 3d engine would be

1. To better learn graphics programming myself
2. To provide all the common ancillary features people need (GUI, exporter integration with built-in scene view, animation sequence tool, debug output, predefined shaders)
3. To be easy to use such that you really don’t have to be a graphics programmer to get nice scenes.
4. To perform complex operations and optimize them internally, relieving the user of this burden.

I would do this with two layers. The first layer would be more low level and an analogue to the 3D engines already out there. The second layer would make decisions as of a necessity, using the first layer for this, and is intended to be what most people would use, with the first layer as a backup.

Categories
Game Development

RakNet in Develop Magazine

Alan Lawrance pointed out to me that Develop Magazine had an article on networking middleware and listed RakNet. Here is a screenshot.

RakNet article

He also sent me the article. Right click to save as.

They spelled the name wrong, and didn’t mention that RakNet also supports the Mac and Linux. They also put that the license is $5000, while actually that is the site-license, and the regular licenses are as low as $100. There are also quite a few companies using RakNet that aren’t listed on the front page.

In other news, Auran is using RakNet for Battlestar Galactica too, which just came out on the XBOX 360.

Categories
Game Development

Gamebryo

I’ve been using Gamebryo lately and the more I use it the more I like it. What I like the most is the toolset. Yesterday I was able to create an object in MAX that had 3 different textures with the default shader and apply an animation. I was then able to directly export this into the level editor, see the animation, and add a sound property. From there I was able to load the file into the game and with some debugging to see my object move around.

The equivalent in my engine right now would have been a monumental task, involving material files, adding programming for the sound and animation, and study of the code to figure out how to get the animation in the right place and to update over time.

The more I use it the more I realize the art problem with my own game was that I lacked the artist support tools that they provide

1. Level editor, with support for custom properties
2. Editing/viewing shader properties by artists in MAX
3. MAX previewer using the game renderer
4. Direct import of levels
5. Direct support for .fx shaders

If I had these things from the beginning I would have saved months that I otherwise wasted redoing art assets and the levels would have looked 10X better. Plus it would have been supported on the consoles.

Support is also very good. I get answers the same or the next day and the technicians are helpful.

My only major complaint is the documentation is incomplete. Yesterday, I spent 3 hours trying to figure out how to load their level asset format and then get the scene node root pointer. It took me 2 days to figure out how to load a custom shader, again mostly debugging. The documentation tells you part of what you need to know, with undocumented preconditions, or references to other systems. In those cases you have to debug the samples and source which is very time consuming.

Ogre is very good about this, where I generally can program from the documentation and didn’t have to build the source until late in the project.

What’s ironic is had I known about Gamebryo at the start of my project I wouldn’t have licensed it. The licensing fee would have scared me away, and if it didn’t, I still wouldn’t have used it. I would have looked at Ogre’s documentation and whatever I want to do would be very clear, vs. days of debugging in Gamebryo, assuming I had the source.

However…

Knowing what I do now, at the end of this project, I would have licensed it. I spent more than the licensing fee in wasted money on artists, redoing art myself, and setting up hard to use tools.

If I manage to find a publisher I’m probably just going to restart the project and use Gamebryo. Especially now that I’ve already been learning it.

Categories
Game Development

Looking for an on-site artist

After seeing what one artist can do in Mount and Blade I realize I wasn’t getting my money’s worth from my existing outsourcing art team. Several times recently at my job I will look at what other artists can do at my contracting job and say “Wow, one artist did all that?”

What really was the last straw was when they sent me this, as a carrier interior

Carrier Mess

It’s just a tremendous ugly mess. And I look at what they did up close and you see this:

Carrier Mess 2

So they spent a huge amount of time modeling control panels right down to the lights, when you actually play the game with the camera about half a kilometer away (as in the first screenshot). I’m about the least competent artist there is but even I understand if you are looking at objects from half a kilometer away maybe you shouldn’t spend time modeling buttons you don’t even see. They’ve been playing the game for 3 months too, so I’m dumbfounded on how this wasn’t obvious.

This has been going on from day 1, which is why it took them 7 months to do essentially half the work they were contracted to do in 4 months. It’s not that they can’t do a good job, it’s that you can’t leave any detail unspecified.

I give up. I’m going to find someone preferably local to salvage the situation.

Categories
Game Development

Contracting + publishing

As Galactic Melee is truly out of money I don’t have time to develop it significantly anymore. I’ve gone back to contracting and have taken 2 full-time contracts. Since I’m now used to working 100 hours a week anyway this is actually a reduction in how much I work a week. The contracts both pay fairly but I’m not making that much because the money still goes towards repaying ongoing or past costs on Galactic Melee development.

On the positive side, one of the clients is a large publisher with both the potential funds and the genre interest to pick up Galactic Melee. Upper management has already expressed interest in looking at the game. Of course there’s a huge difference between a manager verbally asking to look at the game, and actually having the company publish it, but working with and knowing upper management on a regular basis gives me a boost over any other random developer. It’s still a long-shot, maybe 1 in 100 chance, but if it works the game would be published on a console as well as the PC.

Categories
Game Development

Dungeon Crawl

I was playing Dungeon Crawl and it’s this incredibly fun game with a huge learning curve and bad graphics, yet I was addicted. I’m thinking I should have taken this approach with Galactic Melee. I could have did the game for 1/10th the cost and 1/4 the time.

Categories
Game Development

Invested vs. paid

A chat with my friend Bill today.


Kevin: By the way, I found a really fun game called Mount and Blade
Also programmed by one dude, with one artist

Bill: nice… free?

Kevin: Sort of pisses me off cause he has about a dozen models, characters, and weapons and my larger more expensive art team takes like a month just for 4 fighters.

Bill: haha… well, that’s the difference between an artist who is invested and one who’s just getting paid

Kevin: You’re so right about the guy who is invested thing
They should make a new word for right just to describe how right you are