Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (550)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (593)
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  
  GAGETimer 1.1 released!  (Read 2191 times)
0 Members and 1 Guest are viewing this topic.
Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Posted 2004-02-12 15:24:58 »

GAGETimer 1.1 has been released! The primary feature added was support for the 1.5 System.nanoTime() call. GAGETimer will check the VM version and use the nanotimer if it's 1.5 or higher. If that check fails, it will attempt to fall back on the windows DLL, and if that check fails (because the DLL is missing or you're not using Windows) it will finally fall back on System.currentTimeMillis().

Even more interesting is the addition of a new class called "DurationTimer". DurationTimer is a precise countdown timer that is useful for time bounded game events. Some interesting uses:

- Kill the player if they don't finish a level in time. (ala Mario Bros.)!
- Temporary power-ups like Quad damage!
- Fuses for bombs!
- Construction of units!
- Just about anything else that needs to happen within a set amount of time.

Methods are included for developing progress bars, showing seconds and percentages, and pausing the timer (important for when the user pauses the game or some event (like lack of money) stops the countdown).

So, what do you think?


Java Game Console Project
Last Journal Entry: 12/17/04
Offline SpuTTer

Senior Devvie

Medals: 1
Exp: 14 years

Lazy Middle Class Intellectual

« Reply #1 - Posted 2004-02-12 16:06:47 »

Excellent. Sounds like great stuff. I'll check it out later.

Sacramento Volleyball
"Whitty phrase goes here."
Offline Jeff

JGO Coder

Got any cats?

« Reply #2 - Posted 2004-02-13 02:30:18 »

You left out my response which is....

"And why do I use this rather then the nanosecond timer thats now in 1.5?"

I'm really genuinely curious if there is a compelling reason.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

« JGO Spiffy Duke »

Medals: 457
Projects: 3
Exp: 16 years

Eh? Who? What? ... Me?

« Reply #3 - Posted 2004-02-13 09:17:18 »

It abstracts away the requirement of JDK1.5. You can use the GAGE API on any VM from 1.1 and upwards and it does the best it can.

Cas Smiley

Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Reply #4 - Posted 2004-02-13 12:05:21 »

You left out my response which is....

"And why do I use this rather then the nanosecond timer thats now in 1.5?"

I'm really genuinely curious if there is a compelling reason.

Like Cas said, it's cross version *and* it contains support for the nanotimer. It also takes care of a lot of the details for you, such as a highly efficient sleep loop. And the addition of the DurationTimer provides an easy way to handle timed events in game. It even supports the user pausing the game without any special code. (That's one of those things that often gets forgotten and is very difficult to add later.)

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #5 - Posted 2004-02-16 07:04:18 »

I'm missing the point: "I use system stuff instead of another third-party jar/dll"

The FlyingGuns-utilities define a timing framework as well. Checking e.g. for Java3Ds hires-timer availibility and fallback to currentTimeMillis() is just 2 lines of code or so.
And there's a command-queue that allows to submit time-related commands. Also very easy things!

And for you need to define these things to fit your special needs anyway, you can easily embedd the neccesary timing features as well w/o having to interface a third-party lib.

So I feel an external timing lib makes sense only if

  • Hires timing is really required
  • Java3D is not available
  • 1.5 is not available

For all three points still are LIKELY to coincide, it is GOOD to have the external timer available. But it should be as SMALL as possible in interface and jar-size.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
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.

Archive (25 views)
2015-01-29 04:26:08

theagentd (22 views)
2015-01-28 15:33:52

GamerIDGoesHere (32 views)
2015-01-27 01:23:23

GamerIDGoesHere (33 views)
2015-01-27 01:22:15

CopyableCougar4 (40 views)
2015-01-27 00:34:41

CopyableCougar4 (28 views)
2015-01-26 04:47:56

Olo (19 views)
2015-01-25 21:26:00

Olo (26 views)
2015-01-25 18:44:22

Robo11 (43 views)
2015-01-25 06:14:26

basil_ (34 views)
2015-01-17 22:29:32
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

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 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!