Thursday, December 3, 2009

DS space shooters

I've noticed that there have been very few space shooters, or shoot'em ups released on the Nintendo DS through out its lifetime. This puzzles me as it seems those types of games would do pretty well on a hand held. Sure there have been ports of R-Type, Space Invaders and the original NanoStray, but for the most part no game truly makes use of the controls and what the DS has to offer, at least not the way I see it.

While its secret that shooters have been around for decades now, their formula for game play rarely changes. Some are more hectic than others, some are more flashy, but few have done anything with the controls and how the game plays.

With the release of touch screen and other pointer devices I would have thought that people might have jumped at the occasion to take an old genre and give it a fresh spin. Move, aim, shoot: this has been at the forefront of my own shooter idea for the DS, and more recently the Wii.

While I know this control scheme isn't new and has in fact been done on the Xbox and PS3, it has been surprisingly absent from the Nintendo consoles. Maybe there is far less market for shooters on those consoles, but that kind of control scheme is far easier to pull off with touch screen and pointer devices.

Now that I've started diving more and more into C# and XNA I've taken the initiative to realize my dream of creating my DS shooter for the PC. If only a proof of concept, I fully intend to take this as far as I can in hopes that others will see the benefits of what an old genre can play like with new and innovative controls. Of course, new controls is not the only thing I have in store with that game. Do people remember Rez? How about other beat games? Think of that in a shooter, but not quite so beat driven.

Maybe it's my obsessional with audio / video synchronization, but I need to have some harmony and synchronicity with what I hear and see. Let the gameplay drive the audio, and let the audio design the gameplay.

Saturday, November 14, 2009

Convex tools

Been a while since I've made one of these, but there has been a lot of moving around town over the past couple of months. Now that things have settled down, I figure I would talk about something a bit more objective that I've been exposed to over the past couple of weeks.

Why is it that there are no good convex mesh generators for 3dsmax? Since almost every game engine out there uses convex collision meshes I would have thought that there would be at least some robust tool from many versions ago that works well enough is has now become an old defacto like Crazy Bump for normal maps. But there isn't anything like that, not that I found anyways.

Maybe a lot of the new game engines have started incorporating such a tool internally and creating whatever collision mesh they need straight from the imported asset, which is good. But what about all those engines that don't have that capability, or if they do, don't generate accurate enough results?

Necessity being the mother of all invention, I decided to write my own convex mesh generator based on the implementation seen in Unreal; a box sliced at 45 degree angles to fit the source object. The process from start to finish took roughly 4 days with a complete rewrite from scratch at one point.

The original implementation had me looking at all the verticies of the source object, finding the min and max XYZ, and then use that information to create a 26 polygon "sphere" around the object. The problem with this implementation is that it didn't always create a purely convex object and it wasn't all that tightly wrapped either. So I looked closer at what Unreal did and it seemed to me that the collision mesh was being cut only on 45 degree angles, and stopping when it hit the closest vert along any edge.

Ok, sounds simple enough: create a bounding box, bevel each edge at a 45 degree angle until it intersects a vertex, repeat for all edges until the object looks like some weird abstract art. Normally this would be a simple tast for an experienced programmer who has vast knowledge in 3d math and world space, etc. But for an artist working in 3dsmax with max script, the problem was a bit more complicated. Sure there were a lot of helpful functions available for figuring stuff out, but there wasn't anything like "vertex intersects plane" which is what I really needed.

I reused the code for generating that sphere and simplified it into a box, hence starting with the bounding box that I needed. Now that I had the box I was ready to slice it along all of it's edges at 45 degree angles. I placed my slicer objects in the middle of each edge and rotated so it faced 45 degrees out. But the problem remained of how to move the slicer to the closest vertex?

I could use a length or distance function to get the distance to the closest vertex, but because the origin was in the middle of the edge, I only had one point of reference, and usually the closest vertex wasn't the one closest to the middle of the edge. Sure I could subdivide the slicer and give me a lot more sample points, but that seemed like overkill, and not guaranteed to give the most accurate results. Maybe I could calculate the vector to each vertex and find the one with the lowest angle? Hmm, that could work. So I asked one of the render programmers about his thoughts, and he gave me the most ideal solution: find the distance from the plane to the vertex. Heh, well yes, of course. But how to do that?

