GF - low-level web games framework and content pipeline
For detailed information about the framework and its classes, see
DISCLAIMER: This project should be considered alpha - it is likely to have significant changes and additions, and should not be considered stable yet. Use at your own risk.
Game Library Features
- Robust game loop management
- Idle state/hidden tab tracking
- 3D positional sound via Web Audio API
- Efficient sound bank representation (single file transfer) + tools for creation
- Efficient music playback
- (coming soon) fallback for tag
- Display supporting orientation changes, fullscreen mode, etc
- WebGL context loss/restore handling
- Texture atlases and sprite batch rendering
- WebGL shader program abstraction
- Bitmap fonts with kerning and layout
- Mouse Lock support
- (coming soon) on-screen dpad and accelerometer
- (coming soon) gamepad support
- (coming soon) input action map/normalization
- Multiplayer Networking
- Client/server session management
- Synchronized clocks
- Localhost server via Web Workers
- SharedWorker for multi-tab local networking
- node.js server via WebSockets (100% shared code)
- Efficient network binary representation
- (coming soon) authentication via ID providers (G+/Facebook/etc)
- Math and Utilities
- Axis-aligned bounding box
- Quaternion, ray, vec enhancements
- Seedable PRNG
- Viewport (ray casting, frustum culling, etc)
- Content Pipeline
- Integration with anvil-build
- Many built-in game-specific tasks
- Supports a daemon mode for doing live content updates
Setup is largely automated via
setup.bat (depending on platform).
For instructions see setup.
For more information about getting started, check out getting_started.
The web is an awesome platform for games however there have been very few attempts at creating a good development flow for building them. It's trivial to build a simple mash-up prototype, but there is a lack of focus around good engineering. The goal of this project, as well as anvil-build, is to bring some of the good things about other development environments over to the web while also recognizing and respecting what makes web development so much fun.
Your own build system!?
anvil-build arose from the need to have a solid content pipeline and build system that was web-aware and not being able to find any that fit the bill. It's modelled after the build system used internally at Google and provides many things not possible with others. It's in its early stages and is the second revision of the build system I originally designed for this project - the benefits of it cannot be overstated and I hope to demonstrate them soon!
- Compiler inlining can drastically help performance (and can only get better)
- Closure Library contains a lot of useful functionality
- Array, object, and string extensions
- Data structures
- DOM/CSS/etc templating and abstractions
- Rich and efficient vector math library (one of the fastest!)
- Well tested and maintained
What about three.js and other awesome libraries?
All code except dependencies under third_party/ is licensed under the permissive Apache 2.0 license. Feel free to fork/rip/etc and use as you wish!
Have a fix or feature? Submit a pull request - I love them! Note that I do keep to the style_guide, so please check it out first!
As this is a Google project, you must first e-sign the Google Contributor License Agreement before I can accept any code. It takes only a second and basically just says you won't sue us or claim copyright of your submitted code.