Saturday, January 08, 2005
BlitzMax
I've recently bought BlitzMax, which is a very nice little programming language.
I'm working on a physics-based game, and my worklog can be found here. More details when I get something more solid.
0 comments
I've recently bought BlitzMax, which is a very nice little programming language.
I'm working on a physics-based game, and my worklog can be found here. More details when I get something more solid.
Thursday, December 02, 2004
Hahahahhahhahhaha!
Well, Half Life 2 Deathmatch is upon us. Killing friends with toilets is possibly the most fun I've had in an online game. Top stuff!
0 comments
Well, Half Life 2 Deathmatch is upon us. Killing friends with toilets is possibly the most fun I've had in an online game. Top stuff!
Tuesday, November 23, 2004
No Software Patents!

Please. It's just damaging the industry. The only people making a profit is the lawyers, while big companies sue each other and exploit smaller ones which can't afford costly legal aid.
0 comments

Please. It's just damaging the industry. The only people making a profit is the lawyers, while big companies sue each other and exploit smaller ones which can't afford costly legal aid.
We've got this shower switch that provides power to the shower's water heater. Last week after a shower I tried to switch it off and felt something snap inside so it was stuck to "on".
No problem, I thought. I can still have showers. I called the letting agents last week and they agreed, but managed to get someone round today to fix it anyway. Here's the switch:

For the last X months, this thing has been burning inside the wall whenever we've used the shower. Sometimes smouldering, sometimes actually catching fire inside the wall 8O
There's been a slight fishy smell when we had a shower, but we thought it was the extactor fan or the drains or something. No, it was the thermoplastic melting. I'm feeling very lucky that we caught it before it did any more harm.
Need a cuppa now.
Thursday, November 11, 2004
Mandelbrot in PHP
Haven't written a fractal generator for ages, so I decided to give it a go in PHP. It was fun! :)
Mandelbrot set written in PHP
I was inspired after reading this interview with the man himself. Top stuff.
0 comments
Haven't written a fractal generator for ages, so I decided to give it a go in PHP. It was fun! :)
Mandelbrot set written in PHP
I was inspired after reading this interview with the man himself. Top stuff.
Sunday, November 07, 2004
More memory == double plus good
Well, managed to stick an extra 192MB of RAM in the old Wallstreet G3. It makes such a difference: OS X really eats up the memory. Hopefully that'll reduce the amount of thrashing my hard disc has to do and extend its life a little.
0 comments
Well, managed to stick an extra 192MB of RAM in the old Wallstreet G3. It makes such a difference: OS X really eats up the memory. Hopefully that'll reduce the amount of thrashing my hard disc has to do and extend its life a little.
Friday, November 05, 2004
For those of you in need of brain food...
Have a look at this.
Oh sorry, I think I might have got that wrong...
0 comments
Have a look at this.
Oh sorry, I think I might have got that wrong...
Friday, October 29, 2004
0 comments
Wednesday, October 27, 2004
The Physics of Thrust
I've made numerous posts about the physics behind Thrust over the years. I thought I should probably do something a bit more static.
The following is a post I made here a while ago. It's not the best explanation in the world, but it's a good starting point.
I wrote a big long post about this ages ago but it got lost in the Great Purge :(
The way Thrust does it is cheating. When the ship is on its own it moves as expected. When joined to the ball the ball and ship are treated as one body with the centre of mass halfway between the ball and ship.
It's really easy to work out the moment of inertia of the body as you can treat it as two point masses each of mass M joined by a massless rod of length 2r. I = M.r^2 + M.r^2 = 2Mrr.
Now, the torque is defined as T = Ia where a is the angular acceleration.
Your body has a rotation speed w that you use to spin the ship and ball around its centre of mass every game loop. If w=0 then they are not spinning round each other. The acceleration is how much you need to change that value.
I like to think of it this way. Moment of inertia is to rotation what mass is to linear movement. Torque is to rotation what forces are to linear motion.
The only think left to find is the torque T, which only occurs when you thrust. Well that's easy - T = r x F (r being the distance for the force to the centre of mass and F being the thrusting itself). You can get rid of the cross product in 2D like this: T = rf where f is the force perpendicular to the centre of mass (you only take the amount in x and y that is not pointing towards or away from it - that's a simple trig job).
So from those equations you can work out how much the ship and ball needs to spin. You can simplify these equations a lot, which is how the game manages to run on even the simplest machines. I got the whole lot down to one trig call, a few adds and a few mults. Use a lookup table and you don't even need to do the trig.
Edit: Oh, that's just for the spinning. For actually moving the ball and ship, apply the force of the thrust to the centre of mass (halfway between the ball and ship).
0 comments
I've made numerous posts about the physics behind Thrust over the years. I thought I should probably do something a bit more static.
The following is a post I made here a while ago. It's not the best explanation in the world, but it's a good starting point.
I wrote a big long post about this ages ago but it got lost in the Great Purge :(
The way Thrust does it is cheating. When the ship is on its own it moves as expected. When joined to the ball the ball and ship are treated as one body with the centre of mass halfway between the ball and ship.
It's really easy to work out the moment of inertia of the body as you can treat it as two point masses each of mass M joined by a massless rod of length 2r. I = M.r^2 + M.r^2 = 2Mrr.
Now, the torque is defined as T = Ia where a is the angular acceleration.
Your body has a rotation speed w that you use to spin the ship and ball around its centre of mass every game loop. If w=0 then they are not spinning round each other. The acceleration is how much you need to change that value.
I like to think of it this way. Moment of inertia is to rotation what mass is to linear movement. Torque is to rotation what forces are to linear motion.
The only think left to find is the torque T, which only occurs when you thrust. Well that's easy - T = r x F (r being the distance for the force to the centre of mass and F being the thrusting itself). You can get rid of the cross product in 2D like this: T = rf where f is the force perpendicular to the centre of mass (you only take the amount in x and y that is not pointing towards or away from it - that's a simple trig job).
So from those equations you can work out how much the ship and ball needs to spin. You can simplify these equations a lot, which is how the game manages to run on even the simplest machines. I got the whole lot down to one trig call, a few adds and a few mults. Use a lookup table and you don't even need to do the trig.
Edit: Oh, that's just for the spinning. For actually moving the ball and ship, apply the force of the thrust to the centre of mass (halfway between the ball and ship).
Thursday, September 02, 2004
0 comments
All content © James Arthur 2004
TinyMinions: Web Development and Programming Services
TinyMinions: Web Development and Programming Services
This is the domain of teamonkey, aka James Arthur: programmer, web developer and lover of tea.

