Scott Schiller: Programming (Notepad) / Imaging (Photoshop)
Feedback and comments are always appreciated. Thanks for checking this site out! :)
I intend to write some sort of technical notes for this thing, just in case anyone actually is interested in reading over the code (I doubt it'll make much sense by itself, I can tell you that much!) .. to be added soon, time providing.
Primary objects list:
array of brick classes/properties
capsuleTypeData[type] = [typeName,selectFrequency,points];
Capsule classes/properties - eg. capsuleTypeData['laser'] = ['laser',10,100];
levelData[name] = [];
Multi-dimensional level data array (brick map)
Data represented by row/column, each item representing a brick - eg. levelData[name] = [ [0,1,2,3,4,5,6,7,8,9,A,0], [0,1,2,3..etc] ];
userData[name] = [];
User-generated level data (same structure as levelData)
levelNames = ;
User-generated level names, stored in a remote .js file
balls = ;
lasers = ;
capsules = ;
Object collections (for reference from game and main animation loop)
Brick shadow object - is created with each brick object instance
Brick object - referenced by BrickMap object, "building block" of game levels
Stores 2D array (map) of brick object references (ie. one map item maps to one brick object)
Fixed size of 13W x 20H - levels supported up to 13 wide, 20 high
One-time object For "shadow" power-up - trails behind Paddle object.
Refers to user paddle image element, contains methods for positioning and type etc.
Contains object reference, position and velocity (X/Y) components, status, and type (normal/"super" ball)
Power-up object (falls from random bricks) - has type and status properties, and animation methods
For keeping track of and displaying player's score (points)
Displays and tracks "life" icons
Player object - for setting type, applying power-ups, die, respawn etc.
"Fire" object (ie. one instance per shot)
BSOD/warning/status messages object - can pause game if error is critical, or user interaction is needed
Game options (currently just SFX) - has display and control functions
Level Editor Grid object - shows grid area for brick placement
Level Editor Brick item - can be "blank" or set to a certain type
Level Editor Map - basically BrickMap() adjusted for level editor
Trailing "cursor" object, follows mouse showing currently-selected brick type
Main container object for level editor
Editor toolbox within Level Editor
Level Browser object - contains a DIV with a list of user-submitted levels
Basic "menu" object - lists "arcade game | level browser | level editor" at top
CREDITS - people whom I owe thanks
Andrew Beley: Beta-testing and general criticism.
My friends and co-workers at CRITICAL MASS: For their tolerance and humor (eg. "You did what all last night?")
Notepad: The code editor to swear by.
Coffee: For supporting early mornings and late nights.
Winamp: See "coffee".
Turntables: Two good reasons to take a break from the computer! (And possibly another contributor to carpal tunnel syndrome. Who's to say!)
Smokymonkeys TRIGLAV (wow!)
[ more I've forgotten here, to be added soon ]
Okay, well, a nostalgic feeling anyways ;)
- Integrate audio (via Flash)
- Cross-browser/platform compatibility (currently limited to IE - early Mozilla tests were quite slow. Looking into it!)
RESULTSWell, here's what happened in short:
- Features - included stuff that works
- Basic Arkanoid "look-and-feel" (arguable outside of bricks/paddle)
- Inclusion of most of the original hardware-generated sound effects (all square waves)
- Arcade level structure (minus the two "boss" levels so far, sorry)
- Level Editor/Browser (create your own levels/play ones other visitors made)
- Basic JS debugging messages/notification - basically a nice BSOD, minus the BS :)
- Exclusions - stuff I decided to leave out
- Little organism things that come out of the pipes at the top of some levels - would likely make game significantly slower
- "Super" random power-ups (eg. 36 regenerating Super balls, Super laser, etc.)
- Annoyances - stuff that was just pissing me off!
- Intermittent event handling-related bugs (ie. loss of paddle control)
- Win9X's handling of recursive-based animation - ie. setTimeout("animate()",20) - sketchy at best!
- "Object expected, line 1" script errors
- Collision detection on diagonals / when to bounce on both axes
- setTimeout() calls having to refer to objects from the outside
- Flash ActiveX control causing a browser crash if given too many simultaneous JS calls (ie. sound events), the number of which seems to change based on the CSS positioning of Flash in the document (!?!)
- No girlfriend to talk to after a late evening of writing code
^-- Assumed to be irresolvable/unattainable (ha ha) ;]
Thanks for visiting. Feedback, criticism etc. is always appreciated!
This page is XHTML 1.0-compliant.