@naughtysecrets Oh sorry, I removed the password from the beta branch, and didn't update the main thread about it. Magic fixes everything :o (Today)

@naughtysecrets The beta branch should take care of any game breaking issues. Is there something specific that isn't working for you? (Today)

@EdgeOfProphecy @FourbitFriday UGH they're just making it worse with every update (Today)

@FourbitFriday hope you didn't update your bed right before going to sleep (Today)

@amora_b I think more games should just suddenly pause after 40 minutes or so with just a message box that says "Hey, fuck you." (Today)

@MllePilgrim @infinite_ammo Gotta be quick about it if you want to keep up with me. (Yesterday)

@MllePilgrim @infinite_ammo they were delicious (Yesterday)

Luigis new final smash is pretty weird t.co/5DNaLrZLRr (Yesterday)

@Demruth My small rural home town in the US got a roundabout a few years ago. People actually protested it, and take routes to avoid it... (Yesterday)

@infinite_ammo The rich get richer. (Yesterday)

@infinite_ammo "hey guys if we split this 500 piece sushi party platter 5 ways..." (Yesterday)

@snakepixel His recovery is insane (like almost all chars in this game) You can do your air jump, then side B and jump cancel out of it! (Yesterday)

@snakepixel Bowser Jr is who I'm trying to get good with! I love his back air and his air attack after ejecting from the flyer thing. (Yesterday)

@ADAMATOMIC @MattThorson [187] xX Crosspwned j0nEz Xx (Yesterday)

@MattThorson Billy Barnacle (but his business card says William Barnacle) (Yesterday)

@MattThorson Crossbow Jones (Yesterday)

@rabbit_nabokov Or I guess just a script that takes in a number as an argument and spits out the string for 0 - 9? (Yesterday)

@rabbit_nabokov If you want 1 to give you "One" then the best bet would be to make a ds_map with the numbers as keys and the string as value (Yesterday)

@rabbit_nabokov Key string should be a string of characters pressed by the keyboard, or are you talking about the number keys? (Yesterday)

@rabbit_nabokov can you use the most recently added character to the key string? (Yesterday)


2014 - 11 - 2 / 4:22 pm / general

Index Palette Shader

Index Palette Shader

A few months ago I made and released a game jam game that featured a cool shader based off of Dan Fessler's HD Index Painting tutorial. The idea is to take a normal image and render it with an extremely limited palette. Essentially it's like a game boy shader, and with the help of a dither map texture it actually creates the illusion that there are more colors than there actually are.


The game jam version of the shader was rather clunky, and required the game to manually render a dither texture over the entire screen. Yesterday I spent some time figuring out how to apply the dither directly in the shader itself to make it more general purposed. Here's the entire shader:

#version 130
uniform sampler2D texture; // The main input texture (the screen.)
uniform sampler2D palette; // The palette texture.
uniform float shift; // The shift amount on the palette texture.
uniform float offset; // The offset for the random noise generation.
uniform float screenScale; // The current scale of the screen. (1x, 2x, etc)
uniform vec2 screenSize; // The size of the core game screen (320 x 240)
uniform float noiseAlpha; // The amount of alpha the noise should have.

// A weird way to generate a random number with a vec2 seed.
float rand(vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);

