Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (604)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (654)
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  
  need a finger pointed in the right direction  (Read 996 times)
0 Members and 1 Guest are viewing this topic.
Offline pituCaleya

Junior Newbie

« Posted 2009-04-24 11:44:10 »

Hi, everyone, how are you?.

I'd like to ask for a bit of orientation for a project I'll be working on, don't worry, I'm not asking for the 15-minute guide to build my own Quake 5, I'll try to describe the problem as well as I can, bearing in mind that, although I have Java experience, none of it is graphics related.

I need to dynamically visualize some charts, oscilloscope and/or histogram type, but I need to update the graphics as fast and smoothly as possible, and not only visualize them, they should be mouse-click aware. Being able to run it in Windows as well as Linux and OS X is a plus.

So far I've been googleing and I'm not sure if going for Java 2D is going to be fast enough, although it seems that it is hardware accelerated nowadays.

So, the thing is that I don't know whether Java 2D is enough, or going for Java 3D/JOGL, or even a game engine, like jMe or LWJGL, is going to be totally overkill.

Besides, I'd like to use this stuff inside an eclipse RCP app, J3DWorkbench-like, (in case this is a limitation for some of the options).

To sum it up, I'm eager to enter this thick jungle of Java graphics, I'd just like to know I'm headed in the right direction.

Thanks a lot in advance, and please excuse my english,

Offline endolf

JGO Coder

Medals: 7
Exp: 15 years

Current project release date: sometime in 3003

« Reply #1 - Posted 2009-04-24 12:30:14 »


I've not used Java2D for a while, so I can't really say how it's improved. Lots of people do use things like LWJGL for 2D. It might be worth looking at Slick.

You're english is better than some of the native english speakers round here Smiley


Offline Bonbon-Chan

JGO Coder

Medals: 12

« Reply #2 - Posted 2009-04-24 12:51:16 »

I need to dynamically visualize some charts, oscilloscope and/or histogram type, but I need to update the graphics as fast and smoothly as possible, and not only visualize them, they should be mouse-click aware. Being able to run it in Windows as well as Linux and OS X is a plus.

I have made a oscilloscope type component (It is a while now). You can easily create component like that. If you overight an component that allready deal with mouse event, you will have only to deal with the rendering (extends JLabel for example).
In the paint method, it should like that :
  public void paint(Graphics g)
        // update an Image with your oscilloscope data

        newDate = false;


and when you change data :
  public void addPoint(int x,int y)
     // Add you point to an arrayList/Array/...

     newData = true;
     repaint(500); // repaint with a "delay" of 500ms to not redraw everything now if there is others data to add

Well, will it be fast enough ? It all depend of the complexity of your graphics, the speed that you add data,...
If I remember well, I was displaying something like 3 oscilloscopes at the same time over 3s with new data every 10 ms (not sure). And it was working on no so fast computer but the refresh rate was not too fast.

Give it a try on an swing component and if it is not fast enought, it will not be too dificult to convert it to stick.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline teletubo
Global Moderator

JGO Wizard

Medals: 66
Projects: 4
Exp: 8 years

« Reply #3 - Posted 2009-04-24 13:08:57 »

hey Tony,

I believe you don't really need to go into slick or something like that to have a nice and fast oscilloscope.
If you use the right stuff in pure java, like bufferedStrategy, you can have a very fast solution . You can easily check this out in my game (look at the signature) or all the other pure java2d game in the "games  showcase" section in this forum .

Besides,  you might just waste your time learning a whole new library if it happens that the bottleneck resides in the calculation of the waves of your oscilloscope, not in the rendering itself.

So in my opinion you should give Java2d a shot before going into external libraries (which will also give you a little more trouble in deploying your project)

good luck

Offline pituCaleya

Junior Newbie

« Reply #4 - Posted 2009-04-24 14:10:28 »

Wow, thanks guys for the quick answers!

I think I'll start with Java 2D then, and see how it performs, because if it turns out not to be the best option, having a little 2D knowledge might be useful anyway.

Thanks again,
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

bilznatch (20 views)
2015-08-04 11:03:17

SHC (38 views)
2015-08-01 03:58:20

Jesse (24 views)
2015-07-29 04:35:27

Riven (45 views)
2015-07-27 16:38:00

Riven (25 views)
2015-07-27 15:35:20

Riven (27 views)
2015-07-27 12:26:13

Riven (18 views)
2015-07-27 12:23:39

BurntPizza (41 views)
2015-07-25 00:14:37

BurntPizza (50 views)
2015-07-24 22:06:39

BurntPizza (33 views)
2015-07-24 06:06:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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!