My Java game

Thread in 'Discussion' started by makalaka, 18 Jun 2007.

  1. cdsboy

    cdsboy Unregistered

    So why did you go with java? IMO its not the best programing language for games... But then again thats just me...
     
  2. class project
     
  3. cdsboy

    cdsboy Unregistered

    ah make sense xD
     
  4. tepples

    tepples Lockjaw developer

    That and unlike C++, Java can be used to make an applet that runs inside a web page. Applets are easier to deploy than stand-alone programs in the case of some casual 2D games.
     
  5. TetrisFred

    TetrisFred Unregistered

    What makes you say that? What ist the best programming language for games?
     
  6. Probably C. No bloody plus, hash or star.
     
  7. TetrisFred

    TetrisFred Unregistered

    C is such a horrible language for application development. Why would you prefer C over languages such as C# oder Java? I don't see any reason for that. I hope it's not the old "speed" argument...
     

  8. You're posting in a thread where a tetris game won't even run 640 x 480 fullspeed, apparently because of java. Just saying.
     
  9. tepples

    tepples Lockjaw developer

    Try running C# or Java on a Game Boy Advance system, which has a 16.78 MHz CPU, up to 32 MiB of ROM, and 386 KiB of RAM. See if you can achieve the amount of scene complexity that you can achieve with a comparable engine written in C or in C++.
     
  10. I think that his decision to use java was an excellent one. The same codebase can be used on Mac, Windows, and Linux.


    I didn't want to say anything before, but there must be some reason other than the language itself that it runs laggy at 640x480... true that Java is not as fast as compiled C/C++, but come on, I've seen full screen java games with animations flying all over the screen. It must be something in the coding style, or maybe you're stretching the surface every frame (thats not recommended).


    You've already done a great job on the game-- I'd offer to help but I doubt you would need it.
     
  11. tepples

    tepples Lockjaw developer

    The same argument can be made of C or C++ source code that uses the Allegro library.

    MAME, Gens, Nestopia, and VisualBoyAdvance stretch the surface every frame and they don't have a speed problem. But then a lot of the PC-based emulators use fast DirectDraw or OpenGL calls to stretch a surface, calls that might not have a counterpart in the libraries that come with Java.
     

  12. Yeah, I tried that the first time... easy stuff, but then the game was completely unplayable. And considering people here have 2560x2048 desktops... I think you get the picture...


    Then I tried something different. It didn't exactly bad, but it also didn't right so I removed it. There's definitely a way to get a fast 640x480 (or higher), I just haven't look deep enough yet...
     
  13. mat

    mat

    i want 2560x2048! 1920x1200 is so 2006.
     
  14. Of course that is true, but it is a little more difficult, mainly because of the nature of C and C++. I guess what I meant to say is that his java jar file can be run on any fast enough java-supported system -- without recompiling the code.


    I didn't mean that no game or system should ever stretch every frame-- just that it shouldn't be done with java because of the hardware limitations.


    I think the main drawback with Gaming in Java is that it lacks direct access to hardware, which includes everything from Audio and Video to joystick input devices. Adding plug-ins and extensions to alleviate this leads to incompatibility with other systems, at which point you should just go with C++.


    I'm personally working on a tetris-like game with C++ and SDL so, when complete, can be used on Linux, GP2X, and PSP.
     
  15. reivilo

    reivilo Unregistered

    cultris is coded in java.
     
  16. ho hum
     
  17. Interesting discussion about C/C++ and Java.

    Also seeing matt that happy.


    Overall interesting.
     
  18. Brainstormed

    Brainstormed Unregistered


    Java is an excellent programming language, and probably "the best" for certain situations, but stating that C is a horrible language is such an ignorant statement.


    C is a simple and fast language. Nothing more and nothing less. You can do wonderful stuff with such a spartan language.
     
  19. johnberhenry

    johnberhenry Unregistered

  20. Muf

    Muf

    Way to go necroing a thread with nothing useful to add. [​IMG]
     

Share This Page