Friday, May 29, 2009

Wing Commander Saga

The Wing Commander (WC) series was one of the first few that really got me into PC gaming. I would also speculate it was the reason Sound Blaster sound cards became popular too. The first WC came out almost two decades ago in 1990. Sadly, Origin who developed it is no more.


A while back a group of people got together and began work on a project to make a updated WC game, Wing Commander Saga. Using a modified and enhanced version of the Freespace 2 engine’s source code has been released to the public. It will be set in the same time frame as WC3 where humans and Kiralthi are still at war (and not WC4).




Cockpit View


TCS Concordia, the carrier you launch from in WC2.
[Source: WCSaga.com]

Quite an amazing piece of work from an indie team.

By the way, it will be free to play when it is done. And they expect to be done "soon". They already have a demo ("prologue") out.



While on the topic of WC, there is a "work-in-progress" remake of WC Privateer, named WC Privateer Gemini Gold, that is striving for the same missions and look-and-feel as the original.



Cockpit View


In the hangar.
[Source: Priv.SolSector.net]

This is done by another indie team and also available for free.

Friday, May 22, 2009

Interview: Jonathan Blow discusses his platformer, Braid

Jonathan Blow is the developer of Braid, a platformer that makes use of the manipulation of time to solves puzzles. The game first came out on XBox 360 Arcade, and is now out on PC.

You can download the demo from Steam, here.

It has a lot of similarities to platformers like Mario done on purpose to make it sort of a platformer parody. This also allows Braid to introduce the concept of time manipulation (rewind, slow, etc) from early in the game. For example, your character never dies in Braid, instead you are allow to rewind when that happens.



Here's some excepts form his interview with Leigh Christian Ashton of TIGSource:
"I have to admit I don’t really enjoy programming very much any more, because in order to get things done I have adopted a style of programming that makes it as simple as I can, so that it is just easy to get things done, and it only requires time and a lot of typing. So I am not really solving any difficult puzzles or challenges when programming, as beginning programmers might. On the plus side, this means I can program in a relatively efficient manner; on the minus side, it’s a less-engaging activity. I make up for that on the design side; whether I am making a prototype or a full game, it’s about exploring some interesting space of ideas. Programming is now just the implementation detail of how I do that exploration.

It’s not really about innovation so much as exploring interestingness. There is this idea of chasing innovation in game design that I used to be a big proponent of, but that I now suspect is a little bit misdirected."

"I try to encourage people to be willing to delete stuff that is mediocre or just kind of good – or at least put that stuff in a closet for some future day – so that they can focus on the stuff that is great. Many people don’t think that way, though. When it is so hard to get anything substantial done, you just don’t want to throw away any of your hard-earned progress."

"I think gameplay innovation can result in things that are interesting, but at the same time it doesn’t automatically result in something that is deep—often it’s a gimmick. I am interested in deepness and richness of game design. At the same time, I think if a designer is working on something he really cares about, and is really exploring some ideas in his own style, bringing his own particular insight to the table, then he will automatically come up with something different than most other games; furthermore, this will be a deeper, more-compelling kind of innovation."

[Source: tigsource.com]
So innovation does not mean interesting, but interesting usually mean innovation.

Also, the phrase "less is more" comes to mind when he challenges others to delete anything that is not extremely core to the experience. While this may cause a game to receive a great review, it does not necessarily mean the game will be played for a long time (and thus maximizes profitability). Will have to see how many people are still playing Braid a year from now.

Sunday, May 17, 2009

Tutorial: Simulating inertia in 2D with Flash

I was playing around with ActionScript 3.0, in particular making an object accelerate in 2D to simulate inertia. Below is a partial snippet of code that I ended up using:

public var thrust:Number = 1;
public var decay:Number = .9;
public var speed:Number = 0;
public var xSpeed:Number = 0;
public var ySpeed:Number = 0;
public var maxSpeed:Number = 15;
public var xThrustPercent:Number = 0;
public var yThrustPercent:Number = 0;

public var leftkeyPressed:Boolean = false;
public var rightkeyPressed:Boolean = false;
public var upKeyPressed:Boolean = false;

// Respond to keyboard presses
stage.addEventListener( KeyboardEvent.KEY_DOWN, keyPressHandler );
stage.addEventListener( KeyboardEvent.KEY_UP, keyReleaseHandler );

// Update movement every frame
addEventListener( Event.ENTER_FRAME, enterFrameHandler );

protected function keyPressHandler( event:KeyboardEvent ):void
{
  switch( event.keyCode )
  {
    case Keyboard.LEFT:
      leftKeyPressed = true;
      break;

    case Keyboard.RIGHT:
      rightKeyPressed = true;
      break;

    case Keyboard.UP:
      upKeyPressed = true;
      break;
  }
}

protected function enterFrameHandler( event:Event ):void
{
  if( leftKeyPressed )
  {
    rotation -= 10;
  }
  if( rightKeyPressed )
  {
    rotation += 10;
  }
  if( upKeyPressed )
  {
    // Calculate how much thrust to apply to
    // x and y based on the rotation of the object
    xThrustPercent = Math.sin( rotation * ( Math.PI / 180 ) );
    yThrustPercent = Math.cos( rotation * ( Math.PI / 180 ) );

    // Apply the trust to x and y
    // thus accelerating the object
    xSpeed += thrust * xThrustPercent;
    ySpeed += thrust * yThrustPercent;

    // Maintain speed limit
    speed = Math.sqrt( ( xSpeed * xSpeed ) + (ySpeed * ySpeed ) );
    if( speed > maxSpeed )
    {
      xSpeed *= maxSpeed / speed;
      ySpeed *= maxSpeed / speed;
    }
  } else {
    xSpeed *= decay;
    ySpeed *= decay;
  }

  // Move object based on calculations above if ship is visible
  y -= ySpeed;
  x += xSpeed;
}


Obviously, the keyReleaseHandler (which is not shown) does the opposite of keyPressHandler.
Also, you can add a brake functionality to the down arrow if you wish.

Some interesting maths used:

sin( 2700 ) = -1
sin( 00 ) = 0
sin( 900 ) = 1

cos( 00 ) = 1
cos( 900 ) = 0
cos( 1800 ) = -1


Since rotation specifies the rotation of the object in degrees and ActionScript's trigonometric functions (e.g. sin, cos, etc) use radians, you have to convert between the two.

radians = degress * ( PI / 180 )


Lastly, calculating the diagonal distance is done using this simple formula we all learn in school.

diagonal distance = sqrt( x2 + y2 )

Concept: Procedurally-generated content

Designing content (like levels, models, maps, items, etc) by hand can take a lot of time, so this acts as a limit the amount of detail that is put into a game.

The alternative is to generate the content procedurally, which means to create programs that do the design for you in a random and believable way.

One early example is the games Diablo which always create new areas and items so that players never have the same experience twice.

Here's a video that demonstrate this concept:



There is a HQ (Higher Quality) version which you can view by clicking on the "HQ" button on the bottom right of the video.

If you like it, you can download it as a screensaver.
(Note: press "F1" for settings)

Saturday, May 16, 2009

Cinematic: Team Fortress 2's Meet the Spy

Valve has been doing a series of updates to their team-based FPS, Team Fortress 2.

They have been updating each class one at a time, probably to maximize the news coverage they receive, making short movies for each.

Here's a new movie of theirs showcasing their Spy class.



[Source: Kotaku.com]


They really managed to fit in the personalities of each class in this short video.

Truly inspirational...

Friday, May 15, 2009

Tutorial: Handling touch gestures in Flash Lite

I came across this interesting tutorial on how to handle touch gestures made famous by Iphone in a Flash Lite application.

Here's the code from the tutorial:

var startX:Number;
var startY:Number;
var endX:Number;
var endY:Number;

var gesturesListener:Object = new Object();

gesturesListener.onMouseDown = function()
{
  startX = _root._xmouse;
  startY = _root._ymouse;
}

gesturesListener.onMouseUp = function()
{
  endX = _root._xmouse;
  endY = _root._ymouse;

  checkGesture();
}

Mouse.addListener(gesturesListener);

// minimum length of an horizontal gesture
var MIN_H_GESTURE:Number = Stage.width / 3;
// minimum length of a vertical gesture
var MIN_V_GESTURE:Number = Stage.height / 3;

// flags for each kind of gesture
var UP_TO_DOWN:Number = 1;
var DOWN_TO_UP:Number = 2;
var LEFT_TO_RIGHT:Number = 4;
var RIGHT_TO_LEFT:Number = 8;

function checkGesture()
{
  var xDelta:Number = endX - startX;
  var yDelta:Number = endY - startY;

  var gesture:Number = 0;

  if(xDelta > MIN_H_GESTURE)
    gesture |= LEFT_TO_RIGHT;
  else if(xDelta < - MIN_H_GESTURE)
    gesture |= RIGHT_TO_LEFT;
  if(yDelta > MIN_V_GESTURE)
    gesture |= UP_TO_DOWN;
  else if(yDelta < - MIN_V_GESTURE)\
    gesture |= DOWN_TO_UP;
  if(gesture > 0)
    handleGesture(gesture);
}

