Jump to content

HTML5 vs Unity


jon889
 Share

Recommended Posts

I'm part of a group of students that is making a web based game, and the current suggestion is to use Unity and it's browser plugin to make that game. One of the advantages being that it can be compiled to run on any platform such as iOS. However I dislike the idea of forcing the user to install a plugin to play a simple 2D game. Are there any other benefits to using HTML5 over Unity? And also any guides to getting started (like which framework to use)

Link to comment
Share on other sites

It depends entirely on the type of game you're making - Unity is perfect for lots of different things, and its visual editor will let you get something done really quickly. Also it rocks for 3D.

 

If you intend for the game to be playable on the web at the end of it though then forget it. Unless you use the Unity WebGL export (still experimental, still device limited, still massive runtimes) then it won't work - the Unity plugin doesn't work in Chrome any more at all since they disabled NPAPI.

Link to comment
Share on other sites

We've looked at phaser, and our game has simple graphics, just geometric shapes, eg the player is a circle. So it seems better to draw this plain circle with code than a prerendered PNG, so that it can be scaled arbitrarily without pixelation. But I can't see how to draw a circle in Phaser that is also an object like a sprite.

 

Ideally we need jelly-like physics, which also doesn't seem possible with Phaser, as it seems heavily based on sprites?

Link to comment
Share on other sites

I presume it is soft body / non-rigid body physics like if a soft rubber box fell on the floor it would deform and bounce back into shape. I'be just done a quick search and couldn't see anything for this in js - I imagine it is too intensive as the tech stands at the moment. There were a couple of examples on you tube of unity doing it but I got the impression from a quick read that it was not part of its standard features.

Link to comment
Share on other sites

Sorry I didn't mean to suggest it isn't possible just that it is so demanding that there is probably only a limited amount of gameplay that could be built around it - making it more likely a sort it out yourself problem than one you can find an engine for. Certainly p2, box2d, ninja and arcade used in Phaser are all rigid body. If you look at the Wikipedia entry for soft body physics all of the engines it lists are high end c++ ones.

I know that one way is to use a physics engine like box2d and use constraints on polygons to make them deformable. This, to me, seems more of a simulation of soft body physics than the real thing but may suit you. It is quite a manual process setting up the objects though as it is not the engine's purpose. An example I saw for this was on www.emmanueleferonato.com but used the AS3 version of box2d. It probably wouldn't be too difficult to convert though. This method looks to me the way agar.io does it as you can see the blobs are many sided polygons. They also never seem to quite settle which may be a problem and is probably a result of forcing a rigid body system to do a soft body systems work. It is probably a balancing act between enough vertices to look good but few enough to love some resources for game play.

Apologies for not putting links. My old iPad refreshes the page if I change to another tab and I lose my post... I've found. Bloody iOS8 on an iPad2.

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...