@JesusCripe I am making a bunch of stuff but all of which isn't really ready for release yet ;_; Hopefully something this year though! (Today)

.@Livelyivy and her team worked their BUTTS OFF on Gravity Ghost t.co/ybroOoadqw get it so they can afford butt reattachment surgery (Today)

RT @Livelyivy: GRAVITY GHOST IS LAUNCHED I LOVE YOU ALL! t.co/69UeajfNCF (Today)

@arcv2 it's hopefully a tool that can be used on any Google sheet. I'll release it after I polish it a tiny bit more. (Yesterday)

@Silvanis_s I'm not sure, I'm using the google docs json feeds and I think those freak out over empty cells right now. Will test later! (Yesterday)

@Silvanis_s you mean like an empty cell in the sheet? (Yesterday)

Spent the weekend making a thing that takes somethin like this: t.co/KpA4JFMBcp and turns it into this: t.co/5yRHuaLSqZ :D (Yesterday)

@KnechtsLevel @mguniverse I'll make it out tonight, probably around 6ish. (Yesterday)

@mguniverse maaaybe I don't know for sure (Yesterday)

@vonFawks looking pretty cute! (Yesterday)

RT @Livelyivy: Today is your last chance to preorder Gravity Ghost! t.co/0t1h9Nuylk (Saves $5, and you can say you liked it before i… (Yesterday)

Well according to twitter there exists a secret society of people that actually do use the insert key quite often. The more you know! (Yesterday)

Has anyone ever pressed the insert key, started typing, and then thought "yes, this is exactly what I wanted." (Yesterday)

@Fruckert Haha wow, so it is. I did a ctrl+F on the whole thing and for some reason it didn't find it. Whoops ;D (2 days ago)

@infinite_ammo @theBanov ohh I dunno. Maybe not til around pax time again for me ;( (2 days ago)

@NoelFB Or maybe t.co/QjrHFNFbbU or do you mean REAL as in only classical stuff? Like not metalish + chiptune? (2 days ago)

@NoelFB t.co/7dTg3mhOi5 (2 days ago)

@Fruckert Is that in the code or in the documention? I can't find it, at least on the current dev branch. (2 days ago)

@Fruckert I am really smart (2 days ago)

@MattThorson @NoelFB @bombsfall I'll be there YESTERDAY (3 days ago)

follow
search

2015 - 1 - 26 / 12:37 am / tools

Google Spreadsheet Sync

Google Spreadsheet Sync

Have you ever wanted to take the contents of a Google Spreadsheet and drop it right into your game project? So have I! That's why I made a tool that will take the contents of a Google Spreadsheet and turn it into a C# code file full of data!

Demo
Let's say we have a spreadsheet full of data for our video game written in C#, and it looks something like this.

Image

The resulting output of that spreadsheet will be this.

class Sheets {

public static Dictionary<string, CharactersRow> Characters = new Dictionary<string, CharactersRow>() {
{"Adventurer", new CharactersRow() {
Name = "Adventurer",
Health = 100,
Magic = 100,
Attack = 100,
Defense = 100,
Speed = 100,
VictoryPhrase = "Nice try, \"chump!\"",
FailurePhrase = "Ah... well done..."
}},
{"Thief", new CharactersRow() {
Name = "Thief",
Health = 75,
Magic = 100,
Attack = 100,
Defense = 50,
Speed = 200,
VictoryPhrase = "I take what I want!",
FailurePhrase = "Not fair!"
}},
{"Assassin", new CharactersRow() {
Name = "Assassin",
Health = 100,
Magic = 50,
Attack = 200,
Defense = 50,
Speed = 100,
VictoryPhrase = "You're lucky to be alive.",
FailurePhrase = "How could you defeat me?!"
}}
};

public class CharactersRow {
public string Name;
public int Health;
public int Magic;
public int Attack;
public int Defense;
public int Speed;
public string VictoryPhrase;
public string FailurePhrase;
}

public static Dictionary<string, WeaponsRow> Weapons = new Dictionary<string, WeaponsRow>() {
{"Bronze Sword", new WeaponsRow() {
Name = "Bronze Sword",
Attack = 45,
Defense = 0,
Type = WeaponType.Sword,
Value = 100,
CanUpgrade = true
}},
{"Silver Bow", new WeaponsRow() {
Name = "Silver Bow",
Attack = 20,
Defense = 0,
Type = WeaponType.Bow,
Value = 250,
CanUpgrade = true
}},
{"Fire Wand", new WeaponsRow() {
Name = "Fire Wand",
Attack = 35,
Defense = 15,
Type = WeaponType.Staff,
Value = 400,
CanUpgrade = false
}},
{"Lasso", new WeaponsRow() {
Name = "Lasso",
Attack = 30,
Defense = 0,
Type = WeaponType.Whip,
Value = 150,
CanUpgrade = true
}}
};

public class WeaponsRow {
public string Name;
public int Attack;
public int Defense;
public WeaponType Type;
public int Value;
public bool CanUpgrade;
}
}


With a class like that in my project now it becomes very simple to get data from the spreadsheet with the key of the row (the first column.)

var charName = "Adventurer";
var health = Sheets.Characters[charName].Health;
var victoryPhrase = Sheets.Characters[charName].VictoryPhrase;
Console.WriteLine(victoryPhrase);


Download
Download GoogleSpreadsheetSync.zip (0.02MB)

Usage
I use Visual Studio, so I can only really tell you about that.

It's easiest to set this up as an EXTERNAL TOOL in Visual Studio.
* In Visual Studio go to the Tools menu at the top, select "External Tools..."

Image
* Click "Add"
* Name it something like "Google Spreadsheet Sync"
* For Command, press the "..." button to the right and find the exe.
* For arguments you can use "$(TargetName)" "$(ProjectDir)GoogleSheet.key"
* Include the quotes in those arguments!
* For Initial Directory put $(ProjectDir)
* No quotes in that one.
* Below that check the "Use Output Window" option.

Image

Before you run it though you're going to need to create a GoogleSheet.key file. That file should only contain google spreadsheet key.

For this example here's a URL to a published google spreadsheet: https://docs.google.com/spreadsheets/d/11Ia3wr-Pon1180M0_KRR1hywEITLn_P1BoUedbNQeqw/pubhtml

The key is that big long section: 11Ia3wr-Pon1180M0_KRR1hywEITLn_P1BoUedbNQeqw So in this example the contents of your GoogleSheet.key file should only be:

11Ia3wr-Pon1180M0_KRR1hywEITLn_P1BoUedbNQeqw

Save the file as GoogleSheet.key inside your root project folder. (So probably the same folder as your Program.cs)

Image

You should be all set to now run it from Visual Studio! It should appear in your Tools menu. You can even set a keyboard shortcut for it later if you want.

Run the tool from the Tools menu and what should happen is a Sheets.cs file is generated with all the data from your spreadsheets.

Image

Source
Of course it would be way better if you're able to take this tool and craft it into your own needs, so here's the source code!

I've started a public repository where I'll keep any useful tools I create right here.

Trouble?
If you run into any trouble feel free to post a comment and I'll try to help! Or you can reach me at hi@kpulv.com, or the contact form at the bottom of my site.

No Comments

2015 - 1 - 23 / 1:21 am / general

Dev Log: Event Queues Everywhere

Dev Log: Event Queues Everywhere

I've been working on a little prototype involving turn based combat. I'm not quite 100% ready to dive back into Stratoforce yet, and I had this idea gnawing at me and I just have to get it out of my system. What exactly is the idea? Well I can't say what it is yet, but if it works out then I'll talk more about it!

Since it is based around turn based combat I had to figure out how exactly that works. I'm so used to programming things that happen all in real time that suddenly going into a turn based game makes absolutely no sense to my brain. At first I had these huge state machines that were incredibly clunky, then I transformed it all into events that can be placed into a magical event queue.

Here's a simple class that can be dropped into Otter that is an event queue manager. It was whipped up very quickly so there might be some slight issues to debug. Check it out:

/// <summary>
/// A Component to manage and process queue of events
/// </summary>
class EventQueue : Component {

public List<EventQueueEvent> Events = new List<EventQueueEvent>();
public EventQueueEvent CurrentEvent { get; private set; }

bool isFreshEvent = true;

public EventQueue() {

}

public bool HasEvents {
get {
return Events.Count > 0;
}
}

public void Add(params EventQueueEvent[] evt) {
Events.AddRange(evt);
}

public void Push(params EventQueueEvent[] evt) {
Events.InsertRange(0, evt);
}


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

if (CurrentEvent == null) {
NextEvent();
}

while (CurrentEvent != null) {
if (isFreshEvent) {
isFreshEvent = false;
CurrentEvent.EventQueue = this;
CurrentEvent.Start();
CurrentEvent.Enter();
}

CurrentEvent.Update();
CurrentEvent.Timer++;

if (CurrentEvent.IsFinished) {
isFreshEvent = true;
CurrentEvent.Exit();
CurrentEvent.EventQueue = null;
Events.Remove(CurrentEvent);
NextEvent();
}
else {
break;
}
}

}

void NextEvent() {
if (Events.Count > 0) {
CurrentEvent = Events[0];
}
else {
CurrentEvent = null;
}
}
}

class EventQueueEvent {

public EventQueue EventQueue;
public int Timer = 0;
public bool IsFinished { get; private set; }

public void Start() {
IsFinished = false;
Timer = 0;
}

public virtual void Enter() {

}

public virtual void Update() {

}

public virtual void Exit() {

}

public void Finish() {
IsFinished = true;
}
}


This is sort of similar to just a very simple behavior tree (see Kodo for more advanced stuff!) Basically what happens is there's a list of events that all need to be run. The current event is run during the Update, and if it's finished then it's removed and now the next one starts up. You can both Add and Push events into the Queue. Push will insert an event at index zero so it will be the next thing to run. To make events just make classes that extend EventQueueEvent!

So I have events like "Damage" "ActorDefeated" "ChooseTarget" "TakeActions" and more. It becomes very easy to manage when things are broken up into separate classes like this! This is actually also giving me ideas on how to run cutscenes in more real time action type games as well. Maybe it will be of some use to you!

No Comments

2015 - 1 - 22 / 9:25 pm / doodle

Doodle Post

Image

No Comments

2015 - 1 - 21 / 2:34 pm / general

Dev Log: Productivity Experiements

Dev Log: Productivity Experiements

When the new year came about I was determined to break my cycle of endless procrastination loops. I find that my productivity is tied to my mood, and my mood is tied to my productivity, so when things are going great in either one of those then it's awesome, but if one of those drops then it's kind of a self reinforcing downward spiral into the abyss. It's not impossible to break out of it, but it is really really difficult.

When I got back from my holiday season travels the very first thing I did on my main workstation computer was completely block reddit. I'm using a website blocking extension for Chrome that will just straight up block the site entirely. Reddit is a big problem for my procrastination. When facing a super hard problem I could either sit down spend a lot of time trying to solve it... or maybe open a browser and type "r" and suddenly an hour has gone by.

I've blocked reddit before, but not as hard. Usually my previous reddit blocks have just been totally mental. I would catch myself starting to type in reddit and then divert to something else, but this time I wanted to try a more all out approach. Also I can still browse it on my phone which I still do sometimes before bed, but having it blocked on my computer I should be doing work on feels different.

In similar fashion I've also limited my Twitter and Facebook time on my computer to one hour every 24 hours. Other sites are included in this time limit but it's mostly the big T and F. I actually don't think Twitter and Facebook are that much of a problem for me, but it is nice to have a hard limit on it per day, and even just having that limit does make me mindful of how much time I'm actually spending on those sites. For limiting time on sites I'm using the Chrome extension StayFocusd. I think I've only ever hit the hour limit once, but there are some times where working on various projects does involve Facebook and Twitter usage.

Blocking and restricting sites on my computer felt weird at first. I thought "well if I do this won't I just immediately find ways around my own restrictions?" As time goes on though the restrictions feel more like a part of my routine. Since I only have an hour of Twitter and Facebook I spend very little time on those sites now, and the time I do spend on there is very focused and brief. I haven't really felt a need to go to reddit lately, and I feel like I might just be better off without it. If I really really want to browse it I can use my phone which is a separate entity from my work computer.

The last thing for now is toggl which I've mentioned before. It's a simple time tracking application which can also be downloaded as a desktop program. I have a couple of different work categories such as game dev, drawing, blog, misc tasks, and I put exercise on there to track that as well. So far it's been working out pretty well and I am interested to see the results of it after a month or so. It is useful to see how much time was actually spent on certain things during the day.

I'm not holding myself to any sort of requirements through the day. Right now I just work on stuff as much as I feel like I can. Between drawing, game dev, and other stuff I'm logging about 4.5 to 5 hours of productivity a day which seems pretty decent.

As a continue to experiment with productivity I'll be sure to talk more about the results. Right now things are going pretty well with a weird prototype. It's getting me back into the groove of coding which I'm hoping will transfer back to my current projects like Super Sky Sisters and Stratoforce.

2 Comments

2015 - 1 - 16 / 5:02 pm / general

Doodle Post

Image

No Comments

2015 - 1 - 16 / 5:02 pm / general

Dev Log: Game Ideas and Toggl

Dev Log: Game Ideas and Toggl

I've been back in my programmers seat for the past couple days and the rust is pretty real. I'm getting back into Otter and pushed some minor updates to it that should fix some issues I've been having with it. I wasn't liking some of the finer details of how Entities were being added to Scenes, and how Components were being added to Entities, but I think I have that figured out now.

To get back into the programming saddle I've decided to just mess around with a prototype for now. I don't know much about it yet, but I'll say that I'm currently making a turn based battle system for it. Who knows what that could mean! If this idea turns out to be cool though I'll have more info the share about it.

One thing I'm trying now is using toggl to track how I spend my time through the day. I think one of my anxieties about being productive comes from not exactly knowing how much time I spend doing stuff. Right now I just have it set up to track exercise, game dev, writing, and drawing. Those are the broad strokes of what I care about, and I might end up breaking down those categories even futher depending on how this experiment goes.

I still have my co op game Super Sky Sisters to finish and release soon, and then there's Global Game Jam coming up and I don't know if I'm going to make a completely new game there, but I'm definitely going to be jamming regardless either on a current project or a new project.

No Comments

about

About

Hi there, my name is Kyle, and I'm a kid disguised as a grown up. 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