- Home /
How implement my game on the website?
Hi, just like in title - how can I put my game on the website. Im not a pro of html or flash and I have no idea how to put it on website. I want to create a simple website with only main page, no subpages and on the main I want to put the game.
And one more, for web publishing what is better build the game for flash platform or web player?
Sorry for my english :)
Flash Export is already dead and buried, and the Web Player's days are numbered; it will be replaced with WebGL. That is, if you have Pro, and you pay extra, and you don't care about good performance or multiplayer support. So if I were starting work on a game now, and it was primarily web-based, I wouldn't choose Unity to do it, or if I were starting work on a Unity game and trying to figure out a platform to target, it wouldn't be the Web.
Answer by Graham-Dunnett · Mar 19, 2013 at 08:37 PM
You're going to need to become something of a web developer then. Read up everything you can on html, css and (website) Javascript.
When you make a webplayer build Unity will create for you an html and .unity3d file. These need to be uploaded to your web server. Each hosting company have their own way of getting files to the server, mine uses ftp. You'll also need to ask your hosting company to confirm that .unity3d
files can be served.
You can use flash or webplayer. If you have no experience of either stick with webplayer.
It wouldn't hurt to tell him how ins$$anonymous$$d of being a troll.
Answer by pateras · Mar 19, 2013 at 09:11 PM
Just build targetting the web player. It will create an html file for you. Then you can just host it like any other page. There are a number of free options out there. Google for options.
Answer by plord · Mar 19, 2013 at 09:09 PM
Thank you for response! :)
I know basics of html and I know how it works with index and ftp. (Maybe I exaggerated my skills :)). When I upload the files builded in unity (webplayer), do I have to use code generated by unity in .html file and place all files on server or just place the files on server and it will work?
thanks again.
Yes. Just serve up the HT$$anonymous$$L file (with everything else that it generates) with your web server and navigate to it with a browser.
If you want to make your page a little bit fancier, you can muck around with the HT$$anonymous$$L page they provide. As long as you don't touch the javascript that much, you can make it look however you want.
Answer by bruce965 · Mar 19, 2013 at 09:13 PM
Use Dropbox, upload both your HTML and your UNITY3D files in the same folder after compiling by clicking:
File -> Build settings -> Web Player -> Build
After that click on the chain image (at the right of your HTML file) and copy the link it gives you, this is the location where your game is published.
If you can't see anything you have to download the Unity webplayer from here or from the bottom of the page where the game is published.
Have a nice day!
Answer by Ben_the_Lad · May 18, 2014 at 09:03 PM
Hey! I've actually done this before, and it's super-simple. Here's my (admittedly poor) game SNOWBLOCK, which is built in Unity and runs on the web: http://snowblockgame.weebly.com/
You can get a new website free and easy at weebly.com with a drag-and-drop interface, so you only have to do a teeny bit of web development. The only problem with the Weebly method is that you're kind of restrained in the size of the screen, but that's also an enlivening constraint, because then you're almost certain your game will fit on the screen. It all depends on your design though.
I followed this tutorial to get my game up on Weebly: http://jschmille.weebly.com/using-unity-with-weebly.html
The big benefit here is that you don't need to worry about FTP or about writing any real HTML. Weebly's interface is limited by easy-to-use, and getting the game up and running online is a snap.