This repository is organized such that each folder is a fully contained micro-project. To look at any given project, you will want to check-out this repository and then add the project folder of interest to ShiVa from Main->Projects.
Note that you can run a demo of all of these projects by clicking the image below which will take you to a browser-based ShiVa player with the demo.
This demo is meant to test particle interaction with colliders along with a moving dynamic light source. The project is a simple set of planes, set as colliders that form a fully enclosed cube. In that cube is a helper object with a point-light source, a particle system and a dynamics controller.
This is an attempt at making a Newton's Cradle device using the dynamics system. It is a simple example of using ball joints but it doesn't quite function like the real world counterpart. If you know why please let me know or throw me a pull request.
A 2D platformer that uses the ShiVa dynamics system for jump physics. Also includes moving platforms (with limited success) and in-game tweakable physics parameters. In retrospect, a very good example of how NOT to do platformers.
A small game shell that can be used as the basis to start writing a game. This shell includes a basic implementation of various game screens as follows:
The red portion is typically game-specific and so is not implemented.
Keyboard and joystick handling is also built in with the ability to get a latched key state or raw key state.
Means that you get the state of the last keys that were pressed.
Means that you get a single True/False value back the first time the key enters a state of your choice but false for all subsequent times. So if you latch on the down key and the user presses down, the function will return True. If the user continues to hold the down key, it will return false until they let go of the key and press it again.
The joystick key mappings are specific to the Xbox 360 controller for the PC. The primary design goal here was to allow handling key input in each user AI state rather than checking state in the keyboard and joystick handlers. For instance in the Game onLoop function, the following is used to detect player 0 pressing the escape key or start button:
if(this.getKeyLatched ( 0, "esc", true ) or this.getKeyLatched ( 0, "start", true)) then this.Pause ( ) end
I've written this shell half a dozen times. Unfortunately it's hard to cherry-pick AI models once your project is finished. So here is the base that I typically start with for a new project.
MIT (See LICENSE file)