Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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  
  Going as low as possible without JNI  (Read 2494 times)
0 Members and 1 Guest are viewing this topic.
Offline Captain-Goatse

Junior Devvie




I suck at teh 2D. XBOX IS BIG LOL!111


« Posted 2002-12-29 06:36:11 »

I'm attempting to build my own little library for my physics engine/game where I'm trying to do everything from as low as possible.

I have couple of performance questions:

Is it true that Canvas3D negates all the bonuses achieved from Fullscreenmode since it is heavyweight?

Is there any way to disable the innate AWTEvent processing and implement your own on top of it? The way I see this, it would give a nice speed boost to customize the code work with the rendering engine and FPS update interval.

What internat threads can be accessed by the program? It would help a lot if I could implement one of those internal threads to do the input monitoring and perhaps the game physics(collision detection). This would leave the main game thread totally free of unneccescities.

Does anyone have any tips and tricks what to do to get the optimal performance by tweaking the innate processes without JNI?
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #1 - Posted 2002-12-29 11:17:56 »

Quote

Is it true that Canvas3D negates all the bonuses achieved from Fullscreenmode since it is heavyweight?


No.

Quote

Is there any way to disable the innate AWTEvent processing and implement your own on top of it? The way I see this, it would give a nice speed boost to customize the code work with the rendering engine and FPS update interval.


Just don't produce events. Then the event thread just sleeps. I've never heard that the event thread itself produced any noticable load.


Quote

What internat threads can be accessed by the program? It would help a lot if I could implement one of those internal threads to do the input monitoring


It already does. That's the event thread.

Quote

and perhaps the game physics(collision detection). This would leave the main game thread totally free of unneccescities.


Physics in the input processing thread? Normally physics runs as an integral part of the gameloop and does not count under 'unneccescities'.

Quote

Does anyone have any tips and tricks what to do to get the optimal performance by tweaking the innate processes without JNI?


Just use them, they are fine.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Captain-Goatse

Junior Devvie




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #2 - Posted 2002-12-29 17:50:11 »

They are fine, arguably.

Can someone tell me why not to use AWTEventListener and eventDispatched, on suns site it says that it is kind of slow and should not be used, why is this so? I would have only two three kinds of events to dispatch, those from mouse and those from keyboard.

What does the java3d behaviour use to get the events?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline markuskidd

Junior Devvie


Medals: 1



« Reply #3 - Posted 2002-12-29 21:10:06 »

Do you have a link to where Sun's talking about the event thread?
Offline Captain-Goatse

Junior Devvie




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #4 - Posted 2002-12-30 04:18:32 »

Sun is talking about the AWTEventListener:

http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/awt.html

If you mean if I got the link where the event thread is explained then no.
Offline markuskidd

Junior Devvie


Medals: 1



« Reply #5 - Posted 2002-12-30 16:16:12 »

Quote

Note:
It is advised to not use AWTEventListener in a shipping product as it will degrade system performance


This is pretty distressing. And, of course, pretty vague.
Offline Pyros

Senior Newbie




Let's make Java games rock !


« Reply #6 - Posted 2002-12-30 16:20:40 »

Quote
This is pretty distressing. And, of course, pretty vague.


Quite so. Apparently it is best to experiment for best performance.
Offline Captain-Goatse

Junior Devvie




I suck at teh 2D. XBOX IS BIG LOL!111


« Reply #7 - Posted 2002-12-31 13:00:49 »

YES! eventDispatched is faster if you have only few listeners launching elements, such as mouse and keyboard, but with many, there is no speed difference, in fact it is slower.

I'm not totally through with the experiments yet, but this seems to be the case. At least on my computer.

I used java 3d timer to get count the time spend in each event.

I'll post here when done.
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 (30 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (30 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!