Skip to content

jaredbeck/assemblot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Robots (assemblot)

Program battling robots using a tiny subset of x86 assembly.

You can purchase a gun, shields, engine, and CPU clock speed for your robot. If you write efficient assembly, you can run a lower clock speed and have more points to spend on armament!

Supported CPU instructions and registers are described in rules.yml, where you can also configure the size of the arena and stuff like shield fade rate and walls-are-lava.

Usage

# Basic bot vs. itself
ruby -I lib lib/assemblot/server.rb rules.yml bots/basic.yml bots/basic.yml &
open frontend/app/index.html

Getting started

  • Learn to accelerate with the acl instruction (eg. bots/basic.yml)
  • Learn to rotate the gun turret and fire

Goal is fun, not perfect emulation

If I've misunderstood something fundamental about x86 CPUs (which is likely) PRs are welcome, but the goal is just to have some fun, not to build a well-featured x86 emulator.

Implemented so far ..

  • Arena
  • Bot movement (acl)
  • Walls
  • A dozen CPU instructions
  • Bot attribute: CPU clock speed
  • Basic GUI (Eventmachine / WebSocket / HTML Canvas)

TODO

  • GUI inputs: start, pause, stop, add/remove bots
  • fix canvas flicker
  • new file format so that line numbers match up
  • randomize initial bot placement
  • rotate gun turret and fire
  • bot health
  • walls are lava
  • bot attribute points (buying power-ups)
  • purchase more CPU registers (expensive!)
  • frame rate limit

References

About

Program battling robots using a tiny subset of x86 assembly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors