Richard Harrington
5a5fb86359
added support for shells to tick-combined-world
2013-08-21 20:36:57 -04:00
Richard Harrington
12e80d2379
added tick-shell function
2013-08-21 20:27:48 -04:00
Richard Harrington
17f913820a
Merge branch 'shell'
2013-08-21 19:33:30 -04:00
Richard Harrington
52fe0ba01d
Merge branch 'master' into shell
2013-08-21 19:33:13 -04:00
Richard Harrington
1cb3d98701
added new shooter program; commented out because writing to SHOT not working
2013-08-21 19:33:01 -04:00
Richard Harrington
4c90966445
fixed merge conflict
2013-08-21 19:23:18 -04:00
Richard Harrington
4993d9a450
fixed bugs in World refactoring, in main.js
2013-08-21 19:18:29 -04:00
Richard Harrington
6546f18249
Merge branch 'frontend'
2013-08-21 17:30:37 -04:00
Richard Harrington
ba784981cd
refactored main.js to hide more queue-specific stuff in Worlds
2013-08-21 17:29:29 -04:00
Richard Harrington
7afb653f38
changed namespace phys to physics
2013-08-21 13:23:49 -04:00
Richard Harrington
faee52fcd8
moved trig functions from shell into phys namespace
2013-08-21 13:19:21 -04:00
Richard Harrington
1a5b3e3727
separated out tick-robot code into helper functions: move-robot and update-shot-timer
2013-08-21 13:12:42 -04:00
Richard Harrington
36ea96826f
changed 'step-' named functions to 'tick-'
2013-08-21 11:11:16 -04:00
Richard Harrington
8d0996bec6
moved physics formulas from robot into their own namespace
2013-08-21 10:29:44 -04:00
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