How to use built in deploy tool?

Post your help queries and engine programming questions here

How to use built in deploy tool?

Postby beaubrandon » Tue May 20, 2014 4:12 am

Hey guys, I'm trying to figure out how to build my project into the game.js file so I can post it publicly out in the world. I've seem to have missed something somewhere. Can someone post a step by step tutorial (or point me towards the documentation) on how to do that?

My game is strictly client-side and my folder structure is set up as per the instructions.

Thanks!!
beaubrandon
 
Posts: 12
Joined: Tue Nov 05, 2013 3:33 pm

Re: How to use built in deploy tool?

Postby robaldred » Tue May 20, 2014 11:15 am

Hey, The documentation is going through an overhaul. There was some info in the old docs about this but its not all been converted yet.

Building a single game file easy if you know how ;)

Code: Select all
//start in the root of your IGE repo
node server/ige.js -deploy ../../relative/path/to/your/game


It will create a "deploy" folder containing the "compiled" game.js

This file contains everything, all the engine code all your game code. So you only need to require that script for your game.
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Re: How to use built in deploy tool?

Postby beaubrandon » Wed May 21, 2014 4:42 am

Hey Rob, thanks for the reply. Your right, it's pretty easy to build it up. I did run into a problem that I think is specific to my project.

When attempting to build my project I get an error once it reaches 'Compressing...'
Here's what the the console says:

Compressing...
WARN: ERROR: Unexpected token: punc (:) [null:34569,8]

C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:199
throw new JS_Parse_Error(message, line, col, pos);
^
Error
at new JS_Parse_Error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:185:18)
at js_error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:199:11)
at croak (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:630:9)
at token_error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:638:9)
at unexpected (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:644:9)
at semicolon (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:664:43)
at simple_statement (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:822:73)
at C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:693:47
at C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:677:24
at labeled_statement (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:816:20)

I was able to get a couple of the example projects built with no problems. It seems I have an issue somewhere in my stuff. I'll work with it some more tomorrow but if you have any ideas on how I can troubleshoot this please holler.

Today's lesson: build early and often
beaubrandon
 
Posts: 12
Joined: Tue Nov 05, 2013 3:33 pm

Re: How to use built in deploy tool?

Postby robaldred » Wed May 21, 2014 12:49 pm

Basically you have a syntax error somewhere, if you can play your game fine before compiling, it's probably something that's not supported by the node parser.
Likely candidates are trailing commas or missing parenthesis eg.. try {} catch {} should be try {} catch() {}
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Re: How to use built in deploy tool?

Postby rob » Wed May 21, 2014 6:07 pm

beaubrandon wrote:Hey Rob, thanks for the reply. Your right, it's pretty easy to build it up. I did run into a problem that I think is specific to my project.

When attempting to build my project I get an error once it reaches 'Compressing...'
Here's what the the console says:

Compressing...
WARN: ERROR: Unexpected token: punc (:) [null:34569,8]

C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:199
throw new JS_Parse_Error(message, line, col, pos);
^
Error
at new JS_Parse_Error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:185:18)
at js_error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:199:11)
at croak (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:630:9)
at token_error (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:638:9)
at unexpected (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:644:9)
at semicolon (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:664:43)
at simple_statement (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:822:73)
at C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:693:47
at C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:677:24
at labeled_statement (C:\path\ige\server\node_modules\uglify-js2\lib\parse.js:816:20)

I was able to get a couple of the example projects built with no problems. It seems I have an issue somewhere in my stuff. I'll work with it some more tomorrow but if you have any ideas on how I can troubleshoot this please holler.

Today's lesson: build early and often

Remember that the whole of your project gets put in a single file. Make sure all your lines end correctly with a semi colon.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: How to use built in deploy tool?

Postby robaldred » Wed May 21, 2014 6:15 pm

Ahh Yeh, I take that for granted using coffee script, it sorts out all the common syntax errors for you.
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Re: How to use built in deploy tool?

Postby beaubrandon » Thu May 22, 2014 5:09 am

I got it! ...but it was a little tricky.

I did have a few missing semi-colons but that wasn't what turned out to be the problem. I have a HUD object for an IgeSceneGraph (self.implement(HUD); ) that I had commented out the line:

if (typeof (module) !== 'undefined' && typeof (module.exports) !== 'undefined') { module.exports = HUD; }

Since the parser gets fed all the code as text it couldn't display a file name but did have the line number. I had to add in a few temporary console.logs(...) in parse.js in order to see where the parser was at in the text when it crapped it's pants. It turned out that the parser was actually failing on the next few lines after my bad code and calling out a bad token for a ':' on a function declaration...which was actually fine.

I got a few things to clean up but I should have it deployed out in the world soon and will post a link.

Thanks for all the help, I learned quite a bit.

Brandon
beaubrandon
 
Posts: 12
Joined: Tue Nov 05, 2013 3:33 pm

Re: How to use built in deploy tool?

Postby rob » Thu May 22, 2014 2:20 pm

Awesome!!!!
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron