-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
79 lines (68 loc) · 3.12 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Javascript Nanomunchers for the Dr. Ecco website.
Tests are in Jasmine: https://github.com/pivotal/jasmine/wiki
INTRODUCTION
The purpose of this project is to create a Nanomunchers game hosted on the Dr.
Ecco website.
DESIGN CRITERIA
* We desire a game that is compelling to play over one that preserves all of
the computational rigor of the original programming assignment.
* We desire a two player action game.
GAMEPLAY
The game page will display two 'clips' full of nanomunchers on the far left and
right hand side of the screen. The Nanomunchers graph is located in the middle.
--- ----------------------------- ---
| x | | | | x |
| x | | o o--o--o - | | x |
| x | | | | -DD | | x |
| x | | o--o o - | | x |
| x | | | | | | x |
| x | | o--o--o--o--o--o o--o | | x |
| x | | | | | | | x |
| x | | o - o o | | x |
| x | | -DD | | | | x |
| x | | - o--o--o--o | | x |
| x | | | | x |
--- ----------------------------- ---
The player 'motherships' are controlled using keyboard inputs as in
first-person shooters for one player and the arrow keys for the other. A
separate key unloads from the 'clip' of nanomunchers when in close enough
proximity to a node on the graph.
The simulation advances continuously. The appropriate gameplay speed will be
determined by trying to keep the action compelling. All nanomunchers dropped
while munchers are still driving to their next node will fall until the
exisiting munchers complete the cycle, at which time the conflict resolution
rules are enforced.
ARCHITECTURE
boardview.js - Board GUI elements.
clipview.js - Nanomuncher clip GUI elements.
lib - Contains third party libraries Raphael, JQuery.
misc.js - Helper functions.
muncherview.js - Nanomuncher GUI elements.
nanomunchers.js - Game UI elements and global constants.
page.html - Main HTML page hosting game.
playerview.js - Player GUI elements.
scoreview.js - Score GUI elements.
server - Runs a test HTTP server.
simulator.js - Nanomunchers simulation logic elements.
sounds - Sounds used during gameplay.
The game adopts a model/view strategy. All of the core logic elements necessary
to run the game and enforce its rules are implemented in Simulator. Each game
element has a corresponding view object implemented in a separate file. The
main driver of the game is the GameUI implemented in nanomunchers.js. The
GameUI owns all of the UI instances as well as the simulator. Its game loop
timer advances the game simulation while the animation elements are handled by
the animation timer service.
MANDATORY FEATURES
* Board generator.
* Game state model.
- Controls board objects such as motherships, graphs, clips, etc.
* Gameplay state machine.
- Presents UI states on page { Intro, Clip_Loading, Action, End }
* High scores.
OPTIONAL FEATURES
* Prettier graphics!
* Mode to have players strategize by loading their clips with hand-programmed
nanomunchers.
* Game replay.
* Sound effects.
* A narrated story screen (for the die-hard fans).