<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

<channel>
  <title>kpulv . kyle pulver . xerus</title>
  <link>http://kpulv.com</link>
  <description>A guy that makes games and draws stuff and makes websites sometimes.</description>
  <generator>Pineapple Webzone 1.0</generator>
  <atom:link href="http://kpulv.com/feed/" rel="self" type="application/rss+xml" />
    <item>
    <title><![CDATA[Screenshot Saturday: SFML C#]]></title>
    <link>http://kpulv.com/127/Screenshot_Saturday__SFML_C_/</link>
    <guid>http://kpulv.com/127/Screenshot_Saturday__SFML_C_/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/127.jpg" class="image" /><br/><br/><img src="http://kpulv.com/upload/files/51813-ss-small.jpg" alt="Image" border="0"/><br />
<br />
Working on my C# framework for SFML.NET.  C# is actually really neat and I've been having a lot of fun with it!  Although I'm getting to the tricky parts now... gotta implement some stuff like animations, texture atlases, and collision next!  I just found out how easy it is to use shaders on render textures in SFML too, so I'm pretty excited to start messing around in shader land in the coming weeks.]]></description>
    <pubDate>Sat, 18 May 2013 13:58:51 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Dev Log: SFML C#]]></title>
    <link>http://kpulv.com/126/Dev_Log__SFML_C_/</link>
    <guid>http://kpulv.com/126/Dev_Log__SFML_C_/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/126.jpg" class="image" /><br/><br/>At this point I am becoming an expert at making test applications full of randomly colored squares.<br />
<br />
<img src="http://kpulv.com/upload/files/sfmlcsharptest.jpg" alt="Image" border="0"/><br />
<br />
This was made with <a href="http://www.sfml-dev.org/download/bindings.php" target="_blank">SFML.NET</a> and right now is just a quick framework put together loosely based off of <a href="https://github.com/Draknek/FlashPunk" target="_blank">Flashpunk</a>.  I don't have anything concrete yet, just a basic system of Scenes and Entities, but I'm having fun putting this together so far.<br />
<br />
One thing I'm worried about is access to cool libraries.  In AS3 I make use of <a href="http://www.greensock.com/tweenlite/" target="_blank">TweenLite</a> and <a href="https://code.google.com/p/as3crypto/" target="_blank">AS3Crypto</a> a lot.  I'm really surprised there isn't a big &quot;go to&quot; tweening library for C#.  I found some C# tweening classes with some help from Twitter, but they're mostly just &quot;here's the code, good luck&quot; type things.  I was really hoping for something more like TweenLite with a bunch of demos and test applications to try out.  (I know there's tweening options for Unity in C#, but since they are built with Unity integration they don't really help much without going into the core code and tearing it apart which I don't really have the know how to do.)<br />
<br />
I think for now I'll move forward with this while also working a little bit on my AS3 project still.  If I can actually manage to make a playable thing with SFML C# in the next two weeks or so then I'll call it a success.<br />
<br />
I am both loving and hating this period of experimenting with new stuff, haha!]]></description>
    <pubDate>Thu, 16 May 2013 11:29:59 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[AS3 State Machine]]></title>
    <link>http://kpulv.com/125/AS3_State_Machine/</link>
    <guid>http://kpulv.com/125/AS3_State_Machine/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/125.jpg" class="image" /><br/><br/>State Machines are the greatest thing I've ever discovered when it comes to programming games.  More and more I'm beginning to realize that a lot of the structure of the tools I've used is in fact a state machine!<br />
