@ChevyRay I think you're really dang good at it to achieve that pace. It takes me like forever and a million years for editor features ;_; (Today)

@infinite_ammo cancel all my meetings that i didn't have. looks like i have other plans for today. (Today)

@infinite_ammo hahahh fuck I dont remember that and I should be all caught up. I must have missed that... (Today)

RT @Draknek: The Stugan deadline is coming up soon and @bnhw and I want to work on a new project there, looking for a 3D artist: t.… (Today)

@infinite_ammo oh god he's slamming the baby in the toilet. it's only a matter of time before he turns his toilet seat into a subwoofer too. (Today)

@infinite_ammo my fav is my upstairs neighbor who slams his toilet seat down also now apparently has a screaming baby in his apartment?? (Today)

@ChevyRay ugggghhhhh I LOVE MAP VIEWS OF THINGS AHHH (Today)

@jwaaaap I don't think you need to be SUPER HARDCORE but you def need platforming skills and the map system can seem kinda brutal at first (Yesterday)

@ChevyRay hi here is my tutorial on regular expressions this is how to verify an email address s/g+.a-Z0-9[]{/gi-?@/f-[a-Z]0-9??/gmail.com (3 days ago)

@TommyRefenes the lengths you'll go to become a metal gear solid boss amaze me (3 days ago)

@shaneneville t.co/9H8F5KlgFA (4 days ago)

@shaneneville well that sounds rad as fuck jfc (4 days ago)

@shaneneville tell me more (tabletop / pen and paper rpg systems are super duper fascinating to me) (4 days ago)

@Fruckert depends on my pace. if I'm working super fast I'll just have a text file in my csproj folder. if I'm slower I'll use trello. (4 days ago)

@ADAMATOMIC I'm not far into this talk yet but do they discuss how most of the costumes make characters look entirely different and incompre (4 days ago)

I'm excited to make games today! *checks task list* Oh right I'm stuck on like 50 bugs I don't know how to solve. (4 days ago)

@ADAMATOMIC just now realizing that I need a giant motivational poster of nasir over my desk at all times (5 days ago)

@obskyr YEAH I was bummed that the Hollow Knight soundtrack turned a bunch of the loops into short songs or arrangements :I (5 days ago)

I humbly request for video game soundtracks to feature more than one loop on the tracks that normally loop in the game~ (ESPECIALLY BOSS TRA (5 days ago)

RT @bitmOO: Hi, I make playful art! :) If you like my work please consider supporting me: 🐮 t.co/dFSRVxbXzf ☕️ t.co/F2hPwao… (5 days ago)

posts dated from: november 2014

2014 - 11 - 30 / 9:59 pm / tools

Easy CSV Parsing in .Net

Easy CSV Parsing in .Net

Working on getting a public build of my latest game jam game up, and one thing I'm experimenting with is using CSVs for certain types of data. There's a bunch of enemies in the game that all have different stats, and usually I just store this information in the class for each enemy. Storing this data on a CSV has the benefit of being able to see all the data next to each other.

While I could achieve the same thing by having a dictionary set up in the code itself, storing the data in a csv file makes it a little bit easier to view and edit. Tweaks can be made more easily, and storing a bunch of data in dictionaries in code can get a little crazy looking depending on how much data there is to store.


At first I was using OpenOffice Calc for my CSV editing, but there's a huge down side with that: file locking! OpenOffice thinks it's an awesome idea to put any file its editing into a crazy lock down mode, so I can't even read from the file while OpenOffice has it open. So I had to ditch it, and instead I'm using Ron's Editor. So far this is the best free csv editor I can find, even though it's a quite bit more strict about editing than a big spread sheet.

Now for loading the CSV data I'm using CsvHelper which makes parsing a csv as painless as possible. My enemies.csv looks like this:


And the code to parse that looks like this:

var csv = new CsvReader(File.OpenText(Assets.Data.Enemies));
while (csv.Read()) {
var record = new Record();

record.EnemyType = Util.GetTypeFromAllAssemblies(csv.GetField<string>("EnemyType"));
record.Supply = csv.GetField<int>("Supply");
record.Mass = csv.GetField<float>("Mass");
record.MaxHealth = csv.GetField<int>("MaxHealth");

Records.Add(record.EnemyType, record);

I'm using a tiny class called Record to store the data. Record looks like this:

public class Record {
public Type EnemyType;
public int Supply;
public float Mass;
public int MaxHealth;

I end up loading the csv data into a dictionary with the enemy Types as the key, and the Records as the values. When an enemy is created it can look into that dictionary by using its own type and get out a Record object that contains all the data it needs to initialize.

var r = Records[this.GetType()];

new Team(TeamType.Enemy),
new Heart(r.MaxHealth),
new SpriteEffects()
Group = O.GroupGameplay;

if (r.Mass > 0) {
AddComponent(new PushAway(r.Mass, Tag.Enemy));

var h = GetComponent<Heart>();

h.OnDeath += () => {
h.OnDamage += (d) => {

Pretty straight forward! I think I'm going to extend this to expose more fine tunings of things. It might also be fun to leave the files totally exposed for players to mess around with as well.

1 Comment

2014 - 11 - 29 / 8:53 pm / doodle

Doodle Post


Got sick for Thanksgiving and still recovering. Not enough brain power to program yet so just doodling for now.

No Comments

2014 - 11 - 29 / 3:50 am / doodle

Doodle Post


No Comments

2014 - 11 - 25 / 12:04 pm / tools

Google Spreadsheet and nanDeck Workflow

Google Spreadsheet and nanDeck Workflow

One of the things I've been fiddling with for the past month or so is a prototype of a board game inspired by stuff like Dominion and Legendary and a mix of other stuff. It's been a collaboration with some of the local developers in the Phoenix area, and we we're getting to the point where hand writing a bunch of cards was getting really cumbersome, so I looked into tools for generating cards.


I ended up finding nanDeck, which at first looks like a pretty weird program. Okay it is a pretty weird program, but after spending some time with it it really does get the job done. There are some basic tutorials that can get you started, and some neat posts about it here as well.

nanDeck has the ability to read data from a csv file. At first I was using Open Office to manage some spreadsheets and export them to csv files for nanDeck to import, but that wasn't going to last if I wanted to collaborate with others.

I converted all of my spreadsheets into a Google Drive spreadsheet so that I could share it with others, but now the question was how can I take all of that sheet and spit out a csv for each individual spreadsheet that is a part of the document?

The first thing I needed to do was download and install the desktop version of Google Drive. This lets me access my files on Google Drive as just files on my computer, much like Dropbox.

Next I needed a csv export script. I found one here, and then modified it to fit my needs more. The script runs the onOpen method and that adds a custom menu to the document so that anyone that the document is shared with can also use the script. Adding a script to a document is located in Tools, Script Editor.


After loading the script I get a new menu option with my script function.


The script ends up spitting out a bunch of csv files into a folder on my Google Drive. These folders end up syncing to my computer, and now all I have to do is move them from there into a folder where my nanDeck project lives.



That's where a Windows batch file comes in handy. I whipped up a quick batch file that will take all of the csv files from that generated folder and copy them into my project folder. Using some custom system variables it's easy to make this work on my various work computers just by setting those variables on each of them. Just using XCOPY works great.


After the batch file runs all I have to do is click "Validate Deck" in nanDeck and it will update the data from the newly updated files, and now my new deck is ready to rock. Eventually I can even use nanDeck's command line features to copy the files and render the new deck from the batch file. Neat!

There's one major issue to look out for and that's using the Linked Data editor in nanDeck. If you click the button to edit the linked data, nanDeck seems to place the .csv file in lock down, meaning that XCOPY cant write over it. If this happens you'll have to close nanDeck to unlock the file so XCOPY can do its thing. As long as you don't use the linked data editor you'll be okay.

No Comments

2014 - 11 - 25 / 11:18 am / doodle

Doodle Post


No Comments

2014 - 11 - 24 / 8:28 pm / general

Dev Log: Jam Game Stuff

Dev Log: Jam Game Stuff

I've been doing pretty bad on blog posts this month so far, but I've been getting a lot of cool stuff done lately. I've been mostly focusing on my game jam game from a few weeks ago. I want to get that into a good playable state and do some testing at a local indie gathering and hopefully push it out to the public after that. This is another game that I'm making using my 2d .net framework Otter.

During the game jam I started to use the idea of components a lot more. The entity component system is the new hotness in video game programming as it seems many developers are starting to favor it over the old school hierarchy tree of classes. Here's a pretty good write up explaining how it works.


So far all of my games depend very heavily on the whole class hierarchy tree. Like I would have a base Entity, and then maybe a game specific Actor which extends Entity. Then I would have a MovingObject which extends Actor, and then a PlatformerObject which extends MovingObject. Finally the player would be a class (like the momma from Offspring Fling) that extends PlatformerObject. It seemed like a good idea at the time!

Now with this jam game I'm working on I'm trying to use components as much as possible. It may be a little overkill, but I'm using this as a learning opportunity.

For example here's what the Heart component looks like. I use the Heart for everything that can be involved in combat in some way, like anything that can take damage and all that stuff.

There's also something as simple as the RenderAllColliders component, which is handy for just slapping into an Entity if I want to see all of it's colliders during runtime. It will only render colliders on its parent Entity if the game is running in debug mode which is pretty neat.

So what does an Entity look like with all this component stuff? Here's a quick snippet from my main player class:

AddComponent(new CameraTarget());

// Add the movement and pass the axis from the controller.
var movement = new MovementTopdown(7, 0.3f);
movement.AxisMovement = c.Movement;

// Add the weapon, and pass it the shoot button from the controller.
var weapon = AddComponent(new AngelWeapon());
weapon.Button = c.Shoot;

var special = AddComponent(new Components.SpecialAttacks.Shotgun());
special.Button = c.Special;

AddComponent(new ClampInsideScene());
AddComponent(new SpriteEffects());
AddComponent(new RenderAllColliders());
AddComponent(new PushAway(2, Tag.Angel, Tag.Orb));

Later if I need to I can use GetComponent to retrieve any of those components if I need to change anything on them.

So far I'm really liking this approach, and it seems like it's the way things are heading in the video game programming world as far as I can see. I'm a little concerned with the performance of using a lot of components with GetComponent() running all the time, but it's probably not going to have that much of an effect.




Hi! My name's Kyle, and I make video games most of the time in Denver, Colorado. 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.

blog stuff






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 :)