I moved to a new URL! Check it out!

posts tagged with: gamedev

Screenshot Saturday: SFML C#

Image


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.

Dev Log: SFML C#

Dev Log: SFML C#
At this point I am becoming an expert at making test applications full of randomly colored squares.

Image


This was made with SFML.NET and right now is just a quick framework put together loosely based off of Flashpunk. 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.

One thing I'm worried about is access to cool libraries. In AS3 I make use of TweenLite and AS3Crypto a lot. I'm really surprised there isn't a big "go to" tweening library for C#. I found some C# tweening classes with some help from Twitter, but they're mostly just "here's the code, good luck" 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.)

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.

I am both loving and hating this period of experimenting with new stuff, haha!

AS3 State Machine

AS3 State Machine
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!

Finite State Machines


To find out exactly what a state machine is, check out this wikipedia article which describes them as "...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."

An example of this in action in my games are the guards in Super Ninja Slash. They have a couple of different states. Idle, Alarmed, Shooting, and Dead. That covers all their bases for their behavior.

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.

Platforming Ledge Forgiveness

Platforming Ledge Forgiveness
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 jump input buffering 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!

Image


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 as late as possible so that they get the maximum distance out of their jump.

More Development Options!

More Development Options!
Since my last post 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!

Dev Log: What the hell am I doing?

Dev Log: What the hell am I doing?
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 blog posts.

I got back from GDC 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. Offspring Fling 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.

Image


One day I went through some of my old prototypes. I took a look at Gaiadi, my Ludum Dare 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 Game Maker 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?"

Image


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 TweenLite and AS3Crypto.