2015 February 5 - 2:28 pm Home Office

Not really anything new, but I’ve slightly reorganised my home office. I’m pretty comfortable with it now.


2015 February 4 - 9:38 pm DEVM 2.0

I’ve had a great time at King for the last ~18 months, but I also have too many ideas of my own that I want (need) to realize. Last week was my last at king, so from this week onwards I will instead work with my own company again and create my own silly games.
Mostly mobile games, but maybe some PC or console might sneak in.
I’m aiming to keep a similar pace as last time, that is, create 3-4 small-ish games per year.

Now full speed ahead!


2014 November 21 - 7:09 pm 2015

Im aiming to start posting stuff here more often in 2015. 2014 has been a year where I’ve been too busy on other things.


2014 July 10 - 11:25 pm Extreme Forklifting to Windows Phone 8

I’ve ported Extreme Forklifting to Windows Phone 8, since it’s built in Unity it was a pretty easy task.
Wpcentral wrote a piece about it.


2014 June 6 - 3:28 pm Unity Font Importer

Want bitmap fonts with an outline in Unity? Not as easy as it might seem since the built in feature for creating bitmap fonts packs the characters so tight that you can’t add any shadow or outline. And no setting to add padding.

So I made this little editor extension that makes it possible to import fonts created with tools like AngelCode Bitmap Font Generator or Glyph Designer. Anything that creates a .fnt-xml-file.

Here: FontImporter.cs

Font Importer


2013 December 8 - 9:16 pm Extreme Forklifting

Extreme Forklifting is still going really well! I’m surprised how many people are still playing it.

Other than that I don’t have much to write. I can’t talk much about my work at king.com.


2013 July 27 - 11:40 am #1 on iOS

Extreme Forklifting is #1 in the UK AppStore for the second day now. Overall!

And it’s the number one “racing” game in Austria, Australia, Malta, New Zealand and Turkey! And within the top 10 overall in those countries as well.

I never expected it to do so well, really surprised!


2013 July 23 - 4:28 pm Extreme Forklifting on iOS

Extreme Forklifting has been released on iOS for about a week now, it’s been doing surprisingly well.
Taking the #1 spot for racing games in Austria, Luxembourg, New Zealand and Malta!
Within top 10 in a number of countries as well.
And with an average rating above 4.

All your forklifting needs!


2013 June 25 - 11:05 pm Extreme Forklifting released on GooglePlay

The summer is saved! Now you can forklift your way to happiness!

Prepare to embark on the forklifting adventure of a lifetime!

Extreme Forklifting on GooglePlay

I’m hoping to get it released on iOS within the next few weeks.


2013 May 29 - 10:59 pm LightmapLightApproximator.cs for Unity

An alternative to lightprobes for Unity Basic.

For my forklift project I don’t think it’s worth to invest 4500usd to buy Unity Pro with iOS & Android support. I don’t really expect to make much money from it. It’s mostly just for fun and to learn some Unity.
Since lightprobes is a Pro feature I needed something else to adapt the lighting on the forklift according to the shadows in the level.
So I created this script, it casts one or more rays from the forklift onto the ground, and then picks the color from the lightmap at that point, and then applies that value to the intensity settings of the lights that are lighting the forklift. It works pretty good.
If you give it more than one transform to cast a ray from it will use the average intensity.

You might want to use LayerMask to exclude some objects.

A poor man’s lightprobes: C# class

An example:
lightmap unity


2013 May 24 - 12:34 am Extreme Forklifting

I’m spending most my time on a client project which I can not yet talk about, but it should be finished really soon. It’s a quite cool Flash 3D game thingy, with some really huge brands in it.

Whenever I get a little time left over I’ve started to play around with Unity more seriously. And I’m working on a forklift game for mobile which will be pretty great.
I’m confident to say that it will be the best forklift game for mobiles.

So prepare to embark on the forklifting adventure of a lifetime!
Should be released within the next few months.

extreme forklifting


