Team 871's RoboticsSimulator

Hello everyone! This year our senior programmer decided to take on a side project to help us practice and test various game strategies. He has created a simulation of this year’s game in a top-down two dimensional multiplayer game format.

This game has worked out so well for us that, in the spirit of FIRST and Gracious Professionalism, we are releasing it to the entire FRC community!

The RoboticsSimulator pits two alliances of three robots against each other following the same rules and time progression of the actual game. Teams may implement an autonomous mode for their robot using the LUA scripting language.

Robots are controlled via a mouse and keyboard, or mouse and XBox controller. The controls are as follows:

WASD - Move up/left/down/right
Space - Toggle the grabber open/closed
Left/Right arrow keys - Spin left / right
Up/Down arrow keys - Move the lifter Up/Down
F4 - Toggle fullscreen mode
Numpad 5 - Toggle robot/field oriented mode
Numpad 6 - Toggle noclip mode

Xbox Controller:
Left stick - Movement
Right stick - Rotation
Triggers - Lift up/down
Right bumper - Toggle grabber

Users can grab boxes from the icon on the bottom right and drag them into the Vault on the left hand side of the screen by clicking and dragging with the mouse. Additionally powerups can be activated by clicking on the button above the respective boxes.

Various setup details & gotchyas:

The game comes with two sets of executable code, the client and server. Teams should set up and run one server and up to six clients on other computers on the same LAN. The client will prompt the user for the IP address of the server to connect to.

The game can be re-run without closing the client and servers, however the more matches ran without closing and restarting the clients and servers the more laggy/glitchy the game may become.

Please remember that this game is a work in progress, and this is simply a pre-release beta version that we are releasing for your playing pleasure. If you encounter any bugs or major problems, feel free to leave comments here, or on our github and we’ll try to address them.

You can download the release at Team 871’s Github .

Legal stuff:

We are releasing this game under the Apache 2.0 license. In other words, feel free to copy, clone, edit, improve, modify, etc etc the code so long as you document and credit the original work to Team 871.

Although we participate in FRC, we are not personally affiliated with FRC, nor has FIRST or FRC endorsed this product, etc.

FIRST®, the FIRST® logo, FIRST® Robotics Competition and FIRST POWER UP℠ are trademarks of For Inspiration and Recognition of Science and Technology (FIRST®). © 2017-2018 FIRST.

This is awesome! I can’t wait until I can get 5 other friends and do a full game. Is there a reason why the robots cant move in auto? Really great work.

Auton behaves like real Auton, You’ve got to write a LUA script to drive the robot and select it. There’s an example LUA script in the github repo for you to look at.

Oh also, I forgot to mention you can Lift too –
Just raise the lifter to the highest point, then align the forks with the lift bar on the scale, and lower the lift. If you’ve done it right you’ll see the robot move up instead of the lift mechanism on the right hand side.

Super neat idea! Really like that auton is simulated in-house, although I’m a bit confused about the whole Lua thing. Is that because Lua is so simple, so you could just do things like RobotForward();?

Sort of – The Lua interface is set up so that it’s somewhat like robot code, so think Robot.driveMechanum(). We are aware that for this feature to be useful (useable?) . We really need an API document for the LUA scripting. We’ll work on that and try to have something posted in the next day or two.

My scouts looked at this and were wondering if there is a way to change from First Person to Whole Field Perspective.

You can use the mouse wheel to scroll in and out – It’s not the same thing I understand, but the server does render things from a field perspective, if that helps. It wouldn’t be difficult for us to add a mode for that. I’ll add it as a ticket in our github.

Hello Everyone, Hopefully I’m not violating some forum rule here, as this is not a bump post.

We are working on completing our Chairman’s award presentation and we’d like to include some details about this game in it. If any of you who’ve downloaded it and run it have found it useful, could you please reply here and let us know your team number and name, and if/how you found the game helpful/fun/etc.

Your help would be greatly appreciated!

Thank you so much
-Team 871, the “Robotechs”

Team 4405 The Atoms Family from Michigan found it useful to waste time in class. And we trained some drivers with it.