I moved to a new URL! Check it out!

posts tagged with: otter

Platforming Nudging Assistance

Platforming Nudging Assistance
Making a solid feeling platformer isn't as simple as setting up horizontal movement, jumping, and gravity. There are a lot of tricks and behind the scenes magic involved in making something feel good to the player. In the past I've talked about ledge forgiveness, and input buffering, and now I'm going to add nudging assistance to the list!

Ledge forgiveness, input buffering are two tricks that let the player execute their intended action even if they screw it up slightly. Nudging assistance also falls into that category.

The Problem


My latest small game Starforger II is all about roaming around procedural levels. A lot of times the levels have one tile openings in walls that the player wants to navigate into. Take a look at what happens with just a typical platforming physics system when a player tries to navigate into a small tunnel like this.

Image


Even though the player really wants to slide into that hole as they fly by they simply cant because there is no frame in which the player is able to actually navigate into that tile. If their vertical speed is too great they will miss the hole every time even though they are holding down input that would make it seem like they should be able to squeeze into there.

Image


Image

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.

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.

Game Jam Procedural Generation Part II

Game Jam Procedural Generation Part II
In the last episode of Game Jam Procedural Generation I talked about the "outer layer" of my procedural generation code for my yet to be released game jam game. After the outer layer of stuff has been generated, that can be used to inform the "inner layer" of the procedural generation. So the outer layer in this case is the galaxy that the player can explore in their ship, and the inner layer is the actual side scrolling platformer level that they will explore.

Image


Where do we even begin? First keep in mind that I'm using Otter for all of this stuff, so if you see functions and code that looks totally unfamiliar, it's probably an Otter thing. Also keep in mind that all of this code was written during a 48 hour game jam, so it ain't pretty. I'm just going to be sharing big snippets of code and hopefully try to explain what is happening in each one.

In the last step I talked about how I create a config object to hold all of the possible fields that will be used to generate the level. Here's what that looks like:
class ScenePlatformingConfig {
public int Width;
public int Height;

public int ShipStartOffset;

public int TreasureDirection;
public int TreasureDistanceOffset;

public int GroundLevelOffset;

public bool Explored;
public bool Pillaged;

public int Jagginess;

public int Platforms;

public int DecaySpots;
public int DecayChance;

public int IslandSpots;
public int IslandSize;

public int Rooms;

public string Name;

public int BreakableChance;

public int CreatureChance;
}

Pretty straight forward. Just a simple class that will hold a bunch of values that can be then passed to the classes that generate the platforming level.