2013 March 13 - 11:11 pm Rage Giraffe, and portrait

So, release a new game a while ago, Rage Giraffe. I had to release it earlier than initially intended since I have so much work to do right now and the next few months.

Also I made a 3D self portrait, mostly made in Sculptris. I’ve now sent it to be 3D printed. :D



2013 February 1 - 1:13 pm Showreel!

I’ve created a showreel featuring most of the games I’ve created during the last 4 years.


2013 January 2 - 1:30 pm Monster Trucks 360 Development

I had used Away3D earlier, on Tharsis, so it seemed like an good choice for 3D engine. And even though the visuals would be in 3D the gameplay itself would be mostly 2D so I decided to use Box2D for the physics, Box2D is very easy to use, very reliable and well tested.

File size/formats
I wanted to get the core of the game including textures under 5 MB. With my own framework plus Away3D 4.x and Box2D just the code added up to to almost 700 KB. Adding textures, 3D models, and sound effects on top of that and I was worried that it would grow to large.
Music could be streamed and the individual levels loaded on demand, but it would be nice to have all else embedded into the main .swf.

Textures was as expected the biggest assets, however texture resolution is fairly low in the game, mostly 512x512s and 256x256s. It’s a bit funny since the first 3D game I worked on (in 2001) used about the same texture budgets.
I used JPG-XR for some larger textures which required transparency, Flash 11 has native support for JPG-XR. I really like JPG-XR and would have used it for more if the Photoshop support for the format was better.
I ended up using XnConvert to compress the JPG-XR files.

3D models was exported from my 3D modeling application as .obj-files, which are then compressed when they are embedded in the .swf. I could probably have gained some on using a more efficient 3D format, but .obj was the easiest to use.

Levels are .zip-files with .obj-files for the geometry and an .xml-file for the interactive game objects. There’s a separate .obj with the 2D collision geometry (It just ignores the z-axis). The zipped level ends up weighing in at about 200KB-400KB.
I wrote some scripts to automate the process of getting the level exported and packaged for the game, the resulting workflow was perfectly ok, making a dedicated level editor would certainly been better but there wasn’t enough time for that.

I got some question on how I get the polygons from the .obj-file to Box2D.
I make sure they are all convex shapes and then I load the .obj into this code.

At the end the game .swf weigh about 3.5 MB.

Performance was never much of a problem, as long as you have a decent graphics card. The CPU usage is very low, less than 1 ms per frame on my system.
I added the option to toggle anti-alias and shadows in the game, but I’m not sure it makes much difference, it seems more like either the graphics card is way too slow to even remotely work well or performance is not a problem.
A lot of thing could be better optimized in the game, but I don’t think the impact would be enough to justify the time.

Overall there wasn’t any major bugs or problems with the development.


Play the game at Miniclip


2012 December 4 - 10:58 pm New low-prio project.

For the main part of my time I’m finishing the last bits on the monster truck game and porting a clients games to Android.
But I also started a new project which I will work on when I get time inbetween. It’s getting more crazy than initially planned. :D

Work in progress, close to final geometry but without textures.


2012 November 22 - 2:01 am Games for the last 4 years

I’ve been thinking about what I’ve done for the last 4 years, and compiled a list of the games, not counting ports or variants of games. Also not counting games where I’ve only done the programming part as a contractor.

Tilt – 2009
Connection – 2009
Steam of War – 2009
RIFT – 2009

UMAG – 2010
Jet Velocity – 2010
Cubor – 2010
RoboPop – 2010

Eternity – 2011
Jet Velocity 2 – 2011
Toad Trouble – 2011
Surroubble – 2011

UMAG2 – 2012
Tharsis – 2012
A Tilted Puzzle – 2012
RectRot – 2012
Truck Game(unnamed/unreleased) – 2012

I’ve started to work on a smaller project named RAGE-GIRAFFE, and I have a new larger project planned. But after that I might consider getting a normal employment instead of running my own company.


