VexSim - A VEX C++ Code Simulator for Faster Development

tl;dr: I built a VSCode extension + simulator that lets your programming team develop and test robot code before the robot is finished. Install it from the VS Code Marketplace or search “VexSim” in the Extensions tab.


Why I Built This

One of the biggest bottlenecks I kept running into over the years competing in VEX was that build and programming couldn’t happen in parallel. The programming team had to sit around waiting for the robot to be driveable before they could start testing anything meaningful, and trying to do both at the same time just slowed everyone down.

During one of those waiting periods, I started building a simulator to close that gap. The simulator has allowed me to significantly speed up the development process, and by sharing it, I hope it does the same for others as well.


Features

  • Runs your actual PROS project code — no rewriting for a simulator environment

  • Supports LemLib (currently the only supported external library — more below)

  • Integrated as a VSCode extension — a “Run Sim” button appears in the bottom-left corner of any open PROS project

  • Keyboard-mapped controller input for testing both autonomous and opcontrol

  • Configurable drive/tracking ports and physical dimensions via extension settings


Installation

Install the extension from the VS Code Marketplace, or search “VexSim” in the Extensions tab inside VS Code.

On first run, you’ll be walked through a one-time setup. If prerequisites (CMake, MSYS2, SDL2, etc.) aren’t already installed, you’ll be prompted to install them automatically — just say yes twice and you’re good to go.

If you’d prefer to set up prerequisites yourself via PowerShell or manually, instructions are in the README.


Usage

Open a PROS project in VSCode. You’ll see a “Run Sim” button in the bottom-left status bar.

Before your first run, right-click the button → Manage Extension → Settings icon → Settings, and configure:

  • Drive motor ports

  • Tracking wheel ports

  • Physical dimensions of your robot

Note: Your code should not reverse any drive motors in software — handle that in the settings instead.

Once configured, click Run Simulator to build and launch.

Controls

  • F5 — Autonomous
  • F6 — Opcontrol
  • F7 — Disable
  • ESC — Quit

Drive Controls

  • W / S / A / D — Left joystick
  • ↑ ↓ ← → — Right joystick

Buttons

  • L / ; — L1 / L2
  • P / [ — R1 / R2
  • 1 / 2 / 3 / 4 — X / B / Y / A

Current Limitations & Roadmap

Right now, the only supported library beyond PROS itself is LemLib. Adding support for other libraries is documented in the repo’s Contributing section — it’s not too involved, and I’d love PRs for any libraries you add. If there’s a specific library you want supported, open an issue or reach out and I’ll add it (give me about a week).

Other things on the roadmap:

  • Proper drivetrain gear ratio support

  • Support for 5.5W motors

  • Physical controller input


Links

Quick clarification, there isn’t a setting for this yet, it is planned in a future update. You shouldn’t reverse any drive motors at all.

in this not a field controller

It doesn’t require a physical robot, so no. It’s a simulation, it compiles your code to an exe so you can see how it would work before having an actual robot.

OH. wonderful!! does it have camera support

When you say simulator, are you referring to something with a virtual robot like vexcode vr, autodesk synthesis, etc. Or some other system?

This is honestly amazing. As the coder in my team, I have to wait for my teammates for a long time since building a robot takes a long time, so this will help a lot. Good job!

I wonder if someone put in the work for a Python variant of this??

I’m assuming you want to use AprilTags? It’s on the roadmap, you can expect it in like a week, along with some other things I plan to ship with it.

Vexcode VR works great for that, but the physics aren’t the best on it.

It’s a 2D (top-down) simulation of your code (drivetrain only). So you can test driver code & auto code with it, and it has physics too. So yes, kind of like a 2D version of VexcodeVR with better physics and support for PROS and some external libraries.

i actually have tried that before and i totally forgot about it, thanks a lot for reminding me about it, its been a year or two since then, I’ll have to take a look, i didnt know that they had v5 too, i thought it was only iq.