Blog

blog_post_timetracker

*New* WP7 App – Time Tracker

By | Apps, Blog, News, WP7 | One Comment

I recently gave myself up for a “sort of” competition to push my wanted apps into the marketplace. This competition is forcing me to deliver an app each month the the coming three months. So here is my first app developed for this, called Time Tracker.

Time tracker is an application that you can use to keep track of your worked time. You can create a project and start an automatic running time entree, when your done with your work just stop the timer. Multiple overview’s overviews giving you a clean layout of all the time entrees for the selected project, or just generate reports. Time entrees rely on “tags”, each time you create a time entree you have the choice of using an existing tag or creating a new one. This way you can use a tag over multiple time entrees, and even over different projects.

Key features of the current version of the application:

  • Support for unlimited project and time entrees
  • A live tile showing the amount of active time entrees
  • Sorted overviews by day, month or year
  • Filter options
  • Reporting tools (currently only email)
  • Able to export each view to email
  • Groupings by day, week, month and year with total amount of earnings and worked times
blog_post_lightspot

2D Spotlight implementation (HLSL + C#)

By | Blog, Games, XNA Games | 3 Comments

Many people have been asking me how i implemented the spotlight inside my xbox game wages of war. See screenshot at top.

The red light on the left, and the spots on the wall are all the implementation of the spotlight.

I rely inside this post that you have implemented the system that i described inside my post 2D Lightning Continued.

Inside this tutorial a point light is created. Now you can use the following code to implement a spotlight class in the same manner as we did with the point light.
Basically they are almost the same, but this spotlight has some different properties to give to the Shader.

I updated the Lightning sample as that is easier (i hope) for you to understand what you have to implement to achieve this effect in your game.

The arrow keys control the angle of the spot light and up, down control the height of the spot.

Enjoy!

 

Download link:

LightningSample - Spotlight Addon (1005)

 

memory_app_wide

WP7 Game – Delta-N Memory now available for Free

By | Blog, Games, WP7, XNA Games | 2 Comments

For my work i created a Memory game, named Delta-N Memory. This game is only available for the Windows Phone a.t.m.

Quoted: “Memory Game” is a classic game with a lot of different themes to play by yourself, with friends or with your family. You can choose the single player (Arcade Mode) or fight for the first place with the highest score in the Adventure Mode. The Delta-N Memory Game is specially developed and designed for Windows Phone 7.




Button Text
xna-slider-wide-preview

A Windows Phone 7 Multi Page Slider (XNA)

By | Blog, WP7 | 2 Comments

This time i will not post anything shader or lighting related, but something i created for the Windows Phone 7. I guess you can also use this on a windows platform, but you will have to rewrite some code because i make use of the gestures that are available on the windows phone.

So what is this Multi page slider thingy you are talking about, well om some game you find on the phone they implemented something that allows you to swipe across content. This feel like just browsing though pages (hence the name i used for it…). A video means more then a thousand words so let me just show you what i mean :).

The control you see here is devided into the following sections:

Core components

  • GUIControlsPagerControl.cs – The main component for the page slider
  • GUIControlsPagerPage.cs – The pages component for the slider
  • GUIControlsGUIControl.cs – The abstract class each GUI Control has to derive from

Side Components

  • GUIControlsPagerPageMonitor.cs – This monitors which page currently is active (on the video you see it on the very bottom with 2 dots)
  • GUIControlsGUILabel.cs – These are just created to show content on the pages (as an example how to create controls for the pages)
  • GUIControlsGUIImage.cs
  • GUIControlsGUIButton.cs

The core components are the heart of this control. You just create a PagerControl and add Pages to that control. On that page you will add all the required GUI Controls and your set to go.

Let me show you some example code i used inside the application:


// Intialize our page control
 _pagerControl = new PagerControl { ScrollSpeed = 4.0f };
 _pagerControl.Initialize();

 // Create our first page and add two labels and a button to it
 PagerPage page01 = new PagerPage() { BackgroundColor = Color.Black };
 page01.AddControl(new GUILabel("PAGE SLIDER CONTROL", _headerFont));
 page01.AddControl(new GUIImage("soolstyle_logo") { Position = new Vector2(150, 620) });
 page01.AddControl(new GUILabel("Page 01!", _controlFont) { Position = new Vector2(20, 100) });
 GUIButton button = new GUIButton(this, "Demo 02 Screen", 180, 50, new Vector2(20, 200), Color.White, _labelFont, Color.Black, Color.Black * .6f, Color.LimeGreen);
 button.OnButtonPressed += new ButtonPressedHandler(button_OnButtonPressed);
 page01.AddControl(button);

 // Create our second page and add a label to it
 PagerPage page02 = new PagerPage() { BackgroundColor = Color.Black };
 page02.AddControl(new GUILabel("Page 02!", _controlFont) { Position = new Vector2(20, 100) });

 // Add the pages to the page control
 _pagerControl.AddPage(page01);
 _pagerControl.AddPage(page02);

 // Attach the monitor on the page control
 PagerPageMonitor monitor = new PagerPageMonitor("bullet_background", "bullet");
 monitor.Position = new Vector2((GraphicsDevice.Viewport.Width * .5f) - ((_pagerControl.Pages.Count * 25) * .5f), GraphicsDevice.Viewport.Height - 40);
 monitor.ItemSpacing = new Vector2(5, 0);
 monitor.Initialize();
 _pagerControl.PageMonitor = monitor;

