Archive for February, 2012

Game Engine: Crystal Tools

Posted: February 26, 2012 in Uncategorized

In today’s gaming industry, there are several known game engines that are often used to run the video games we play. Big name engines that we all know are Havok, CryEngine, Unity, Unreal etc. These engines are often licensed and used for several different types of game genres and entirely different series.

Today we’ll be talking about a lesser known engine for normal people. One that isn’t a huge name right now that is off the top of a regular gamer’s mind.

Crystal Tools.

Crystal Tools? Sounds a bit silly, what’s it do/who uses it?

This engine was built for Square Enix’s series of seventh generation Final Fantasy games. This engine was designed to be used on the PS3, Xbox 360, Wii and Windows. In the previous generation, Crystal Tools was called White Engine, just recently brandishing a new name.

This engine is pretty much the heart pushing and running the recent Final Fantasy games on the different consoles. Though it was mainly designed for the PS3.

How good is it/features of the engine?

The main praise that this engine has received is for its ability to render very high quality CGI in real time. According to some sources, Square Enix made the engine to be capable of taking advantage of the PS3’s Cell processor, and uses 4 out of 6 of the synergistic processing elements (SPEs, refer to article: Anti-Aliasing: Get rid of those jaggies!)

According to video game director for Square Enix, Tetsuya Nomura, the goal is to make very good looking graphics, similar to the graphics in fight scenes of Final Fantasy VII: Advent Children.

Other capabilities of the engine are advanced audio processing, cinematic cutscene transition, physics effects calculations and special effects rendering in game and all in real time.

Currently there is not a lot of information publicly available, nor is the engine available for use on other game series/genres. So far it has been strictly used for the Final Fantasy series.

Updates and new versions of the engine are still being developed, some sources saying to expect a version 2.0 for Final Fantasy XIV. It also contains many plugins that can be used for game designers that won’t be discussed in this post.

Screenshot of battle sequence in Final Fantasy XII: real-time

Screenshot of battle sequence in Final Fantasy XII-2: real-time

As games are being developed further and further to become more realistic than its competitors or previous versions, more professionals are adapting games as tools to help them improve their skills.

Games are not necessarily only created and designed for leisure and entertainment. Recently, more and more games are being brought out to be used as simulation to hone the skills of professionals. A good example are medical simulators for surgeons, flight simulators for pilots and so many more. Though these have been around for a long time, they have often looked crude, or lacked the full immersion and realism that simulators should have.

Nowadays though with all the new technology and hardware, very realistic simulators can be made. A simulator that takes advantage of all this, that is used today and will be discussed in my blog post is iRacing.

More and more driver’s have been using this simulator to improve and hone their driving/racing skills. Some are just casual players looking for realistic driving games to play, or some players are big name racers practicing without going to the track and facing the real dangers while trying new skills.

Simulators are becoming more and more popular with professionals as they are convenient ways to practice without experiencing as much danger, but gaining the same skills from going out. In a way this is helping professionals cut costs of using real machines versus a simulator.

What is iRacing?

It is an on-line racing simulator designed to be as realistic as possible. Using real physics of cars in its game, unlike more arcade games such as Forza or console racing games, it tries to be as accurate as possible. Though this game, which the company calls a service, requires a monthly subscription fee.

The video game uses exact replicas of cars that can be raced in the game along with replica tracks from around the world. The game also has officially sanctioned events such as real races for prizes.

How does it look?

Though the graphics aren’t the best of the best, they aim for realism with proper proportions and cockpit views for players that want to get as close to the experience as possible.

Cockpit screenshot from iRacing

The game does offer automatic updates, so you can expect the game to get more and more realistic than what it is already as it is developed further.

Track Record, who uses it and has it actually helped?

A great example for a professional using iRacing as a training tool is Tommy Milner. Racer Tommy Milner claimed that playing these simulators helped dramatically reduce the learning curve of new tracks. He applied his training through the simulator iRacing to win the 24 hours of LeMans; a huge race that is a triumph for any driver to win.

 For a couple thousand dollars (this includes the price for the giant TV!) he built a rig at his own home to practice without having to spend the resources to get into an expensive racecar and hit unfamiliar tracks.

Milner in his home racing rig running iRacing

“I spend probably 2 hours on the sim a week when im not racing and 2 hours a day a few days leading up to a race,” Milner told It helps racers refresh their minds on tracks they haven’t raced on for a significant amount of time.

This is not the only success story of using iRacing in a professional setting. More good examples are Racer Trevor Bayne using iRacing to help him win the Daytona 500, or even an average guy, named Greger Huttu, who has never driven a racecar playing and winning races on iRacing, then put on a track to see if he can actually race like he races online. Recently, even Travis Pastrana is using iRacing to train for NASCAR.


 With hardware advancing further along with software, simulators are being made more and more realistic everyday. These developments are helping professionals and even regular people gain the skills they would never attempt to achieve in real life (due to several complications).

We can hope that simulator technology improves to the point we can only practice on simulators and apply our skills directly to real life right after. Games are becoming useful for real world applications and being designed as training aids. Keep up the good work world!

So with the approaching release date of the regular PS Vita on February 22nd 2012, I thought it would be appropriate to write a rough summary on the new handheld. I received my First Edition already and have been playing with it since February 15th last week and so far, it’s given a good impression on the graphics and what to expect on a handheld in the months to come.

Isn’t it just an updated PSP with an extra analog stick?

Nope. This little handheld is an entirely new beast. It features a 4c core ARM cortex-A9 for its CPU (Sony always likes shoving multiple cores in their platforms it seems), an SGX543MP4+ GPU, 512MB or RAM and 128MB of VRAM. There’s more memory overall in this little thing than the PS3! This should give you a brief idea on how much potential for graphics there is for this portable console. But let’s talk more about its graphics.

The GPU:

The GPU that is featured in the PSP Vita is a SGX543MP4+ GPU. Sure it sounds really technical from all the letters and numbers, but it is a GPU made by PowerVR (formerly VideoLogic). So no, Nvidia and ATI are not a part of this handheld. The GPU is a part of the company’s series 5XT and has 4 cores. This GPU can handle up to 7.2 GFLOPS @ 200MHz per core. This is a huge improvement from the last generation handheld, the PSP. The PSP featured a GPU with only 2MB or VRAM versus the 128MB on the Vita.

Though there isn’t really a lot of information listed about the PSP’s GPU to compare to the Vita’s, the PSP’s CPU processed up to 2.6 GFLOPS, way less than the Vita.

So is it like a PS3 like everyone’s saying?

The PS3 is still capable of creating larger and better games nowadays since developers have gotten used to the hardware, finding better and more efficient ways to make games look good. Though for a handheld, the Vita is doing very well graphics wise with some games comparable to the PS3’s. Though with the Vita’s hardware still new to developers, there hasn’t been a lot of time for new ways to create good looking games on this handheld to come up.

But even the launch titles on the Vita look fantastic.

Modnation Racers on the PS3

Modnation Racers on the Vita

Little Big Planet Demo on the Vita


The graphics on this handheld look great, even on the title launches. If you look at the PSPs launch titles, the graphics looked a bit crummy compared to the PSP games released today. When developers start finding new and better ways to make games look good on this little handheld, you can expect some pretty fantastic graphics.

Homework 5: Remixing Games

Posted: February 17, 2012 in INFR 2330
Tags: , ,
Part 1: Remix of War


War is a simple children’s card game for 2 players. To play the game, players need a standard deck of 52 cards ( no Jokers) and will shuffle the deck, then deal out half to each player. Players will take their decks and put them in a face down stack. Simultaneously, players will flip over the top cards of their decks, where the highest rank of the two cards will win (Ace is high, King, Queen, Jack, 10-2). Winner till take the cards and place them in his/her own discard pile. Though in the event that the cards drawn are equal, a sequence of “war” will happen. This sequence is when players deal the top 3 cards of their decks face down, then draw a fourth new cards from the top of their decks. The higher rank of this sequence will win all cards on the table, including the face down cards. Winner will then place all cards into their discard pile.

The resolution of the game is when a player runs out of cards. Players will keep playing, and once their deck runs out, they will turn over their discard pile to become their new deck. Once a player no longer has enough cards to continue, or complete a full sequence of war, the winner is the one who has the most cards/is still able to continue.

This is a game entirely based on chance. The game is playing itself, while players are simply drawing the cards without any decisions.

Now let’s turn this game into something that involves a bit of decision/risk taking.

I have thought of a new way to play War, to involve some decisions for players to make, so it requires them to use skills/decisions instead of relying on luck.

A deck of 52 playing cards is shuffled and split evenly by dealing out the cards to both players.

