Results 1 to 10 of 179

Thread: nxPascal

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    Quote Originally Posted by JC_ View Post
    1) there is no demo for control (mouse and keyboard) - key repeat, key down, key up, keypressed, doubleclick.
    2) frame rate limiter is not accurate, is set to 60 FPS but jumping from 62-63. It is a bit problematic in the calculations of moving objects etc. It should be exactly 60 FPS.
    3) will be fine basic demo with accurate physics (movement) independent of the framerate
    Didn't notice this message before. The Picking demo makes use of mouse, keyboard and frame timing. There is a difference between how many times frame is rendered, and how many times gametick is calculated. Frame times can differ because frameskipping is in use by default. However amount of gameticks per second should always be the same on every machine. These are controlled with methods SetFrameInterval() and SetFrameSkipping(). By default the frame interval is set to 16, where 1000/16 makes for 62.5. 1000 is not divisible by exact 60, you would get 16.6666666. But this is closest you get to vsync ratio of 60 fps. Also all this is the reason i made GameTemplate demo To make it very easy to start new project, with all the input and frame handling placed ready.

    You seem to have different version to mine (3339 lines in nxGL.pas by the way...), i have different code on that line. Also i tried setting range-checking on in Delphi 7, and then called the TGLTextureSet.AddEmptyTexture(), which seems to be function you mean. I don't even get any compiler hints. Not getting any hints in Lazarus either. Delphi code uses SysUtils.PByteArray type for the data array, which means
    TByteArray = array[0..32767] of Byte;
    Sure, textures like 512x512 with alpha channel use over 1 million bytes of data, and would sure go over boundary.
    Would you check if this fixes it?
    Data^[i*4+3]:=255;
    Because after all we refer to pointer allocated data, not static array. And now that i think about it, it could possibly be replaced with setlength() implementation.
    Last edited by User137; 21-06-2013 at 02:45 AM.

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
  •