2012 September 21 - 2:09 am More Stage3D stats

This are the stats for my game Tharsis.
Based on 1,009,505 game starts.

Context fail 18.87%
DirectX 9/10/11 39.59%
OpenGL 8.12%
Software 33.42%

Which means the game was only playable for about 47% of the visitors. (Software is insanely slow).
Thats sucks big time, but probably still way better than Unity/Shockwave/Java/WebGL.

Context fail is something that any serious site could easily fix by setting the correct wmode.

Software is pretty high, may be that the game has been viewed by a lot by users in poorer countries where cheap embedded non compatible GPUs are more common.


2012 September 11 - 2:58 pm My main project at the moment.

Some of the cars for a Stage3D game I’m working on.

The textures and UV mapping are a bit sloppy done, but the car is pretty small when in the game so it didnt make any sense to spend too much time optimizing the UVs or painting more detailed textures. I will improve the textures somewhat.

And some really small screenshots from the actual game.

It’s all work in progress though, so things might change quite a lot.

I’ve spent a fair amount of time creating tools for creating the levels, it’s been fun work.

All the light is real time, I would probably be able to get better light at lower performance cost if I’d use prebaked lightmaps, but it a lot more work creating unique UVs for all surfaces and then pre-render the light. Now I can go from the level editor to the game with just one button push and ~2sec export time. Also pre-rendered lightmaps would increase the download size, I want to keep the core game under 5mb and each level (which is loaded as it starts) under 300kb.

The libs I’m using are Away3D and Box2D.


2012 September 10 - 9:31 pm Dev

My main project is moving along nicely, it’s starting to become really pretty, although pretty might not be the word the target audience would use. :)
It’s scheduled to be completed by late November or early December.

I decided to postpone the plans I had for a vehicle shooter since the mouse-lock in Flash 11.2-11.4 does not seem ready to use yet.
I can see it working for panorama viewers and maybe interactive architecture visualization, but its too slow and imprecise for games. Need to get subpixel mouse movements at 60hz for games. And preferably without mouse acceleration. But while that game is on hault why not try Overwatch, its a shooter game that many people love. If you are interested there is also a Overwatch boosting services that can help you level up your character much faster and make your gaming experience better.


2012 September 8 - 5:11 am Why Stage.mouseLock (in it’s current state) is not great for games.

[Edited this post some, large part of my issues was due to mouse acceleration, the rounding was only part of the problem.
This post is a complete mess but I wrote it at 5am…]

With Flash 11.2 Adobe finally introduced mouse-lock, finally we can make FPS or third person games with mouse controlled camera.

I haven’t gotten around to try it out until now, and I noticed that even-though MouseEvent.movementX/Y are typed as Number they are always floored to ints. D:
Combine this with that you have no absolute mouse position when using mouse-lock (you only got the delta change) you have a huge problem.

For each mouse update you may lose up to 1 pixel of movement. I’m not entirely sure how often MOUSE_MOVE fires but lets say once per frame, at 60 fps you may lose up to 60 pixels worth of mouse movement per second. That’s terrible.

It also seems that the MOUSE_MOVE event fires very unevenly, often being around 100ms between events, making the movement very uneven. It needs to fire at around 60hz for an first person shooter.

I’ve tried this on Flash Player 11.3.300.257 and 11.4.402.265 on osX Lion. Really hoping there is something wrong with my computer.
[Edit: Tried it on my windows7 machine, same result in both IE and Firefox.]

[Edit2: Its possible that the problem is incresed by mouse acceleration, if the OS settings for mouse acceleration affects the movement values. Later: Yes they are.]

Btw, a bug, MouseEvent.clone() does not clone the movements values. So you need to set those yourself.

To sum things up, what’s missing in Flash (currently 11.4) for games. Without these it’s not possible to make a decent FPS like game.
1. Raw mouse input without mouse acceleration.
2. Mouse input at 60hz
3. Sub-pixel precision on mouse movement.