In my remixed version, it will also use a standard 52 deck card without Jokers. The deck will be shuffled and split in half to each player. Players will then draw a hand of 5 cards from the top of their own decks. Players will choose one card they wish to play in their hand and put it forward onto the table.

Unlike the original version, this will not be simultaneous. Players will take turns going first, which is where the decisions lay. To determine who goes first, a standard first draw from the top of their decks will determine who plays a hand first at the beginning of the game.

Highest card wins (Ace is high, King, Queen, Jack, 10 down to 2). Winner will take the cards and place them to his/her own discard pile if they are unequaled ranks. Players will then draw 1 card from the top of their decks to make their hands back to a total of 5 cards. In the event of cards being played with the same rank, this will engage a “war.” Players will draw 3 cards from the top of their decks and place them face down then pick a card from the top of their decks. If the player does not have enough cards from the top of their deck, they will shuffle their hand and take the remainder from there. Highest card wins and winner takes all cards and places in their discard pile. Game will continue until one player is out of cards or does not have enough cards for “war.”

Part 2: Remix of Tic Tac Toe


If you don’t know what Tic Tac Toe is then we might have a problem. Possibly one of the easiest games to learn and earliest game you learn about. Regardless here’s a brief overview of the game. A simple 3×3 grid is drawn without borders, players will then take turn to mark down Xs and Os until one of them can make a consecutive 3 in a row, column or diagonal. This is a strategic game, though once you and your opponent learn the strategy to win, it will often end in a tie game.

Who needs skills when you’ve got chance, let’s make it random! 

To make Tic Tac Toe a chance based game, I have added a mechanic to randomize the Xs and Os placed.

Players will set up a 3×3 grid to play with, one side labelled x, the other side labelled y. Players will choose to be an X or an O. Players will either flip a coin or some other means of chance to determine who goes first. Using a regular 6 sided die, players will roll twice, the first being the coordinate for the x axis, and the second being the y axis. 1,2,3 are 1,2,3, and 4,5,6 are 1,2,3. These numbers will represent the tile they will place their marker. In the event that a space rolled is already taken, players will roll again until a space is found with no marker. If there is one space left, player can ignore die roll and place marker on last space. First player to get 3 in a row will win the round.

That’s it! No skill required.

Part 3: Remix of “Race from the Ace”


This game was originally for Homework 2, where it was to create a “race to the end” based game. The game “Race from the Ace” was created by me and my group, Jason Porier and Sascha Maurer.  A simple overview on how the game was played are as follows:

  • Game to be played with 2 or more players
  • One player will be assigned the title of dealer per round
  • Dealer will deal one card to every player, starting on the person on his/her left and dealing to themselves last
  • First player (left of dealer) will look at card and decide to keep their card or to trade it with the person on his/her right
  • This will continue until the dealer, where the dealer can choose to split the deck or to keep his/her card since they cannot trade with anyone
  • If a player has a King, and another player is trying to trade cards with him/her, the player with the King can refuse to trade since it is the highest card, winning the round
  • Once all trades/keeps are done, all players will show their cards simultaneously
  • Player with the lowest card in the round will receive -1 spaces
  • Using a key on the board, it will determine how much players will move that round using the values
  • First one to the end wins!
  • Colors of tiles on the board have powerups, though they will not be listed since they’re not relevant to this post

Gameboard with key for value of cards

This game involves the decision of players and their thoughts on the chances of getting a better card if they choose to trade. At the very base of this game it is a skill based game.

Now let’s make it chance based.

The only real change needed to completely nullify any decisions or skills in playing the game is removing the mechanic of being able to trade/keep cards. In this version, dealers will just deal one card to every player, then everyone will flip their cards simultaneously. Players will then move along the board accordingly. No skills, no decisions.

With my anticipation of going out and purchasing the new release of Final Fantasy XII-2 when I have free time, it reminds me of a very important aspect of making a game look realistic. Hair. I’ve always associated with gorgeous pre-rendered cutscenes to the Final Fantasy series, even their feature length film Final Fantasy VII:  Advent Children. I’ve always wondered what it was that made the characters look so good, and of course, I realize now it is hair!

We have a lot of hair, how can we approach creating and rendering hair? Do we render every single strand of hair?

Yes and no, there are several different approaches to rendering hair. Theoretically you could render every single strand of hair, but that would be highly inefficient and would take a lot of processing power. But now with better technology, we are able to render better looking characters. I will be discussing briefly on one of many approaches to rendering hair, since I’m not an expert.

