Archive for August, 2011

XNA SpriteFonts

While working on Iron Roads today, I tried to use the custom font Radius (a free font from Urban Fonts.)   I like how the letters look like curving tracks you might see on a draftsman’s drawing or surveying map.  It has potential for the Iron Roads logo.  Anyway, I ran into a tricky problem that stumped me for a long while.

Iron Roads with Radius Font

I followed the normal procedure as Microsoft describes in Drawing Text with a Sprite:

  1. Right-click your Content project in Solution Explorer, click Add, and then click New Item.
  2. In the Add New Item dialog box, click Sprite Font. You may find it convenient at this point to change the name of the new file from “SpriteFont1” to the friendly name of the font you intend to load (keeping the .spritefont file extension).  The friendly name identifies the font once it is installed on your computer, for example, “Courier New” or “Times New Roman.” When you reference the font in your code, you must use the friendly name you have assigned it. XNA Game Studio creates a new .spritefont file for your font and opens it.

At this point I had what I needed, but alas, it wouldn’t compile, complaining:

The font family “Radius” could not be found. Please ensure the requested font is installed, and is a TrueType or OpenType font.

Took me a long while to figure it out, but it’s actually quite simple. Install new fonts before starting up Visual Studio! So, all I had to do was shut VS2010 down and start her up again, an Voila! New beautiful font displaying in my game!!!

Iron Roads Title Screen Draft Peek

Please note, this is a concept piece, not art assets are my original and I don’t claim copyright to them.

Advertisements

Read Full Post »

August 28, 2011

Microsoft ACE

I’ve been working on accessing Microsoft Excel doucments via .Net’s System.Data.OleDb classes and ran into an interesting error: Provider=Microsoft.ACE.OLEDB.14.0 provider is not registered on the local machine.

It isn’t logical, but in the Ole Db connection string, you don’t use the version number 14.0 to access MS Office 2010 documents (even though that is the version number.)  You use 12.0. ex.

 Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:exec.xslx;Extended Properties=”Excel 12.0;HDR=YES;”

NOT

Provider=Microsoft.ACE.OLEDB.14.0;Data Source=C:exec.xslx;Extended Properties=”Excel 14.0;HDR=YES;”

Here’s the post that helped me figure that out: The Microsoft.ACE.OLEDB.14.0 provider is not registered on the local machine.

You get ACE, or the Access Database Engine here

Read Full Post »

Hurricane Irene

If you want to help the victims of Irene start here: Network For Good: Hurricane Irene

Hurricane Irene is causing a lot of stir.  Game jam challenge:  “You have 48 hours to make a game during the Hurricane and about Hurricanes.”

Potential games about Hurricane

  • You are a Hurricane, rip down as many buildings as possible
  • You are an insurance claims adjuster, denie as many claims as possible
  • You are a city in a low laying area, how much money can you save not preparing
  • You are a C-130 and must collect reading ffom the eye of the storm
  • You are a boat or ship and must steer clear of all the hurricanes trying to sink you
  • You are an oil rig and … I dunno… what do they do?!?  Hmmm… according to Wikipedia, it sounds like they abandon them.
  • You are mother nature and must use hurricanes to control population and development on the main land

Hurricane Irene

Read Full Post »

I didn’t finish. I just didn’t have my weekend clear.  You really need a clear weekend to finish Ludum Dare. The tech change in the middle didn’t help.

My main take away: Unity slowed me down. I’m too much of a programmer. When a game engine gets in the way, I can see all the different ways I would code myself out of the problem, but I can’t see any solutions in the engine’s context. Code is a powerful too, and I’m good at using it. Game engine’s are alien worlds with bizarre rules and un-explainable behavior.

So, I’m going to stop using game engines (or frameworks etc.) I’ll use non-game libraries and leave all the game programming to myself. Specifically, something like SDL, SFML or even XNA are good for me, but not stuff like Torque 2D or Unity. I think XNA is “library” enough not to be considered a game engine. It’s more like a toolbox. Oh, I think the caveat here is I want to make 2D games, not 3D.

I think there is a bigger principal at work here: KISS = Keep It Simple Stupid Game Engine’s are complicated systems built by lots of programmers.  They have multitudes of  audiences with different needs.  This all makes them hard to understand with lots of bells and whistles.  In order to accommodate all these different requirements, some feature are overly complex with lots of assumptions.  Those assumptions require rigidness to keep you out of the weeds that aren’t handle so well because of those assumptions.  So at the end of a Ludum Dare weekend, you look back and see all the time lost figuring the game engine’s nuances and gotrchas.  Then you pine for a chance to go back in time and just pounded out the code you needed.

Read Full Post »

The XNA version of my game now surpasses the Unity version.  What’s working:

  • Player display
  • Player movement
  • Player collision with items
  • Background Board (no wall collision yet)
  • Door key displays
  • Player can pickup keys
What still needs to be done:
  • Wall collision
  • Door display (Locked and Open)
  • Level transition
  • Enemy display
  • Enemy following
  • Enemy killing you
  • More Levels
I’m feeling like this list is too long to finish in 7 hours and 15 minutes.  I also have a lot of chores around the apartment that need attention. So,  I’m going knock the “can’t ignore” ones out and then hopefully I can sprint to the end!
LD21 Screenshot 2

LD21 Screenshot 2

 

Read Full Post »

Sick of fighting with Unity. Switching to XNA. And, I have a party to goto now, so I don’t expect too much of a game done by Sunday night. That’s the way Ludum Dare’s go!

The Start in XNA

The Start in XNA

Read Full Post »

I’m about half way throught this weekend’s Ludum Dare 21 (althought the traffic level is really bad right now.)  The theme is Escape.

Tools so far:

My Pac Man mechanic isn’t exactly fun, but it too late in the contest now to change :(   I’m using momentum or forces to move the player, which at least one interesting difference over the classic game.  This make moving around a little less straight forward, and might have some emergent strategies, we’ll see.

Interesting! Notch of Minecraft fame is video streaming live as he programs his Ludum Dare 21 entry!!

 

 

Read Full Post »

Older Posts »