@HansenKimberley @theBanov t.co/jE5B0hsj14 (Today)

@TannerGill_ It is tough to take internet tutorial stuff and use it. I really recommend this: t.co/RZ27t0nGiO (Today)

@TannerGill_ Ah I see. I would recommend something like Game Maker Studio at this point. It's a pretty safe environment to learn in. (Today)

@jacobalbano @floatvoid Yeah I worry since it's not officially maintained though that it'll be janky and/or missing features. (Today)

@floatvoid that's what their runtime license prevents you from doing though :I (Today)

@TannerGill_ Hm what do you mean by new material? Not sure if I'm totally understanding the question. (Today)

@floatvoid Yeah that was pretty mean of them. I pretty much had no idea if I wanted to use it based off the trial because of that. (Today)

@ChevyRay yeah man people just don't converse like they used too t.co/nDS2HIqfOF (Today)

@floatvoid Yeah, well the main reason I used Spine is that they had a ready to roll C# API. Spriter's APIs seem to be less far along. (Today)

@HansenKimberley @theBanov I don't know POOP about Unity though! (Today)

@helvetica @aeiowu It really is amazing how this shit is all playing out just as predicted without net neutrality. (Today)

RT @helvetica: Oh great. Great fucking appointment Obama. God damnit. Look, I’m loving the healthcare, but this is a huge blunder. t… (Today)

RT @MOOMANiBE: If you like learning about interesting, lesser-known games, you really should be following @WarpDoor. (Today)

@twobitart @RayMPerry @pietepiet t.co/cQFOUQC6v3 (Today)

RT @rabbit_nabokov: momo 3 is 95% approved to top 100! please vote and RT to spread the word, minna!! t.co/Aw9zjkSpeZ t.co/Xo… (Today)

@legobutts Its a tool to teach american children that eating a sandwich of marshmallows is a perfectly fine meal. #diabetes (Today)

@twobitart nuuuuuudistu beachu~ (Today)

@djcoreynolan <3 (Today)

RT @djcoreynolan: dammit, life would be so excellent if I didn't have some mysterious autoimmune disease continuously sapping my HP (Today)

The fade away jumper: t.co/qaSLcckISB #TowerFall t.co/1Z1U1YF72t (Yesterday)

follow
search

2014 - 4 - 2 / 11:24 am / general

Dev Log: Anti-clumping Made Easy

Image

Starting to get back into a bit of a groove on this game thing. One little fun thing to work on was the enemy anti-clumping code. I don't want any enemies to stack on top of each other (although it would be smart of them to do so in order to conceal their numbers.) With a short bit of code I can have enemies push each other away, similar to how babies and rocks push away from each other in Offspring Fling.

public virtual void PushAway() {
if (Hitbox != null) {
if (Overlap(X, Y, (int)Tags.Enemy)) {
var e = Overlapped as Enemy;
if (e.Mass >= Mass) {
var push = new Vector2(X - Overlapped.X, Y - Overlapped.Y);

if (push.X == 0 && push.Y == 0) {
push = new Vector2(Rand.Float(-1, 1), Rand.Float(-1, 1));
}

push.Normalize(pushAwayForce);
pushAwaySpeed += push;
}
}
}

var length = Util.Approach((float)pushAwaySpeed.Length, 0, pushAwayForce * 0.5f);

pushAwaySpeed.Normalize(length);


X += (float)pushAwaySpeed.X * 0.01f;
Y += (float)pushAwaySpeed.Y * 0.01f;
}

Pretty neat! This is actually pretty similar to the original code in the prototype many many years ago, except now it's in fancy C# instead of GML. Enemies will call PushAway() every update.

No Comments

2014 - 4 - 2 / 11:14 am / doodle

Doodle Post

Image

Image

No Comments

2014 - 3 - 31 / 2:31 am / general

Dev Log: Coroutine Example

Image

Thanks to knowledge passed down from Chevy Ray I was able to get Coroutines working in Otter recently! Coroutines are magical chunks of code that are able to yield their execution and remember their state. It's bonkers what you can do with them using this power.

I added an example to Otter to hopefully help out any folks that are looking into using them:

