Jump to content
  • Advertisement
  • entries
  • comments
  • views

About this blog

Still making games...

Entries in this blog


Easy now...

I sent Bennu to my older brother so he could test it and he found it too difficult, so I'm adding an easier difficulty setting. He also suggested a view of the level before it begins would be useful to the player, so he knows the level boundaries. Video here.

In the easier difficulty setting, when Bennu falls in the water, instead of dying, he is grabbed by a hippo that throws him back up. Here's the hippo image:




DreamBuildPlay 2012

Graveyard Shift made the top 20!


A reference: http://www.theverge.com/gaming/2012/8/20/3255885/dream-build-play-design-competition-announces-it-40-finalists




DreamBuildPlay 2012

So, we finished our entry on time. In the past two weeks we completed the intro sequence, the animations for when the player dies, built a new tip system and fixed a truckload of bugs.

As mentioned, we replaced last year's tutorial with a tip system. We felt the tutorial was too restrictive for experienced players who will probably guess how most of the game works on their own. The tip system works with question marks that are spread on the first two maps. The players can read these tips when they step on them or dismiss them.

The animation for when the player dies is... Well, you'll see for yourself in the game, it's not something that should be spoiled.

Even if we don't get anything else out of this, I can say contests are a great opportunity to establish goals for your project. We did work in the past two weeks that would otherwise, in our part-time work hours, easily take at least three months.

Here's the video we made for the contest, it was made in a hurry so the editing it's not that good, but...

[media] [/media]




DreamBuildPlay 2011...

...So, just submitted Graveyard Shift to the 2011 DreamBuildPlay competition. It's amazing how much faster development goes when you have a set goal.

Anyway, here's the video that accompanied the entry:

[media] [/media]




Developing a phone game...

Just a quick status update.

We got the phone from the DreamBuildPlayContest, it's a spiffy Lumia 900. The interface and screen is quite nice, shame about the apps.

Graveyard Shift is on a temporary hiatus as I'm developing a phone game by myself. The game is being developed in XNA, it's almost complete and running on the Lumia. I'm going to start porting it to Objective-C soon as the plan is to release it first to iPhone and then to Windows Phone and Android.

About the game itself I can't say much because it's a simple and easily duplicable concept. What I can say is that it's an original puzzle game and I never saw anything quite like it.





To get new weapons and tile upgrades the player will have to enter the cemetery crypts and have a conversation with ghosts. If he chooses the right answers, he gets those items. If he doesn't, the game gets harder on the next round (more zombies spawned, etc.)

This is all experimental and will be cut out if people think it doesn't fit it. Anyway, here's a video:




Color dispensers!

I've been working on the color dispensers. Like in Bennu, when a ninja touches a color dispenser he changes color and is only able to destroy blocks with the color he has at the moment.

The dispensers were inspired by the cursed seals in Naruto. Each seal is a circle with the kanji of the color it lends the ninja inside (red, green, blue). The seals are composed of particles made with the mask emitter in the Mercury Particle Engine.

When the ninja touches a seal each particle is moved towards the ninja, which gives the impression that the seal is dissolving into the ninja.

">Video here.





Bennu, now with more Bennu. I still have a few bugs to iron out, but it looks like fun. ^^ Video here.

EDIT - The only reason the Bennus don't move at the same time is because I'm playing alone and switching controllers.





Hello there. Since my last entry I finished these items:

- Points system
- Options screen
- Pause menu
- 360 Gamepad support

Click here for a video. It's longer than usual but shows pretty much everything that's finished (except for the intro sequence).

- Tutorial
- Levels, lots more
- End sequence
- between-world sequences
- Credits





My brother suggested that I should display a chain instead of the balls I previously used to show the connection from the Bennu to the object it's swinging from. Click here for a video.

I also got major performance improvements from switching my broad-phase collision algorithm. I was previously using a modification of the sweep and prune implementation that came with the Farseer Physics Engine. In the way I was using sweep and prune, objects were being sorted in an array by their lower and upper boundaries along the X axis.

In my specific case I have a lot of objects, but most are static (such as the blocks and obstacles), so the array processing got expensive on more complex levels.

