Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
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 867 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,
Regards
Antonio


Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


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

Hi

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

Endolf

Offline Bonbon-Chan

JGO Coder


Medals: 12



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

Quote
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 :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
  public void paint(Graphics g)
  {
     if(newData)
    {
        // update an Image with your oscilloscope data

        newDate = false;
    }

    g.draw(image,0,0,null);
  }


and when you change data :
1  
2  
3  
4  
5  
6  
7  
  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
« League of Dukes »

JGO Ninja


Medals: 48
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,
Regards
Antonio
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.

atombrot (25 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!