-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Design Plan
Written after tech decisions and proof of concept prototype have been created, as of v0.1.0-prototype.
- A frog you can control.
- Move around the map, "attack" with tongue to eat an insect.
- Game ends when you are hit by a wasp or eat a wasp.
- Insects spawn randomly and fly around randomly.
- Points are awarded for successfully eating non-harmful insects.
- The back-end server maintains a scoreboard of high scores.
-
Node.js: chosen because it is a requirement. In future, may choose to develop over socket.io for real-time communication.
-
Express: Express is the ideal framework for server data. Most of the game is designed to work with WebGL or canvas client-side, but the server-side application will be handled by Express.
-
WebGL: The best way to render quickly in modern browsers.
-
Pixi.js: A framework to build on WebGL. Makes it easy to build a 2D sprite game. Also falls back to plain Canvas in the event the browser doesn't support WebGL.
-
MongoDB/CassandraDB: As a pure storage medium for JSON, this suits us. We don't need much if anything for relational structure.
Note: P# is the priority ToDo number. MVP marked items are part of the Minimum Viable Product.
-
Moving player, ARROW KEY or WASD control. Rotation to match direction. [P1 - MVP]
- Constraint to within play area.
- Tongue attacking, limited range. Hit-scan or projectile? (Apply hit detection.)
-
Custom or freely available sprites for
frog,low-points insect,high-points insect, anddanger insect. [P1 - MVP] -
Interesting backdrop for game field. [P2]
-
Spawn-able insects. [P1 - MVP]
- Primitive AI control.
-
Score system. [P1 - MVP]
-
High score tracking. [P1 - MVP]
- Entry of username for high scores.
-
Sprite animation. [P3]
-
Sound. [P3]
- Sound effects.
- Background music.
-
Obtaining art & sound. Licensing is the primary challenge here.
-
Hit-detection. A little bit of geometry. The main concern is how to handle firing: projectile is probably better for game challenge, but hitscan is easier to program.
-
Handling unique usernames (does it matter?) Likely this won't be addressed, as the high score system will be similar to arcade name entry. Incentive to not use another's name is to use your own to reflect your high score.
-
AI control system. This won't follow advanced AI principles, it will likely be a simple randomness system with constraints.
-
Spawning system. Building the proper object-oriented system and ensuring it is performant.
- Player presses attack.
attack()is called. - Attack toggles
attackingvariable, which disables movement. - Tongue proceeds, hit detection is run on each "step" of the tongue.
-
HIT: call
eat(insect)on Player. Restore player movement. - MISS: Restore player movement.
-
HIT: call
-
play()runs hit detection on player and all wasps. If hit detected, game ends.
- Call
moveRandom()on Insect.- Generate random direction and turn that way.
- Set velocity based on own property
velocity.
- If period of time for pathing passes, or insect becomes constrained, call
moveRandom()again.