← All projects
Languages & VMs / Systems & concurrency · 2025

Corewar

Programs fighting for control of a shared memory: we wrote the virtual machine that runs these battles, with its own instruction set and processes that fork, a shell to step through the fight, and a live 3D view of the memory, all the way to a VR headset. First of our campus.

COpenGLGLFWUnityVRreadlineCriterion
Team
2 people
Context
End-of-1st-year project
Status
Done
1 / 3OpenGL view: four champions in the 6 KiB arena

Context

Epitech's end-of-1st-year project, based on the 1984 programming game where programs fight for control of shared memory.

What was built

  • Circular 6 KiB memory arena and champion loader
  • All 16 instructions with their cycle costs, including process fork
  • Bonus: a shell to control the simulation step by step and print any value at any time
  • Bonus: a live 3D view of the memory in OpenGL (GLFW)
  • Bonus: a VR mode, where the virtual machine acts as a server and a Unity client renders the battle in the headset
  • Companion assembler: robot_factory

Results

1stof the campus