Bots and Simulations > DNA - General

some minor help

(1/2) > >>

Nitus:
I'm working on a movement script that makes the bot accelerate when it's going too slow and let itself drift once it gets going too fast - when its drifting it rotates 360 degrees once in awhile to scan for targets.
 
My question is what are the values for movement, I.e., how fast is 1, how fast is 2, etc.

PurpleYouko:
The movements that you apply to .up, .dn, .sx, .dx are accelerations only.

As with any acceleration, the resultant change in velocity is proportional to the energy you spend and the mass of the robot.
If your robot's mass is exactly 1 then 1 .up store will result in a forward velocity change of 1. if it is less than 1 then you get more velocity and so on.
The final factor is friction. The velocity of your bot will be reduced by a value proportional to the physics setting for friction.

Numsgil:
Also remember that the 'movement factor' in your physics page will change how effective acceleration is.  At best you'll only get about 80% of the energy you spend into accelleration.

Shen:
Another tip. If your going to be drifting and spinning at the same time you will need to use *.velscalar not *.vel because vel is calculated by the direction your bot is facing, so if you turn your vel will decrease.

Nitus:
I'm not thinking as far as energy cosumption. I just want a common-sense benchmark. Is there a way for the bot to get it's absolute position, or at least some kind of orienting point?
 
But that's too complex for this bot. I think I just need to test a bot with various values until it appears to move as I would like it to. I mean as long as it is speeding up and slowing down properly the dx and sx should suffice.

Navigation

[0] Message Index

[#] Next page

Go to full version