Calculating the distance from a plane (considering it was infinite in size) to a point in space is a simple matter when it's aligned to on the major axis's. You simply move the sample point right under, or over, the point in question and calculate the distance. The problem with this is that it gets much more complex when the plane is rotated. So I was almost there, I just had math standing in my way :)

One of the things I had forgotten about max is that it allows you to select a different coordinate space! But would a different coordinate space always give me the necessary measurements in THAT coordinate space? Or would it still be all in the world coordinate space? Well, as it turns out, it did! Problem solved!

Finally I had my bounding box, I had my aligned slicers, and now the final piece of the puzzle was solved too. Since I was in the slicer's coordinate system, figuring out the distance to the closest vertex was a snap since now everything acted as though it was aligned to a major axis. With that out of the way, the slicers got moved in, the bounding box cut, and there we have it, a purely convex and simple mesh surrounding the arbitrary source object.

Now while the might seem like a very round about way to going about creating this convex mesh.. and not very quickly I might add, it works every time. Save for the rare instances when the boolean operation messes up and produces artifacts. But the principal is sound. Surprisingly I'm not sure how I could optimize this script other than maybe use a function for a couple repetitive calculations. It makes me appreciate just how slow scripting languages can be compared to compiled, and even interpreted languages. But it also gives me a great satisfaction to know I've just created a script that can save hours, maybe days of manual work for artists all around the industry. And I've proven to myself that stuff like this can be taken on by artists too, not just programmers :)

If you're interested in check the script out, visit my website (www.renalicious.com) and see the Tools Portfolio section for the max tools.

Monday, August 24, 2009

Leave it to the imagination

Having been around as a gamer for many years now, I have played and seen many different types of games, and it's no surprise that with the advancement of technology come the advancement of visual fidelity. Playing a game like Crysis I am sometimes awestruck by the near photo realistic renditions of a virtual world. And other times I feel as though someone has missed the mark with trying to emulate how the world looks.

What is it about photo realism that we as artists and developers find so interesting? Is it because we want to create a new world while retaining all the qualities of the one we live in? If that's the case, would the location have the same sort of impact if it was set on the surface of Titan, or Venus? Two areas that are covered by thick clouds, dimly lit, and a landscape that is unlike anything we've seen.

Maybe it's because I've been involved with making games for so long, but I can't help starting to feel that the better the visuals, the more we're being spoon fed all the information, leaving little to the imagination. Maybe its why, as with my previous post, canned scenes are as intriguing as they provide mystery and only fragments of information. There is no denying that old first person shooters such as Unreal, Half-Life, SIN, System Shock 2, and look pretty dated these days, and with their simplicity the player really has to fill in the blanks themselves, for better or worse. But back in those days in the mind's eye those games looked just as good as Crysis looks now, except they had a lot more atmosphere.

Unreal 1, for example, was a game that really pushed the visual limits in 1998, and I was blown away by the fact that I was now playing in huge outdoor areas, and seeing structures like the sun spire that I had never seen before. It truly was an alien world, even though it was made up of city block sized flat planes :) But what I remember most is the progression of time from level to level, and the sounds and music. The fact that it felt like an adventure across an uncharted alien world, it truly was, Unreal. What else was there to explore? How did this area come to be?

Other games such as SIN also had very unique level locations, but the atmosphere and the sounds made it come to life, despite it looking very primitive. But again, it too took the player on an adventure through the world.

And the two games that probably give me the fondest of memories are System Shock 2 and Deus Ex. The two games where visuals were sorely lacking (Even when they were released), but I would play them again and again and again. What did those games have that modern games don't? Even Bio Shock doesn't hit home as well as System Shock did. Deus Ex 2? Good, but not quite there. Unreal 2? Hmm, I'd have to give it a separate article!

In System Shock I remember the sounds; walking through the corridors of a dying ship with an ever present rumble, alone in space. And when the rumble wasn't there it was an echoy wind noise, or a groaning of a giant organic being. Something was always there even though I could not see it. Add to all that faint whispers from pipe wielding mutants walking around, talking to themselves. Was it a voice that I heard? Or was it just my imagination… eep! Are those footsteps coming towards me? Or are they leaving? Maybe if I hide in this corner it will all go away!

