Creating an app for mobile and browsers

I’m having difficulty figuring out if my idea and project is actually doable or not.

I’m planing on a project that consists of two parts.

First part is strictly a mobile app (for iOS and Android). This is where my users will have access to all kinds of information that is being read from a database. They are also able to make a few features that writes to the DB. So far I don’t have a problem.

The second part of the app is the admin area. The admin area is a copy of whatever a user can do but along with a few more features (it’s an admin area, so it’ll be possible to do a few more writing to DB and such).

My question is: How do I create an app that works in the browser as well? Is it simply just the WebGL plugin I need or do I need some other plugins? I want to be able to use the exact same code.

You simply export it the game to WebGL and put it on a server, which can be local. Yes it is that easy. For some features you might want to use Application.platform though. Have a look at this document:

With the help of this, you can limit certain things to a specific platform, which is an easy way to control which platform has access to what or change certain features like controls only for a certain platform.

What will not work in a browser is stuff that is Android specific of course, like the Google Play Store API.

You might also want to make modiciations to resolution or viewport of the camera, depending on the game, but that is optional.