Dart software moved to Github

I recently updated the dart software and moved it to Github. You can find the compiled source code and a couple of more screenshots under the releases tab.

 

Update on the dart software

Just pushed a new version of the dart software to google code!

 

Application launcher

launchy

I recently went looking for a good application launcher, and most people seem to be running http://www.launchy.net/ . I tried it for a short while, and it’s pretty much what I need but there was one thing bothering me. Launchy works by indexing your start menu and because I never use the start menu, I don’t have my applications in there. So I had to create a folder and put all my shortcuts in for it to index. I know there is probably a plugin for launchy which solves this somehow but I saw this as an opportunity to learn some more WPF and write my own application launcher.

This was a few weeks ago and I’ve been using the launcher I wrote a lot since then. It stays in the background and saves the list of applications that is running every 5 minutes, very basic. I also added the option to add files and folders and switch between running applications. Feel free to download the source code and have a look around, you might find it useful.

Press CTRL+SPACE to bring it into focus at any time, or click on the icon in the tray bar. F1 opens up the list of added shortcuts where you can delete/edit/add entries.

 

XNA 2D Fog of War / Basic Lighting

A friend of mine asked me how to make lights for a 2D game in XNA he’s working on, so I threw together a small example:


protected override void Draw(GameTime gameTime)
{
//Börja med att rita en textur med svart bakgrund och vitt där man vill ha "ljus"
GraphicsDevice.SetRenderTarget(fogTarget);
GraphicsDevice.Clear(Color.White * 0.1f);
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive);
spriteBatch.Draw(gradient, new Rectangle(100, 100, 400, 400), Color.Blue);
spriteBatch.Draw(gradient, new Rectangle(400, 30, 400, 400), Color.White);
spriteBatch.Draw(gradient, new Rectangle(100, 30, 400, 400), Color.Red);
spriteBatch.End();

//Resetta rendertarget
GraphicsDevice.SetRenderTarget(null);
GraphicsDevice.Clear(Color.CornflowerBlue);

//Rita ut allting som vanligt
spriteBatch.Begin();
spriteBatch.Draw(cat, new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height), null, Color.White);
spriteBatch.End();

//Sätt blendstate till nåt häftigt o rita ut foggen (alpha och color måste vara samma för source/destination)
BlendState blendState = new BlendState();
blendState.AlphaDestinationBlend = Blend.SourceColor;
blendState.ColorDestinationBlend = Blend.SourceColor;
blendState.AlphaSourceBlend = Blend.Zero;
blendState.ColorSourceBlend = Blend.Zero;

spriteBatch.Begin(SpriteSortMode.Deferred, blendState, null, null, null);
spriteBatch.Draw(fogTarget, Vector2.Zero, Color.White);
spriteBatch.End();

base.Draw(gameTime);
}

 

Progress report #4

Above is a screenshot of the current state of the editor. I have gotten most of the basics done with the editor, wiring up the commands (undo/redo etc), adding/deleting/moving objects around, saving/loading a level, controllable player character and a solid code structure.

My next step is to make it possible to edit animations and assign them to bodies etc. My last exam is tomorrow but I will still be quite busy with new courses starting and other stuff.

I have used the same setup proposed in this post for the player character in the farseer physics engine and so far it seems to be working out ok.

 

Progress report #3

I’ve basically started to work on the actual engine and editor for the game, but there is still some things left to finish story- and outline wise but I’m thinking that stuff like that will change quite a lot throughout the entire development, so not much is set it stone. I’m still expecting things to move along smoothly but I have some exams coming up and other things that will prevent me from putting as much time in the game as I would like to. Hopefully by next week I have a screenshot or maybe a small video to show 🙂

 

Progress report #2

I’ve not gotten as much done as I would have hoped for but I’m still confident that I can keep the deadlines I’ve set for myself 🙂

 

Progress report #1

Last week I had set a deadline for myself to have a draft of the story for my wp7 game ready, which I more or less have, but I didn’t make a post.

I have a pretty solid feel for what I want the main characters personality to be like, but I still have a lot of other stuff to figure out. I also have the basic elements of the story down but I need to find a way to put everything together.

I decided to make a roadmap for the game as well. Just a set of sub goals which I will try to aim for but the dates will probably change.

  • 18 june-1 july    continue with story and start to rough out some drawings of characters and environments
  • 2-8 july              finish story and character design (more or less)
  • 9-22 july            start to work on level design, puzzles, define most important gameplay elements and put together some requirements for the game engine
  • 23-29 july         finalize level design and requirements, create a storyboard outlining the entire game
  • 30 july-5 aug    start working on the engine and put together a small tech demo
  • 6 aug-okt           workworkworkwork
  • okt-nov              playtesting
  • nov-dec              tweaking

I’m aiming for release sometime around new year

 

Building a game for WP7

One of my goals for this summer is to publish a game to the windows phone marketplace. I have a pretty good idea of what I want to create, but I’m not really sure where to start. I thought it would help if i documented my progress through my blog. I hope I can make some progress each week and make a post about it. So here’s what I’ve got so far:

I will be creating a puzzle/platformer involving both physics and classic “safecracker” puzzles.

The game will be in 2D and I will be aiming for an art style similar to Trine (http://www.youtube.com/watch?v=2OTJFsI6xyo), Lumi (http://www.youtube.com/watch?v=sEv3BOyjmnw), Rayman (http://www.youtube.com/watch?v=-Js3nXKuErg) and Heart of Darkness (http://www.youtube.com/watch?v=EZgfHsXhwjQ)

I’m planning on using farseer for physics (http://farseerphysics.codeplex.com/).

The next most important step will be coming up with a story. I want the story to be feel important for the player, and be what drives the gameplay forward. My goal for next week will be having a draft for the story and characters etc.

 

KnockoutJS

KnockoutJS is a javascript library which I started using just recently. I really like it, it is VERY powerful. I recently stumbled upon an annoying bug though that took me several hours to figure out. I got a message saying:


SCRIPT5022: Unable to parse bindings.
Message: SyntaxError: Expected identifier, string or number;
Bindings value: attr: { class: availability_class }
knockout-2.0.0.debug.js, line 1718 character 17

When running the code in IE7, IE8 and some older versions of Opera and Firefox. The html for this looks like:


<td data-bind="attr: { class: availability_class }">
<div style="text-align: center; font-size: 48px; line-height: 0;">&bull;</div>
</td>

And I couldn’t see anything wrong with it, but just for fun I tried adding quotes around "class", like so:


<td data-bind="attr: { 'class': availability_class }">
<div style="text-align: center; font-size: 48px; line-height: 0;">&bull;</div>
</td>

And it worked! So just in case someone else runs into the same problem, there you go. The knockout documentation says that adding quotes is necessary if the attribute name is a non-legal javscript name, for example "data-attribute" (containing a dash), but older browser seems to struggle even without the dash. So remember to add quotes just in case!