Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 2380 times)
0 Members and 1 Guest are viewing this topic.
Offline wazoo

Senior Newbie





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

*phew*

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

thanks!

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 »

Wow...

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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (35 views)
2014-12-15 09:26:44

Mr.CodeIt (26 views)
2014-12-14 19:50:38

BurntPizza (55 views)
2014-12-09 22:41:13

BurntPizza (88 views)
2014-12-08 04:46:31

JscottyBieshaar (50 views)
2014-12-05 12:39:02

SHC (65 views)
2014-12-03 16:27:13

CopyableCougar4 (68 views)
2014-11-29 21:32:03

toopeicgaming1999 (128 views)
2014-11-26 15:22:04

toopeicgaming1999 (119 views)
2014-11-26 15:20:36

toopeicgaming1999 (34 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org 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‑gaming.org
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!