Skip to content
Browse files

Split README's hacking section off, and slight README updates.

  • Loading branch information...
1 parent 817bad8 commit a273c41a31c5d562b68077037373d5865af4a772 @stephank committed Jun 12, 2010
Showing with 77 additions and 51 deletions.
  1. +64 −0 HACKING.md
  2. +13 −51 README.md
View
64 HACKING.md
@@ -0,0 +1,64 @@
+# Hacking the ArashiJS code
+
+## Directory structure
+
+* `src` contains all the JavaScript source code.
+* `snd` contains the WAV PCM conversions of the original sounds.
+* `img` contains the SVG and PNG conversions of the original images.
+* `util` contains some utilities used in conversion and by the `Makefile`.
+* `dist` contains distributables created by `make`.
+
+## Code structure
+
+The game loop is found in `src/engine.js`. The engine basically keeps track of the game state, and
+calls the related handler method each frame. These methods in turn live in the source files
+underneath `src/gamestates/`.
+
+All other files are basically utilities for getting things done:
+
+* The `src/vakit/` directory contains drawing utilities (which stem from the `VAKit` library in the
+original Project ARASHI).
+
+* The `src/soundkit.js` library is a minimal abstraction for playing sound effects.
+
+* The `src/random.js` library contains a pseudo-random number generator. The most significant
+feature of this is that it is seedable. (This is necessary for playback of recordings.)
+
+* The `src/grid.js` library contains the code for reading and drawing the level's grid, and
+includes definitions for levels converted from the original.
+
+## Build infrastructure
+
+A `Makefile` is included, which fulfills some optional development tasks:
+
+* `make lint` runs JSLint on all source files. Before each source file is processed, the file
+`util/lint.head.js` is concatenated. This file contains the default JSLint options used throughout
+the source code. You can override the environment variables RHINO and JSLINT if the defaults don't
+work for your set-up.
+
+* `make dist` creates the compressed JavaScript and CSS distributables under `dist/`. The file
+`util/dist.head.js` is concatenated to the input of the compressor. You can override the
+environment variables JAVA and YUICOMP if the defaults don't work for your set-up.
+
+* `make clean` is your run-off-the-mill cleaning target for the above two.
+
+## Testing
+
+There is not fancy automated testing, but it is quite easy to test individual game components
+during development.
+
+A file `testing.template.html` is included, which is basically a commented start-up page. To use
+it, make a copy of it called `testing.html`. The copy won't be tracked by version control, so you
+may put together quick and dirty tests as you please.
+
+The `testing.template.html` template also demonstrates how `Engine.start` can be supplied a
+different 'entry-point' object. This technique can be used to test a single drawing or animation,
+or perhaps simply to skip the intro and jump right into a specific level.
+
+## Canvas pecularities
+
+The HTML5 canvas has a fair amount of state variables. This is the place to document the
+pecularities of how ArashiJS deals with these variables.
+
+* When using the drawing state stack, always `restore` **before** a `stroke` or `fill` operation.
+* Always reset `globalAlpha` to 1.0 when you're done using it.
View
64 README.md
@@ -3,66 +3,28 @@
ArashiJS is a (work-in-progress) Tempest-clone written in JavaScript and HTML5.
ArashiJS is adapted from Project ARASHI for the Apple Macintosh.
-Project Arashi is available at: http://users.tkk.fi/jmunkki/cards/arashi.html
+The original Project ARASHI is still available at [Juri Munkki's website].
## Playing
The game is incomplete at the time of writing.
-To launch, simply open `arashi.html` in a browser.
+You may visit [the online version of ArashiJS][ArashiJS Online] to play the latest and greatest
+of ArashiJS at any time.
-## License
-
-ArashiJS is licensed GNU GPL version 2. See the COPYING file for details.
-
-# Hacking
-
-## Directory structure
-
-* `src` contains all the JavaScript source code.
-* `snd` contains the WAV PCM conversions of the original sounds.
-* `img` contains the SVG and PNG conversions of the original images.
-* `util` contains some utilities used in conversion and by the `Makefile`.
-* `dist` contains distributables created by `make`.
-
-## Code structure
-
-The game loop is found in `src/engine.js`. The engine basically keeps track of the game state, and
-calls the related handler method each frame. These methods in turn live in the source files
-underneath `src/gamestates/`.
-
-All other files are basically utilities for getting things done:
+Should you download ArashiJS, then you can simply open `arashi.html` to play.
-* The `src/vakit/` directory contains drawing utilities (which stem from the `VAKit` library in the
-original Project ARASHI).
+## Contributing
-* The `src/soundkit.js` library is a minimal abstraction for playing sound effects.
+Fork me on Github! If you're not already reading this file on Github, then take a look at the
+[github project page][ArashiJS project page].
-* The `src/random.js` library contains a pseudo-random number generator. The most significant
-feature of this is that it is seedable. (This is necessary for playback of recordings.)
+For some documentation on the code, see the included `HACKING.md` file.
-* The `src/grid.js` library contains the code for reading and drawing the level's grid, and
-includes definitions for levels converted from the original.
-
-## Build infrastructure
-
-A `Makefile` is included, which fulfills some optional development tasks:
-
-* `make lint` runs JSLint on all source files. Before each source file is processed, the file
-`util/lint.head.js` is concatenated. This file contains the default JSLint options used throughout
-the source code. You can override the environment variables RHINO and JSLINT if the defaults don't
-work for your set-up.
-
-* `make dist` creates the compressed JavaScript and CSS distributables under `dist/`. The file
-`util/dist.head.js` is concatenated to the input of the compressor. You can override the
-environment variables JAVA and YUICOMP if the defaults don't work for your set-up.
-
-* `make clean` is your run-off-the-mill cleaning target for the above two.
-
-## Canvas pecularities
+## License
-The HTML5 canvas has a fair amount of state variables. This is the place to document the
-pecularities of how ArashiJS deals with these variables.
+ArashiJS is licensed GNU GPL version 2. See the `COPYING` file for details.
-* When using the drawing state stack, always `restore` **before** a `stroke` or `fill` operation.
-* Always reset `globalAlpha` to 1.0 when you're done using it.
+ [Juri Munkki's website]: http://users.tkk.fi/jmunkki/cards/arashi.html
+ [ArashiJS Online]: http://stephank.github.com/arashi-js/
+ [ArashiJS project page]: http://github.com/stephank/arashi-js

0 comments on commit a273c41

Please sign in to comment.
Something went wrong with that request. Please try again.