I also use this control inside my newest game for the windows phone called Maladras. Here you can see it in action inside that game:

All the level buttons and header text are part of a Page and at the bottom you can see the page monitor with 4 dots.

I shall leave it with this for now, as always if you got a question about it just leave a reply here!

You can download the application from here:

WP7 Page Slider (XNA) (464)

Note: Excuse me if the code isn’t that pretty, i don’t have a lot of time to even work on my game let alone provide example code. But i try to do my best!! :)

dream_build_play_2011_wide

Dream Build Play, a few days left…

By | Blog | One Comment

Its been some time that i posted on the blog but i will try to make it up!

Only a few days left and i must be ready with Wages of War to enter the competition… A lot of work has been done since the last blog post and i will post some new images later this evening to show the current state of the game.

The hardest part was getting the game to run smoothly on the xbox. The first tests i did on it where dramatic, the game ran on +-5 fps :). So it was time for some cleanup! I modified the lightning shader to run smooth of the xbox, a test application was written for this. Using a batch of lights inside the shader did the trick for me. The first runs without it, it only could handle +- 10 – 20 lights. Now with the modifications it can handle up to 150 lights, a nice improvement indeed! Another issue i had was my tiling engine, this was doing +- 1200 spritebatch calls each draw call. So i spend a evening thinking about how i could improve this. Another test application was written for this specifically. This time i use 2 rendertargets, which switch each time a new row has to be drawn. The image from the first rendertarget was being drawn on the second with an offset and the new tiles where drawn on it after. This was i only need to draw the rendertarget onto the screen, rather then doing 1200 draw calls!

As i only have a few days left for the dream build play, i must spend them wisely and create enough content to be able to draw some attention :). Downside to this is that i have to draw all the art myself, make the content myself and create some code myself… This together takes allot of time! Tonight i will create the following items:
- Create key items, these are items you must gather in order to continue at some point.
- Create a GUI for the Skills the player is able to use.
- Create the Beam weapon in such a way that it doesn’t generate garbage…
- Maybe more if i make it :)

Stay tuned to http://www.luxtime.su/ for more fashion products.

LightningTest-2011-01-16-19-04-05-351

2D Lightning Continued

By | Blog, Featured, XNA Games | 33 Comments

A week ago i received a twitter message about the 2d lightning i posted. He asked me there if i could reproduce some normal mapping effect with correct lightning. I failed in doing so with the previous code i posted, so i picked it up and began coding once again om my lightning. The results where very pleasing for me and the person that asked for it :).

The results ended up like this:

The effect can off course better be viewed in motion, so i created a little movie for you as wel:

See it in HD on youtube

Source Code


Now it is time for some code, i will not discuss all the code that is required for this effect because at the bottom of the page you can also download the sample code that contains everything you saw in the movie.

First of all you will require a color map of your current scene and a normal map (in the sample we only use one texture for this)


Together with a light source these two images become the result you see below (this image has a low ambient light):

The color map and normal map texture will both be rendered to their own rendertarget. This will result into two different textures, one is your color image and one your normals. These two textures are provided to the shader effect as parameters to create a light map, such image you can see below. This is where all the magic happens :).


This lightning texture is then combined with the color map to produce the desired effect. I do it this way because i had some problems before rendering multiple lights, doing it this way i didn’t have any of those problems.

The variables or constants inside the shader effect file (MultiTarget.fx) can be tweaked to your desires. Especially the following line will adjust the specular highlight (or you can disable it this way):

Also the height of the light will have a huge impact on how the coloring will react. The default value of the height of the light will be around 100. Try to lower the number and see what it does :).

If you have any questions remaining, feel free to ask me :).

Update: I updated the sample application to work with xna 4.0. The lights are now working with a generic list; A specular strength variable is used; Shader is slightly modified.
LightningSample-XNA-4.0 (1567) (This requires XNA 4.0 installed)


Game Texture update

By | Blog, XNA Games | 4 Comments

I finally sat down and devoted some time into creating some new textures for the robot itself and the weapons that are currently in the game. It took me many tries on it, but i really like the end result i got right now :). See the pictures below of my new texture for the player’s robot. Take a note though that i am not really a designer so i don’t have a keen eye for it hehe. Also you can see the beginning gun equipped by the bot in the screens below. I always liked a bit of big guns and they are all animated when fired… :P

Main texture. I figured that this color fitted as best into the game, so i labeled it “main”.
Yellow player

But as easy as it is, i can make variations from that one like the one’s below. I might put this in a feature so that the player can select the color he wishes to play with.
Blue Texture
Green Texture
Flower Power???
Pink, Purple

Let me know what you think about these new textures :).

Development Diary #02

By | Blog, XNA Games | 2 Comments

It will be a smaller update then the previous one’s, because i was quite busy with real life stuff. Most of my time went into designing a new design for our front garden, i must keep the misses happy ain’t i :).

I am just lucky that my girl supports me in this and provides some time for me to actually code and design my game. Enough chatting about that, on to the game. The main issue i was facing is that this project began as a simple test for me, just to see how tiling worked and to see if i would make some similar results. Once i got that properly working, the editor came to life. I just kept on adding new stuff to the editor that soon the design was just a mess. Now it was time to bring an engine to life, that i can use the code for both the editor and the game itself (a prototype game only exists then). After many line’s of code written and creating textures for everything i stood where i was a few weeks ago.

Now it was time to add some actual game flow. I wanted that the game consist out of several missions that the player can play. Now these missions must support multiple maps (if i need them), to use teleporters or elevators or just plain doors, that will lead in to a different area. To support this kind of feature i needed to rewrite a lot inside the engine’s core, this took some time to get it in way i wanted it to be.

After the support of missions, cinematics (cut scene’s) came to life. Because let’s face it, a game without some story telling or some automatic gameplay (intro’s orso) isn’t much fun. As i am not really the greatest story teller, i just suck at it… I am trying to do my best. After some night’s of programming, i finally had my cinematic system the way i want it. This system provides me with all kinds of stuff that i can use to automate the world, or just show dialogs to the player. All the cinematics will be loaded from Content XML files when they are needed. This way its easy to add new features and to adjust settings inside the cinematics.

Here is a short video of this system:

httpvhd://www.youtube.com/watch?v=7o4-BLB6MXk
See it in HD on youtube

WordPress problems

By | Blog, XNA Games | No Comments

I seem to be having some wordpress problems here. As i cannot post any long posts anymore. I tried to solve it with a .htaccess file as they say of the forum, but this didn’t do the trick for me :(.

I hope i can fix this soon…

Edit: It seems to my host doesn’t like some words that i used to make up my story. In this particular story i used the word “in to” without the space.

Development Diary #01

By | Blog, XNA Games | One Comment

Ok so i guess it is time for an update regarding my upcoming game called “Wages Of War” (working title).

Here is a video showing off my latest build of the game:

httpvhd://www.youtube.com/watch?v=hCh9Q5zUT-0
See it in HD on youtube

What is new since my latest video showing you how to create the lightning system i use.

[list bullet="arrow"]
  • The lightning system has been updated with some small tweaks to make is visually a bit better.
  • Some basic AI has been added.
    • For now only a Bot and a Turret
    • Navigation paths and a pathplanner
    • Steeringbehaviours for the Bot – Path Following, Wander and Obstacle Avoidance for now.
  • Some more components have been added, now game object can also consists of multiple body parts (see Player and Bot).
  • Many texture updates, i still need to make all graphics myself so ;-). Also depth maps and normals maps have been created for all the textures.
  • A few more weapons have been added. This includes the Flame thrower and a Beam weapon.
  • Many updates to the editor i use. (see below)
  • An inventory screen has been added to make it a bit easier for me to select weapons
  • There should be some more points… but i cant seem to remeber them right now.
[/list]

In the new video you should be able to see most of the new points i discussed here. If you want to know anything in particular, just ask :).

The Editor

The editor i created for this game is helping me alot. This also includes fast testing many times of new things i implemented, but also i can make levels is no time. The only problem i am facing so far are the textures :P, because i am not that great of an artist in creating textures.

I am not going to explain in detail what the editor is all about or what its features are so far, because this editor will likely stay for private use only and thus not really user friendly :).

Here are some screenshots of the current build of the editor: