Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (93,116 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
Lee Everett

C++ Webclient for gaming?

Recommended Posts

Lee Everett

Is it possible to have a C++ webclient for games? I know it's possible with Java, but now Chrome doesn't support it.


If yes, can you link me to a game that has support for C++ (webclient)?

Share this post

Link to post
Share on other sites

You can write a browser plugin and interface with it via JS. If you need something beyond that, you're using the wrong tools for the job.

Share this post

Link to post
Share on other sites
Lee Everett

You can write a browser plugin and interface with it via JS. If you need something beyond that, you're using the wrong tools for the job.



Okay well the reason I'm asking is because I am creating an indie mmorpg (not to a great scale, but something that can support around 1,000-2,000 players). I've been programming in Java for about 6 years, and recently there have been a ton of security features that prevent me from making the game as accessible as I want. Example, Chrome blocked client that don't have a certificate, and then removed the webclient feature entirely. I do want to have a browser accessible client, because from my experience on a previous game server I used to work on about 70% of people used that since they didn't want to directly download.


It's not something big like Call of Duty, or GTA V (since it's Indie), and there aren't any 3D elements, the game is completely 2D.


So for something like this would it be easier to rewrite everything in HTML5? And have a separate client in C++/Java? I'm looking for something that can be used on all platforms, so with Java I previously could have webclients, desktop clients, and even on the phones. It saves a lot of time and effort.

Share this post

Link to post
Share on other sites

If you want a game that can be ran in browser or as a stand alone from the same code, my best recommendation is Unity. Now, running Unity games in browser requires users to install Unity web player, similar to how Java and Flash used to require a separate install back in the day. But it's a minimum hassle for end users, and a lot of people who play web games already have Unity installed.


As a stand alone, it works just like any other client. Best option for writing game code is C#, which won't give you quite the performance of C/C++ code, but it's pretty darn good. Certainly far better than anything you can do with JavaScript and HTML5. Unity also comes with a whole bunch of tools for graphics and networking built-in and has a huge community where you can get help.


Unity games are also relatively easily ported to iOS and Android. So if you were considering mobile market, this gives you better coverage out of the box. It's easy enough to use to make it a favorite as a game dev teaching tool, but also has features advanced enough to attract AAA developers. Hearthstone is probably the biggest name among Unity games, but there are many others.



That's as far as the client goes. If you need a server, that's a separate story. I don't know how complex it needs to be. Obviously, if it's something very simple that just needs to connect people together, you can throw something together in PHP and run it on any old LAMP. But if your server is complex enough to make you want to reuse code between server and client code, which would be case for most MMOs, and you're going with Unity for client, then you probably want a C# server as well. You can run C# under Linux, but obviously, Windows is a friendlier environment. If you're happy with a Windows server, then just run with C#. Like I said above, it's fast enough for most task, and if you get in a bind with performance for something like AI code (path finding tends to be a performance hog), you can always write a C/C++ library and import it into a C# project.



In short, with Unity/C# combo, you can have all the features and safety of Java-like environment, a big chunk of the C/C++ performance, and easy way to make web client, mobile client, and stand-alone client from the same code. For an indy MMO, I can't think of a better combination.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.