Deus Ex, while being grounded on earth, was completely different than SS2, but still left its mark like a brick in the face. At the time it didn’t run all that well, the AI was kind of silly, and all textures were 256x256 max, thanks to 3dfx's limitations. But I was so drawn into the world that it didn’t matter, I just wanted to explore and figure out the best way to get past those guards or those turrets without being spotted. Would someone really NOT have noticed a vent shaft leading from the outside directly into the top secret lab? Probably not! But with low fidelity visuals, everything took on a characterization of the real world, and the mind took care of the rest. It really did allow me to personalize the experience I was given.

There are more games that I found just as exciting that I didn’t mention here, even older SNES and genesis games. But this article focuses more on first person shooters of what I could consider the golden era of shooters: from about 1997 / 1998, to 2001 / 2002. Games that might have looked simple by today standards, but really gave me incredible immersion and made my mind fill in all the blanks about the experience. I'm a shooter fan at heart, so I'll talk about what I know and love.

It’s all about the gameplay and the experience after all, right? They always say to “keep things simple” and “less is more”. The problem is “how little” and “how simple”, because we’re no longer living in the 90s, expectations have changed and people won’t stand for cubes on the screen anymore.

Up next I’m going to focus on more modern games that really hit home; games with more modern visuals!

Saturday, August 15, 2009

Canned scenes and backgrounds

What is it about canned scenes that make them so fascinating to me? What is a canned scene anyways? Well, I would describe it as: a non interactive 3D or 2.5D composition of objects inaccessible to the player or camera and usually only seen from a limited perspective.

When I think about some of the canned scenes I've come across over the years, I always felt that they really added a lot to the life of the world by giving the area some, or a lot, of story and background. A cave behind a window in Doom, or a building in the distance in Stalker, or even a room full of gore behind a barricaded door in FEAR, all of these make you wonder just what happened, or what's really there. Of course it's easy to get there with cheat codes, but when you get there, the experience is lost; the carefully crafted illusion fall apart.

Is there some driving force that makes us want to get to, or into, a place that we're not suppose to be? Maybe its our need to solve a mystery or explore the unknown that's created in these small instances, and also an easy way to give life to the world at the same time.

Sunday, August 2, 2009

Stalker, old and new

A few months ago CSG worlds released a free version of Stalker from 2004, and seeing how I have played though the original (Or should I say the production version) many times, I jumped on the opportunity to see how one of my favorite games of recent times looked many years ago. I have looked at all the old screenshots, but seeing it in motion was even better. Some of the things that interested me were what changed, what didn't, and what the community thought.

First off what I saw right away in the 2004 release (I'll refer to it as ST04) was the size of the levels and how much bigger they were. I know for one like big levels, or bigger level, but I think this is one case where less is definitely more. In the retail version of Stalker (STSoC) the levels seem like the perfect size for the first couple of playthroughs; there is enough there to keep you entertained given the amount of different types of AI, anomalies, walking speed, etc. ST04’s levels were too big some of them, like Dark Valley, Yantar, and the reactor. They were trying to go for an open world type game, I think, and I liken Stalker more to a game like Crysis in this case. It had that open world feeling, but smaller doses worked better in the end. STSoC ended up being much more cohesive with smaller levels that were better distilled for action and exploration, or the fact that they were much less confusing and better on memory as well.
A couple of examples:
  1. Garbage, it had a lot of extra tunnels and routes under the factory. Sure they could have put rats in there, but aside from that, and a few items, there really wasn’t anything to do except move forward or backwards. Stalker isn’t known for disabling traps and security systems to gain access to an area. Not to mention ST04’s garbage was a LOT longer too, and with all the back and forth story elements, I’m glad it was cut down in size.
  2. Agroprom and the Bar / Wildlands, both split into two levels. I find this interesting more from an “Oooh! This is how these two levels connect!!” perspective  Of course it’s more memory friendly, and easier to script / debug.
  3. Underground labs were simplified and made more linear. Now this might sound like an issue, but I find it quite refreshing. The world provides enough variety for open-worldness, and the labs give me just the opposite: a nice linear adventure.
  4. Yantar ended up being MUCH different, and while I can’t comment on how ST04’s version would have ended up, I LOVE the final version. ST04’s version looks like it may have been one of the first levels in the game, remnants of 2001 when the project began. It LOOKED like it was heading more towards the style of The Warehouses in STSoc, but I’m glad it didn’t 
  5. Power station. While very cool that I can walk around the entire Chernobyl power station on foot, verbatim… aside from fighting off wild animals and getting irradiated, there didn’t seem to be much to do in ST04.
Of course the art changed too, for the better. Strangely enough some of the levels that never made it into the final release looked to be furthest in development, and the most interesting story wise.

Next, some of the things that stayed the same interest me on a more personal level. I guess it gives me some insight into the minds of the developers in some way. Aside from the obvious like monsters and weapons, a lot of the levels stayed the same… except they were more condensed. I find this interesting because it seems like Stalker was going to be much more straight forward action. 4 years later it turns into this choose your own adventure type game using a lot of the same assets.

Finally what really caught my attention was the community’s reaction to this. A lot of people seemed to think that ST04’s atmosphere was much better than STSoC. Huh?! First off ST04 doesn’t have much of a developed atmosphere or mood because there is no music, no sounds, none of the cool ambience and weather effects that they put into STSoC. One of the best things about Stalker, in my mind, is the incredible atmosphere. It feels so real at times that it makes me want to jump into the game world and experience it in person. That’s saying something considering everyone lives in a deadly, radiation ridden dystopian wasteland. ST04, on the other hand, felt empty, dead, and boring… a testament to how incomplete it really was at the time.

Stalker isn't the only game I've had the privilege of playing both the final retail version and an earlier version. Doom comes to mind, as do all the games I've worked on. But it's one of the more modern games, and one that I really enjoy. If someone released an early version of Deus Ex, or System Shock 2, I would be playing those in a heart beat... and posting about it too ;)

