forked from kivancgumus/ige_prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to version 1.2.4 from premium repo
- Loading branch information
Showing
128 changed files
with
6,879 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,3 +163,11 @@ pip-log.txt | |
.DS_Store | ||
|
||
.idea | ||
|
||
.old* | ||
.deploy* | ||
|
||
npm-debug.log | ||
|
||
# Ignore all node_modules | ||
server/node_modules* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var igeClientConfig = { | ||
include: [ | ||
/* Your custom game JS scripts */ | ||
//'./gameClasses/MyClassFile.js', | ||
|
||
/* Standard game scripts */ | ||
'./client.js', | ||
'./index.js' | ||
] | ||
}; | ||
|
||
if (typeof(module) !== 'undefined' && typeof(module.exports) !== 'undefined') { module.exports = igeClientConfig; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var config = { | ||
include: [ | ||
//{name: 'MyClassName', path: './gameClasses/MyClassFileName'}, | ||
] | ||
}; | ||
|
||
if (typeof(module) !== 'undefined' && typeof(module.exports) !== 'undefined') { module.exports = config; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var image = { | ||
render: function (ctx, entity) { | ||
// Draw the player entity | ||
ctx.strokeStyle = 'rgba(255, 0, 0, 1)'; | ||
ctx.beginPath(); | ||
ctx.moveTo(0, -entity._geometry.y2); | ||
ctx.lineTo(entity._geometry.x2, entity._geometry.y2); | ||
ctx.lineTo(0, entity._geometry.y2 - 5); | ||
ctx.lineTo(-entity._geometry.x2, entity._geometry.y2); | ||
ctx.lineTo(0, -entity._geometry.y2); | ||
ctx.stroke(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
var Client = IgeClass.extend({ | ||
classId: 'Client', | ||
|
||
init: function () { | ||
//ige.timeScale(0.1); | ||
ige.showStats(1); | ||
|
||
// Load our textures | ||
var self = this; | ||
|
||
// Enable networking | ||
ige.addComponent(IgeNetIoComponent); | ||
|
||
// Create the HTML canvas | ||
ige.createFrontBuffer(true); | ||
|
||
// Load the textures we want to use | ||
this.textures = { | ||
ship: new IgeTexture('./assets/PlayerTexture.js') | ||
}; | ||
|
||
ige.on('texturesLoaded', function () { | ||
// Ask the engine to start | ||
ige.start(function (success) { | ||
// Check if the engine started successfully | ||
if (success) { | ||
// Start the networking (you can do this elsewhere if it | ||
// makes sense to connect to the server later on rather | ||
// than before the scene etc are created... maybe you want | ||
// a splash screen or a menu first? Then connect after you've | ||
// got a username or something? | ||
ige.network.start('http://localhost:2000', function () { | ||
// Setup the network stream handler | ||
ige.network.addComponent(IgeStreamComponent) | ||
.stream.renderLatency(80) // Render the simulation 160 milliseconds in the past | ||
// Create a listener that will fire whenever an entity | ||
// is created because of the incoming stream data | ||
.stream.on('entityCreated', function (entity) { | ||
self.log('Stream entity created with ID: ' + entity.id()); | ||
|
||
}); | ||
|
||
// Load the base scene data | ||
ige.addGraph('IgeBaseScene'); | ||
}); | ||
} | ||
}); | ||
}); | ||
} | ||
}); | ||
|
||
if (typeof(module) !== 'undefined' && typeof(module.exports) !== 'undefined') { module.exports = Client; } |
Oops, something went wrong.