Pre-Rendered Scenes in Final Fantasy VII, notice the block hair.

Pre-rendered scene from Final Fantasy XIII-II, notice the actual hair that is rendered versus a block of hair.

So how do we get it to look all pretty and stuff?

The approach I will be discussing a slightly dated, but was found through an ATI presentation. This hair rendering technique uses a polygonal hair model. Then by applying shaders it creates a realistic looking hair model.

The shader used is a mix of Kajiya-Kay-hair shading model and Marschner’s model presented at SIGGRAPH 2003. The technique uses a simple approximate depth-sorting scheme as well, so this is a simple approach to rendering hair.

The reason for choosing a polygonal model over a line model for hair is because it has a lower geometric complexity which helps depth sorting faster.

What is the Kajiya-Kay Model?

It is a lighting model for anisotropic strands where the hair strands tangent is used instead of the normal in lighting equations. The hair normal is assumed to lay in a plane spanned by the tangent and view vector (V):

What is the Marschner Model?

It is the model for scattering properties of hair. It mainly discusses the primary specular highlight is towards hair tips, while secondary specular highlights are colored and shifted towards hair roots. “Sparkly” hair is the result of the secondary specular highlighting. The math for this model is very complex, so developers will often just try to match these properties visually.

Are there any textures for hair?

Yes, a common texture for hair is stretched out noise. Randomly generated noise in top to bottom line pattern.There is also alpha textures to show where the hair is opaque and translucent. Examples of the textures:

How do the shaders work for hair rendering?

There are both vertex and pixel shaders being used for hair rendering. The role of vertex shaders are to pass down tangent, normal, view vectors, light vectors, and ambient occlusion terms. While the pixel shader is responsible for diffuse lighting using the Kaijya-Kay model, two shifted specular highlights for the hair, and combining the terms.

What all this means is, an ambient occlusion, diffuse term, and specular term are all created by the shaders and combined into a final product:

Hair requires depth sorting:

Depth sorting is needed to draw the hair in back-to-front order to give the hair a look of depth/correct alpha blending. It uses a static index buffer that goes from the inside to outside order, maintaining the back-to-front order of drawing the hair. This lets the program load the patches of hair created and is drawn in order on screen. Not every hair is individually drawn.

What is the rendering pipeline/scheme?

There are 3 passes with this technique to create the final product.

Pass 1 deals with opaque parts of the hair.

Pass 2 deals with transparent back-facing parts

Pass 3 deals with transparent front-facing parts

This sounds pretty easy, why doesn’t everyone use this technique?

The reason is that this technique has cons some developers do not like. It also may not be complex enough to give a desired output. Pros of this technique are low geometric complexity so this allows the vertex engine to run faster (less load) and makes depth sorting faster when drawing hair back-to-front. This approach also allows applications to be run on lower-end hardware using simpler shaders or fixed-function pipelines.

Cons for this approach on the other hand are that this approach is assuming there is close to no animation for the hair model. Hair blowing in the wind or ponytails need to be dealt with separately. This approach is also not suitable for all hairstyles. It is more suited for simple, “flatter” hair styles. Not ones with hair sticking out in peculiar patterns like Cloud from Final Fantasy VII. Nothing too extreme now.

There are ways to optimize this technique for better performance, but I have no been able to grasp it all. But don’t think that this is the only approach to creating hair in 3D computer graphics. There are many new and improved techniques, as well as old and outdated ones. Whatever approach suites the needs for an application can be used.

For a very long time, I personally always thought that games were simply games. Even if there was news about “video games” being applied in other ways, I kind of just looked away and continued with my narrow field of view that, simply, games were games. That’s it. Little pieces of entertainment.

Though, through a recent lecture, we took an approach at looking at games as art. After this lecture, it occurred to me that people a companies have been using games in so many different ways I never thought. I major way companies have been using video games is advertising, though I never really noticed. Now that I think about it, it is a growing place for advertisements to be placed in games.

Usually, in-game advertisements are small and not entirely noticeable. I never really considered these advertisements, such as the boards lining race tracks in Gran Turismo 5 or even the boards lining the soccer fields in the FIFA series. They just looked so natural to be a part of the scene, though I’m sure companies paid large amount of money to be placed into the games.

FIFA 10, advertisements for Toshiba and Fujifilm on boards

FIFA 11, where other companies did not want to advertise, EA advertised its own products and name. Need for Speed SHIFT billboard! 

Those these simple product placements never really changed the dynamics or mechanics of a game, they were simply a superficial layer of the aesthetics portion of the games. They took up room, and presented information unrelated to the game to players.

Now are there any games, where the game itself is an ad?

I thought for a while if there were any games where it was not just ads placed somewhere on the screen. Then I remembered several years back a company actually took an approach to create an entire video game as an advertisement for their company. Who was that company?

Burger King.

That’s right, Burger King was a video game publisher at one point. Back in 2006, Burger King released 3 games for the Xbox 360 to advertise their fast food.

  • Pocketbike Racer
  • Sneak King
  • Big Bumpin’
Some could say this is a shameless self promotion, but Burger King was actually pretty clever with these games. They hired the studio Blitz Games to create these games. Naturally, you would think the games would do terribly, as they were only around $4 to purchase from Burger King, but actually their score weren’t too bad!
  • Pocketbike Racer: 4.5 on IGN
  • Sneak King: 6.7 on IGN
  • Big Bumpin’: 7.0 on IGN
  • Average for all 3 games: 6.07
An average 6.07 rating for all 3 games is still pretty passable for a game that costs $4 and was made for a fast food franchise! These games show that games make a pretty effective medium to advertise through, a more interactive approach to target consumers.
For games that have the objective of shamelessly promoting Burger King, I think they did a pretty good job plastering Burger King everywhere while creating an advertisement that is actually enjoyable on a gaming platform.
Overall, I think Burger King did a pretty good job, straying from the typical advertisements and trying something new to get their brand out there. Games are finding more and more ways to be applied in today’s environments.
Check out the reviews on IGN:
Pocketbike Racers
Big Bumpin’
Sneak King

Often when people are shopping for new computer hardware, such as graphics card to upgrade their current system, consumers will often stumble across the choice of having a “Professional” card or a “Consumer” card. A professional card is usually meant for workstations and for applications related to work and not leisure, while consumer cards are meant for gaming and an average person’s usage.

Well, then I can just get whatever I want right? A good graphics card is a good graphics card.

False. When finding a graphics card, you need to find one that suits your needs. You need the right tool for the job. What are you going to be using your computer for? Video games? Modelling/Maya? If it’s for work, you should invest into a workstation card, while if you’re using the computer for video games, you should just stick with consumer grade cards.

Don’t think one card can only do one task. Professional and consumer cards just do their specific jobs better than one another.

I found 2 GPUs that are pretty much the same, but why is there such a HUGE difference in prices?

To give you an idea of the price difference between consumer grade cards and professional cards here is an example.

A NVIDIA GTX 590 GPU with 3GB of VRAM is around $750-$800, which is pretty much the top of the line consumer GPU in the current series from NVIDIA. On the other side of the spectrum an NVIDIA Quadro 5000 with 2.5GB of VRAM (512MB less than the GTX590) goes for… $1750. Yepp. That’s a whole chunk of a lot more than a consumer grade card. Want to take another step forward? An NVIDIA Quadro 6000 with 3GB of VRAM goes for $4000!

Top of the line gaming card. $750. Still a bit pricey. 

Not even top of the line workstation card, $1750. Definitely pricey.

Well, I’m looking at their specs, it seems the consumer grade cards have more bang for their buck!

Though it may be true that a GTX590 has 1024 CUDA cores, while a Quadro 6000 has only 448 CUDA cores, in a workstation setting with Maya, the Quadro would outperform a GTX590. The GTX590 also has a 327.7 GB/sec memory bandwidth, while the Quadro 6000 only has a 144 GB/sec bandwidth for its memory. So looking at the hardware, it seems the GTX590 should be the more expensive one!

What it really comes down to in these GPUs.

Algorithms. It’s all about the algorithms. Professional cards contain specific drivers that are specially designed to work with work programs such as CAD, Maya, and other work applications. These drivers are reflect on the price of the card, as they drivers too money to research and develop! The investment in more efficient algorithms in a workstation GPU for work applications shows in its price. While on the other hand, consumer cards do not require this extensive research into work related drivers that cost a lot of money. This helps reduce the price of a consumer grade card in the end.

Right click and open image in new tab to see the results!

As you can see in the results, a $4000 workstation GPU loses significantly to a $475 GTX580 card in a 3D game benchmark setting.

So remember, if it’s for work, invest into your work. If it’s for fun, don’t take it too seriously. Time to save up those pennies!