================ Turbulenz Engine ================ Turbulenz is an HTML5 game engine and server-side APIs available in JavaScript and TypeScript for building and distributing 2D and 3D games that run on platforms that support HTML5 features such as modern browsers without the need for plugins. .. contents:: :local: Examples using the Turbulenz Engine =================================== Games ----- * `Polycraft `__ - 3D * `Save the day `__ - 2D * `Denki Blocks! `__ - 2D * `Denki Word Quest `__ - 2D * `Score Rush `__ - 2D * `Score Rush MP `__ - multiplayer * `Space Ark `__ - 3D * `Apathy `__ - `src `__ - 2D * Salty Dogs - `src `__ * `Gargantia Sky Courier `__ - `src `__ - 3D Apps ---- * Sample app - `src `__ * Touch, keyboard, mouse and pad controller input app - `src `__ * Viewer - `src `__ * Realtime multiplayer worm app - `src `__ * Asynchronous turn based multiplayer tic-tac-toe app - `src `__ Prototyping ----------- * Prototyping basic app - `jsfiddle `__ * Prototyping sample app - `src `__ * Prototyping template app - `src `__ Samples ------- * Setup: * `Device Initialization `__ - `src `__ * `Basic Loop `__ - `src `__ * 2D Rendering: * `2D Canvas `__ - `src `__ - `jsfiddle `__ * `Draw2D `__ - `src `__ * `TextureEffects `__ - `src `__ * `Immediate Mode Rendering `__ - `src `__ * Loading - `src `__ * SVG - `src `__ * 3D Rendering: * `Camera `__ - `src `__ * `Material `__ - `src `__ * `Forward rendering `__ - `src `__ * `Morphing `__ - `src `__ * `Post effects `__ - `src `__ * `Particles `__ - `src `__ * Deferred Rendering - `src `__ * Load model - `src `__ * Scene loading - `src `__ * Animation: * `Animation `__ - `src `__ * `Multiple animations `__ - `src `__ * 2D Physics: * `2D Physics `__ - `src `__ * `2D Physics constraints `__ - `src `__ * `2D Physics callbacks `__ - `src `__ * 3D Physics: * `3D Physics `__ - `src `__ * `3D Physics `__ - `src `__ * `3D Physics collision mesh `__ - `src `__ * 3D Physics constraints - `src `__ * Sound: * `Sound `__ - `src `__ * Video: * `Video playback `__ - `src `__ * Services: * Leaderboards - `src `__ * Multichat - `src `__ * Payments - `src `__ * Userdata - `src `__ Features ======== Low-level API ------------- **Graphics** - Simple shader-based immediate mode API: - A Shader may contain multiple Techniques, either single or multi-pass. - Once a shader Technique is set on the Device, the parameters required by the program code can be updated by a TechniqueParameter object: - TechniqueParameter objects hold multiple references to Textures, TechniqueParameterBuffers or individual values. - Multiple TechniqueParameters can be set on the Device at once. - Vertex buffers, Index buffers and Textures can be created, updated and destroyed dynamically. - Multiple Streams of Vertex buffers can be used at the same time. - Support for 1D, 2D, 3D and Cube textures: Any pixel format supported by the hardware. - Asynchronous resource loading: multiple resource files can be downloaded on the fly, JavaScript code will be notified when resource is available for usage. - Multiple image file formats: DDS, JPG, PNG and TGA. - Support for textures archives containing multiple image files: less flexibility than individual files but better for optimal bandwidth usage. - Occlusion queries: - Number of pixels rendered can be queried for a section of rendering. - Available in plugin mode only. - Fullscreen support (Supported platforms). - Take screenshot feature: - Video playback support: - WebM, MP4. - Render video as texture. - Playback controls play, pause, stop, resume, rewind. **Math** - Math types: - *Vector2* *Vector3*, *Vector4* - *Matrix33*, *Matrix34*, *Matrix43*, *Matrix44* - *Quaternion*, *QuatPos* - *AABB* - Storage format optimized based on available support - Optimized operations support *destination parameters*, reducing object allocation. - Array to/from Math type conversion utilities. **Physics** **3D** - Easy-to-use efficient physics simulation. - Optimized JavaScript implementation. - In plugin mode, this is a lightweight wrapper around the Bullet Physics Library http://bulletphysics.org/wordpress/ - Rigid bodies and collision objects: Plane, Box, Sphere, Capsule, Cylinder, Cone, Triangle Mesh, Convex Hull. - Constraints: Point to Point, Hinge, Cone Twist, 6DOF, Slider. - Ray and convex sweep queries: Returning closest point of impact and surface normal. - Character representation. - For use with 1st/3rd person games. - Includes properties for velocity, position, crouch, jump height, death, on ground. - Contact callbacks. - Rigidbodies, characters, collision objects. - Called on presolve, added, processed, removed. - Filter responses by mask. - Triggers with no collision response. **2D** - Efficient 2D physics simulation written specifically for JavaScript. - Shapes: - Circle, Box, Rectangle, Regular Polygon, Custom Polygon. - Create shapes as sensors. - Shape grouping and mask interactions. - Collision detection: - Sweep & Prune, Box Tree Broadphases. - Utilities for Raytest, Signed Distance, Intersection, Contains Point, Sweep Test. - Simulation world: - Multiple simulation groups. - Optional gravity. - Customisable simulation iterations. - Rigid body simulation: Dynamic, Static, Kinematic objects. - Materials: Elasticity, Static/Dynamic/Rolling Friction, Density. - Arbiters: - Contact grouping. - Contact information: Position, Penetration, Normal/Tangent Impulse - Constraints: Point to Point, Distance, Weld, Angle, Motor, Line, Pulley, Custom Constraint. - Debug rendering: - Rigid Bodies, Constraints, Worlds, Lines, Curves, Rectangles, Circles, Spirals, Linear/Spiral Springs. - Enabling and disabling of rendering types. - Scaling for Draw2D viewport. **Sound** - Easy-to-use efficient wrapper of hardware audio features: Utilizes Web Audio,