<br />
<span class="header3">Finite State Machines</span><br />
To find out exactly what a state machine is, check out <a href="https://en.wikipedia.org/wiki/Finite-state_machine" target="_blank">this wikipedia article</a> which describes them as &quot;...an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition; this is called a transition. A particular FSM is defined by a list of its states, and the triggering condition for each transition.&quot;<br />
<br />
An example of this in action in my games are the guards in <a href="http://superninjaslash.com" target="_blank">Super Ninja Slash</a>.  They have a couple of different states.  Idle, Alarmed, Shooting, and Dead.  That covers all their bases for their behavior.<br />
<br />
Without using a state machine, writing code for all of that behavior can quickly become a giant mess of if statements and booleans.  With a state machine, I can completely separate all the code for the guard's Idle state, the Alarmed state, Shooting, and Dead.<br />
<br />
<span class="header3">Source Codez</span><br />
It would probably help to see my code for my state machine, so here's that:<br />
</p><pre class="brush: as3">package com.kpulv.bits <br />
{<br />
	import com.kpulv.Bit;<br />
	public class StateMachine extends Bit<br />
	{<br />
		/*<br />
		State Adding Template:<br />
			.addState(<br />
				function():void {<br />
					<br />
				},<br />
				function():void {<br />
					<br />
				},<br />
				function():void {<br />
					<br />
				}<br />
			)<br />
		*/<br />
		private var states:Array = new Array();<br />
		private var state:int = -1;<br />
		<br />
		private var stack:Array = new Array();<br />
		private var timers:Array = new Array();<br />
		<br />
		private var STATE_BEGIN:String = &quot;begin&quot;;<br />
		private var STATE_UPDATE:String = &quot;update&quot;;<br />
		private var STATE_END:String = &quot;end&quot;;<br />
		<br />
		/** Trace warnings to the debug console. */<br />
		public var warnings:Boolean = false;<br />
		<br />
		public function StateMachine() <br />
		{<br />
			super();<br />
			name = &quot;StateMachine&quot;;<br />
			<br />
		}<br />
		<br />
		override public function update():void {<br />
			super.update();<br />
			<br />
			var curState:int = -1;<br />
			/** If there is a stack, set the top element to the current state */<br />
			if (stack.length &gt; 0) {<br />
				curState = stack[stack.length - 1];<br />
				timers[stack.length - 1] += 1;<br />
			}<br />
			else {<br />
				curState = state;<br />
			}<br />
	<br />
			if (curState == -1) {<br />
				if (warnings) trace(&quot;[State Machine: No State Set]&quot;);<br />
				return;<br />
			}<br />
			<br />
			if (states.length == 0) { //no states!<br />
				if (warnings) trace(&quot;[State Machine: No States]&quot;);<br />
				return;<br />
			}<br />
			<br />
			if (states[curState] == null) {<br />
				if (warnings) trace(&quot;[State Machine: Invalid State]&quot;);<br />
			}<br />
			<br />
			var updateFunction:Function = states[curState][STATE_UPDATE];<br />
			if (updateFunction != null) {<br />
				updateFunction.call();<br />
			}<br />
<br />
		}<br />
<br />
		public function addState(begin:Function = null, update:Function = null, end:Function = null):uint {<br />
			var obj:Object = new Object();<br />
			obj[STATE_BEGIN] = begin;<br />
			obj[STATE_UPDATE] = update;<br />
			obj[STATE_END] = end;<br />
			<br />
			return states.push(obj)-1;<br />
		}<br />
		<br />
		public function pushState(state:uint):void {<br />
			if (states[state]) {<br />
				stack.push(state);<br />
				timers.push(0);<br />
				<br />
				if (states[state]) {<br />
					if (states[state][STATE_BEGIN]) {<br />
						var beginFunction:Function = states[state][STATE_BEGIN];<br />
						beginFunction.call();<br />
					}<br />
				}<br />
			}<br />
			else {<br />
				if (warnings) trace(&quot;[State Machine: Invalid state to push.]&quot;);<br />
			}<br />
		}<br />
		<br />
		public function popState():int {<br />
			if (stack.length == 0) {<br />
				if (warnings) trace(&quot;[State Machine: Stack has nothing to pop.]&quot;);<br />
				return -1;<br />
			}<br />
			<br />
			var state:uint = stack[stack.length - 1];<br />
			if (states[state]) {<br />
				if (states[state][STATE_END]) {<br />
					var endFunction:Function = states[state][STATE_END];<br />
					endFunction.call();<br />
				}<br />
			}<br />
			timers.pop();<br />
			return stack.pop();<br />
		}<br />
		<br />
		public function changeState(state:uint):void {<br />
			if (stack.length &gt; 0) {<br />
				if (warnings) trace(&quot;[State Machine: Cannot change state while in stack mode.]&quot;);<br />
				return;<br />
			}<br />
			<br />
			if (this.state == state) {<br />
				return;<br />
			}<br />
			<br />
			var previousState:uint = this.state;<br />
			this.state = state;<br />
			<br />
			if (!states[state]) {<br />
				if (warnings) trace(&quot;[State Machine: Invalid State]&quot;);<br />
				return;<br />
			}<br />
			<br />
			timer = 0;<br />
			<br />
			//call end on current state<br />
			if (states[previousState]) {<br />
				var endFunction:Function = states[previousState][STATE_END];<br />
				if (endFunction != null) {<br />
					//trace(&quot;[State Machine: Calling End]&quot;);<br />
					endFunction.call();<br />
				}<br />
			}<br />
			<br />
			//call begin on new state<br />
			var beginFunction:Function = states[state][STATE_BEGIN];<br />
			if (beginFunction != null) {<br />
				//trace(&quot;[State Machine: Calling Begin]&quot;);<br />
				beginFunction.call();<br />
			}<br />
		}<br />
		<br />
		public function resetState():void {<br />
			timer = 0;<br />
			<br />
			var beginFunction:Function = states[state][STATE_BEGIN];<br />
			if (beginFunction != null) {<br />
				beginFunction.call();<br />
			}<br />
		}<br />
		<br />
		public function get currentState():uint {<br />
			return state;<br />
		}<br />
		<br />
		public function get stateTimer():uint {<br />
			if (stack.length &gt; 0) {<br />
				return timers[stack.length - 1];<br />
			}<br />
			return timer;<br />
		}<br />
		<br />
	}<br />
<br />
}</pre><p>I should note that it extends a class called &quot;Bit&quot; which is just a component base class that I use for my Entities.  I can add Bits to Entities and they are automatically updated when the Entity updates.  Here's Bit:<br />
</p><pre class="brush: as3">package com.kpulv {<br />
	public class Bit {<br />
		<br />
		public var parent:Actor;<br />
		<br />
		public var name:String;<br />
		<br />
		public var timer:uint = 0;<br />
		<br />
		public var active:Boolean = true;<br />
		<br />
		public function Bit() {<br />
			name = String(KP.getClass(this));<br />
		}<br />
		<br />
		public function update():void {<br />
			if (!active) return;<br />
			<br />
			timer++;<br />
		}<br />
		<br />
		public function render():void {<br />
			<br />
		}<br />
		<br />
		public function renderDebug():void {<br />
			<br />
		}<br />
		<br />
		public function added():void {<br />
			<br />
		}<br />
		<br />
		public function removed():void {<br />
			<br />
		}<br />
		<br />
		public function toString():String {<br />
			return &quot;[Bit &quot; + name + &quot;]&quot;;<br />
		}<br />
	}<br />
}</pre><p><span class="header3">Implementation</span><br />
The basic set up of my State Machine is that sets of functions are added to it as the States.  Each State just has three functions: begin, update, and exit.  When a state is added to the machine, it returns an int which is the reference to that state.  So usually the code for adding a state can look like this:<br />
</p><pre class="brush: as3">//setting up a state<br />
var STATE_IDLE:uint;<br />
sm:StateMachine = new StateMachine();<br />
STATE_IDLE = sm.addState(enterFunction, updateFunction, exitFunction);<br />
sm.changeState(STATE_IDLE);<br />
<br />
// later, in the update function<br />
sm.update();<br />
<br />
// later in the class<br />
protected function updateFunction():void {<br />
	//called every update of state machine<br />
}<br />
protected function enterFunction():void {<br />
	//called when the state machine enters this state<br />
}<br />
protected function exitFunction():void {<br />
	//called when the state machine is leaving this state<br />
}</pre><p><span class="header3">Super Ninja Guard</span><br />
This style of coding made creating the guard in Super Ninja Slash really easy.  I can think about the guard acting in four different distinct ways.  When he is idle, he just marches left and right and turns around when he gets to a wall, or when he reaches a ledge.  He can also spot the player, or hear the player in this state.<br />
<br />
<img src="http://kpulv.com/upload/files/ninjaguard_01.jpg" alt="Image" border="0"/><br />
<br />
If the guard hears the player, he will change to his STATE_ALARMED state.  In this state, the guard will change his walk speed and move really fast in the direction he heard the sound.  When he reaches a wall or an edge, he will stop moving and after a certain amount of time of being stopped, he'll return to his STATE_IDLE state.  The guard can also be re-alarmed during this state, so if the player keeps making sounds, the guard will continuously be alarmed.<br />
<br />
<img src="http://kpulv.com/upload/files/ninjaguard_02.jpg" alt="Image" border="0"/><br />
<br />
While in the idle state, or the alarmed state, if the guard spots the player with his flashlight, he will enter the STATE_SHOOT state.  This state is pretty simple and just has the guard shoot four times at the player (or sometimes another guard's flying dead body.)  After the four shots have been fired, the guard will return to the STATE_IDLE state.<br />
<br />
<img src="http://kpulv.com/upload/files/ninjaguard_03.jpg" alt="Image" border="0"/><br />
<br />
The last state is STATE_RAGDOLL or the dead state.  This is after the player has slashed the guard with the sword.  The guard can never leave this state, and all it does really is turn off all the movement of the guard, switch the animations, and change the guard's physics a little bit to make him a little bit more bouncy when he flies around from gunfire or slashes.<br />
<br />
<img src="http://kpulv.com/upload/files/ninjaguard_04.jpg" alt="Image" border="0"/><br />
<br />
Here's a quick attempt to map out the basic logic behind this system:<br />
<br />
<img src="http://kpulv.com/upload/files/ninjaguard_05.jpg" alt="Image" border="0"/><br />
<br />
The guard is pretty stupid, and if I wanted to or had more time (this was a 48 hour game jam game) I could make him way more complicated and add many more states.  Maybe after he's done shooting he would enter a state that would cause him to investigate the area the player disappeared into more, or he would enter a state that would cause him to call for help and surrounding guards would enter a state that would lead them to the guard that is calling for help.  When I have a state machine that can organize all the code for these different behaviors it becomes way easier to ramp up the complexity without adding too much messy code.<br />
<br />
<span class="header3">Some More Thoughts</span><br />
With a state machine all of this code is completely separated, and it's much easier on my brain to think about the different phases of an enemy's behavior.  The applications of the finite state machine go way beyond just enemies though.  My entire game manager class in <a href="http://offspringfling.com" target="_blank">Offspring Fling</a> was a huge state machine of different states like intro, paused, gameplay, cleared level, restart level, go to next level, go back to title screen, etc.  Also when I was working on menus for my Global Game Jam game I made them all into state machines to handle when they are arriving on the screen, being used, and being dismissed.<br />
<br />
Another quick thing to note is that the state machine I posted also supports a stack of states.  I can push and pop states and the state machine will remember the whole stack, but only update the state on top.  This was inspired by this <a href="http://gamedev.tutsplus.com/articles/game-design-articles/how-to-build-a-jrpg-a-primer-for-game-developers/" target="_blank">this article about RPG design</a>.  I haven't really fully tested this yet but so far it works okay.  Feel free to take my code and make it way better for your needs!]]></description>
    <pubDate>Tue, 14 May 2013 11:03:54 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Offspring Fling 50% Off Sale]]></title>
    <link>http://kpulv.com/124/Offspring_Fling_50__Off_Sale/</link>
    <guid>http://kpulv.com/124/Offspring_Fling_50__Off_Sale/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/124.jpg" class="image" /><br/><br/>Offspring Fling is part of the <a href="http://showmethegames.com" target="_blank">Show me the Games</a> sales promotion this week, which is appropriately named <a href="http://www.showmethegames.com/sales.php" target="_blank">Show me the Sales</a>!  There are a ton of amazing games on sale and you should not miss this chance!  These sales are <strong>direct from the developer</strong> which is pretty dang cool.<br />