I switched to a grid-based collision algorithm, where all static objects are placed in a two-dimensional matrix where each position corresponds to a sub-square of the level, containing the list of static objects that are present in that sub-square. An object is placed in every sub-square from his lower (x,y) boundary to his upper (x,y) boundary, as depending on the object's dimensions it can belong to more than one sub-square. The non-static objects are kept in a list apart, and collisions are only checked between each non-static object and the static objects in the sub-squares the non-static object is currently located in.

Right now the collisions between each pair of non-static objects are all being checked, since I have a small number of them, but these can be optimized apart.




Breaking the chain - more videos and screenshots

In Bennu, everytime you create a ball chain, balls are created in regular intervals from the beak of the Bennu to the first object found in the direction the beak is pointing to. If an object is found the balls are chained together, if no object is found the points are still created but fall to the ground.

Previously, everytime you created a new chain the balls that belonged to the previous chain were removed from the scene and placed in a "ball cache" in order to prevent performance issues. I changed that in order for the balls to remain on the scene until they were needed for a new chain. The result can be seen in this video.

Also I did a new level that explores something I did some months ago: in later worlds everytime the Bennu touches a block of the wrong color (a different color from the Bennu's current color) a new block is spawned. In this level the walls are slippery so the Bennu can't grab to them and he dies if he falls on the water. See it in action.




Box2D.XNA and ear clipping...

The first difficulty I ran across in OMA was importing polygons into the game. The polygons in Box2D.XNA must be convex and are limited to 8 vertexes (for performance reasons), which means that when using complex polygons you have to divide them into simpler polygons. One of the authors of Box2D.XNA suggested ear clipping, an algorithm to divide polygons into triangles. The algorithm described in that paper is more optimized than the implementation I went with, because since I only partition the polygons during game initialization, performance isn't that important.

As mentioned in the paper, "an ear of a polygon is a triangle formed by three consecutive vertices Vi0, Vi1, and Vi2 for which no other
vertices of the polygon are inside the triangle." The basic algorithm consists of taking the initial polygon vertex list and removing ears one by one until only one triangle remains. The paper suggests using a double-linked list to store the polygon vertexes because it's a data structure that allows quick access to both current, previous and next elements when iterating the list, as well as fast removal and insertion.

Additionally, a circular list would be even more useful so that no boundary checks would be necessary. In the .Net C# framework, the double-linked list implementation doesn't allow for circular lists, meaning that the last element on the list will always be null, instead of the first element. You also can't change this pointer on the list, because a node can only be inserted in the list once. So I did my own generic circular list implementation, which is basically the same as all circular list implementations: :)

public class CircularListNode
public CircularListNode previous, next;
public T value;

public class CircularList
public CircularListNode first, last;

public void Add(T value)
CircularListNode node;

node = new CircularListNode();
node.value = value;

if(first == null)
first = node;
last = node;
last.next = node;
node.previous = last;

last = node;
first.previous = last;
last.next = first;

public void Remove(CircularListNode node)
if(first == null)

node.previous.next = node.next;
node.next.previous = node.previous;

if(node == first)
first = node.next;

if(node == last)
last = node.next;

(Note that this implementation in particular isn't meant to be used outside of this context: the node removal doesn't check if the list is empty because in our particular case it should never be.)

Next, the ear clipping algorithm:

public class GeometryFactory
public static List> EarClip(CircularList vertices)
List> ears;
CircularListNode node1, node2;
bool isEar;

ears = new List>();

node1 = vertices.first;
while(node1.previous.previous != node1.next)
isEar = (InternalAngle(ref node1.previous.value, ref node1.value, ref node1.next.value)
node2 = node1.next.next;
while(node2 != node1.previous)
if(PointInsideTriangle(ref node2.value,
ref node1.previous.value, ref node1.value, ref node1.next.value))
isEar = false;

node2 = node2.next;

ears.Add(new List { node1.previous.value, node1.value, node1.next.value });

node2 = node1.next;
node1 = node2;

node1 = node1.next;

ears.Add(new List { node1.previous.value, node1.value, node1.next.value });

return ears;

The EarClip function receives the vertex circular list (The vertexes must be ordered in anti-clockwise order). It then iterates it, looking for ears. The first check is done by the InternalAngle function, which verifies if the angle formed by the current vertex and its siblings is convex or concave. If it's concave, it can't be an ear and there's no need to do the next step: verifying if any of the other vertexes is inside the triangle formed by the current vertex (the "ear tip") and its siblings (which is done using the PointInsideTriangle function). Each time a ear is found the triangle it forms is added to the output ear list. The "ear tip" vertex is removed and the iteration continues. The iteration stops when there are only 3 elements on the list, which are the final triangle.

The InternalAngle function:

private static float InternalAngle(ref Vector2 v1, ref Vector2 v2, ref Vector2 v3)
Vector2 a, b;
float angle;

a = v2 - v1;
b = v3 - v2;

angle = (float)Math.Atan2(b.Y, b.X) - (float)Math.Atan2(a.Y, a.X);
if(angle {
angle += (float)Math.PI * 2;

return angle;

The PointInsideTriangle function (if you're interested in how it's derived go here):

private static bool PointInsideTriangle(ref Vector2 p, ref Vector2 a, ref Vector2 b, ref Vector2 c)
Vector2 v0, v1, v2;
float dot00, dot01, dot02, dot11, dot12,
invDenom, u, v;

// Compute vectors
v0 = c - a;
v1 = b - a;
v2 = p - a;

// Compute dot products
Vector2.Dot(ref v0, ref v0, out dot00);
Vector2.Dot(ref v0, ref v1, out dot01);
Vector2.Dot(ref v0, ref v2, out dot02);
Vector2.Dot(ref v1, ref v1, out dot11);
Vector2.Dot(ref v1, ref v2, out dot12);

// Compute barycentric coordinates
invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
u = (dot11 * dot02 - dot01 * dot12) * invDenom;
v = (dot00 * dot12 - dot01 * dot02) * invDenom;

// Check if point is in triangle
return (u > 0) && (v > 0) && (u + v }

The List> returned by the EarClip function can be used to add each triangle to a Box2D.Xna shape:

Body body;
BodyDef bd;
PolygonShape shape;
Fixture f;

CircularList vertices;
List> triangles;

vertices = new CircularList();
// Build the polygon vertex list here

bd = new BodyDef();
// Set additional body properties here

triangles = GeometryFactory.EarClip(vertices);
foreach(List triangle in triangles)
shape = new PolygonShape();
shape.Set(triangle.ToArray(), triangle.Count);
f = body.CreateFixture(shape, 1.0f);
// Set additional fixture properties here

And that's it.




Blood pools

In order to maximize the "satisfaction per kill ratio" I added blood pools. The pools are made out of a maximum of 3 blood textures that are placed close to each other, rotated randomly and expanded at different rates, giving the sensation of multiple leaking wounds.

Video here:

[media] [/media]




Beta version!

[color=rgb(41,47,51)][font=Arial] The beta version of Twitchy Thrones is ready! If you have an iPhone and want to help us test/improve it please go here: [/font][/color]http://tflig.ht/1w0mXSn

More information about the game here:

Here's the game in motion:




Bennu trailer - DreamBuildPlay

The DreamBuildPlay deadline is today. I spent the last month and a half increasing the game performance on the 360. One of the requirements for submitting a game was a video of it, which you can check here.

The trailer is poorly edited, but I think that made it (unintentionally) funnier. So, anyone else submitted a game?




Bennu submitted for playtest!

So last night my brother, who lives in the USA, submitted Bennu for playtest in the Community Games.

I changed the cover because the previous one didn't work that well when resized:

Some screenshots:

And the thumbnail:




Bennu Revisited...

I just pulled Bennu out of the Xbox Marketplace, the reason being I'm about to release a free version for PC. Even though Bennu is only selling an average of 1 copy per month, it would be harsh having a priced version of Bennu with it being free on the PC.

The PC version will not be a direct port, featuring:
- Improved controls (more accurate pointing, faster rolling).
- Keyboard controls (and mouse on the menus).
- Improved tutorial.
- New and missing levels (the harsher ones of the first world were removed and replaced by easier ones).
- Some minor changes to dialogue.

Why free? As mentioned before, sales on the Xbox weren't so good (it sold about 180 copies), but I still feel it was our best game so far. I'm hoping it will get to more people on PC, where gamers are more used to hard-to-master games.




Bennu on the 360...

I had a plan that if Bennu wasn't selected for the PAX 10, which it wasn't, I would participate in this year's DreamBuildPlay contest. But this year's DreamBuildPlay contest is for the 360 only, so I figured that since Braid was out too, I'd buy a 360. :) And by the way, Braid is totally worth it.

I was curious about how much effort it would take to port the game to the 360. The steps I went through may help someone in the same situation (some of them are explained in more detail in the creator's club web site):

1. Used XNA Studio's option to create a copy of each project for the 360, which gave me new compiler errors, as expected. This works well, the projects share files but you have to add new files to each project separately.

2. Added to each 360 project the 360-specific xna framework dlls (included in the XNA directory in Program Files).

4. Replaced references to libraries not supported on the 360. I was using the Application class in the System.Windows.Forms library to change the current system culture so the decimal separator employed on data files wouldn't get messed up on other systems. It was replaced by Double/Integer/whatever.Parse with an invariant culture. Timers also aren't supported, so I did a basic Timer class of my own.

3. Added a XBOX360 flag to each 360 project so I could use conditional compiling instructions for the platform. With this flag I was able to keep the mouse/keyboard code in the PC generated code but not on 360 code.

5. Removed the encoding specification from the XML files I load game data from as XNA on the 360 doesn't support encoding specification. Luckily I wasn't counting on a specific encoding.

6. Purchased a Creator's Club gold membership and downloaded XNA Game Connect from the XBOX live games list. I'm not sure you need the gold membership to do this, but I want to check out other games anyway.

7. Added the 360 console to XNA Game Studio on the pc, just needed to input an identification code so it knows which console to upload the game to (the game is uploaded through the internet without any direct connection needed between the pc and the console).

8. Deployed the game to the 360. Each time you build the game it checks which files were altered and uploads them, which is pretty neat.

By then the game was running on the 360. Which was freaking cool.

On the positive side, I was surprised I had to alter so little of the game code, specially the file input/output code. Also, the game looked good on a small tv, the colors where much brighter than on my LCD monitor.

On the negative side, I'm having performance issues on the 360. This is a common issue, reported my many developers. This is where I am now: Every 5-10 seconds, the game freezes for a second or so. I think it's the garbage collector, but I'm still running tests. Here's a collection of resources I've gathered on this subject:

Managed Code Performance on Xbox 360 for XNA: Part 1 - Intro and CPU
The cost of value types in .NET Compact Framework
XNA Framework Remote Performance Monitor for Xbox 360
Understanding XNA Framework Performance
Twin paths to garbage collector nirvana
Foreach, Garbage, and the CLR Profiler




Bennu "box" art

To submit a game to community games you need to create "fake box" art to display on the xbox marketplace. Here's Bennu's:

EDIT: New version




Bennu - First prototype

Welcome to the Bennu journal.

Right now I've finished the first prototype of the game, which has programmer art *shudders* and lacks many of the features I hope to implement.

Bennu is a puzzle game that can be described as puzzle-bobble meets spiderman meets some-cool-stuff-not-done-yet. Basically you control Bennu, an old bird that can't fly for long and so goes around each level using his tail to grab to whatever he can and swing himself around, smashing bricks with his head (the head and the bricks must have the same color), until there are no bricks left. Currently his color changes every five seconds but in the future the player will have to touch bonuses with the Bennu to change color.

Right now the blocks are generated randomly, but in the final game each level will have a hand-made layout. Click here to see a movie of the game.

The game is being developed using XNA and the Farseer 2D Physics Engine, which (so far) I highly recommend. :)




Before and after

So my middle brother finished doing the new backgrounds and also polished the blocks and Bennu's chain:

And the main menu. And the buttons.

All that stuff you hear about how you should get other people to play your game worked for me, but it's also nice to have an outsider's perspective on your art. :) Like the gameplay, when you've been working on it for too long, you stop noticing the flaws.

Click here for a video of the new stuff. It's long again.




Avatar Man....

Avatar Man is back in playtest. If you have a creator's club account (this is starting to sound like I'm sponsored by Microsoft or something. I wish.) you can test it here.

Also, here's the (final?) game cover:




Avatar Man...

is out now! If you want to give it a try go here or download it in the Xbox marketplace.



  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!