Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm going to write browser online game, not MMO, but something like a lot of Flash game. But with OpenGL rendering, because Flash is using CPU for rendering.

What are advantages of pure Java or c++ with Java that only create window.

My requirements are:

  • good performance - low overhead when calling OpenGL functions
  • short code( if possible ) - so, Java is fully object oriented language, which can require usage of object for each called OpenGL function
  • basic portability - Linux, Mac, Windows - multiple builds for each platform aren't problem
  • little communication with server for saves, top score,... not multiplayer - may be slow
  • game should be downloadable
share|improve this question

closed as not constructive by Tetrad Jan 22 '12 at 2:05

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
just have a feeling it'll have benefits if you use pure java, I think it's because pure java can run on any platform but if you try combining those languages c++ binaries would prevent cross-platform features –  Ali.S May 25 '11 at 10:28
    
For clarity, are we talking web in browser, or web as in multiplayer downloadable binaries? @Gajet out of interest, how does C++ limit cross platform features? Most libraries are X-platform. –  The Communist Duck May 25 '11 at 10:41
1  
Have you thought of using WebGL? –  zacharmarz May 25 '11 at 10:57
    
Just FYI: The upcoming release of the Flash player will use the GPU and provide hardware accelerated 3D and 2D rendering. –  bummzack May 25 '11 at 11:01
1  
-1, what exactly are you asking here? Advantages in what areas? Which one do you prefer? You haven't given any real requirements, and even if you had (i.e. "performance", it really wouldn't be answerable since there is so much more to a program than the language itself. Why do you need or want to use java at all? –  Tetrad May 25 '11 at 13:52

2 Answers 2

up vote 4 down vote accepted

Just use Java, don't bother with anything else. If it becomes necessary to start augmenting the program with C++ bolt-ons, you can do so later once you've proven it to be to true.

Until then, you'll be able to build a perfectly excellent game in Java that meets all your requirements and has the advantage of being significantly easier to build and deploy since you won't have to deal with the hassle that is C++'s lack of binary portability.

If you're into it, it looks like it's also possible to use a developer preview version of Flash to get the hardware accelerated features bummzack mentions.

share|improve this answer
    
if you use just java, other than controls, would it make an easy convert to android? –  Spooks May 25 '11 at 17:50
    
I don't know too much about Android, somebody else is probably better suited to respond to that. –  Josh Petrie May 25 '11 at 18:15
    
The game itself (game logic etc.) should be trivial to move to Android, but the UI components will probably need a bit of rewriting to the Android APIs. For example, the Andoid OpenGL ES library is a bit different from what you get in LWJGL. –  mikera May 17 '12 at 14:35

If you're writing it for the browser, C++ is not an option; you would have to use Java. Alternately, look at Unity.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.