<br />
<object width="584" height="360"><param name="movie" value="http://www.youtube.com/v/0TIVD7qwEiE&hl=en&fs=1&rel=0&ap=%2526fmt%3D22"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0TIVD7qwEiE&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="584" height="360"></embed></object><br />
<br />
Today is also Mothers Day!  So as part of Show me the Sales, and to celebrate Mothers Day, <a href="http://offspringfling.com" target="_blank">Offspring Fling</a> (a game that was originally made during a Mothers Day game jam) is now <strong>50% off</strong> on the <a href="http://offspringfling.com/#store" target="_blank">Humble Store</a>.<br />
<br />
<span class="centerme"><iframe class="store" src="http://www.humblebundle.com/store/product/offspringfling" width="550" height="264" frameborder="0"></iframe></span><br />
Just use the friendly widget right there if you want to grab a copy of the game during the sale.  All sales on the humble store also include a free <strong>Steam key</strong> to redeem to activate the game on <a href="http://store.steampowered.com/app/211360/" target="_blank">Steam</a>.]]></description>
    <pubDate>Sun, 12 May 2013 14:33:49 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Platforming Ledge Forgiveness]]></title>
    <link>http://kpulv.com/123/Platforming_Ledge_Forgiveness/</link>
    <guid>http://kpulv.com/123/Platforming_Ledge_Forgiveness/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/123.jpg" class="image" /><br/><br/>When it comes to making a cool platforming game there's all kinds of little tricks you can do to make your game shine above all the rest.  I mentioned <a href="http://kpulv.com/106/Jump_Input_Buffering/" target="_blank">jump input buffering</a> in a previous post and how silently helping the player out here and there can make a huge difference in the feel of your game.  The topic of this post is very similar to that!<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_01.jpg" alt="Image" border="0"/><br />
