Well, it runs, sorta. At least there's no NullPointerException anymore. Now, Simmons just runs straight into the wall. I've got a feeling that it has to do with the way I'm applying the forces that AGravEngine? returns.
How does it move?
How does it fire?
No targeting implemented yet. Planning to implement VirtualBullets if I a) can understand just how it works and b) if I have time (1v1 tourney in java class is in about a week).
How does it dodge bullets?
Senses if the enemy has fired a bullet based on change in energy, and assumes enemy has fired directly at Simmons (most kids in my java cllass don't have advanced targeting systems). Creates a gravPoint based on predicted location of the bullet, and will dodge accordingly.
How does the melee strategy differ from one-on-one strategy?
Where did you get the name?
Well, I had recently recieved the Blood Gulch Chronicles DVD, from Red vs Blue.com in the mail, and felt like naming my bot after one of the characters on the show. The first one to pop in to my mind was Simmons, so I decided to use that.
Can I use your code?
Sure, though it isn't very useful unless you are trying to help me out. I've just gotta figure out where I should host the files (probably my site).
What's next for your robot?
Implementation of a targeting system, after I get the robot working that is.
What I need
I'd like a bit of help doing something with the vectors (vector in terms of physics) the AGravEngine? spits out.
What other robot(s) is it based on?
If those really are your numbers then you should expect to hug the walls. This in ANTIgravity movement, because it repels. Enemy bots and walls should both repel, the way you have it is bots repel and walls attract. Make the walls force negative, and it should work. -- Tango
No, if you look at Hanji/AGravEngine and Hanji/GravPoint, both of which are used in my bot, the wall force, when positive repels, and the grav points force are repulsive when negative. It is a small thing with the math, you change the update method, ie switch around the +/- operators in some places, they can be set so both can be positive or negative repulsive.
This is the math:
//this calculates the force the gravpoint exerts on the bot xForce += force * Math.sin(angle); yForce -= force * Math.cos(angle); //this calculates the force the walls exert on the bot xForce -= wallForce/Math.pow(curX, wallDropoff); xForce += wallForce/Math.pow(width-curX, wallDropoff); yForce += wallForce/Math.pow(height-curY, wallDropoff); yForce -= wallForce/Math.pow(curY, wallDropoff);As you can see, if you were to switch the +'s and -'s in, say the gravpoint section, positive would become repulsive, negative attractive. The same thing is in Hanji's comment's for those classes. Burk3, Good Luck. --Dan