Help at deploying game to Windows Azure Web Site

All things HTML5 or text based engines, or really any web based engines.
Post Reply
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Help at deploying game to Windows Azure Web Site

Post by lucbr »

Hello,

I need to deploy one game to the Windows Azure Web Site.

I have taken a look at http://www.isogenicengine.com/documenta ... e-project/ and run the deploy command, but it really didn't help. The deploy command just creates one game.js file and one index.html file. Then, when I run game.js, nothing happens.

I am trying to deploy the example from the engine at github (23.1-server-physics). My team and I just want to deploy that example to analyse the feasibility of adopting your engine or not. After get it done, the example will not be live anymore. We are doing that because our website will be using some features that are in that example (23.1-server-physics).

Don't worry, as soon as we get the problem solved, we will put the solution in your forum.

One more thing. By default, Windows Azure Web Site runs server.js that is in the root folder.

Thank you so much!
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Re: Help at deploying game to Windows Azure Web Site

Post by lucbr »

Below I am pasting one message I have received from Mr. Evans
I have not tested on Azure because I didn't think anyone would use it for production games since linux servers are generally more stable and secure. I have tested on Debian and OSX, and on my Windows machine natively.

The issue you are having is a misunderstanding of the deploy system. Deployment will create a client-side only version of your game with all the server-side code removed so it's actually the exact opposite of what you want :)

I think the first thing you should do is get the engine server running on your windows machine at home / office first before you upload to a cloud machine. This way you can understand how the server runs.

There are a few things you need first on Windows or Azure, you will need to install Node.js, then make sure your game folders are setup correctly so that you have a root folder that both the engine and your game exist in like this:

c:\mystuff\someRootFolder

Then the engine is under:

c:\mystuff\someRootFolder\ige

and your game is under:

c:\mystuff\someRootFolder\mygamefolder

(you can call mygamefolder whatever you want)

In the case of an example that already exists in the engine, you can just have the c:\mystuff\someRootFolder\ige folder.

Once that is in place it is easy to run the game server:

cd c:\mystuff\someRootFolder\ige
node ./server/ige.js -g ./examples/23.1-server-physics

If you have setup node correctly the engine's game server will load up.

The game server is *not* a web server. This means you will need to serve the files that the client will load using a separate web server (in the case of Azure I will assume it is IIS? but I've not used Azure so I am guessing).

Basically your IGE game server will run on port 5000 or something like that, then your web server runs on port 80 (the default web port).

Let me know if you have more questions but please post them on the forum so everyone can benefit from the answers! :)

Cheers,

Rob
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Re: Help at deploying game to Windows Azure Web Site

Post by lucbr »

Hello Mr. Evans,

I really appreciate your help.

Look, I already can run the example from this command that you have sent to me: node ./server/ige.js -g ./examples/23.1-server-physics

Then, what I need to do now is just to run something as simple as node server.js and inside my server I would run node ./server/ige.js -g ./examples/23.1-server-physics Is that possible? I need to do so because the Azure Web Site runs node server.js automatically.

If it is not possible to do so, Do I have to create something like a Virtual machine (Linux, for instance), and after that, run manually something like node ./server/ige.js -g ./examples/23.1-server-physics in my Linux VM and after that, exposing via Node.js webserver the index.html to the client? Am I catching up?

Thank you so much.
robaldred
Posts: 64
Joined: Tue Aug 27, 2013 5:54 pm

Re: Help at deploying game to Windows Azure Web Site

Post by robaldred »

Hi, I have no knowledge of windows on the web, and Id never suggest to anyone to use it, so if you're able to run Linux that would be the preferred route, Debian or Ubuntu.

If you want to get it working on windows, you cannot run against the server.js file directly with IGE
this along with all your other game configuration is loaded and run by the ige.js.

Make sure you are in the root of your Ige source folder.
As long as windows can run node (I assume it can)
then as Rob suggested run the following command:

node ./server/ige.js -g ./example/23.1-server-physics

If this does not work, please post back your terminal output and any error messages you see.
Thanks
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Re: Help at deploying game to Windows Azure Web Site

Post by lucbr »

Hello Mr. robaldred,

I run the example properly in my Windows 8. My problem is at deploying the example to the Windows Azure Site.
It seems that I don't have enough control on my Azure site in order to start the IGE Game Server and run the regular Node.js server.

Do you believe that it is better to create a Virtual Machine on a cloud hosting service like Amazon or Azure? In general, where and how do you host your games? What do you recommend to me?

Thanks!
robaldred
Posts: 64
Joined: Tue Aug 27, 2013 5:54 pm

Re: Help at deploying game to Windows Azure Web Site

Post by robaldred »

Hello again. I see that makes sense you would need a shell to be able to run the server. Personally I tend to avoid so called "cloud" services. They have created greater issues than they claim to solve for me, I much prefer bare metal.

If I were you. I'd be thinking about 2 approaches depending on the audience and traffic.

1. If your game is low traffic a small VPS running Ubuntu would be perfect.
2. For larger deployments a dedicated Linux box running Ubuntu.

I have access to lots of dedicated boxes so that's the method I go with, obviously there's considerable cost if youre a hobbyist. however I found that a cheap €40 p/m server is cheaper and more reliable than a medium aws instance that's up 24/7.

Hope that's helps.
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Help at deploying game to Windows Azure Web Site

Post by coolbloke1324 »

OK I'm going to spend some time this week creating a server deploy script that will interact with Azure and deploy to it so it can be mostly automatic.

I'll also look at getting the same done for some linux ones too like Heroku.

I'm reading the Azure docs now...
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Re: Help at deploying game to Windows Azure Web Site

Post by lucbr »

Hi guys! Thank you for your support.

Dear coolbloke1324, It would be great if you could do it. Also, If you could do some deploy script to AWS, it would be great since here in Brazil we have Amazon's datacenter, so, I believe I have got to use AWS because the ping is better to brazilian users.

I tried to deploy to Azure because I first thought that it would be the easiest way to go in the development time. After I had the website done, I would move to AWS.
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: Help at deploying game to Windows Azure Web Site

Post by coolbloke1324 »

Isnt aws just a standard vm? I mean, dont you just have shell access? If so it doesnt need a deploy script.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
lucbr
Posts: 12
Joined: Mon Oct 14, 2013 11:27 pm

Re: Help at deploying game to Windows Azure Web Site

Post by lucbr »

humm, ah, nice, thank you :)
Post Reply

Return to “HTML5/Web Engines”