function handleGesture(gestureFlags:Number)
{
  if(gestureFlags & LEFT_TO_RIGHT)
    trace("left to right gesture");
  if(gestureFlags & RIGHT_TO_LEFT)
    trace("right to left gesture");
  if(gestureFlags & UP_TO_DOWN)
    trace("up to down gesture");
  if(gestureFlags & DOWN_TO_UP)
    trace("down to up gesture");
}


It was from a mobile games development blog, Jappit which covers all the different platforms, namely J2Me, Flash Lite, Symbian, Iphone and Andriod.

Monday, May 11, 2009

Concept: Making money from advertising

As an indie developer, one possible source of revenue is from advertising.

Games are made available freely so as to generate web traffic to the site, which generates a small amount revenue each time users view the site, however this revenue is generated on each visit and does not require any purchase from players.


There are two possible routes for this: self-hosting and third-party hosting.

With self-hosting, the creator gains all the revenue from advertising and does not require to share it with anyone else. However he has to pay for the hosting of his application, manage the advertisements (usually through Google's AdSense) and handle publicity of his game.

With third-party hosting, the creator can publish his game to one (or more) of the many game sites which will host if for free, manage the advertisements and help with the publicity of the game by listing it on their site (and sometimes providing reviews, ratings and usage statistics). In exchange for this, the revenue from advertising is shared.


Here are some such game sites:


Newgrounds: They have been paying for embedding advertisements into Flash games for a while, and recently (on 14 May 2009) started paying for any game (or content like animations, music, or even blogs) hosted on their site.
If you make browser games, you know the Flash portal Newgrounds. They’ve had their own embedded ads service since about May 2008, but now they’ve kicked it up a notch. Newgrounds now automatically share their ad revenue whether you sign up for the ads or not.

For example- I made a game recently and got it sponsored by a third party. The terms were that I wasn’t allowed to embed any ads in the game. So I didn’t, there are no ads in the game. Now Newgrounds will pay me regardless just because my game’s on their site. Not just games either, ad impressions come from audio submissions, animations and even my damn userpage. I made 3 cents for having a blog. Thanks!

[Source: TIGSource.com]

GameJolt: Unlike other sites, they deal with not only Flash games but freeware too. They are just one of the new independent gaming sites that have been recently appearing.
Their new Ad Revenue Sharing plan will go into closed beta very soon, at which time every member who has signed up to the site and uploaded at least one game will go into a hat to join the beta and start earning a whopping 50% of the ad monies.

[Source: IndieGames.com]

Kongregate: A flash game site that has been around since 2006, they have built quite a reputation for themselves. Sadly, unless you host on their site exclusively and use their API, the percentage of revenue that they give you is much lower than other sites.
By default, all developers receive 25% of the ad revenue generated from their games. This includes all ads within the games and any potential ads on the game page that may be added in the future. Games that are integrated with all of Kongregate’s APIs earn an additional 10%, and games that are offered exclusively on Kongregate’s site earn an additional 15%. Thus, it’s possible for a game to earn 25%, 35%, 40%, or 50% of ad revenue.

[Source: Kongregate.com]

BigPoint: They host both Flash and downloadable games, however are very selective on game submissions. Their revenue model is not visible and probably depends on the type of game.
We'll take care of the success of your game. In addition, we offer promising developers interesting financing models.

You profit from business and marketing cooperations for single titles or
for your entire portfolio.

In this way we can support you with professional advertising campaigns and an established distribution network with some of the largest media partners and portals, such as Pro7Sat1 AG, Yahoo, Web.de, etc.

[Source: BigPoint.net]


There are a lot more of such sites. And while you will not make a ton of money, they are a good way to build a reputation for yourself or your indie company.

Friday, May 8, 2009

Concept: Customizing Games for Donations

Daniel Benmergui, has released several Flash games that can be downloaded and played for free.
The unusual thing is that he also offers to customize two of them: Today I Die and I Wish I Were the Moon if you donate to help him build his next game.

  • $27 … and you become an silver sponsor of my next game and your name will appear in the credits, including a link of your choice [17 available]

  • $75 … and I’ll make a “pixelated”, moon-style version of yourself or whoever you want [5 available]

  • $497 … and make you a custom version of I Wish I Were the Moon or Today I Die, creating both characters after whoever you want, making the game the most original gift ever [2 available]

  • $995 … including a new ending of your liking! [Only 1 available]
[Source: Ludomancy.com]
That is a very interesting idea. An interactive gift in the form of a game.

And, people who donated get something nice and special.


By the way, I found "Today I Die" (puzzle) game play where it uses words as part of the game to be unique. Substituting words cause the background and certain object to change allowing to progress further. Really requires thinking outside the box.

Thursday, May 7, 2009

Flash Lite

Adobe Flash Lite is a highly optimized implementation of the Flash runtime for mobile phones, consumer electronic devices, and Internet-connected digital home devices.

Additionally, Flash Lite 3 allows developers to quickly create engaging applications, accelerate time to market, and increase customer adoption. With the new distributable player solution from Adobe, developers can directly distribute rich mobile applications with the latest Flash Lite player to millions of smartphones.

[Source: Adobe.com]
The popularity of Flash Lite is much less that that of J2ME which is the current dominate market holder for mobile games (with IPhone currently second, but increasing rapidly).

This is mostly due to the limited number of mobile phones that support it (mainly high end Nokia and Sony Erickson models) and those that do support it likely only support the older releases (e.g. Flash Lite 2.0, 2.1, etc).

Hopefully this will change, as the power of it and ease of development is far superior to J2ME from my point of view, hence the limited support for it currently. But as time goes by, phones become more powerful, and I expect J2ME to lose it majority.

Here's a Flash Lite game, as you can see it is also playable using any Flash Player on a browser. Notice the numbers on the buttons, they allowing using a mobile phone's number pad to play.


Tic Tac Toe (Flash Lite, v1.0)
[Source: ClickGamer.com]




Anyone has any opinions on this? If so, please do comment as I would like to hear what you think.

Wednesday, May 6, 2009

Flash Animation Tutorial by NCH85

While surfing the internet, stumbled on a two-part tutorial on animating using Flash.




[Source: DeviantArt.com]



If you're a newbie to Flash like me, they you may find them useful.
I really loved the animation, and the script was good too.

I especially liked how he showed the way he drew the rabbit with the different Flash tools in part 2.

Tuesday, May 5, 2009

Concept: Complexity... the good and the bad

An ex-colleague and good friend of mine, Andrew posted the following, and I thought it would be good to share it. Here it is paraphrased to be more generic:
There are two types of complexities in games: inherent complexity and emergent complexity.



The inherent complexity is inherent within the basic mechanics of the game. Those things that you need to know in order just to be able to play it. This complexity includes the rules and interface to play the game.

In a board game, this complexity is a necessary evil as it is what creates the game in the first place. It defines the shape of the board, the pieces and the basic constraints on their movement. To play the game you must understand these constraints. (Perhaps this is less so in computer games where the interface prevents you from straying beyond them, but an overall big picture view is still really quite essential even if some details can be left till later).

To be able to play the game you need to know this. Without it you can still be clicking away but much of what is going on around you wont make sense, and I'm not sure that you could be considered to be 'playing' any more than a monkey behind the wheel of an out of control truck could be considered as 'driving'.



Then there is the other type of complexity, emergent complexity.

This includes our understanding of the consequences of the basic mechanics, and the strategies and counter-strategies we apply to playing the game.

If the inherent complexity is the game board, then emergent complexity is the game that is played upon it, for it is but a function of the various strategies, techniques and styles that players come up with given the constraints imposed upon them by the basic game mechanics.



There is a very critical difference between the two types of complexity and it is this difference that makes inherent complexity bad and emergent complexity good.

Inherent complexity is a roadblock that must be passed before a player can participate in the game. The bigger the barrier the fewer who will pass it. Learning the details that make up the inherent complexity will not let you compete better, it will merely let you compete.

It follows that we would want to minimize this aspect.

I wont argue that there is a certain satisfaction - especially for the geekier among us - in learning systems of byzantine complexity and memorizing vast tables of obscure statistics and the such, but I think its accurate to say that for the most part players would like to get their basic training out of the way and get down to the real business of playing.

Emergent complexity does not prevent you from playing.

In fact it is the secret sauce that keeps you playing, because every time you play you learn a little more about the game. Something you think you did wrong this time and are eager for next time to try and correct it. Some new idea you want to try applying in the next game.

You will notice I use the words 'think' and 'idea' here. These are not cold hard facts to be learned, instead these are subjective. They are opinions, styles, choices. Making these choices is playing the game.

Eliminating the emergent complexity means eliminating these choices. Eliminating the emergent complexity means eliminating the gameplay.

So I want people to minimize the inherent complexity and maximize the emergent complexity. Because while the inherent aspect is the price of the ticket, the emergent part is the game itself.

To finish with an example, take a look at the games of Chess and Wei Qi. Both have very simple inherent complexity but extremely high emergent complexity. They take but an hour to learn yet a lifetime is needed to master them.

I gather that both games still enjoy a certain level of popularity despite having been released quite a while ago.

[Source: forums.sjgames.com]
With this in mind, I always aim to design games that are extremely simple to get started with, but have a lot of depth that can be slowly learnt over time.

I think this is the simple reasons that some good games become so popular, and other good games rarely have more than a small fan following.


Make a game with too much inherent complexity and few people will finish learning to play it, whereas if you make a game with too little emergent complexity and most people will get bored after playing it a while.