Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  Removed..  (Read 1938 times)
0 Members and 1 Guest are viewing this topic.
Offline Jari Särö

Junior Duke


Medals: 1



« Posted 2011-12-30 00:26:15 »

Removed..
Offline Cero
« Reply #1 - Posted 2011-12-30 00:48:15 »

Quote
safe to computers

stop it already
apart from boardgames not being graphically intensive, you sleep just like normal
only without frame-limiter you could even really heat up the graphics card.

you're doing 14 fps board games, and people are creating 60 fps first person shooter, and this isn't even an issue for them
video cards overheating would be a hardware design problem, waaaaay more low level than you can access

Offline ReBirth
« Reply #2 - Posted 2011-12-30 02:00:29 »

Quote
hundred users to my site
that sounds to hurt server, not each client
Quote
need to be sure that my site is safe to computers people use when running my applets
You can tell us what exactly it is doing.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline theagentd
« Reply #3 - Posted 2011-12-30 10:46:37 »

is there a sleep in lwjgl to graphics card, lwjgl itself is a native library it has .so .dll files, does lwjgl include an option to sleep or halt graphics card from gl11 commands, maybe would be a good idea to do so maybe a 400 ms - 800 ms a second ?

Solution 1: Build an insanely low-level library in C/C++ to query the driver specific commands to measure GPU load, VRAM load and video engine load and adjust the amount the processor sleeps to reduce the load of the game.
Solution 2: Add a CPU sleep. The graphics card can't work faster than the CPU. The slowest one of the two decides the rendering speed.
Solution 3: Add a huge warning stating that the game has a chance to kill you by exploding the user's computer, possibly with (faked) proof to assure the player of the risk he's taking by running your game.
Solution 4: Force the player to run Prime95 and Furmark before starting the game to ensure they have adequate cooling for their CPU and GPU.

The above solutions are jokes. The actual solution is to do nothing.

Sleeping 800ms per frame? Excuse me, but are you insane? Can you picture any 3D game running at 60 FPS at 200/60 = 3.334ms per frame? Most commercial games do much more post-processing than that, and you want to limit the time for each frame to 1/5th of the already low amount of time you have? You have got to be joking.

How does it make sense to not utilize the GPU or CPU fully? Can you picture a car only being able to drive at 1/5th its rated speed? Can you picture a TV that's only 1/5th the resolution it says in the specifications? A box of corn flakes containing only 1/5th the amount of corn flakes it says on the box? Get real. Don't try to solve your user's heat problems and, as Cas says: Make games.

Myomyomyo.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #4 - Posted 2011-12-30 14:16:34 »

Do we really need to keep replying to  Jari Särö's delusional ideas about CPU/GPU/sleep usage? We've answered the question in many forms already, he's clearly not listening and it's just starting to clog up the forum.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Online Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2011-12-30 15:07:10 »

I think it's a problem of perception:
  • When your game is running at exactly 60fps, using 100% CPU and 100% GPU, it looks like the computer has no problem performance wise.
  • When your game is running at exactly 5fps, using 100% CPU and 100% GPU, it looks like the computer has a huge problem performance wise.

While it is just as busy, consuming the same amount of energy, some non-technical person might fear for the hardware in the case it's running at 5fps. It's surprising a programmer is so hard to convince...

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Jari Särö

Junior Duke


Medals: 1



« Reply #6 - Posted 2011-12-30 17:31:24 »

Removed..
Online Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2011-12-30 17:48:00 »

Don't even bother with dirty rectangles. Imagine if 3D games would use dirty rectangles... they would most likely determine the entire canvas/viewport is dirty. 2D rendering is (often) so much cheaper that it's simply fast enough. Java2D can be slow, so maybe, if you're really having such performance problems, you're simply forced into Slick2D or LWJGL - and the framerate might go up to several hunderd fps.

Clicking on your link, I get an applet running at ~1fps with "sleep: 902ms" persecutioncomplex the games are (therefore?) unplayable.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Jari Särö

Junior Duke


Medals: 1



« Reply #8 - Posted 2011-12-30 17:54:40 »

Removed..
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #9 - Posted 2011-12-30 18:15:48 »

Clicking on your link, I get an applet running at ~1fps with "sleep: 902ms" persecutioncomplex the games are (therefore?) unplayable.
Same. Couldn't click on anything either, maybe that's a side effect of the terrible framerate.

Seriously, whatever crazy stuff you're doing with sleep() and yeild(), stop it. Just write a fixed framerate loop (at 30fps if you're paranoid about cpu time) and be done with it.

And as Riven says, don't bother with dirty rectangles for something as simple as a board game (or indeed anything).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight


Medals: 32



« Reply #10 - Posted 2011-12-30 18:22:27 »

Also same, they were unplayable.  You can probably sleep for just 20ms and still keep someone's cpu at below 5% usage.

Offline Jari Särö

Junior Duke


Medals: 1



« Reply #11 - Posted 2011-12-30 18:26:49 »

Removed..
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #12 - Posted 2011-12-31 03:43:15 »

Yep the "ilmojein pilotit 1917" game was completely unplayable (partly due to not understanding Finnish Tongue) but mostly due to 4FPS?!? The planes and clouds were lagging and stuttering like crazy.

Looking at the HTML source, you shouldn't be disabling OpenGL (-Dsun.java2d.opengl=false) and only using DirectX/Direct3D (-Dsun.java2d.d3d=true) since now the applet will not work on anything other than Windows.

Offline ReBirth
« Reply #13 - Posted 2011-12-31 04:10:56 »

It didn't start at all on me~
I'm little curious about what code inside it Tongue

Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #14 - Posted 2011-12-31 06:04:56 »

@ReBirth you have to click on the image after clicking on the name.

Offline theagentd
« Reply #15 - Posted 2011-12-31 11:04:41 »

1. Remove sleep(OVER_NINE_THOUSAND)
2. Huh
3. Profit!

Myomyomyo.
Offline ra4king

JGO Kernel


Medals: 350
Projects: 3
Exp: 5 years


I'm the King!


« Reply #16 - Posted 2011-12-31 11:10:30 »

Hahahahahahahahahahahahahaha.

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.

Longarmx (36 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (27 views)
2014-10-15 16:18:58

TehJavaDev (52 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (77 views)
2014-10-11 22:30:10
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!