@MarioKid591 hey sorry I forgot. Send me an email hi@kpulv.com (Today)

@BomuBoi oh my god I hate these so much. "What if ash hallucinated Pokémon cause his dad died and he was sad" (Today)

@BenRuiz LL is one of the best feeling games I've played in the past forever. Some minor visual criticisms but aside from that its NOICE (Today)

@TommyRefenes PARCEIL ONIY!!! (Yesterday)

@AsherVo @ADAMATOMIC I'm pretty sure making a game that isn't playable in a weekend is impossible (Yesterday)

@tom_hunt haha oh man that's a slippery slope... (2 days ago)

@GreyAlien Hmm yeah that's good. Right now I'm tinkering with a board game and having fun editing spread sheets full of stuff. (2 days ago)

@GreyAlien I feel like I run out of simple things to do... haha (2 days ago)

Really wish I could figure out why my brain goes from being super productive to having no motivation at all UGH (2 days ago)

@kertgartner @gabrielverdon It seems that people are really getting into this "internet" stuff! Some are even using it for businesses! (2 days ago)

@gabrielverdon @kertgartner I thought canadian internet lines were wood. (2 days ago)

@gabrielverdon @kertgartner The internet lines get cold and moose nibble on 'em so they're pretty slow, eh? (2 days ago)

@kertgartner Canada has awesome healthcare but damn it seems like all the ISPs and mobile carriers suck. (2 days ago)

@pietepiet t.co/CZoX8s1A7E (3 days ago)

@spinning_ebooks nope all that stuff is determined by demand. I didn't even know about the gem stuff until it launched haha. (3 days ago)

@infinite_ammo I charge $200 an hour for tween consulting. (3 days ago)

@infinite_ammo I pretty much only play Street Fighter IV... ;_; #indiedevconfessions (3 days ago)

RT @danielben: If you want to be a better programmer, watch this industry veteran make a full professional game from scratch *live*: http:/… (3 days ago)

@dasCameo1 the final super secret levels are unlocked through rainbow flowers ;D (4 days ago)

@konjak I'm now trained in the art of Select layer. Draw some pixels. Erase them. Now commence drawing. (4 days ago)

follow
search
posts tagged with: gamedev

2014 - 12 - 18 / 1:50 am / general

Moving the Console Window

Moving the Console Window

Just wanted to share a quick tidbit of code that's useful for making a game with a console window for debug information. A lot of times I want to launch my game and have the console window on a different monitor, or just out of the way in general. It gets super annoying to have to move it over every time I launch a game for debugging, but then I found that I can move it with programming!

I'm going to be honest and say I don't totally understand how this works. It uses DllImport to get some functions from the user32.dll in Windows and then uses those to move the window around... I think? It should be noted that this probably only works for Windows.

