Goombert
|
 |
Reply #15 Posted on: July 03, 2013, 05:44:08 pm |
|
|
 Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Deus, also, I am planning a profiler to be integrated with debug that will output things such as ram and vram and cpu usage >:
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect. 
|
|
|
|
|
egofree
|
 |
Reply #18 Posted on: July 04, 2013, 02:53:22 pm |
|
|
 Joined: Jun 2013
Posts: 601
|
Second, was this for empty game?
Yes. Do you use any anti-virus?
Yes, but i tried already to disable it, but it doesn't change anything. With gDEBugger, i tried also to see if it's possible to see CPU use for each function, but i don't think it's possible. Finally i tried an c/c++ profiler on Windows : very sleepy ( http://www.codersnotes.com/sleepy). Here is the result : First screen :  Second screen, it's the breakdown of the thread which uses almost all CPU power :  And my task manager (to prove i am not lying  ) : 
|
|
|
Logged
|
|
|
|
TheExDeus
|
 |
Reply #19 Posted on: July 04, 2013, 03:16:37 pm |
|
|
 Joined: Apr 2008
Posts: 1860
|
It seems the very cool sleep function isn't that cool after all. Try setting room speed to 999 (which should disable sleep) and see what you get (and check if you get stable 999, if not then set it lower so it's stable). Here is mine: http://imageshack.us/a/img59/1533/52h1.pngSo I clearly don't have it. It is weird that sleep eats so much CPU for you though. Maybe forthevin knows more.
|
|
|
Logged
|
|
|
|
egofree
|
 |
Reply #20 Posted on: July 04, 2013, 04:54:57 pm |
|
|
 Joined: Jun 2013
Posts: 601
|
It seems the very cool sleep function isn't that cool after all. Try setting room speed to 999 (which should disable sleep) and see what you get (and check if you get stable 999, if not then set it lower so it's stable). Interesting. I tried many different values, and here is the result: Room speed between 1 and 59 -> CPU 13 % Room speed between 60 and 999 -> CPU 25 %
|
|
« Last Edit: July 05, 2013, 01:57:42 am by egofree »
|
Logged
|
|
|
|
Josh @ Dreamland
|
 |
Reply #21 Posted on: July 04, 2013, 05:43:22 pm |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
It uses 13% CPU at 1 FPS?
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
TheExDeus
|
 |
Reply #23 Posted on: July 05, 2013, 02:01:31 am |
|
|
 Joined: Apr 2008
Posts: 1860
|
Josh, by the looks of the profiling the Sleep() function is the one eating the CPU. So if it sleeps for 59/60 then it will eat as much or even more CPU. Maybe I am wrong though as I can't find a topic on the internet about Sleep() using much CPU. Here is an interesting article on how to make it use certain amount of CPU - http://www.codeproject.com/Articles/28870/Better-Way-to-Sleep-Control-Execution-and-Limit-CP . But I don't think we should limit a game to run at certain %. Could be a cool optional feature though for creating programs that are meant to run in background. 25% is 1 core and you will not get more with a single threaded application like an enigma game. Though that means you exceeded stable FPS. Try drawing fps (draw_text(10,10,string(fps)) to see what you actually get. If you set it to 100, then you get 100? And max CPU load (25%)? And when set to 400 you also get 400, but with max cpu load (25%)?
|
|
« Last Edit: July 05, 2013, 02:03:47 am by TheExDeus »
|
Logged
|
|
|
|
egofree
|
 |
Reply #24 Posted on: July 05, 2013, 02:37:42 pm |
|
|
 Joined: Jun 2013
Posts: 601
|
25% is 1 core and you will not get more with a single threaded application like an enigma game. Though that means you exceeded stable FPS. Try drawing fps (draw_text(10,10,string(fps)) to see what you actually get. If you set it to 100, then you get 100? And max CPU load (25%)? And when set to 400 you also get 400, but with max cpu load (25%)?
Room speed FPS CPU load ------------------------------------- 30 30 14 60 60 25 100 60 25 400 60 25
|
|
|
Logged
|
|
|
|
|
|
Goombert
|
 |
Reply #27 Posted on: July 06, 2013, 11:36:56 pm |
|
|
 Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Here I got the answer Josh, Windows sucks, there you go have a nice fucking day. As far as those deprecated GL functions go, much of the OpenGL3 graphics system is still using software rendering for some things, just about the only thing I've changed is using Vertex Buffers for models.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect. 
|
|
|
|
egofree
|
 |
Reply #29 Posted on: July 07, 2013, 06:56:07 am |
|
|
 Joined: Jun 2013
Posts: 601
|
But as far as I can tell he is the only Windows user we have who has this problem. It's weird, but still shows that it could be something specific to him. ego, have you tried on another PC? And if you sometime in the future reinstall Windows then try again. And did you actually install the OS or was it preinstalled with the PC?
edit: And what is this TestOpenGL.exe you are running all these tests? Is it really an empty game? I guess you would notice if it wasn't...
I've totally re-installed my PC (Alienware X51) several weeks ago, because i know it had a lot of crap on it and i've installed also an anti-virus. I tried to install as much as possible open-source software. I've got another mini-PC, a Dell Studio Hybrid, which is several years old, with a dual boot (Vista and Linux mint). I tried the empty project on Vista : CPU load 50 % !!! I know the computer is not very powerful, but we are talking about an empty project. I analysed the exe with anti-virus and it doesn't seem to find any viruses : https://www.virustotal.com/en/file/a4aa8fe98dfcb0a08a71ada1e4f96ae193d8eec06428cd8110cd6a421e7eb7fb/analysis/1373196738/. I tried also to install ENIGMA on this mini-PC and i created an empty project, but the result is the same. Java is up-to-date. To create an 'empty' project, i just do this : right-click sprite, create a new one, and choose an image, then right-click object, create a new one and choose the sprite, and finally right click room, create a new one add the object to the room. In any case, you can download there the exe of the empty project : http://www35.zippyshare.com/v/24257123/file.htmlI know i already told you, but in any case, thanks for your support, TheExDeus, i really appreciate.
|
|
« Last Edit: July 07, 2013, 12:30:21 pm by egofree »
|
Logged
|
|
|
|
|