<br />
Take a look at this typical platforming scenario.  Our player is barreling toward a ledge at top speed, just holding right without a care in the world.  They're going to want to jump when they get to the end of that ledge, and they're probably going to want to hit jump <em>as late as possible</em> so that they get the maximum distance out of their jump.<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_02.jpg" alt="Image" border="0"/><br />
<br />
Ideally they would hit the jump button right now.  Their character is still on the ground, and in the most simple implementation of a platformer jump system then this would be fine.  I assume that the code would be just something along the lines of <em>if (onGround) { jump(); }</em> and onGround would evaluate to true if our player collides with the ground at y + 1.<br />
<br />
But what happens if the player just slightly overshoots the ledge?<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_03.jpg" alt="Image" border="0"/><br />
<br />
If our most basic platforming system is only looking at the player's y + 1 to detect the ground, then the player will not be able to jump in this case.  At this point you might ask well doesn't that make sense?  The player isn't on the ground, so they can't jump... that's how it would work in the real world!<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_04.jpg" alt="Image" border="0"/><br />
<br />
This isn't the real world though, this is video games!  If you're playing a fast paced platformer running at 60 frames per second, it's incredibly easy to hit the jump button right after you run off a ledge, but to your feeble human eyes it looked like you hit the jump button while you were still on the ground.  This can be incredibly frustrating, especially if you're trying to make jumps across some pretty wide gaps and you're trying to maximize your jump distance.<br />
<br />
What I like to do for my games for this situation is to introduce a timer that keeps track of how long it has been since the player last touched the ground.  I usually refer to it as a <em>jump grace period</em>.<br />
<br />
The logic goes a little something like this: First I have a jumpGraceTimer and a jumpGraceTime.  jumpGraceTime is a fixed value of how may frames I will allow the player to still have access to their jump after they leave the ground.  Usually this is around 3 to 5 frames (at 60 frames per second) depending on the speed of the player and the game.  The timer counts down from that value to 0 whenever the player is no longer touching the ground (no collision at y + 1) when they <em>didn't</em> jump.  If they did jump, I assume that they are purposely leaving the ground and I don't need to help them, so I set the timer to 0.  When the player is touching the ground, that timer is always set to jumpGraceTime, so that it's ready to count down when the ground collision is no longer happening.<br />
<br />
Now when I check to see if my player can actually jump or not, I'm actually checking to see if they are on the ground (onGround) or if the jumpGraceTimer is greater than 0.  If they indeed can jump, then I do the jump logic and set the jumpGraceTimer to 0 manually.  I don't want the player to be able to jump multiple times if they happen to be really good at mashing.<br />
<br />
</p><pre class="brush: as3">if (jumpInput) {<br />
	if (onGround || graceTimer &gt; 0) {<br />
		jump();<br />
	}<br />
}<br />
<br />
//somewhere else in the code:<br />
public function jump():void {<br />
	//pretend theres more jumping logic here<br />
	graceTimer = 0;<br />
}</pre><p><br />
You can implement this in any way you want really, but this is just my go to technique! (<em>Edit: Actually I guess I could just check to see if the graceTimer is &gt; 0... but there might be some reason why I'm still checking onGround || graceTimer &gt; 0... I can't remember now, haha!</em>)<br />
<br />
So here we go again.  Our player runs off the ledge and hits jump just 2 frames after they've left the ground...<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_06.jpg" alt="Image" border="0"/><br />
<br />
But thanks to our jumpGraceTime that allows the player to be off the ledge for 3 to 5 frames before their jump is taken away, they can jump!<br />
<br />
<img src="http://kpulv.com/upload/files/platformer_ledge_05.jpg" alt="Image" border="0"/><br />
<br />
And all is right in the world.  If you do this right then the player wont suspect a thing.  A very popular platformer game that you've probably heard of before (<a href="http://www.adamatomic.com/canabalt/" target="_blank">Canabalt</a>) makes use of this technique!  If you really try to push the limit, you'll notice that your character can actually be totally off the ledge and still jump as if his feet were on solid ground, but just for a fraction of a second.<br />
<br />
Just be careful with how much time you allow the player to have before they can no longer jump.  I implemented this in <a href="http://offspringfling.com" target="_blank">Offspring Fling</a> with a very small timing window and it works just fine.  However, we implemented this technique in <a href="http://snapshotgame.com" target="_blank">Snapshot</a> as well, but the timing window might actually be <em>too</em> generous in this case. There are times where you can clearly see Pic falling before you push the jump button, and this can sometimes cause a weird disconnect, or reveal the &quot;man behind the curtain&quot; which can make the player feel a little disrespected.<br />
<br />
Little tricks like this that help the player feel more in control can really help your platformer shine!  But you don't want to go overboard and baby the player either.  Let them roam free and hurt themselves sometimes and learn from their mistakes, but also make sure they don't get frustrated by tiny details like pushing a button too early or too late by fractions of a second (unless we're talking about <a href="http://www.youtube.com/watch?v=JmGlTukjP58" target="_blank">Street Fighter</a>.)]]></description>
    <pubDate>Sat, 11 May 2013 00:13:30 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[More Development Options!]]></title>
    <link>http://kpulv.com/122/More_Development_Options_/</link>
    <guid>http://kpulv.com/122/More_Development_Options_/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/122.jpg" class="image" /><br/><br/>Since <a href="http://kpulv.com/120/Dev_Log__What_the_hell_am_I_doing_/" target="_blank">my last post</a> about trying out a bunch of different engines and coding languages, a bunch more options were pointed out to me by various people through the comments and through facebook and twitter, so here's a quick rundown of these things I've never even heard of or considered until last week!<br />
