Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (537)
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  
  HUD / QuickHUD  (Read 3508 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Posted 2006-07-15 03:34:18 »

Hey, Amos, is this QuickHUD class still necessary? I added a new static method to the HUD class called createAndInitialize. Please check it out and tell me if we still need QuickHUD?

Marvin
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2006-07-15 10:12:00 »

Hey, Amos, is this QuickHUD class still necessary? I added a new static method to the HUD class called createAndInitialize. Please check it out and tell me if we still need QuickHUD?

Marvin
I don't use RenderLoop nor these ScheduledOperation things so this class is useful for me.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #2 - Posted 2006-07-15 10:16:36 »

By the way, what happened to HUD class  Shocked I can't register it any more on keyboard or mouse..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #3 - Posted 2006-07-15 14:28:48 »

By the way, what happened to HUD class  Shocked I can't register it any more on keyboard or mouse..

Sorry, I simplified the Input- and Picking System of the HUD (a little to far, I guess). But it's fixed now.

No offense, but why don't you use RenderLoop?

EDIT: My question aims at missing features that you may need and that could be implemented in the (Ext)RenderLoop class, so that you can effectively use it.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #4 - Posted 2006-07-16 21:20:50 »

Please recheck the factory methods of the HUD class. I added some more and could therefore simplify your QuickHUD class. First of all, I hope that's ok, and secondly I really think this class is not needed anymore, because it just holds an instance of HUD and OperationSchedulerImpl. So this is just as easy to use directly.
Offline Goliat

Junior Member





« Reply #5 - Posted 2006-07-17 11:34:21 »

No offense, but why don't you use RenderLoop?

i actually don't want to use the render loop too ... i like the way shown in the book 'Killer game programming for java' ... it uses a single thread, but suspends the rendering if necessary to achieve a given ups (updates per second) rate
have a look at one implementation here: www.fhaust.de/downloads/GameTimer.zip
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #6 - Posted 2006-07-17 15:27:10 »

No offense, but why don't you use RenderLoop?

i actually don't want to use the render loop too ... i like the way shown in the book 'Killer game programming for java' ... it uses a single thread, but suspends the rendering if necessary to achieve a given ups (updates per second) rate
have a look at one implementation here: www.fhaust.de/downloads/GameTimer.zip

It seems like this implementation just handles to hold a maximum FPS and to render the scene in that interval. The RenderLoop also does it and a lot more. Maybe I got this coding wrong, but I don't see, that it did more.
Offline Goliat

Junior Member





« Reply #7 - Posted 2006-07-17 16:06:09 »

that's not entirely true ...
this implementation seperates the FPS (frames per second) from the UPS (game logic updates per second)
and tries to hold a given ups rate at the cost of suspending rendering calls where necessary
for the user this results in smoother viewing as the updates are constantly kept the same even in graphic intensiv scenes
you can set the maximum number of skipped render calls so it won't drop below a fixed point
but afaik it won't annoy the view if the fps drops down to ~25fps as long as the ups stay at the needed rate

so far ... Flo
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #8 - Posted 2006-07-21 20:38:23 »

By the way, what happened to HUD class  Shocked I can't register it any more on keyboard or mouse..

Sorry, I simplified the Input- and Picking System of the HUD (a little to far, I guess). But it's fixed now.

No offense, but why don't you use RenderLoop?

EDIT: My question aims at missing features that you may need and that could be implemented in the (Ext)RenderLoop class, so that you can effectively use it.
I like to know *when* it's rendering. I don't like to think I'll have to schedule everything.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #9 - Posted 2006-07-21 23:04:39 »

I like to know *when* it's rendering. I don't like to think I'll have to schedule everything.

Of course and naturally I have nothing against it, that you're not using (Ext)RenderLoop Smiley But you actually know, when it's rendered -> the closest time possible -> the next render loop. And you can still decide to override loopIteration to do and sync everything "by hand". (Ext)RenderLoop does so much for you. I just think it's a good idea to use it. You'd have much less code and much less to do and think about, don't you?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #10 - Posted 2006-07-21 23:25:52 »

I like to know *when* it's rendering. I don't like to think I'll have to schedule everything.

Of course and naturally I have nothing against it, that you're not using (Ext)RenderLoop Smiley But you actually know, when it's rendered -> the closest time possible -> the next render loop. And you can still decide to override loopIteration to do and sync everything "by hand". (Ext)RenderLoop does so much for you. I just think it's a good idea to use it. You'd have much less code and much less to do and think about, don't you?
Well I'm gonna think about it when I've got 2 seconds for me.

If you say it's gonna make me have less code then it sounds interesting..

But the problem I see with that is it's scenegraph-centric. Which is not the case of every game. It should be logic-centric.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #11 - Posted 2006-07-21 23:37:14 »

But the problem I see with that is it's scenegraph-centric. Which is not the case of every game. It should be logic-centric.

I don't understand exactly, what you want to say. Before I start to guess, could you please be more precise?
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #12 - Posted 2006-07-22 13:04:03 »

Some changes :
- Fixed the issue with QuickHUD : it was due that full-screen JOGL canvases don't have a Window, in which case we simply take canvas3d.getWidth/Height() for innerWidth/Height
- Fixed an issue : operations scheduled by buttons were returned as not alive, which caused them not to be executed by OperationSchedulerImpl
- Some things I forget

Attached : a little screenshot of my game's model viewer. This HUD system just works great..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #13 - Posted 2006-07-22 13:13:39 »

Some changes :
- Fixed the issue with QuickHUD : it was due that full-screen JOGL canvases don't have a Window, in which case we simply take canvas3d.getWidth/Height() for innerWidth/Height
- Fixed an issue : operations scheduled by buttons were returned as not alive, which caused them not to be executed by OperationSchedulerImpl
- Some things I forget

Ah, cool. Thanks. So this was the error. In my test cases I'm not using fullscreen, even if the Xith3DTestStarter supports it by just one click. I should try it from time to time Wink

I just modified the HUD class slightly, such that we don't let the exception-catching mechanism do too much and a real error/exception, which we didn't foresee, will still be thrown.

EDIT: btw. really cool screenshot. Nice kind of HUD usage.
Offline Matthias

Senior Member


Medals: 3
Projects: 1


TWL - Themable Widget Library


« Reply #14 - Posted 2006-07-23 19:38:37 »

Attached : a little screenshot of my game's model viewer. This HUD system just works great..

Wow  - really nice. Just one question - the larger icon on the frame - did you paint the frame or is this a window manager thingy ?
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #15 - Posted 2006-07-23 19:45:31 »

Wow  - really nice. Just one question - the larger icon on the frame - did you paint the frame or is this a window manager thingy ?

I don't think, he used a window manager. This is all done by the HUD and some Image Widgets. Correct me, Amos, if I'm wrong. Well, at least it should be done this way. The HUD can do this and should be faster than the window manager, which is not know to be very fast.

Maybe it even is one big image with an alpha channel used to produce full transparency in the center.
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #16 - Posted 2006-07-23 21:33:39 »

Attached : a little screenshot of my game's model viewer. This HUD system just works great..

Wow  - really nice. Just one question - the larger icon on the frame - did you paint the frame or is this a window manager thingy ?
The window has no border. The "borders" you see is a 800x600 background image. However, MInimize buttons is working.

I wanted to make possible window dragging, too but when I tried it was a bit buggy so.. maybe later.

(attached : background image).

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #17 - Posted 2006-09-11 02:39:09 »

I've just updated the Frame Widget and added a Dialog Widget. Both are fully usable now.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #18 - Posted 2006-09-17 15:51:56 »

I've fixed the ProgressBar Widget and added Mouse Wheel support to the WidgetContainerBase (--> Panel).

And just to have it in this thread: Clipping is working now.

Marvin
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.

CogWheelz (17 views)
2014-08-01 22:53:16

CogWheelz (15 views)
2014-08-01 22:51:43

CopyableCougar4 (18 views)
2014-08-01 19:37:19

CogWheelz (19 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

E.R. Fleming (42 views)
2014-07-29 03:07:13

E.R. Fleming (13 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36
Resources for WIP games
by CogWheelz
2014-08-01 18:20:17

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

List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22
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!