Is it possible to create a Facebook game that is a Windows executable?

| | August 11, 2015

I’m thinking of trying to make a game, and I heard Facebook is good place to make it popular, but I don’t want to make a sprite-based Flash game, I want to use OpenGL for rendering to get nice graphics and good performance with it.

I know there is Java which supports OpenGL (I think), but I would like to make my game closed-source so that people cannot make their own mods for it like what happened with Minecraft.

Another option I thought was to make OpenGL executable and a Flash version, but I think it might be too much work for one guy. Not to mention I have never done anything in Flash.

So, is there any way to develop closed-source game that can be also played through a browser? By closed-source I mean the people have no way of getting the source code by decompiling it in any way.

2 Responses to “Is it possible to create a Facebook game that is a Windows executable?”

  1. If you ever reconsider the closed-source approach, then I think JavaScript and WebGL are what you need. I have a few randomly picked arguments for you:

    • JavaScript can be obfuscated to a point where it’s not worth reverse-engineering, simply because it can be redone in less time.
    • don’t think your code is worth much, it’s your idea that will be copied, and what you will achieve alone in 2 years will be redone by a team of six in less than 4 months.
    • even if you ship compiled code, you will have a hard time preventing anyone from modifying your assets.

    If you really don’t want to go that way, I have never used it myself, but haXe was recommended to me several times including very recently. It is a high-level language similar to ActionScript that compiles to JavaScript, Flash, C++ and more. It has OpenGL bindings that alas do not appear to be maintained.

    My personal expectation is that solutions such as Google’s NativeClient will some day become the norm, because that will make a fantastic amount of code portable to web applications. Right now I can write OpenGL ES code with NaCl that runs at native speed and I am extremely satisfied with the very little amount of code I had to change. The Ogre engine was successfully ported to NaCl. The drawback is that the code only works in Chrome, and the Mozilla developers have made it clear that they don’t want NaCl in Firefox.

  2. Something will only get popular on Facebook if you build all the Facebook infrastructure, ie. a website with various links into the Facebook API to allow people to log in, share links, comment on it, etc. It’s probably not worth the effort unless you have a specific reason to want to use the Facebook system.

    To have something playable on the web and also as an executable, and to directly use OpenGL, then pretty much your only choice right now is Java. You can get accelerated 3D in the browser with Unity, but you don’t have low level OpenGL access. And Flash’s 3D support is rapidly becoming usable, but I don’t know how you access those APIs.

Leave a Reply