void main() {
// The size of the game window.
vec2 screenSizeScaled = screenScale * screenSize;
// The pixel coordinate being operated on.
vec2 pixpos = gl_TexCoord[0].xy;

// Get dither pixel
vec2 overlayCoord = floor(gl_FragCoord.xy / screenScale);
// Get 1 or 0 based on the pixel location.
float overlayPixelColor = mod(overlayCoord.x + overlayCoord.y, 2);
// Dither is black and white every other pixel.
vec4 overlayPixel = vec4(overlayPixelColor, overlayPixelColor, overlayPixelColor, 1);

// Scale the frag position to match the screen scale
vec2 scaledpos = floor(pixpos * screenSizeScaled);
// Adjust the position based on the scale of the screen.
scaledpos -= mod(scaledpos, screenScale);
// Convert back to 0 - 1 coordinate space.
scaledpos /= screenSizeScaled;

// Get base color.
vec4 pixcol = texture2D(texture, pixpos);

// Mix dither texture.
pixcol = mix(pixcol, overlayPixel, 0.1);

// Determine the brightness of the pixel in a dumb way.
float gray = (pixcol.r + pixcol.g + pixcol.b) / 3;

// Round it to the nearest 0.25.
gray = round(gray / 0.25) * 0.25;

// Add some noise.
gray += (rand(scaledpos + offset) * 2 - 1) * noiseAlpha;

// Map the palette to the pixel based on the brightness and shift.
pixcol = texture2D(palette, vec2(gray, shift));

// Multiply through the gl_Color for final output.
gl_FragColor = pixcol * gl_Color;

The shader does require a 2d texture for the palette itself. For this game the palette I used was this:


The "shift" uniform in the shader determines the Y coordinate to sample the palette on. A shift of 0 will sample the top most Y, and a shift of 1 will sample the bottom most. You can use this to dynamically change the palette during the game.

The shader needs to have the "screenScale" uniform set to the current scale of the screen. This will make sure that the pixel size is corrected for the dither and the noise. The shader also needs to know the "screenSize" in order for the noise pixels to be the correct size. You can also just set the "noiseAlpha" to 0 if you don't want any of that stuff to show up.

To make the noise change every update the "offset" value should be set to a random float 0 - 1 every update.

Here's what the game looks like without the shader:


And turning on the shader:



No Comments

2014 - 10 - 29 / 2:45 pm / doodle

Doodle Post



2014 - 10 - 27 / 7:38 pm / general

Dev Log: Snakes and Skeletons

Dev Log: Snakes and Skeletons

The struggle of building creatures out of skeletons and bones continues this week as I try to finish up a Snake class for Otter! One of my other goals with enemies is to be able to construct enemies out of "snakes" of entities. Basically have a series of pieces all following the next piece like a slithering snake.


I already had the ground work for this laid out last week, but today I dug into it some more so that I could actually have each piece of the snake be an entity with a skeleton. Now I can build crazy enemies and objects out of snakes composed of skeletons all animating! The next step is going to be going back to the game project itself and plugging some of this stuff in, as well as cleaning up the code as much as I can in order to have it be useful for people other than me.

No Comments

2014 - 10 - 25 / 3:55 am / doodle

Doodle Post


No Comments

2014 - 10 - 24 / 9:44 pm / general

Dev Log: More Skeletons!

Dev Log: More Skeletons!

This past week has been spent working on some Otter technology for implementing my own skeleton and bone systems.


But Kyle why aren't you using Flash or Spine or Spriter or some other way to implement bone animation!?

Well in regards to flash, I've seen what is necessary for writing a flash file interpreter and I am totally not interested in going down that path at all. Flash is already a giant pain to use for just frame by frame animation, and I've used to create animations way back in my flash cartoon days of college, and that is something I don't want to relive. I wish Flash got an overhaul in regards to its UX, but that'll never happen, so I don't want to rely on it.

In regards to Spine and Spriter, I already use Spine for pure art based skeletons. The thing about Spine is that I actually cannot include the Spine runtime for Otter by default -- it has to live in a separate repository. This is because it is a violation of the Spine license to distribute the runtime to users who may not have purchased the full version of Spine. That is the main issue there, and also I have no idea how to use the Spine skeletons for what I want to do, nor do I know how to create Spine skeletons on the fly at runtime. I would use Spriter, but so far I have not seen any C# runtimes or APIs that don't have major issues.


I ended up just creating my own since I felt that takes less time than learning how to use another tool, and since I have a very simple use case for this I can just jam out my own solution in a relatively quick time. I don't have any need for complicated animation files or animation blending or anything like that. This system is mostly designed to manipulate Entities in Otter, so that I can create big bad enemies built out of multiple pieces.

Also it may end up being the case that these enemies will be created at run time procedurally. If that is the case, I would have no idea how to implement that using Spine, Spriter, or Flash's systems.

No Comments

2014 - 10 - 24 / 9:35 pm / doodle

Doodle Post


No Comments



Hi there, my name is Kyle, and I'm a kid disguised as a grown up. I'm making video games and living the indie game developer life in Tempe, Arizona. Here you will find my thoughts, games, websites, doodles, and other stuff like that. I worked on Snapshot, Offspring Fling, and a whole bunch of other games. I also created and maintain Otter, a 2d game making framework. If you want to get a hold of me use the form on the bottom of the page, leave a comment, or just tweet at me. I try to post three times a week. Thanks for stoppin' by! You're the coolest.



Do you want to make a Let's Play of one of my games, or a just a video featuring footage of my games? You have my full permission to do so! Even if you are monetizing your videos, you still have my full permission to use any footage from any of my games. Go for it!


Your message has been sent! Thanks :)