Archive for June, 2010

DuneStorm™… More updates!

More updates on the DLSE (DuneStorm™ Level Editor). Has a working grid system now, snapping, better selection, a number of shortcut keys, better looking menu, some back-end code optimizations and a few other smallish things.

DuneStorm™ Small Updates

Just some quick updates on DuneStorm™. Made the UI (entity’s), joints and springs look a lot nicer, there’s now anti aliasing on the circle shapes, the maps can now be saved to the .dust format as well.

DuneStorm™ Level Editor NEW!

Updates on the DSLE. More updates coming soon.

Features Include
Primitive Shape Placement
Property Editing (size, position etc)
Physics Integration (Joints, Springs, Static’s etc)
Dragging/Scrolling
Level Config Editor
And many… many more! (and a lot more to come) … there’s actually so many I can’t even think of them!

DuneStorm™ Level Editor

A small level editor I am working on for my 2D/XNA based Game Engine!. It still needs a lot more work but the majority of the interface and a good amount of the back-end code is completed. I’m hoping to possibly finish it off this week or next week at the latest so I can continue working on the game engine. More updates soon!

C# Nullabalicious!

Something I’ve started using lately, and quite like… is C#’s ‘?’ property. This allows you to flag a parameter in a method’s constructor as ‘nullable’. In other words, when someone interfaces with your method, certain arguments can be left blank or set to null. This save’s creating overloaded methods. An example of such a method looks like:

public void PrintString(String text, int? numberOfTimes)
{
     int number = 1;
     if(numberOfTimes.HasValue)
          number = numberOfTimes.value;

     for(int i = 0; i < number + 1; i++)
     {
          DisplayString(text);
     }
}

Hope this helps or makes things easier in some cases :) .

Google Chrome Speed Tests!

An awesome video from the people at google, demostrating the speed of their browser, ‘Google Chrome’. I personally use it, and like it alot! Check it out:

And here’s the making-of:

How to detect a key press in XNA

XNA supplies us with a KeyboardState, that we can use to check whether a certain key has been pressed. But, it doesn’t check if that key is being held down. This can be a problem in some cases… For example, say we want to open a menu when the user presses the ‘escape’ key. If we just did the usual check of myKeyboardState.IsKeyDown(Keys.Escape) it would return true every iteration of your update function. This, would cause the menu to flash on/off multiple times and it gets annoying… fast. So, to fix this, create 2 private (or public) variables:

private KeyboardState keyboardState;
private KeyboardState lastKeyboardState;

In either your LoadContent() or Initialize() set

lastKeyboardState = Keyboard.GetState();

And at the top of your Update() function add

lastKeyboardState = keyboardState;
keyboardState = Keyboard.GetState();

Then, using a simple function

private bool HasKeyBeenPressed(Keys key)
{
     if(keyboardState.IsKeyDown(key) && lastKeyboardState.IsKeyUp(key)
     {
          return true;
     }
     else
     {
          return false;
     }
}

you can now check whether a key has been pressed, instead of just being held down! You can call it like so HasKeyBeenPressed(Keys.Escape);

Hope this helps!

Hey, look… I have a blog!

Hello fellow gamers, developers, and users! I’m eXsolved (Tristan). I’m a programmer and the founder of Dunebox™ Game Studios (www.dunebox.com). Well, lets cut to the chase, this is my new blog! I’ll be posting development logs, tutorials, tips and anything else I might come across that I feel like sharing. So check back often, and feel free to contact me whenever.

Cheerios, Tristan!.