Hello Guest

Recent Posts

Pages: 1 ... 8 9 [10]
91
Help / Re: 100% CPU core usage with empty Scene?
« Last post by Kyle on November 14, 2015, 11:21:09 AM »
I'm on Windows 7.

If you're used to using DeltaTime in your games then setting fixed framerate to false should be what you want to do.  I'm still unsure as to why you experience weird time issues with fixed framerate on though, but using realdeltatime to do stuff in fixed framerate mode is probably not going to be very reliable.
92
Help / Re: 100% CPU core usage with empty Scene?
« Last post by hinst on November 14, 2015, 03:06:06 AM »
I am not sure, but seeing this comment in code:
Code: [Select]
// Not running Windows 8 or higher.
perhaps Windows 8 + is required for MediaTimer. Do you run Windows 8?
// I only wrote class App; I copied MediaTimer class from some page

-----
I tried to set Game.FixedFramerate = false; seems like it resolves my problem; both framerate and RealDeltaTime.
When I set FixedFramerate = false then I get update-rate = 58...62.
When I set FixedFramerate = true then I get update-rate = 31 and things move approximately 1.8x faster than they should
93
Help / Re: 100% CPU core usage with empty Scene?
« Last post by Kyle on November 13, 2015, 02:28:04 PM »
I get the "High resolution clock isn't available." exception, am I missing something to run this example?
94
Help / Re: 100% CPU core usage with empty Scene?
« Last post by hinst on November 12, 2015, 11:33:23 AM »
I created a minimal app which reproduces the problem with frame rate and frame time measurement. It only has an empty scene

Testing app: http://pastebin.com/pghTVszW
What I get: https://drive.google.com/file/d/0B9QPF4Dcx5xtRVVPbzZWVTJ6R0U/view?usp=sharing

When I first noticed the problem with time measurement, I searched the internets a bit and found two more possible methods of time measurement in C#: QueryPerformanceCounter and some MultimediaTimer. I write results obtained from each timer to console and I get very different results

Output as plain text: http://pastebin.com/UwXAi2Fq

MultimediaTimer seems to give more accurate result but I am not sure yet; QueryPerformanceCoutner is mad which is strange. I used QueryPerformanceCounter API from native non-.net apps and it worked fine
95
General / Re: Error when using keys
« Last post by Frankity on November 12, 2015, 09:31:29 AM »
Are you creating a button for "Left" before trying to use it?  It appears as if the button is null when trying to check it (the null reference exception)

yes, i was confused with this but after reading the doc, i found a nice and clean solution :D, thanks
96
General / Re: Error when using keys
« Last post by Kyle on November 12, 2015, 09:28:13 AM »
Are you creating a button for "Left" before trying to use it?  It appears as if the button is null when trying to check it (the null reference exception)
97
General / Re: Error when using keys
« Last post by Frankity on November 12, 2015, 09:23:18 AM »
hi again,

i fixed the thing using some code:

Code: [Select]
var axis = AddComponent(Axis.CreateWASD());
            var movement = AddComponent(new BasicMovement(400, 400, 10));
            movement.Axis = axis;

and this:

Code: [Select]
if (Input.KeyDown(Key.A))
            {
                X -= moveSpeed;
                sprite.Play("walkLeft");
                sprite.FlippedX = true;
                direction = Global.DIR_LEFT;
            }

thanks anyway :D
98
General / Error when using keys
« Last post by Frankity on November 12, 2015, 08:09:55 AM »
hi, i was trying to follow the Otter 2D Top-Down Adventure Tutorial, but i can't keep working on it due this error, the key assignation in the tutorial are different in relation with the actual version of Otter.

the Otter 2d top... code look like this:

Code: [Select]
Global.PlayerSession.Controller.Up.AddKey(Key.Up);
and the code for the actual version of Otter, my code in this case is this:

Code: [Select]
Global.PlayerSession.Controller.AddButton("Right", "Left");
the problem is when i run the game this exception appear:



is there a way to handle or fix it?
99
Bugs / Re: Otter.Text ctor bug
« Last post by Kyle on November 11, 2015, 05:58:48 PM »
Thanks for the example, I think I pushed a fix in the dev branch that fixes this.
100
Bugs / Otter.Text ctor bug
« Last post by hinst on November 11, 2015, 02:42:24 PM »
Here is an app which reproduces the problem
http://pastebin.com/j6RHviQb // just one source file
Pages: 1 ... 8 9 [10]