View Poll Results: What kind of game project are you working on?

Voters
33. You may not vote on this poll
  • Nothing at all. Too busy.

    1 3.03%
  • None, just game engines or tools.

    3 9.09%
  • I make simple free stuff for fun.

    6 18.18%
  • I'm working on a commercial project and can talk about it much. (NDA, etc)

    4 12.12%
  • I'm working on my own creator-owned project.

    12 36.36%
  • I have a lot of prototypes/ideas, but I don't really have any concrete plans.

    7 21.21%
Results 1 to 10 of 52

Thread: Who is writing a game?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #23
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Quote Originally Posted by hwnd View Post
    EDIT: but at the same time, i don't like that the editor will take 100% CPU.
    But it should redraw fast, i tried TThreadedTimer and set it interval to 1ms. It was good, because user can just "paint" tiles on blocks and editor should draw them immediately without any delay. That's why 1ms timer. Although i know that TTimer is limited to >16ms
    A couple of ways to limit your frame-rate (pseudo Code) :

    ATime := GetTime();
    Render();
    While (GetTime() - ATime) < TimePerFrame do
    begin

    Sleep(1);

    {This will free up the CPU - tells the OS Scheduler it can do some other stuff NOTE : it's not garunteed to sleep for exactly 1ms, only garunteed to wait *at least* 1ms. it could sleep for 10ms in this example, for example.}

    end;

    You could use VSync on it's own - that'll just wait on GL Swap Buffer if it's called before it's time for the next frame but the above method offers more control. You should leave VSync enabled regardless, if you want to measure performance it's much better to time how long Render(); takes rather than seeing what your max FPS is.
    Last edited by phibermon; 28-08-2012 at 02:47 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •