I moved to a new URL! Check it out!

posts dated from: november 2015

Doodle Post

Image


Image


Image

Dev Log: RPG and YAML Stuff

Dev Log: RPG and YAML Stuff
With the move to Denver pretty much complete I've gotten back into some sort of groove of working on stuff, but I guess my brain must've been pretty scrambled with this sudden weather change because now I'm taking some time to work on a completely different project again!

This is actually a project I've worked on here and there over the past year, but I think I finally have narrowed down some ideas in my head on more of the finer details and that's inspired me to work on it some more.

Without spoiling too much about it: it is some sort of RPG, and it does have some sort of procedural generation element to it. I've been digging into using YAML for the data since I've been looking for something easy to parse and easy to write out. I think the failings of JSON and XML are that it is a giant pain to write out by hand, so YAML seems to be covering that gap quite well.

Here's an example of some of my YAML data:
---
bob:
name: "Bob"
health: 10
money: 5
drop: [null, null, basicattack]
color: ff0000
combat:
- Attack 1
- Attack 1
- [Attack 1, Attack 1, Charge]
- Attack 1
- [Flee, Defend]
- Restart
...

And to parse it in Otter I'm using a library called YamlDotNet. It makes parsing YAML pretty easy but unfortunately it is lacking in documentation and community.

The parsing code for the above data looks like this:
// An enemy class to match the structure of the YAML
public class Enemy : DataObject {
public static string DataPath = Assets.Data.Enemies;

public int Health { get; set; }
public int Money { get; set; }
public List<string> Drop { get; set; }
public List<object> Combat { get; set; }
public string Color { get; set; }
}
...
// A method to load the data from the YAML
enemies = Load<Parsed.Enemy>();
...
// The method to load the data from YAML
static Dictionary<string, T> Load<T>() where T : Parsed.DataObject {
string dataPath = "";
try {
dataPath = (string)Util.GetFieldValue(typeof(T), "DataPath");
}
catch {
throw new Exception(string.Format("No data path found on type {0}", typeof(T)));
}

var dict = DD.Yaml.Deserialize<Dictionary<string, T>>(File.ReadAllText(dataPath));
dict.Each((k, v) => {
v.Id = k;
});
return dict;
}
Normally I would be using my Google Spreadsheet tools for data, but unfortunately spreadsheets break down at a certain point. When my data starts to need more than just scalar values in each field spreadsheets become a pain to use. Basically if I want an enemy to have a list of attacks to perform on the player I have to enter that list into a single cell of a spreadsheet which just doesn't look or feel good.

More updates on this and hopefully Super Sky Sisters coming soon!

Doodle Post

Image

Now on Itch.IO

Now on Itch.IO
I think things are finally settling down in good ole Denver, Colorado. I probably should update the little paragraph about me on the right. I have my desktop PC all set up and going again with my ridiculous four monitor set up, so I got back to work by diving into itch.io.

You can now find almost all of my downloadable game titles available on kpulv.itch.io! A lot of the games there also have the option of tossing a few bucks my way in exchange for a zip file, but all of my free games are still available for free.

Image


Itch.io seems like a really great platform and I feel really inspired whenever I visit. It feels a lot of like an underground scene of video games which is a pretty stark contrast with booting up Steam. Nothing against games on Steam, but I don't really think the big games on the platform really do anything for me anymore... but that's a blog post for the future (if I feel like diving into my taste in games, oh boy.)

I'm getting back online and back to work on my contract work, as well as Super Sky Sisters and one or two of my other prototype ideas.

Doodle Post

Image

Doodle Post

Image