RoboCode2021
About
This has a .exe version of the game, if you want to see how it works with the demo robots.
(Press esc to end a battle early!)
The .yyz game is the source code for importing into GMS 2.
Where to start/How to code
- download GameMaker Studio
- free version works for everything but packaging as a .exe
- maybe look at some intro gamemaker IDE tutorials?
- GML is basically python
- import the .yyz file into Gamemaker
- do 3 things
- 1) Make a copy of oRobotTemplate
- rename it (more important than it seems)
- in the 'step' event, use ds_list-add() to add however many behaviors to 'allBehaviors'
- change your arbiter from arbiter_SimplePriority to whatever you want, pass it 'allBehaviors'
- 2) Make new behavior scripts!
- use 'sensors' of your robot
- scan - list of robots recently scanned
- each robot in the list can be 'viewed' for values
- (Again, DON'T MODIFY)
- x,y,velocity,bearing...
- each robot in the list can be 'viewed' for values
- bearings of robot, turret, radar, lastRadarBearing
- hittingWall, beenHit, hitOtherRobot
- x,y,room_width,room_height
- scan - list of robots recently scanned
- make sure they return an array with these values
- velocity,turnRate,gunRotation,RadarRotation,Scan,GunFire,vote
- use 'sensors' of your robot
- 3) Make new arbiters!
- Arbiters should only care about the values in their passed arrays. They shouldn't be looking at any other variables
- make sure they return an array with at LEAST these values
- velocity,turnRate,gunRotation,RadarRotation,Scan,GunFire