Commit Graph

316 Commits

Author SHA1 Message Date
Richard Harrington
6be9e599e1 added firing of new shells to SHOT write-register function 2013-08-20 23:40:54 -04:00
Richard Harrington
206f44ed9e added shell module, with some trig functions 2013-08-20 23:22:07 -04:00
Richard Harrington
a632b53817 added SHELL_SPEED constant 2013-08-20 23:21:45 -04:00
Richard Harrington
63ff5c8e05 refactored 'register' to do a lot more destructuring of registers and robots passed as parameters 2013-08-20 17:45:37 -04:00
Richard Harrington
61dcd040ad got the shot timer counting down 2013-08-20 17:30:37 -04:00
Richard Harrington
ad24b7e850 added SHOT register and :shot-timer robot field.
:shot-timer does not count down yet, and SHOT register
does not release shells.
2013-08-20 17:01:42 -04:00
Richard Harrington
a32a83d24f refactored register to be able to use mixins separate from their
map keys
2013-08-20 16:02:48 -04:00
Richard Harrington
c38f82d22e moved single-use read- and write-register functions directly into the extend protocol blocks as anonymous functions 2013-08-20 15:05:03 -04:00
Richard Harrington
163ba2840b altered indentatin in register 2013-08-20 15:03:34 -04:00
Richard Harrington
07596d8fad refactored 'register' with path-to-robot-field convenience function 2013-08-20 14:57:53 -04:00
Richard Harrington
70c866189b refactored drawing of circles; added drawing of lines, and guns 2013-08-20 14:39:16 -04:00
Richard Harrington
09aea21988 changed name of draw function to drawWorld, main.js 2013-08-20 14:38:11 -04:00
Richard Harrington
f6ce750299 refactored scaleFactorX & Y stuff into functions, in main.js 2013-08-20 14:36:54 -04:00
Richard Harrington
0bcff121ae altered :moving-to-spot program so it sets the gun aim to a random direction 2013-08-20 14:32:15 -04:00
Richard Harrington
f440a473ed updated comment for worlds constructor 2013-08-20 14:26:37 -04:00
Richard Harrington
1aa388eb54 added Geom module for geometric calculations 2013-08-20 14:26:03 -04:00
Richard Harrington
e02dd126c0 each new index.html request now initiates a new game instance 2013-08-20 13:25:51 -04:00
Richard Harrington
d7d27ca9f0 moved test-programs out of test into src, renamed it src-programs
also fixed some testing bugs that were using
the old parameters for init-world
2013-08-20 12:21:09 -04:00
Richard Harrington
9b46900f9b changed width and height to robot-range-x and robot-range-y and made
them constants

because technically, the robot ranges are the maximum ranges for the
centers of the robots' bodies,
so the actual extent of the arena when
displayed must be slightly larger
2013-08-20 12:10:58 -04:00
Richard Harrington
e3b879fba8 removed 'core' dependency in handler, now depends on world and browser 2013-08-20 11:51:40 -04:00
Richard Harrington
b4b962096b separated 'animate' into two namespaces: 'terminal' and 'browser' 2013-08-20 11:40:29 -04:00
Richard Harrington
2074f589a5 changed keypress to keydown, to allow for repeating when key is held down 2013-08-19 21:05:26 -04:00
Richard Harrington
c4397525e5 cleaned up keyboard event listener code 2013-08-19 20:59:54 -04:00
Richard Harrington
cb93f22cdd added comment about removing simulation loop, index.html 2013-08-19 20:59:29 -04:00
Richard Harrington
a40455bae7 removed TODO comment in index.html about fastForward 2013-08-19 20:55:28 -04:00
Richard Harrington
d453f5b9ad added STARTING_FAST_FORWARD config and set it to 15 2013-08-19 20:54:24 -04:00
Richard Harrington
af2a9272e3 added keyboard event listeners for fast-forwarding 2013-08-19 20:50:04 -04:00
Richard Harrington
2671d42f0e set it up to skip simulation worlds, for better fast forwarding 2013-08-19 20:49:32 -04:00
Richard Harrington
84ce9109c8 fixed debugStartTime parameter in index.html 2013-08-19 20:47:44 -04:00
Richard Harrington
df46da85ba changed gameSecondsPerTick in index.html to almost exactly 1/30 2013-08-19 20:42:19 -04:00
Richard Harrington
5d03943942 added drop and dropMulti to Queue library 2013-08-19 20:40:37 -04:00
Richard Harrington
284e2b55a9 whole lot of refactoring of main.js into more coherent pieces 2013-08-19 20:05:39 -04:00
Richard Harrington
42a4d40105 removed comment 2013-08-19 13:53:47 -04:00
Richard Harrington
c205f120b7 changed robot radius 2013-08-19 13:53:33 -04:00
Richard Harrington
ee04037e79 tightened up html (cosmetic) 2013-08-19 13:28:07 -04:00
Richard Harrington
36e418efd6 separated out javascript from index.html 2013-08-19 13:27:54 -04:00
Richard Harrington
8000fdabea separated out css from index.html 2013-08-19 13:26:53 -04:00
Richard Harrington
2fde950905 fixed merge conflict 2013-08-19 13:07:04 -04:00
Richard Harrington
33c32856ea encapsulated all canvas stuff into its own object in index.html 2013-08-19 13:05:52 -04:00
Richard Harrington
1215ab5b62 rewrote comment about dropping simulation ticks, in index.html 2013-08-19 00:42:07 -04:00
Richard Harrington
de4597e363 updated readme with description of namespaces 2013-08-19 00:25:59 -04:00
Richard Harrington
420331ccd8 more work on animation in browser
removed some debugging statements
changed the size of the robots
added more reporting of time, animation rate and
   simulation rate
2013-08-18 22:32:53 -04:00
Richard Harrington
af9e5e9317 got rid of debugging statements in handler 2013-08-18 22:27:17 -04:00
Richard Harrington
49f2f47968 got animation going in the browser -- extremely hacky and full of debugging statements 2013-08-18 21:32:13 -04:00
Richard Harrington
03ce17eb9a got enqueuing of downloaded json worlds going
(fair amount of hacky debugging stuff in there now)
2013-08-18 19:58:55 -04:00
Richard Harrington
5750481e02 fixed bug in Queue.enqueueArray 2013-08-18 19:58:04 -04:00
Richard Harrington
6d429d6da0 removed initial json fetching tests from client and handler 2013-08-18 19:57:44 -04:00
Richard Harrington
31512947f0 fixed bug in my new enqueue_array function in Queue.js 2013-08-18 18:18:56 -04:00
Richard Harrington
56391578ac removed most comments from Queue.js (easier to read without them) 2013-08-18 18:15:44 -04:00
Richard Harrington
0afb9164b0 got jquery ajax calls working 2013-08-17 17:07:01 -04:00