Wheelchair Stunts - more development

I don't know wether my coding sabatical is responsible but after a few months off from game development I'm certainly well up for it at the moment.

 

Now I've ironed out the wrinkles that were stopping me from moving forward previously, I'm now clearing up all the R&D work and starting to put the game together.

 

So pleased with my progress I put this video up on youtube. 

Wheelchair Stunts

Wheelchair physics

 

Created a proper wheelchair object with driver and added some controls to brake, lean forward and lean back.

The leaning forward and back was supposed to make the guy lean and affect the chair in flight however it didn't really work.

 

 

I also added a brake, which is just a motor on the rear axle set to zero speed but it was while testing this, I discovered something interesting.

Rotating the wheel in reverse in flight makes the chair spin backwards and vice versa for forwards. So I swapped out the lean with a 'spin wheel' and now I can get backflips and forward rolls. Might add a slider for this so I can spin the wheels at variable rates so I can steady my flight gently or do stunts.

 

I also have set the components Mass in kgs to something more realistic and its improved it no end. I was working previously just using densities and had these quite low but now its all much heavier its behaving brilliantly now.

Still have this idea of having different drivers with different weights but cant decide just yet.

Still have to work out how im going to detect the landing force and what is a good landing and a bad one.

 

 

Parallax scrolling.

Was a tiny bug in the mouse scrolling where when zoomed the screen was slightly behind the mouse pointer. Turned out to be a 1 liner fix and simply multiplied the movement by the zoom factor, sorted. 

While I was there I had a little look at applying some parallax scrolling. 

As I had layered all my canvases anyway this turned out to be super easy to implement. I just multiplied the movement of each layer by a smaller percentage and voila. Another job done. Excellent.

Silverlight zooming anti alias problems

I've been using a tiled background, each tile made from a silverlight Rect with an image. For a long time I had been using a hazy light blue image as the background repeated. However, when I changed it to a proper blue background I started to notice that each tile develops this horrible white border when zoomed.

 

Turns out to be known issue where silverlight antialiases elements when they are not on an exact pixel boundary, and there is nothing you can do about this so it seems. No, antialias = false here.

 

Took a while to figure it out. What I needed to be doing is writing my tiled images directly to the canvas as 1 big image. A writeable bitmap in fact and silverlight has such a thing, furthermore the writeablebitmapEx extension makes it even easier and adds some handy functions such as the blit method which solves my problem wonderfully.

So now Im blitting tiled images directly to a larger image which is added to my background canvas. In fact Im adding 1 to each of my 3 parallax canvases.

 

So now I need to make some maps..

 

Maps

I had long decided that my maps are going to be an array of 2 digit numbers, each one corresponding to a 32x32 pixel tile, then I just read through the array mapping the tiles to the screen. I think my main reason for this is so that you can somewhat see the map in a text editor and make minor adjustments.

Well, it works at least. Along with the writablebitmap, I create a large bitmap and blit each tile to it, then add it to the background canvas.

Ive created a map class that has an array for each canvas and some other info about the ramps and other objects.

One thing I've changed is to use 64x64 pixel tiles, mainly to keep the map array down and make it at least take up less space in the editor.

 

I really should but I really don't want to make a map editor. We'll see..