Extremely insightful lecture by Matt Leacock, game designer of the co-op board game, Pandemic.
I especially found interesting how he approaches iteration and he seems very well read in game design theory.
Also, his visualisation of Mihaly Csikszentmihlyi's Flow principal is very well presented.
Sunday, 6 November 2011
Cooperation and Engagement
Monday, 3 October 2011
Learn The Trigonometry Functions
Labels: code, gamedev, math, trigonometry
Sunday, 2 October 2011
Beyond the Game
I've recently watched Beyond the Game, a documentary about the competitive Warcraft III: Reign of Chaos scene in Asia.
It's very interesting, especially the fact that they compete at a high level and train like professional chess players.
But the difference is that chess is an open game system, the "algorithms" & mechanics of the game are exposed and played in a physical space.
But Warcraft runs in a total virtual plane were the game mechanics are somewhat hidden, I know, as a player, that there's a certain randomization on almost every damage hit but I don't see it being run, I only see the result exposed by the visual feedback layer.
A dice roll in a video game compared to one done with a real dice and thrown by an human hand will always have a certain degree of suspicious development because we don't see the actual process but only the result.
That's why I find it very fascinating that some will want to develop mastery of a video game when at the end, complete understanding of the system & control over it can be subtly manipulated by the makers of the system, especially in the context a lot of competitive gaming do not actually freeze to a specific build of the game but do take into account the developer's patches.
Simple Solution: Reading Twitter Feeds
I was working on a way to feed Twitter messages into an indie game prototype last March. Basically, certain events and unlocks could be triggered by specific commands embedded in subtle Twitter messages.
I was slamming my head against Twitter API and JSON, when it clicked, I could simply read the generated RSS feed and parse out what I need.
In other words, I find that most of the time, it's easier to bypass the official API of the service provider and always check for simple alternatives.
Links:
iPhone SDK: First Steps With JSON Data Using the Twitter API
With Just 3 Lines Of Code Add Twitter/Facebook Into Your iOS App
Use self()
I’m building a database abstract layer in PHP using a Singleton pattern, I based my code the following article.
In the comments, I found that you can self-instantiate a class with “self” instead of calling it by name, very useful if you plan to change the class name over time.
Must re-write code if you change the class name:
self::$m_pInstance = new Database();
No worries with self():
self::$m_pInstance = new self();
Labels: code
PHP & Enums
Enums are not native to PHP, at least not for the moment but I found a way to simulate with the help of this post on stackoverflow.
<?php
class DiceEnum
{
const d4 = 4;
const d6 = 6;
const d8 = 8;
const d10 = 10;
const d12 = 12;
const d20 = 20;
}
?>
But if I base myself on the SPL documentation, it’s seems we are going to have a supported native integration very soon.
Labels: code
Syntax :: the use of ?
I had a PHP exam this morning for a job interview, which I feel I probably failed, my main problem is that I had doubts on how PHP5 handles object references, I’ve been programming in C++ and objetive-C recently and my mind is stretch out with all the different IDEs, scoping, syntax and specifications of each language.
This causing me to go from one mindset to the other and in a written exam, were you don’t have access to documentation when in doubt or a debugger to feel out the language, it gets very difficult.
And so I’m reviewing the PHP5 documentation in hopes it will help me perform better at my next job interview.
While reading up, I found this very interesting proof of concept, the thing I like the most about it it’s the use of the syntax:
($bar === $this ? “Yes\n” : “No\n”)
Never used it or at least not everyday and it’s actually was a question on the exam.
At least when I fail, it’s always epic!
<?php
class Bar
{
public $prop = 42;
}
class Foo
{
public $prop = 17;
function boom()
{
$bar = &$this;
echo "\$bar is an alias of \$this, a Foo.\n";
echo '$this is a ', get_class($this), '; $bar is a ', get_class($bar), "\n";
echo "Are they the same object? ", ($bar === $this ? "Yes\n" : "No\n");
echo "Are they equal? ", ($bar === $this ? "Yes\n" : "No\n");
echo '$this says its prop value is ';
echo $this->prop;
echo ' and $bar says it is ';
echo $bar->prop;
echo "\n";
echo "\n";
$bar = new Bar;
echo "\$bar has been made into a new Bar.\n";
echo '$this is a ', get_class($this), '; $bar is a ', get_class($bar), "\n";
echo "Are they the same object? ", ($bar === $this ? "Yes\n" : "No\n");
echo "Are they equal? ", ($bar === $this ? "Yes\n" : "No\n");
echo '$this says its prop value is ';
echo $this->prop;
echo ' and $bar says it is ';
echo $bar->prop;
echo "\n";
}
}
$t = new Foo;
$t->boom();
?>
Labels: code