<br />
<span class="header3">SFML for C#</span><br />
Apparently <a href="http://www.sfml-dev.org/" target="_blank">SFML</a> has a bunch of builds for other programming languages aside from C++.  You can grab the C# version and a lot more versions <a href="http://www.sfml-dev.org/download/bindings.php" target="_blank">right here</a>.  BlendoGames has a pretty <a href="http://blendogames.com/news/?p=106" target="_blank">nifty write up</a> on using SFML for C# along with Mono for <a href="http://blendogames.com/atomzombiesmasher/" target="_blank">Atom Zombie Smasher</a>.  I haven't tried it out for C# yet because I can't even figure out how to get it working with Visual Studio C#... the readme assumes that I know way more than I do.<br />
<br />
<span class="header3">Allegro 5</span><br />
<a href="http://alleg.sourceforge.net/" target="_blank">Allegro</a> is a pretty classic graphics library.  I actually tried using Allegro after I experimented with SDL back in 2008.  The latest version looks pretty neat, except I am not a big fan of the underscore style formatting of all the Allegro functions.  It looks like it's only for C and C++.<br />
<br />
<span class="header3">Monkey</span><br />
<a href="http://www.monkeycoder.co.nz/" target="_blank">Monkey</a> is a language that compiles to virtually every modern device out there, and it also has its own IDE to work with.  Apparently <a href="https://twitter.com/braceyourselfok" target="_blank">Brace Yourself Games</a> is using this for their upcoming title <a href="http://braceyourselfgames.com/" target="_blank">Crypt of the NecroDancer</a>.<br />
<br />
<span class="header3">StarlingPunk</span><br />
I had no idea that <a href="http://www.andysaia.com/radicalpropositions/starlingpunk/" target="_blank">StarlingPunk</a> even existed, and I thought I knew everything about all the *Punk interations!  Haven't dug into this one yet, but it looks like a rewrite of the underbelly of Flashpunk to make it compatible with Stage3d.  Unfortunately it looks like the immediate drawing stuff doesn't work as a result, but there is some support for Rectangles and Circles.<br />
<br />
<span class="header3">BlitzMax</span><br />
I've heard of <a href="http://www.blitzbasic.com/Products/blitzmax.php" target="_blank">BlitzMax</a> before but I actually only knew <a href="http://androidarts.com/" target="_blank">one person</a> that used it, but now I know <a href="http://www.greyaliengames.com/" target="_blank">two</a>!  BlitzMax has its own IDE and the language looks pretty strange to me since it appears to be based off BASIC, but if that's what you're into then maybe BlitzMax is for you.<br />
<br />
<span class="header3">Iggy</span><br />
Someone suggested <a href="http://www.radgametools.com/iggy.htm" target="_blank">Iggy</a> to me in the realm of Flash but this appears to be more of a Scaleform type thing where you're designing user interfaces with flash to be imported into a larger scale game project coded with something else.  I'm not sure I'd be actually into making a game with this because I don't even use the Flash software to make any of my flash games.<br />
<br />
<span class="header3">Futile</span><br />
In the wild word of <a href="http://unity3d.com" target="_blank">Unity</a> I've been meaning to check out this 2d framework called <a href="http://www.reddit.com/r/futile" target="_blank">Futile</a>.  It looks like it has a lot of ideas from the Flash world assembled into an easy to use code driven framework to render 2d stuff in Unity.  I am going to check this out fully at some point soon, but my up front issue with it is that it is based on flash stuff which I don't use often (stuff like addChild() and all that.)  People might be confused since I use FlashPunk, but FlashPunk totally subverts all of the standard flash practices because it operates all inside a single Sprite object.<br />
<br />
<span class="header3">Corona</span><br />
<a href="http://www.coronalabs.com/products/corona-sdk/" target="_blank">Corona</a> came up in the discussion as well, but this looks like it's more geared toward app development for Android and iOS and not so much PC, Mac, and Linux games.  It would be nice to be able to do some stuff on iOS or Android, but honestly I am not too excited about it, so I'm looking for something that's more focused on desktops if anything.<br />
<br />
<span class="header3">Zoetrope</span><br />
Don't know much about this one other than that it's running on top of the LOVE runtime, so you'll need that runtime to try the demo out.  <a href="http://libzoetrope.org/" target="_blank">Zoetrope</a> looks like it's based in Lua, which unfortunately for me means it's out.  I know that a lot of people like Lua, but I just got very frustrated with it when using it for <a href="http://snapshotgame.com" target="_blank">Snapshot</a> (I couldn't even use +=, c'mon!)<br />
<br />
<span class="header3">Closing Thoughts</span><br />
Even with this list and the list from my last post, there are still way more options out there for making games which is pretty crazy to think about.  A lot my issues just seem to come from the fact that I've formed habits based on old, inefficient ways of doing things, specifically immediate drawing.  It just makes so much sense to me to call draw functions and have things be copied to the screen in the order in which their functions are called... but most hardware I guess hates this technique, which is why most engines don't seem to even support this type of thing.  I just love manipulating bitmapdata in flash and controlling exactly when something is rendered in the code!<br />
<br />
I think ultimately I'm going to stick with AS3 and FlashPunk until I finish one more project with it.  I will be trying to learn some new stuff on the side at the same time, but so far all of my searches have left me frustrated.  FlashDevelop and FlashPunk have spoiled me, and now whenever I try anything I just compare it to those and get easily discouraged when something feels &quot;worse&quot; than the way that FlashPunk does it.<br />
<br />
It's difficult to dive into something and give it my all when I'm not sure if what I'm doing is the right decision...]]></description>
    <pubDate>Wed, 08 May 2013 11:41:38 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Doodle Post]]></title>
    <link>http://kpulv.com/121/Doodle_Post/</link>
    <guid>http://kpulv.com/121/Doodle_Post/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/121.jpg" class="image" /><br/><br/><img src="http://kpulv.com/upload/files/13-5-7-doodle.jpg" alt="Image" border="0"/>]]></description>
    <pubDate>Tue, 07 May 2013 14:58:25 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Dev Log: What the hell am I doing?]]></title>
    <link>http://kpulv.com/120/Dev_Log__What_the_hell_am_I_doing_/</link>
    <guid>http://kpulv.com/120/Dev_Log__What_the_hell_am_I_doing_/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/120.jpg" class="image" /><br/><br/>I'm not really sure what I'm doing right now.  I'm kinda going all over the place if you can tell from my past two or three weeks of <a href="http://kpulv.com/107/FlashDevelop_with_HaXe_NME_and_HaXePunk" target="_blank">blog</a> <a href="http://kpulv.com/115/FlashDevelop_to_iPad_Workflow/" target="_blank">posts</a>.<br />
<br />
I got back from <a href="http://kpulv.com/104/Some_Post_GDC_Thoughts/" target="_blank">GDC</a> and I saw what people were working on and I felt kinda crappy about putting all this effort into yet another AS3 game with Adobe AIR.  The problem is performance.  Flashpunk has a hard time maintaining 60 frames per second because of weird Flash things... it's just not that super stable.  <a href="http://offspringfling.com" target="_blank">Offspring Fling</a> is a relatively simple 2d game and for whatever reason some people with modern computers have a hard time running it at 60 fps and this is extremely frustrating for both them and me.<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-heartbeat.jpg" alt="Image" border="0"/><br />
<br />
One day I went through some of my old prototypes.  I took a look at <a href="http://www.youtube.com/watch?v=yhsQaNGwUgQ" target="_blank">Gaiadi</a>, my <a href="http://ludumdare.com" target="_blank">Ludum Dare</a> game from three years ago (WHAT THE HELL HOW IS IT THREE YEARS OLD ALREADY.)  One of the most disturbing things about it was how smooth it ran.  The <a href="http://www.yoyogames.com/gamemaker/studio" target="_blank">Game Maker</a> run time is actually pretty dang impressive and it runs at a solid 60 fps, especially when compared to flash.  This made me actually feel pretty bummed because Offspring Fling isn't nearly as stable (at least in my eyes.)  It's one of those moments where I asked myself "am I somehow getting worse at making games?"<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-gaiadi.jpg" alt="Image" border="0"/><br />
<br />
So I want to learn something new... but then I've already put all this work into this AS3 framework that I'm using.  The amount of friction to start on something new is really tough, because right now in AS3 making things is extremely fast and efficient because I've solved a lot of my issues and have a bunch of helper classes with super fast solutions to common problems across my projects.  AS3 just also has a ton of useful libraries that I make use of like <a href="https://www.greensock.com/tweenlite/" target="_blank">TweenLite</a> and <a href="https://code.google.com/p/as3crypto/" target="_blank">AS3Crypto</a>.<br />
<br />
I started by experimenting with <a href="http://www.nme.io/" target="_blank">HaxeNME</a> a few weeks ago.  I decided to check out <a href="http://haxepunk.com/" target="_blank">HaxePunk</a> since <a href="https://github.com/Draknek/FlashPunk" target="_blank">FlashPunk</a> is my favorite thing ever.  At first I was incredibly pleased by the performance when building to a native windows target.  60 frames per second, consistently, with over 10000 entities being rendered and updated!  I was super pumped.  Haxe is also tempting because it's very similar to AS3 which I've been using a lot for the past couple years now.<br />
<br />
<img src="http://kpulv.com/upload/files/nme_setup_demo.jpg" alt="Image" border="0"/><br />
<br />
Unfortunately I hit a pretty big snag with HaxePunk.  It's just not in a very usable state right now, especially for native targets.  The rendering code needs to be updated for these targets to fix a lot of issues.  Sprite flipping doesn't work, the drawing functions like line, circle, rectangle, they all don't work, and there are some weird things that I don't like about the style (Image.createRect returns a graphic instead of an image, which then prevents me from using Image functionality such as scale, angle, alpha, etc.)  HaxePunk is out of the question for now for any sizable game projects, but it's still very much a work in progress and I hope it becomes something more stable in the future.<br />
<br />
So now it was on to something else.  I still didn't feel like going back to my metroidvania project just yet, so I did some prototypes in Flashpunk for possible control schemes for various things on mobile devices.  I recently picked up an iPad and I wanted to just play around with it.<br />
<br />
I managed to <a href="http://kpulv.com/115/FlashDevelop_to_iPad_Workflow/" target="_blank">set up FlashDevelop and Adobe AIR</a> to compile right to my iPad, so I started to experiment with that.  I first tried running a FlashPunk window on the iPad and I actually was pretty excited at first because a 640 x 480 FlashPunk window runs at 60fps on the iPad4.  Then I tried to scale it up to the size of the screen and that absolutely murders it.  The framerate was 20 or so with nothing going on.<br />
<br />
...but wait!  I just need to use <a href="http://gamua.com/starling/" target="_blank">Starling</a>, or Stage3d in general.  That should run much better on the iPad.  Flashpunk 2 is currently in development, and actually you can see and use the in progress version of it in <a href="http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&uid=7981" target="_blank">Saint11's Ludum Dare game</a>, and that uses Starling as the base of its rendering system.  I'll just stick Flashpunk 2 onto the iPad and see how that goes.<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-ipadcrap.jpg" alt="Image" border="0"/><br />
<br />
It took me a couple days of wrangling, but I eventually got Flashpunk 2 rolling on the iPad instead of just regular Flashpunk.  At first everything seemed good except for a few minor bugs.  I had some touch input working for something, but then I ran into performance issues almost right away.  Not really sure what's happening right now, but Flashpunk 2 is still a work in progress so I'll have to wait it out until it's in a solid "1.0" version.<br />
<br />
Okay so... now what?  This entire time <a href="https://twitter.com/TommyRefenes/status/329750834034380800" target="_blank">Tommy has been harassing me</a> about learning C++ and using that for a game engine.  I really don't think that's going to happen.  I tried C++ in the past and it was a giant disaster.  I spent 2 months just getting stuff to move around and render on the screen, and eventually I just hit a wall of too many bugs involving pointers and references and I couldn't go on... but maybe I'm smart enough now to handle it.<br />
<br />
<span class="centerme"><img src="http://kpulv.com/upload/files/5-3-13-sfml.jpg" alt="Image" border="0"/></span><br />
I've been playing around with <a href="http://www.sfml-dev.org/" target="_blank">SFML 2.0</a> and I finally got the simplest example program to compile, but I'm still not sure if I'm able to handle C++.  The resources for C++ just seem way too scattered but maybe that's just my perception.  What I mean is that when I search for a solution of a problem in AS3, I can easily find one definitive solution... with C++ I end up finding a bunch of completely different problems that might be related to what my problem is and then I'm going down this giant branching story path of why I might be getting a LINKER ERROR or a SEG FAULT or whatever, and I just get overwhelmed with information and I want to throw up.<br />
<br />
I don't know if C++ is for me... but SFML 2.0 seems really nice.  And there's also this <a href="http://toastedware.com/?p=80" target="_blank">Toast framework</a> that someone wrote which is essentially just a C++ port of Flashpunk, but it's missing some core functionality that I make use of a lot like entity layering, and once again the Draw functions.<br />
<br />
I also got into <a href="http://unity3d.com" target="_blank">Unity</a> a little bit and did some quick tutorials.  I managed to <a href="http://catlikecoding.com/unity/tutorials/" target="_blank">make a Clock</a> so far.  I've used Unity a little bit in the past for making levels for things, but I've never actually coded and put together any sort of engine in it.  Unity feels very strange to me, but I'm willing to give it a fair shot.<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-unity.jpg" alt="Image" border="0"/><br />
<br />
Also on my list is C# and <a href="http://monogame.codeplex.com/" target="_blank">Monogame</a>.  I started digging into this a little bit last year, but I had to put it down to finish <a href="http://snapshotgame.com" target="_blank">Snapshot</a>.  I know that <a href="http://www.mattmakesgames.com/" target="_blank">Matt</a> has some pretty awesome stuff rolling in Monogame right now with <a href="http://www.towerfall-game.com/" target="_blank">Towerfall</a>, and I'm hoping his latest framework becomes public in the future, as he tends to have the same line of thinking as Flashpunk, and anything like Flashpunk or Game Maker is easier on my brain.<br />
<br />
The main problem I keep running into is update loop vs. event system.  I don't like event systems and callbacks registered to event triggers.  This style of coding is very hard for me to follow and doesn't make a whole lot of sense in my brain, but that's mostly caused by my upbringing in update loop environments.  <a href="http://clickteam.com/" target="_blank">Klik & Play all the way through Multimedia Fusion</a> is a big update loop that checks for conditions in a specific order each frame, and Game Maker can be coded the same way with everything happening in the Begin Step, Step, and End Step events.<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-gamemaker.jpg" alt="Image" border="0"/><br />
<br />
The next big issue is the drawing stuff.  Apparently the style that I prefer is "immediate" rendering or drawing modes (I just learned about this term a few days ago, haha!)  I like the ability to do stuff like "Draw text, draw a line, draw a circle, draw text" and it all happens in that order, so the final text call would be above the circle, which is above the line, which is above the text.  I use this kind of stuff for effects and I use all of this especially for rapid prototyping and visual debugging.  These methods have become my bread 'n' butter for getting stuff rolling quickly.  One of my favorite things in Flashpunk is to just say "var img:Image = Image.createRect(16, 16, 0xFF0000);" which just quickly creates a rectangle image on the fly.  I can scale the rectangle, rotate it, blend it, tween it, etc.  This stuff allows me to make super fast prototypes with some neat effects like squash and stretch right out of the gate, letting me feel out a game quickly and effectively.<br />
<br />
<img src="http://kpulv.com/upload/files/5-3-13-drawing.jpg" alt="Image" border="0"/><br />
<br />
Ultimately it just feels like I'm searching for an engine that doesn't exist.  <a href="http://www.andymoore.ca/2013/04/im-holding-out-for-a-unicorn/" target="_blank">Andy Moore's recent post about searching for a unicorn</a> resonates a lot with me.  Every engine has its shortcomings and I just need to decide which one I'm most comfortable overcoming.  C++ is super hard on my brain, but has the highest potential for performance... Unity is really weird feeling to me, but should perform well and has a huge community behind it, HaxePunk is very familiar to me already, but also has a long way to go before I feel like it's properly useable.. and AS3 is my sharpest tool in the shed right now, but unfortunately doesn't perform the greatest.<br />
<br />
A tough spot to be in, but it is also fun to learn new things.  I hope I can get back to something solid soon!]]></description>
    <pubDate>Fri, 03 May 2013 16:05:05 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[TIGJam 5 Website]]></title>
    <link>http://kpulv.com/119/TIGJam_5_Website/</link>
    <guid>http://kpulv.com/119/TIGJam_5_Website/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/119.jpg" class="image" /><br/><br/><img src="http://kpulv.com/upload/files/tigjam5site.jpg" alt="Image" border="0"/><br />