class Program {
static void Main(string[] args) {
IntPtr handle = FindWindowByCaption(IntPtr.Zero, Console.Title);
MoveWindow(handle, -700, 50, 1000, 1100, true);

Core.Game.Start(); // Start the Otter game
}

[DllImport("user32.dll", EntryPoint = "FindWindow", SetLastError = true)]
public static extern IntPtr FindWindowByCaption(IntPtr zeroOnly, string lpWindowName);

[DllImport("user32.dll", SetLastError = true)]
internal static extern bool MoveWindow(IntPtr hwnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
}


I use functions to find the console window by it's name which can be accessed through the Console class in .net, and move the window by its handle. I give it a negative X coordinate because that pushes it onto my left monitor, so now every time I launch the game my console window appears and immediately gets pushed over to the left monitor. Neat!

No Comments

2014 - 12 - 16 / 9:57 am / general

Dev Log: Board Game Stuff

Dev Log: Board Game Stuff

Work continues a little bit on a board game prototype with some local Phoenix developer friends. Dave ended up making some amazing tokens for us to prototype with which makes the game feel a billion times more fun. Every week we have a play test and it seems like we're narrowing in on something that's actually a playable game.

Image

We've been using Google Sheets and nanDECK to prototype and print out our cards, and then sticking them into sleeves along with Magic cards to play with. I think having a total break from making games with code and complex art assets has been pretty fun -- it's a totally different experience than making a video game, and getting better at board/tabletop game design is something I really want to work towards.

Image

I'll get back to my main project soon I promise! (but now holiday travel season is upon us and that puts a giant wrench in everything too.)

No Comments

2014 - 12 - 11 / 11:19 pm / general

Dev Log: That Lost Feeling

Dev Log: That Lost Feeling

I feel like days are just flying by lately. What have I even been up to?! The past week or so has probably been a record low in the motivation department, and I have no good idea why that is. I guess it just happens. Sometimes I just end up feeling totally lost as to what I should do, or what I should be working on.

I'm working a little bit on a board game idea that some local Phoenix developer friends came up with, and I'm poking around at finishing my two player coop action game, but overall my amount-of-work-getting-done value has dropped off a lot, and the crazy thing is just a week or so ago it felt like it was at an all time high! I've been doing creative stuff and making games and whatever else for years now and I still don't understand how it all works.

Sometimes it just seems like every other developer or creative person on the planet has everything figured out and I'm the only one that totally drops off the face of the earth for weeks. (I know that's pretty hyperbolic, but I'm not claiming to be rational here.) When I get programming demotivated I start to draw more, and you'd figure I'd draw art for my games, but the problem is that for some reason that stresses me out, and so I just start to doodle what makes me comfortable instead.

I'm going to try just fiddling around with Otter to see if I can get a spark going again for programming. I think some of this feeling might have to do with upcoming travel which always stresses me out beyond belief. I wish I didn't freak out so much whenever I have upcoming travel, but I'm not really sure how to fix it!

Oh well, game development isn't all sunshine and puppy dogs and rainbows or whatever. Sometimes it sucks, and it's really depressing! But maybe it will clear up again soon.

On the upside I've been watching Handmade Hero and so far it's been pretty awesome. It's going to be a complete series on making a game from scratch. It's opening my eyes to a lot of stuff that I thought was just dark magic, and there are a lot of great programming and development tips scattered throughout all of the videos.

1 Comment

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.

Image

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:

EnemyType,Supply,Mass,MaxHealth
BasicTest,1,1,10
BigSkeleton,10,0,-1
TestPart,0,0,5


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()];

AddComponents(
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 += () => {
Death();
};
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 - 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.

Image

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.

Image

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

Image

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.

Image

Image

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.

XCOPY "%NANDECK_CSV_SOURCE%" "%NANDECK_CSV_DEST%" /S /Y /I


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 - 10 - 22 / 3:04 pm / general

Dev Log: Skeletons

Dev Log: Skeletons

This past week I've been chipping away at some general changes to Otter as well as doing some quick experiments with some things that I eventually want to include in my bigger game project.

The most recent of these experiments is setting up a general purposed skeleton system. The main idea is that I want to be able to make up enemies and other objects with a bunch of individual pieces that move around and animate. Normally I could say just using something like Spine or Spriter is good enough for this, but for this I wanted something of my own creation.

Image

The idea is that there is a Skeleton Entity in Otter that contains bones that all move, rotate, and scale based on their parent. Typical skeleton bone behavior. The difference is that each bone can hold an Entity on it. Each individual Entity on the bone can then have its own logic, so for example the first thing I want to have is the ability to destroy individual pieces of the skeleton. I can do that by having the Entities on each bone have logic for taking damage and being destroyed.

Image

So far I have one early iteration of this working but I'm realizing that the math that programs like Spine and Spriter do might be slightly different, and I'm trying to figure out exactly how they approach their transformations. It's a little difficult to find any articles or tutorials on how to code this stuff up yourself, as most people assume that using Spine or Spriter is what you want to do. I could potentially go back to using Spine and try to figure out how to wrangle its data format into loading a Skeleton into my custom format, but sometimes just making something yourself from scratch ends up being more straight forward!

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