I moved to a new URL! Check it out!

Otter Updates

Otter Updates
Another quick round of updates to Otter this week. All of these changes are currently happening in the dev branch and will be moved to the default branch once I get some more documentation and testing done.

* Platforming Movement now supports jump through platforms
The PlatformingMovement component can jump through platforms now.

Image


The set up for this requires adding tags to the component that are to be used as jump through. The next step is adding a collider to the Entity that will act as the jump through platform detector. This collider should be only 1 pixel tall, and should be placed on the very bottom of the entity, and probably be the same width as the collider being used for the rest of the collisions. The component also allows for the player to push down + jump in order to drop through a platform.

* Tiny music changes
The Music class now keeps track of all of the created music objects in order to update them when the global volume is changed. Previously I was using the EventRouter but if the user ever decides to clear all of the event router subscriptions the music object would break.

* QuitKey has become QuitButton
The QuitKey has been replaced with a Button object. The default to quit is still the Escape key on the keyboard, but now it can be set to any key, mouse button, or joystick button.

* AutoTiling example
An example project has been added in the Examples folder which should show the basics on how to use the auto tiling system in Otter.

* Collider double-add bug fix
There was a bug in the Collider system that allowed a collider to be added to the internal collider list twice. If an Entity used AddCollider or SetCollider in its Added method those colliders would be added to the Scene twice. If one of those double-added colliders are then removed at some point then bad things would happen. This has been fixed by only allowing colliders to be added to the scene once.

Game Jam Procedural Generation Part III

Game Jam Procedural Generation Part III
In the last episode of Game Jam Procedural Generation I talked a lot about generating the base of the platforming level in Starforger II, and carving out rooms into the ground of the level.

Image


So now we have a basic level that with a bunch of empty rooms below the ground. The next step is going to be connecting those rooms together. To do this I built a quick class called a TunnelSnake (tunnel snakes rule) to dig tunnels from any point on the map to any other point. Here's the full source of that class:
class TunnelSnake {
public int X;
public int Y;
public int Width = 1;
public int Height = 2;

public int EndX;
public int EndY;

int verticalSteps;
int verticalStepMax = 4;
int forceHorizontal = 0;
int forceHDirection = 1;

public TunnelSnake(int x, int y, int endX, int endY) {
X = x;
Y = y;
EndX = endX;
EndY = endY;
}

public void Dig(GridCollider grid) {
while (X != EndX || Y != EndY) {
grid.SetRect(X, Y, Width, Height, false);

if (Rand.Chance(50) || forceHorizontal > 0) {

if (forceHorizontal > 0) {
X += forceHDirection;
Height = 2;
X = (int)Util.Clamp(X, 2, grid.TileColumns - 2);
}
else {
X += Math.Sign(EndX - X);
}

forceHorizontal--;
if (forceHorizontal == 0) {
verticalSteps = 0;
}
}
else {
verticalSteps++;

Y += Math.Sign(EndY - Y);

if (verticalSteps == verticalStepMax) {
forceHorizontal = Rand.Int(3, 15);
forceHDirection = Rand.Sign;
}
}

if (Rand.Chance(50)) {
if (Rand.Chance(50)) {
Width += Rand.Sign;
Width = (int)Util.Clamp(Width, 1, 5);
}
if (Rand.Chance(50)) {
Height += Rand.Sign;
Height = (int)Util.Clamp(Height, 2, 6);
}
}
}
}
}

Doodle Post

Image

Starforger II

Starforger II
A few weeks ago I went to a local game jam in Phoenix! The them was discovery and I set out to make some kind of space exploration procedural thing. The final result was a game I named Starforger II. There is no Starforger I, but maybe I can make a prequel someday.

Download


Starforger II v1.0 - Windows (92mb)

Whoa what's with the file size? Well this game has a lot of weird sounds in it, and maybe I can figure out how to get them more compressed, but right now they take up a lot of space.

The game uses Enter, X, C, and the arrow keys, or a USB game controller (although the game is designed around the 360 controller, so using one of those would be ideal.)

Screenshots


Image


Image


Image


Image

Otter Updates

Otter Updates
There's been some recent happenings in the development branch of Otter. I've been busy fixing and polishing up some stuff, and also adding some of the last features I really want to get in before I can call it version 1.0. Here's some of the recent updates that can be seen in the commit log:

* Added LoadGridAutoTile() to the Tilemaps
In an effort to make game jam coding even faster I added auto tiling support to the Tilemap class. This is similar to the LoadGrid functions of Tilemap but now each tile will be placed depending on the neighboring tiles. I'll talk about this more when I merge it into the main branch, but for now it's usable and you should be able to figure out what's going on by checking out the source.

* Added SetAutoTileData() to Tilemap
If you're not using the default data set for auto tiling you can load your own data through this function. Calling this before using LoadGridAutoTile will let you use your own data. There's an example of how this data looks in the source for Tilemap.

* Added GetPowerSet() to Util
This is a handy function that can be used to get every possible combination of any amount of members of a list. Say you have a list of values {1, 2, 3}. GetPowerSet can return a list of lists that is every possible combination. So you would get {}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}. This is useful for the auto tiling algorithm, and maybe other stuff.

* Fixed Text OutlineColor and ShadowColor
I think I fixed a bug where OutlineColor and ShadowColor were ignoring the alpha of the Text's main color which lead to some wacky stuff.

* Fixed window scaling bug
Fixed a bug where if you used SetWindowScale() or SetWindow() with only a width parameter you would get a slightly messed up window. Basically what was happening is that the height of the window was off by 1 pixel. This should now be working properly.

That's all of the major changes lately. If you're using Otter you can post questions or your projects on the forums! It's awesome to see what people are making using the engine.

Otter Nap



I recently was in Seattle for PAX 2014 so obviously I had to make a stop at the Seattle Aquarium to hang out with some otters. These otters were just chilling out after a hectic day of otter stuff and I was able to get some super cute video of it. I added some random Youtube public domain music to the video since the original video just had waterfall noise.