"code" Posts

Parameter vs Argument

ParameterVSArgument

What’s in a name? I hear people talking about, or more likely arguing over, whether it’s a bracket or a brace; whether it’s a method or a function; whether it’s a parameter or an argument… And, frankly, most people seem to get it wrong.

(more…)

Avoid Compilation with Webplayer Templates

CompilePhail

Have you ever wanted to simply disable a script while you were developing your project?

WebplayerTemplates is the answer.

(more…)

Heads or Tails? Flipping a coin

Coin

How do you flip a coin? In code? Elegantly?

I don’t mean the model, but returning a random boolean value?

Well, it’s not that simple… or, really… it is.

(more…)

A simplified Black Hole

BlackHole

For Space Duel, I wanted to make a black hole… one that would bend the trajectory of the shots in the game and attract or swallow the player’s spaceship.

This is what I created to make a simple arcade-style gravity well.

(more…)

Simple Pooling

PoolingSplash

Everything we do in our games requires some form of resource – memory, cpu time, storage space – and anything we can do to help reduce the drain on our resource budget can be good.

Pooling can help us do this.

(more…)

Restart Buttons are easy and often overlooked!

Restart

I have the chance to play a large number of prototype games.

These can be work-in-progress, concepts, level testing, and the like.

I have a pet peeve.

The single most overlooked feature is a simple “restart” button.

 

(more…)