Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  (Loaded question) Is there any type of game not Java suitable?  (Read 3474 times)
0 Members and 1 Guest are viewing this topic.
Offline wazoo

Senior Newbie

« Posted 2006-12-24 07:01:55 »


I realize how potentially lethal a thread like this can become, but please let me try to urge some calmness and brotherhood Smiley

I'm evaluating the use of Java-LWJGL for some game ideas I had in mind, namely a 2D RPG I want to create. I'm hoping the use of Java keeps the doors open to the Mac/Linux market without me needing to port any code over (like I would have to do if I wrote the game in C++).

As with most languages, I know that there's some "good" things that every language handles well, and some "not so good" things that don't go so smoothly.

With the use of java-LWJGL, what experience have people had with the "not so good" situations? I'm just trying to target a few known "not so good" situations, so that I can plan out any needed workarounds before I hit the pitfalls (if possible). Smiley

Again, I apologize for the loaded question, my intent is mainly information gathering here Smiley


Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #1 - Posted 2006-12-24 07:51:53 »

The "not so good" case are tripple A games with a big fat budget, because Java lacks middleware and because the big studios lack Java programmers. Another case is hand crafted SSE/2/3/4 asm code, which may speed up some specific bits enormously (but thats more of a thing for raytracing, media en/decoding etc... for the most part it isn't worth the trouble).

Within the hobby to shareware range (small team/small budget) those things don't matter. Especially if it's 2D stuff. There isn't much to calculate anyways usually. No one cares if the game could run at 500 instead of 450fps if the graphics card limits it to 200 in first place. Smiley

My machine is 7 years old by now (500mhz ugh), but even with that pile of ancient crap I make it rarely drop below 60fps (with lwjgl that is). And if it does... then I'm either doing something overly processing intensive, something stupid or both.

That shyguy game for example runs at 140+ fps (while ~10% of the cpu is used elsewhere). And Tribal Trouble runs at playable ~30fps.

A 2D RPG would run fine, too. Even with immediate mode rendering and doing a few stupid things here and there. 60+fps would be a piece of cake... even for my machine. (Filling 640x480 with 16x16 tiles [immediate mode] while using ~45% of the cpu elsewhere gives me still ~140fps. There is absolutely nothing to worry about.)

弾幕 ☆ @mahonnaiseblog
Offline fletchergames

Senior Devvie

« Reply #2 - Posted 2006-12-24 22:59:03 »

I've programmed small 2d RPGs in Java before.  They weren't anything special, but they drew just as much art to the screen as any other RPG would.

I had to use an option for the JVM to make the last one run fast enough while scrolling the screen with the mouse.  In particular, I had to use "-Dsun.java2d.d3d=false".  I think what that flag does is use Direct3D for Java2D when it's set to true.  Apparently, Direct3D was too slow for my purposes, but switching to whatever it used instead (probably OpenGL) fixed it.

If I had written the program in C++, that would have been difficult to do.  If the graphics routines were all properly encapsulated, it would have been possible to switch.  But Java does that for you.

I don't know precisely what caused the problem, but I haven't encountered it in the game I'm working on now (not an RPG).  I was drawing alot more images to the screen than I really had to, or I wouldn't have had the problem at all.

A potentially smarter solution would have been to only draw the parts of the screen that need to be updated.  When scrolling, I could just shift the image of the last screen over and draw only the new area.  Various aspects of the code made this complicated, so I just didn't bother.  Since I could just change that flag anyways, it didn't matter.

The biggest problem people seem to have is getting their images to be hardware accelerated, but that's pretty easy once you know what's going on.  There's lots of topics about this in the forum.

Java can do anything any other programming language can do.  It is approximately as powerful as any other modern programming language (personal preferences determine who uses what).  The standard library that comes with Java gives you alot to work with.  It's harder to interact directly with the hardware, but I would rather deal with the Java API than worry about all the different possible hardware configurations.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline wazoo

Senior Newbie

« Reply #3 - Posted 2006-12-25 05:12:48 »


That's exactly the kind and type of feedback I was really hoping for!

Thanks to both of you for providing me with such valuable insights!

Yeah I'm hoping to stick with LWJGL and implement a crude view frustum culler clipped to the 2D plane to hopefully cut down on what's being updated and what isn't. *cross fingers*. But it definitely won't hurt to search for some of those topics you mentioned Fletchergames.. (thanks!)

oNyx: you bring up exactly what I was thinking...basically a small team not needing to handcraft assembly code. Nobody will notice if I'm running at a 500 or 200 fps so long as it doesn't "feel" that way.... Grin

Thanks again! Much appreciated!

Pages: [1]
  ignore  |  Print  

EgonOlsen (45 views)
2018-06-10 19:43:48

EgonOlsen (25 views)
2018-06-10 19:43:44

EgonOlsen (47 views)
2018-06-10 19:43:20

DesertCoockie (202 views)
2018-05-13 18:23:11

nelsongames (127 views)
2018-04-24 18:15:36

nelsongames (126 views)
2018-04-24 18:14:32

ivj94 (867 views)
2018-03-24 14:47:39

ivj94 (128 views)
2018-03-24 14:46:31

ivj94 (771 views)
2018-03-24 14:43:53

Solater (143 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!