The MekaWars' pilots move their first steps or, better, fly their first flights. As already explained in an old post (read it), in a programming-game like MekaWars, the bots' AI is written in Lua and executed in a sandbox, that is a protected environment where the player's code is executed without affecting in dangerous ways the computer, or the execution of the simulator, or other players' code.
As you can see in the screenshot (always taken from the current simple radar-screen-like viewer), a very short script can already control the vehicle on which the pilot is loaded. In this case, the pilot sets the speed at 75 m/s and every 5 second changes direction by 90 degrees.
The simulator answers to those commands accelerating the vehicle to the requested speed and rotating the direction when necessary. There are also other behaviors managed automatically by the simulator. For example, when a vehicle hits an asteroid, it bounces, but the direction is again rotated, according to the maximum speed of the vehicle, to match the requested direction. Then, after several collisions, the vehicle is so damaged that it explodes and the pilot is lost in space... but this is another story.
Stay tuned for more developments in the structure of the simulator and more complex pilots' behaviors.
The simulator answers to those commands accelerating the vehicle to the requested speed and rotating the direction when necessary. There are also other behaviors managed automatically by the simulator. For example, when a vehicle hits an asteroid, it bounces, but the direction is again rotated, according to the maximum speed of the vehicle, to match the requested direction. Then, after several collisions, the vehicle is so damaged that it explodes and the pilot is lost in space... but this is another story.
Stay tuned for more developments in the structure of the simulator and more complex pilots' behaviors.
No comments:
Post a Comment