An object (a robot, a piece of wall or an obstacle), has the following properties regarding the physics:
A force is the power that drives an object a certain way. It influences the Momentum, and has the following properties:
Formulas:
A robot should have a motor which transforms the robot's energy into kinetic energy taking into account friction, and efficiency of the motor. -- FnH
A robot should have a gun which uses the robot's energy to launch a bullet. If we drop air friction we don't have to consider things like reach. In this case the bullet's velocity will remain constant and a function of the spent energy. -- FnH
That is, if you disregard acceleration due to gravity. With gravity, its velocity will only remain constant along the horizontal axis, and will accelerate along the vertical axis. -- nano
I was assuming we'd keep robocode purely 2D. If we add a third dimension you would need to specify the arc you're fireing in as well (thus making it possible to shoot _over_ tanks etc.). You could also argue that the bullets are fired at such high speeds (like gunshots) that the vertical acceleration is negligable. --FnH
I think that it's possible to apply the phisics in a 2D environment, where only the Gravity points downwards, and nothing else uses the vertical axis. --Daniël Pelsmaeker
A robot should have a shield that uses energy to neutralize bullets. To be true to the current robocode rules the energy needed tot stop the bullet should be around 4 times more than the energy needed to fire the bullet. -- FnH
What would be the point of such a shield? It sounds like it would be just as bad as being hit. -- PEZ
My guess is that the firer wouldn't get any energy, or bullet damage points if their bullet hit your shield. Any bullets which did get through would have decreased power. However, I'd have to raise the question of how long the shield lasts (in ticks). -- Rod Hyde
Does it cost anything to raise the shield if you don't get hit? If so, how much? -- PEZ
I invented the shield to keep everything energy-based. The shield is up the entire time and uses energy when you get hit. I thought it would make it more understandable as to why you lose energy when you get hit. You could also invent some other story as well ... -- FnH
Aha. but that's excellent. An alternative might be that the bullets consist of anti-matter or some such. =) -- PEZ
My toughts about shields:
Unfortunately, since you can always tell when a bullet would hit you, a shield like this may just be too good. The amount of energy that it used would have to balance out the energy that would be lost for an actual hit, and then the shield would be worthless. You can never tell when a bullet is actually going to hit you or not; you can only tell when it would hit you if it were aimed correctly. Thus the only way to use the shield is to turn it on everytime a bullet might hit you and then immediately turn it off again, or not use it at all. This adds no strategy to the game, only complexity. -- nano
Also, it wasn't my intention to bring something new to R2 ... Again, I just used the word 'shield' in order to have a reason why being hit should cost energy (instead of subtracting points from structural integrity or something) ... -- FnH
Yes, my reply was in response to Daniël's take on shields, sorry about the confusion. -- nano
As was my reply (hence the also), sorry about the confusion :) -- FnH
Maybe someone can move this part of the dicussion to a /Shield? page, to avoid this confusion. -- Daniël Pelsmaeker