A simple pong game that is a work in progress. My intention was to write a minimally viable pure HTML5/Javascript game engine to learn about game programming concepts and design patterns.
Implemented:
- Fixed update, variable render game loop
- Stack-based Finite state machine with leave/enter transition management
- Simple asset pre-loading
Not yet implemented:
- Caching for the Render step.
- A class for user input. Mouse and keyboard.
- A base entity class.
- A base vector class.
- An audio class.
- Simple game menu capability.
- Separate collision handling.
- Add dev/prooduction logging method.
Copyright 2019 Edd Clarke
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
I spent several days reading both of the following resources which were thoughtfully laid out and very well articulated. Hat-tip to both of these gentlemen. I used some concepts I liked from each as well as other internet based resources.
- Robert Nystrom - http://gameprogrammingpatterns.com
- Jake Gordon - https://codeincomplete.com