Sign in to follow this  
Blade

Releasing a game with Babylon

Recommended Posts

Hello, Everybody!

 

I'm currently planning to create a browser game using the Babylon.js framework. I am confused about deployment and how to actually release the game, so I would appreciate if you would solve a couple of mysteries I have about this.

 

First of all, I can see that I need a webserver in order to use Babylon properly. I understand that this is because I need to define a custom MIME type for the .babylon extension to be loadable. Alright, so basically, all I need to do is use the js framework to craft my own game by implementing game mechanics and importing files from Blender with the .babylon extension, all of this running on my Apache local webserver?

 

If so, then how can I redistribute the game? I will make users download the games files (js scripts, .babylon files, css files and actual html files that link everything) but how can I be sure that the user will actually have a webserver installed? What if they don't? Because my point is to make the game work offline, not in such a way that the users will need to access my website everytime they want to play the game.

 

And then I thought about Node.js. Do you guys think I can include node.js along with the game files? I mean, will that create a node local server on every user's machine when they download the files, so the game will be ran on that node.js server just as it runs on my own local server on my machine? How can I do that? Is this what I'm supposed to do?

 

Or, perhaps, this is totally wrong and I should simply host the game files on my online server and only allow users to play online?

 

Thank you!

Share this post


Link to post
Share on other sites

Hosting your game on an online server is the simplest way to go. Having your players download the game files and run them locally with a webserver would be a turn-off for many people, and you would lose the main advantage of developing a browser game (make it immediately playable by virtually everyone).

 

If you're planning to charge players for access to your game, I'd say that setting up an authentication system for your customers is the way to go, simple and efficient!

 

Also the fact that the game is hosted online means it is only accessible when connected to the internet. Maybe that's why you're looking for a way to distribute it to local machines?

Share this post


Link to post
Share on other sites

Hosting your game on an online server is the simplest way to go. Having your players download the game files and run them locally with a webserver would be a turn-off for many people, and you would lose the main advantage of developing a browser game (make it immediately playable by virtually everyone).

 

If you're planning to charge players for access to your game, I'd say that setting up an authentication system for your customers is the way to go, simple and efficient!

 

Also the fact that the game is hosted online means it is only accessible when connected to the internet. Maybe that's why you're looking for a way to distribute it to local machines?

 

Thank you for your answer!

 

Well, I might host it online. But is there a way to get rid of the browser UI? I can manually create an application shortcut in Chrome and it will open in a window with no UI other than the window bar. But how can I automatize this? I cannot tell every user to create their own shortcuts manually. And I would really appreciate it if my game was ran in something that doesn't look like the usual common browser.

 

Basically, I want it to look like a desktop app as much as possible.

Share this post


Link to post
Share on other sites

Hi Blade!

 

I believe you are mixing a few concepts and paradigms.

 

A Web-Server is only needed to serve the files on the internet. The user does not require a web server and it doesn't matter if he/she has one installed or not. It is only thee to deliver the resources from the place they are stored. Just like a regular website (eventually, babylon is a webgl engine, which creates 3d "webseites".).

 

So, having a server will help you deliver the game to anyone who has the url. If you want to offer the game offline, you might need to consider something like cordova/phonegap - a "browser wrapper" that will create a native application for all operating systems. It is eventually nothing more than a browser running a single code base - the html/js/css/resources you provide. No need here for a server (unless you want the user to log the score online etc') - the game is distributed with everything needed to run locally. The question here would be - what operating systems would you like to support?

 

Node JS is a javascript-based server, running locally on your machine (or somewhere online). You can't expect the user to have it, and I don't see a reason why you would need it. NodeJS is more for the server side of your game, on the client side you have the browser that will run the javascript code.

 

Getting rid of the browser UI is usually possible in full screen mode (which requires the user to approve it) or using wrappers like cordova - this is a browser without UI. 

 

If you want to deliver offline games, maybe think if a WebGL engine is the right thing for you (it is, of course!!  :) ). There are upsides and downsides to each technology, the question is whether or not it actually fits your usecase.

 

If you want to create windows 8 apps, they fully support HTML5. You can read the getting-started guide here - https://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx and there are a lot of other resources online.

 

I hope I helped somehow 

Share this post


Link to post
Share on other sites

Hi Blade!

 

I believe you are mixing a few concepts and paradigms.

 

A Web-Server is only needed to serve the files on the internet. The user does not require a web server and it doesn't matter if he/she has one installed or not. It is only thee to deliver the resources from the place they are stored. Just like a regular website (eventually, babylon is a webgl engine, which creates 3d "webseites".).

 

So, having a server will help you deliver the game to anyone who has the url. If you want to offer the game offline, you might need to consider something like cordova/phonegap - a "browser wrapper" that will create a native application for all operating systems. It is eventually nothing more than a browser running a single code base - the html/js/css/resources you provide. No need here for a server (unless you want the user to log the score online etc') - the game is distributed with everything needed to run locally. The question here would be - what operating systems would you like to support?

 

Node JS is a javascript-based server, running locally on your machine (or somewhere online). You can't expect the user to have it, and I don't see a reason why you would need it. NodeJS is more for the server side of your game, on the client side you have the browser that will run the javascript code.

 

Getting rid of the browser UI is usually possible in full screen mode (which requires the user to approve it) or using wrappers like cordova - this is a browser without UI. 

 

If you want to deliver offline games, maybe think if a WebGL engine is the right thing for you (it is, of course!!  :) ). There are upsides and downsides to each technology, the question is whether or not it actually fits your usecase.

 

If you want to create windows 8 apps, they fully support HTML5. You can read the getting-started guide here - https://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx and there are a lot of other resources online.

 

I hope I helped somehow 

 

Cordova sounds interesting. I will look into it. I need it to support most of the things that the latest browsers support, including WebGL and GPU acceleration.

 

I know what a server is and what it does. It's just that, yesterday I was watching a video course by Babylon's developers and they said that you will need a local webserver in order to properly run Babylon with external assets. So I figured that, should I decide to make the game available offline, I may need my users to have a webserver installed. That is also why I asked if I could redistribute Node.js.

 

Anyway, thanks for the tips!

Share this post


Link to post
Share on other sites
It's just that, yesterday I was watching a video course by Babylon's developers and they said that you will need a local webserver in order to properly run Babylon with external assets. 

 

 

That is only for local development and testing when all your files are on your hard drive. During local development in your own machine, you open the local html file in your browser and that then loads the js files. But you also need to load .babylon files which will be local files in your hard drive. That will not be allowed by the browser as local files are not allowed to be loaded due to security reasons. But the browser is allowed to load files from the same website where the html was loaded from. Website implies web server(even one hosted locally on your machine). Hence the web server requirement.

 

You can of course start chrome in a special mode that allows loading of local files but there is no real need for that with simple to setup web servers like Apache Tomcat etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.