Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	RELEASE_NOTES.md
	package.json
	src/GameEngine.js
  • Loading branch information
namel committed Feb 7, 2018
2 parents 78e91bc + 2cbd1b0 commit b736917
Show file tree
Hide file tree
Showing 55 changed files with 2,042 additions and 799 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
40 changes: 25 additions & 15 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,41 @@

# Release Notes for Lance

## Release 1.0.1

### Breaking Changes

1. Event `preInput` was renamed to `processInput`, `client__processInput`, `server__processInput`. `postInput`. This is a breaking change but no one actually used these events.

## Release 1.0.10

### Breaking Change

1. fix a breaking change that was introduced in 1.0.9 - which moved the initialization from the physics engine into the GameEngine

## Release 2.0.0 - June 2017
## Release 2.0.0 - February 2018

### New Features

* new netscheme data type: *STRING*. Will only be broadcast if it changed since last broadcast.
* PhysicsEngine no longer initialized in two places. It is initialized in the GameEngine

* Implemented HSHG collision detection for SimplePhysics
* Implemented ClientEngine standaloneMode for network-less testing of game engines
* New KeyboardControls class to help with sending key-based input
* Moved to es6 modules on all games
* ES6 Modules: Modules are imported using the "import from" construct. For example import GameEngine from 'lance/GameEngine' instead of const GameEngine = require(...)
* ES6 Modules: Games must configure webpack.config.js. See sample game
* ES6 Modules: Babel must be configured in order to run es6 modules on node server-side, by creating a .babelrc file. See sample game
* Renderer-controlled game loop support: the physics engine is asked to step forwards by dt, where dt is the time between current frame render and last frame render
* full-sync support for updating all game objects when new player connects
* Renderer refactored as a singleton, and instantiated only on client
* Render objects and Physics objects are now sub-objects of the GameObject

### Breaking Changes

* `PhysicsEngine` should no longer be instantiated in the Server `main.js` and in the client entry point. Rather, it should be instantiated in the `GameEngine`.
* All classes are now in ES6 format instead of CommonJS
* `PhysicsEngine` should no longer be instantiated in the Server `main.js` and in the client entry point. Rather, it should be instantiated in the `GameEngine` subclass for your game.
* `PhysicsEngine` constructor now does all initialization. Use of `init` function is deprecated.
* `GameEngine` step method cannot be called without passing the `isReenact` argument. Games which override the `step` method must pass this argument when calling the super method.
* `GameObject` New `onRemoveFromWorld` to mirror `onAddToWorld`
* Objects are now instantiated with a reference to the gameEngine, and get and ID automatically
* Method `isOwnedByPlayer` moved from `clientEngine` to `GameEngine`, and the `clientEngine` now sets the `playerId` in the `gameEngine`. `GameObject` constructor is therefore: constructor(gameEngine, options, props) and must call the super constructor correspondingly
* The `GameWorld.getPlayerObject()` method has been removed, you can get the player objects using the `GameWorld.query()` method, passing a `playerId` attribute.
* constructors of `DynamicObject` and `PhysicalObject` have changed to the following: gameEngine, options, and props.

## Release 1.0.1

### Breaking Changes

1. Event `preInput` was renamed to `processInput`, `client__processInput`, `server__processInput`. `postInput`. This is a breaking change but no one actually used these events.

## Release 1.0.0 - March 2017

Expand Down
2 changes: 1 addition & 1 deletion docs/spaceships.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ will be ignored.

A trace message is usually recorded as follows:
```javascript
gameEngine.trace.info(`this just happened: ${foobar()}`);
gameEngine.trace.info(() => `this just happened: ${foobar()}`);
```

By default, Lance already traces a lot of information, describing
Expand Down
3 changes: 2 additions & 1 deletion jsdoc.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"src/ServerEngine.js",
"src/ClientEngine.js",
"src/GameEngine.js",
"src/serialize/GameObject.js",
"src/serialize/DynamicObject.js",
"src/serialize/Serializer.js",
"src/serialize/PhysicalObject.js",
Expand All @@ -19,7 +20,7 @@
"src/serialize/Quaternion.js",
"src/render/Renderer.js",
"src/render/AFrameRenderer.js",
"src/matchMaker/MatchMaker.js"
"src/lib/Trace.js"
]
},
"plugins": [
Expand Down
32 changes: 0 additions & 32 deletions main.js

This file was deleted.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lance-gg",
"version": "1.0.10",
"version": "2.0.0",
"description": "A Node.js based real-time multiplayer game server",
"keywords": [
"pixijs",
Expand All @@ -25,7 +25,9 @@
"socket.io": "^1.4.6",
"socket.io-client": "^1.4.6"
},
"main": "main.js",
"files": [
"src"
],
"author": "Opher Vishnia",
"contributors": [
{
Expand All @@ -44,9 +46,10 @@
"docs": "jsdoc -c jsdoc.conf.json",
"test-all": "mocha test/EndToEnd/",
"test-serializer": "mocha ./test/serializer/",
"test": "mocha ./test/serializer/"
"test": "mocha ./test/serializer/ --compilers js:babel-core/register"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-preset-es2015": "^6.22.0",
"chai": "^3.5.0",
"docmeta": "OpherV/docmeta",
Expand Down
Loading

0 comments on commit b736917

Please sign in to comment.