This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 »
1261
General ENIGMA / Re: Overuse of the CPU ?
« on: July 05, 2013, 02:01:31 am »
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%)?
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%)?
1262
General ENIGMA / Re: Overuse of the CPU ?
« on: July 04, 2013, 03:16:37 pm »
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.png
So I clearly don't have it. It is weird that sleep eats so much CPU for you though. Maybe forthevin knows more.
Here is mine: http://imageshack.us/a/img59/1533/52h1.png
So I clearly don't have it. It is weird that sleep eats so much CPU for you though. Maybe forthevin knows more.
1263
General ENIGMA / Re: Overuse of the CPU ?
« on: July 04, 2013, 05:56:33 am »
Well first, GL1 doesn't work for me but GL3 does. So that is also weird.
Second, was this for empty game?
And can you give the information about profiling - like the time and cpu usage inside the debugger. The information you provided is what GL functions it called, but sadly it doesn't give information on how long they took.
I can render an empty room with just 1 object which draw fps with 0% CPU load. Even when I render 999FPS. When I set it to 9999FPS then I get 2400 actual FPS and cpu load is 16%. This is on a laptop with an ATI card and 2.5Ghz I3. When I check CPU load with profiler I get 3-12% and it varies all the time. In the task manager I still get 0% though.
Do you use any anti-virus?
Thanks about the profiler link. Didn't know it's freeware now. It is very good profiler.
edit: And Robert, do you plan to remake all the drawing functions OGL3? I see that it still uses immediate mode.
Second, was this for empty game?
And can you give the information about profiling - like the time and cpu usage inside the debugger. The information you provided is what GL functions it called, but sadly it doesn't give information on how long they took.
I can render an empty room with just 1 object which draw fps with 0% CPU load. Even when I render 999FPS. When I set it to 9999FPS then I get 2400 actual FPS and cpu load is 16%. This is on a laptop with an ATI card and 2.5Ghz I3. When I check CPU load with profiler I get 3-12% and it varies all the time. In the task manager I still get 0% though.
Do you use any anti-virus?
Thanks about the profiler link. Didn't know it's freeware now. It is very good profiler.
edit: And Robert, do you plan to remake all the drawing functions OGL3? I see that it still uses immediate mode.
1264
Off-Topic / Re: Simulation of the 6502 CPU
« on: July 03, 2013, 04:59:50 pm »
This is truly awesome. Creating something that can compile its assembler is one thing (and not really particularly hard. I have done that for a MSP430 microcontroller), but simulating it in a silicon level where you can see every signal is a whole new level. Very impressive. It's possible to simulate CPU's in programs like Labcenter's Proteus, but there it just has a model on how it works and what signal does what. It is still very cool to see how a uLinux runs on a simulated PC by loading from ROM into RAM and executing functions on a simulated Z80 (if I remember correctly) CPU.
1265
General ENIGMA / Re: Overuse of the CPU ?
« on: July 03, 2013, 04:49:31 pm »
But the timer works between frames, I am thinking something goes wrong during the rendering (or as nothing is really rendered, then the buffer flipping). Still, profiling can be done and checked why it consumes CPU like that. I have almost identical PC to him and I don't have that problem. I still think he should also try some games or example to check if CPU usage actually increases. Maybe because of some compatibility problems the 13% will be the default and additional computation will not really increase that.
1266
Proposals / Re: Adding a 'Donate' button
« on: July 03, 2013, 04:41:32 pm »
I'll take your money!
But in any case, if the maintenance costs become too much (for the site) then Josh could always just make the wiki style banner saying - "We have X amount of dollars out of Y amount needed this month for servers". That way there will be no excess as people wouldn't donate if not needed and the money would go only to cover the expense. I don't think that is a problem though, as I think the server costs are not that big. If Ism and Josh for some reason don't want to or can't cover the expenses, then I am sure there are other developers here (including me) who could do that for them.
But in any case, if the maintenance costs become too much (for the site) then Josh could always just make the wiki style banner saying - "We have X amount of dollars out of Y amount needed this month for servers". That way there will be no excess as people wouldn't donate if not needed and the money would go only to cover the expense. I don't think that is a problem though, as I think the server costs are not that big. If Ism and Josh for some reason don't want to or can't cover the expenses, then I am sure there are other developers here (including me) who could do that for them.
1267
Issues Help Desk / Re: Wait until an instance is destroyed
« on: July 03, 2013, 03:37:36 pm »
Did it also fix you instance_create problem? That seems to depend where you want to create them. If they are made in the room (via placing the instances) then it they will be created and run for 1 step before you will be able to deactivate them. What you can do is deactivate the enemy instances at the create event of the same instance (like it deactivates itself). Then wait 1 step for all objects to be created and then create the obj_start_level. This will make sure the enemies are invisible and that all of the other objects are created.
1268
General ENIGMA / Re: Overuse of the CPU ?
« on: July 03, 2013, 02:31:59 pm »
Well anything is possible, but CPU load shouldn't be changed by the graphics system. Maybe some more detailed profiling is possible to see what exactly the game is doing on the CPU. Looking at this thread http://social.msdn.microsoft.com/Forums/vstudio/en-US/ef38c900-f2e2-4ae7-8e03-2a3941805aa3/profiling-what-code-causes-high-cpu-usage even the most basic timer profiling could do the trick. You could check which function executes the longest and thus see why it shows that CPU usage at 13%. In that case it is possible that the some GL function (like GL swap buffers or something) cause a stall which takes a larger amount of time and thus shows up as higher CPU usage (while in reality CPU was just waiting).
Try turning off the background in room, if that doesn't show anything then set automatic redrawing to false. I don't think "Sleep on minimize" thing is implemented, but if it is then try that as well.
Try turning off the background in room, if that doesn't show anything then set automatic redrawing to false. I don't think "Sleep on minimize" thing is implemented, but if it is then try that as well.
1269
Issues Help Desk / Re: Wait until an instance is destroyed
« on: July 03, 2013, 08:52:53 am »
screen_redraw(); only calls drawing events. So unless you put the destruction timer in the draw event of the obj_start_level then it will not work (as it will never be destroyed). But I don't get what exactly you mean by "i don't the want the sprites to move before the animation is finished"? That is, you don't want anything to actually move on the screen? If you do any position updates or sprite index changes in the draw event then they will still move. If you do that in step and use exclusively drawing in the draw even then the screen_redraw(); could still work. Although I don't think animation is updated (the image index) in draw event, but in the step event,. So either put the destruction in the draw event or add a timer in the while(){}. Like:
Also it's possible to use surfaces. This would speed it up (but loose some compatibility with ancient hardware) and would allow cool effects. GM transitions uses surfaces.
Code: [Select]
timer = 0; //This in create
while (instance_exists(obj_start_level))
{
screen_redraw();
timer += 1;
if (timer>30) with (obj_start_level) instance_destroy();
}
Or maybe:Code: [Select]
while (instance_exists(obj_start_level))
{
screen_redraw();
obj_start_level.image_index+=1;
}
But I think all the checks (like calling animation end event) are done in step event. And if you manually change the image index then it probably won't even call the event. So maybe adding an if (obj_start_level.image_index>sprite_number) would fix it.Also it's possible to use surfaces. This would speed it up (but loose some compatibility with ancient hardware) and would allow cool effects. GM transitions uses surfaces.
1270
General ENIGMA / Re: Overuse of the CPU ?
« on: July 03, 2013, 08:42:12 am »
I doubt DirectX would change anything. It just happens that for some hardware/software combinations stuff like that happens. I doubt the CPU use would increase even if the room wasn't empty. Just like when people cried that GM games are 2mb even when just having 1 empty room, but when you make the game it usually grows to only 4mb. So it's hard to tell why it shows 13% CPU load, but it's possible the load wouldn't change with a basic game.
Maybe now something has changed? Like downloaded newer drivers or installed/uninstalled something and it shows a different load now?
Maybe now something has changed? Like downloaded newer drivers or installed/uninstalled something and it shows a different load now?
1271
SHUPAER123'S HOME / Re: I like to sux off Robert
« on: July 03, 2013, 08:38:29 am »
I cannot vote because the cursor is a troll face.
1272
General ENIGMA / Re: Use Paths in ENIGMA.
« on: June 30, 2013, 07:09:51 am »
I haven't tried anything. I also don't really have problems with it doing it the way I do it now. So I can wait until the compiler is finished.
1273
General ENIGMA / Re: Use Paths in ENIGMA.
« on: June 29, 2013, 03:31:03 pm »
Well that will work as the speed will be controlled by move_towards_point. On the other hand the points from path_get_x/path_get_y will be closer or more separated depending on the place on the path. If it worked correctly then you wouldn't need that move_towards_point, it would work with the code I posted.
1274
General ENIGMA / Re: Use Paths in ENIGMA.
« on: June 25, 2013, 01:32:57 pm »
We could create a competition like that. ENIGMA doesn't have resource manipulation functions (for objects that is) so can't cheat. You can create sprites by rendering on surfaces (you can't load sprites either, everything must be one script).
time-killer-games: I tested the functions before I posted. When you set the path to linear it works perfectly fine (even the speed parameter for points), but with curved paths it sadly doesn't have that constant speed.
time-killer-games: I tested the functions before I posted. When you set the path to linear it works perfectly fine (even the speed parameter for points), but with curved paths it sadly doesn't have that constant speed.
1275
General ENIGMA / Re: Overuse of the CPU ?
« on: June 25, 2013, 01:27:10 pm »
Empty games usually use more CPU. Just like the most intensive part of SC2 was the menu (where there was a sphere rendered). The same here. Your GPU has nothing to do so the CPU boost to the max. It shouldn't really happen at 30FPS though. I previously found a problem that having the room_speed set over the max CPU/GPU can handle, then CPU will spike to 100% (for the one core it runs on), you lower the FPS by 1 (like 61 to 60) and it falls to 0%. We need a more intelligent system which would run in the background and monitor and change the performance. Although VSYNC and adaptive vsync (which we should implement, it's the same function like we have now, but with -1 set instead) it usually doesn't happen.
And I just tested with one animated sprite with one object and in one room with default 30fps. I get 0-1% CPU load. I also have i7, 16gigs of RAM and 660TI. So it could be something else on your side. Is something else using the CPU? As I said, it seems to use a lot of CPU when it can't catch up. So if you can't easily render 30FPS because of some massive processes, then the game could just up in CPU usage. It seems like a devilish circle, but for now I don't know what can be changed. For me that happens when I render over 300FPS (or more) in the 1mil cube demo.
edit: Also I though we had a memory leak because ram usage kept increasing from about 18mb on startup to about 20mb after about 1 minute. Then it stabilized though. I don't think we cache anything so it seems weird.
And I just tested with one animated sprite with one object and in one room with default 30fps. I get 0-1% CPU load. I also have i7, 16gigs of RAM and 660TI. So it could be something else on your side. Is something else using the CPU? As I said, it seems to use a lot of CPU when it can't catch up. So if you can't easily render 30FPS because of some massive processes, then the game could just up in CPU usage. It seems like a devilish circle, but for now I don't know what can be changed. For me that happens when I render over 300FPS (or more) in the 1mil cube demo.
edit: Also I though we had a memory leak because ram usage kept increasing from about 18mb on startup to about 20mb after about 1 minute. Then it stabilized though. I don't think we cache anything so it seems weird.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 »