using Otter;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoroutineExample {
class CoroutineScene : Scene {

public Image ImageBox = Image.CreateRectangle(50);

public Color NextColor = Color.White;
public Color CurrentColor = Color.White;

public CoroutineScene() : base() {
// Center that box.
ImageBox.CenterOrigin();

// Gotta draw the box.
AddGraphic(ImageBox);

// Set the box position.
ImageBox.X = 100;
ImageBox.Y = 100;
}

public override void Begin() {
base.Begin();

// Start the coroutine, yo.
Game.Coroutine.Start(MainRoutine());
}

/// <summary>
/// The main coroutine to execute. This will move the box around and change its color.
/// </summary>
/// <returns>Whatever a coroutine thing returns. Sometimes 0 I guess.</returns>
IEnumerator MainRoutine() {
// Wait for 30 frames.
yield return Coroutine.Instance.WaitForFrames(30);
// Set the next color.
NextColor = Color.Red;
// Move the box to the top right.
yield return MoveBoxTo(540, 100);

// Wait for 30 frames.
yield return Coroutine.Instance.WaitForFrames(30);
// Set the next color.
NextColor = Color.Yellow;
// Move the box to the bottom right.
yield return MoveBoxTo(540, 380);

// Wait for 30 frames.
yield return Coroutine.Instance.WaitForFrames(30);
// Set the next color.
NextColor = Color.Green;
// Move the box to the bottom left.
yield return MoveBoxTo(100, 380);

// Wait for 30 frames.
yield return Coroutine.Instance.WaitForFrames(30);
// Set the next color.
NextColor = Color.Cyan;
// Move the box to the top left.
yield return MoveBoxTo(100, 100);

// Start a new coroutine.
Game.Coroutine.Start(MainRoutine());
}

IEnumerator MoveBoxTo(float x, float y) {
// Used to determine the completion.
var initialDistance = Util.Distance(ImageBox.X, ImageBox.Y, x, y);

float currentDistance = float.MaxValue;
while (currentDistance > 1) {
currentDistance = Util.Distance(ImageBox.X, ImageBox.Y, x, y);

// Determine the completion of the movement from 0 to 1.
var completion = Util.ScaleClamp(currentDistance, 0, initialDistance, 1, 0);

// Lerp the color of the box.
ImageBox.Color = Util.LerpColor(CurrentColor, NextColor, completion);

// Spin the box along with its movement.
ImageBox.Angle = Util.ScaleClamp(completion, 0, 1, 0, 360);

// Actually move the box.
ImageBox.X = Util.Approach(ImageBox.X, x, 5);
ImageBox.Y = Util.Approach(ImageBox.Y, y, 5);

// Wait until next frame.
yield return 0;
}

// Done moving. Update the color.
CurrentColor = NextColor;
}
}
}

I'm actually totally not sure if I'm doing it correctly in the example, but it seems to be working out well so far. Going to try using them for various things now in my current projects!

2 Comments

2014 - 3 - 31 / 1:27 am / doodle

Doodle Post

Image

Colored this with 20% monitor brightness so hopefully it came out okay.

No Comments

2014 - 3 - 30 / 4:16 pm / general

Otter Updates

Otter Updates

Over the past week I've finally pushed some updates to Otter after managing to rip out the Spine animation stuff. It turns out that in order to use the Spine runtime you need a purchased copy of Spine, meaning that if I include the Spine code in Otter everyone that uses Otter would need a copy of Spine... not ideal. (I wish Spine wouldn't license their code like this.)

So now the Spine runtime for Otter lives in a separate repository. It can be used along with Otter if you import it into your solution also using Otter. After you import it you need to give it a reference to Otter (also in your solution) and then give your game project a reference to OtterSpine. Then you should be ready to roll with SpineAnimation.cs.

Other updates to otter include:

* Renamed GetClass to GetEntities on Scene
* Add Vertices graphics type
* Added Color.Mix()
* Corrected issue between game angle and graphics angles
* Fixed issue with BoxCollider constructor
* Fixed some collision bugs
* Added shortcut of Left-Alt in Debugger to hide debugger (useful for screenshots)
* Minor updates to Particle
* Added LerpColor to Util
* Slight changes to Vector2

If there's any bugs or horrific things broken then let me know in the Otter forums!

No Comments

2014 - 3 - 29 / 3:55 pm / doodle

Doodle Post

Image

Image

No Comments

about

About

Hi there, my name is Kyle, and I'm a 27 year old kid with adult powers. 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.

facebook

videos

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!

contact

Your message has been sent! Thanks :)
SEND MESSAGE