<br />
The <a href="http://tigjam.com" target="_blank">TIGJam 5</a> site is now live and registrations are open!  Make sure to sign up soon if you want to go to one of the coolest jam events of the year.<br />
<br />
(Also ignore the glaring typos on that image of the site for now.)]]></description>
    <pubDate>Tue, 30 Apr 2013 16:28:55 -0700</pubDate>
  </item>
    <item>
    <title><![CDATA[Birthday Feast!]]></title>
    <link>http://kpulv.com/118/Birthday_Feast_/</link>
    <guid>http://kpulv.com/118/Birthday_Feast_/</guid>
    <author>pulverk@gmail.com (Kyle Pulver)</author>
    <description><![CDATA[<img src="http://kpulv.com/upload/blogimages/118.jpg" class="image" /><br/><br/><img src="http://kpulv.com/upload/files/27birthday-1.jpg" alt="Image" border="0"/><br />
<br />
<img src="http://kpulv.com/upload/files/27birthday-2.jpg" alt="Image" border="0"/><br />
<br />
Had an awesome day yesterday with some of the coolest people I know!  I celebrated my birthday by eating an inhuman amount of sushi (all of the sushi in the first picture was just my order.)  My friend <a href="http://aztezgame.com" target="_blank">Ben</a> remarked "I would offer to buy your sushi, but there's no way I'm paying for a Kyle Pulver amount of sushi."  It's understandable... last time I ate sushi with Ben my bill ended up being four times the amount of his.<br />
<br />
Then my friend Linda made that red velvet cake with the momma from <a href="http://offspringfling.com" target="_blank">Offspring Fling</a> on it, and it was amazing.  The cupcakes we're also red velvet and delicious (although I feel like there was a missed opportunity there to make the cupcakes all babies from Offspring Fling too, haha!) but hey, now that I have a cake of my game, I can finally make it onto Kotaku, right?]]></description>
    <pubDate>Mon, 29 Apr 2013 17:20:26 -0700</pubDate>
  </item>
    
 
</channel>

</rss>