Post

 Resources 

Console


Re: World Build - messix (0 replies, 935 views) (2004-May-4)
-
Wow Dan thanks heaps for all the feedback mate! Really appreciate it! There's not one thing I don't agree with what you said so I'll implement them all in. Interestingly, I originally had it so the mouse worked pretty much like what you said would be a nice change - when you moved the mouse over the main picture box it would send the mouse back into world build and if you moved the mouse to any edge of the tile that you were working on the mouse would go back to the system. This obviously didn't work to well as you couldn't get to and of the edges on the tile. Should work pretty well if I only do it on the picture box side though. Ok, the FPS calc. It's worked out as per the example given on Jack's DirectX 4 VB site (never found a better way to work it out then that) with the example below: If GetTickCount() - LastTimeCheck >= 1000 Then FrameRate = FramesDrawn FramesDrawn = 0 LastTimeCheck = GetTickCount() lblWorldName.Caption = World.strWorldName & " FPS: " & FrameRate End If FramesDrawn = FramesDrawn + 1 DoEvents The above code sits in the main game loop, which is the way I've always done it. I thought this displayed the correct FPS as when I first started developing on the older PC it used to go down to numbers like 8, 13, etc. If there is something wrong with that then please tell me and I'll change it ASAP. Note that GetTickCount() is a direct call to the windows API: Public Declare Function GetTickCount Lib "kernel32" () As Long


-
Up One Level | Back to News


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 58 visitors within the last 20 minutes
RSS News Feed