Thursday, July 30, 2009

Server issues

With all this hot weather in Vancouver we had to move the AC to the main living area. And as my server was sitting outside for the past couple of years, it just couldn't cope with the added heat of the AC exhaust port right by it. Thankfully I had a new box waiting to be setup :)

In all I had about 4-5 hours down time as I installed everything, got the OS setup, and finally figured out my ports. So www.renalicious.com is up and running properly again.

I can finally retire the old Xeon rackmount behemoth "Crusher" :)

Don't Push The Button

How many game titles do you know where you must push a button in order to continue with the story? I know a couple games that come to mind are Deus Ex and Bio Shock. And one thing that I have always wondered about is what it would take to make a game where you actually have an option, or some choice, when it comes to Pushing-The-Button.

Modern engines definitely look pretty, but because it can take many man months to make a single level, developing content that players might not see is becoming increasingly taboo. Has anyone ever played SIN? I can remember playing it a couple years ago, or last year, and discovering a level in the game that I never knew existed, based on my actions and completed objects in the previous level. I was floored! Here is a game that was released in the 90’s and I’m still finding new things about it. Whereas a game like Bio Shock one I’ve played through it once, the only thing that’s left is playing through it again with a different set of plasmids, but I’m pretty sure I’ve seen all the levels.

So the more powerful the technology, the more linear things get? That seems almost counter intuitive. So how far back would we need to go to create a game like SIN where, based on what the player chooses, the game and even the story will change?

Obviously we can’t go as far back as choose your own adventure games, or even text based because the player will simply lose track of what is going on. But what about making a game like that in the Doom engine, or at best, the Quake engine? I can remember pumping out a level in a matter of hours in Doom, and days for a Quake level. Naturally these engines are old and a lot of extra features will need to be added. But with what we know these days, why couldn’t we plug in advanced AI and scripting into these old engines? They’re free too!

The way I see it, making a game from start to finish takes 100% of the development time and resources. But if, like in Deus Ex, where the player chooses option B instead of option A half way during the game, it shouldn’t add another 50% development time, to a total of 150%. If anything it would add maybe 25%, especially if the developers are smart and reuse levels and assets which take the longest to make. What’s left is scripting, dialogue, maybe cinematics, etc.

The first half will always stay the same, but in the second half you could be on the hunt for faction A, instead of being hunted by faction B. The levels can easily be reused, just move the spawn points, change a couple of assets, and new scripting.

Something like this really excites me, because using the right technology a game that really gives the player story options can be developed. Don’t like your allies? Take the offer to defect then take them out in the next level! Did you fail at that too? Maybe it was all part of the plan to play as a double agent. Eventually you meet up in a warehouse. If you stuck with your allies you will be the attacking force, but if you defected you would be defending. Or maybe you’re really part of the third faction, sneaking in to steal the goods while the other two are fighting it out. How cool would that be? :D