Jump to content

  • Log In with Google      Sign In   
  • Create Account

Frank Force

Member Since 05 Jan 2009
Offline Last Active Apr 26 2013 01:06 AM

Topics I've Started

Expert question: How to get a better time delta?

31 March 2013 - 02:40 PM


I'm working on a game engine and something occurred to me about how accurately we are measuring the delta between frames.  I normally use a timer to check the delta, but even when running vsynced the measured delta is never exactly equal to the vsync interval.  On average it's equal to the vsync interval but the measured delta time can fluctuate quite a bit.  This means that if you have a fancy fixed time step with interpolation it's still going to be wrong because the delta that is being represented between frames will not ever be equal to the vsync interval, even though the frames themselves are always shown at exactly the refresh rate.  This causes a tiny bit if jitter that maybe most people don't notice but I do, and it was really starting to bug me. Clearly something must be done to correct the discrepancy, right?
Please understand that using a fixed time step with interpolation is not going to fix this issue!  What interpolation fixes is temporal aliasing, this is more like temporal fluctuation. The solution I worked out corrects the time delta in advance so it will always be in phase with the vsync interval. My game engine runs incredibly smooth with this enabled so I already know that it works.
My question is, am I crazy or is this kind of important for every game engine to have?  Is there some other more simple method I am unaware of that people use to deal with this?  I tried posting in a few other places but no one seems interested or maybe they just don't understand what I'm talking about.  One guy was very insulting and basically called me a noob... I've been working in the game industry at major studios for over a decade. If just one person can understand what I'm talking about and/or explain why I'm wrong that would be totally awesome.  Here's a link to my blog post with more info and code...


3D Bonsai Tree Game

11 January 2009 - 05:02 PM

GoBonsai is a prototype of interactive bonsai tree software. Eventually I would like to build a full game around it, but for now I’m releasing what I have which is a pretty nice demonstration of the engine with one tree type and a simple interface. Many features are planned for the future like ability to save and load trees, more tools, wiring, root trimming, pot selection, scenery, higher quality rendering, etc. Beta testers are needed. The website is www.bonsaigame.com Screenshot 1 Screenshot 2 - Frank Force

Best way to load a webpage from C++

11 January 2009 - 05:41 AM

I am working on a windows screensaver in a multi-threaded environment. Trying to load a webpage when someone clicks on a button. Was using the code... ShellExecute(NULL, L"open", L"http://www.frankforce.com", NULL, NULL, SW_SHOWNORMAL); Worked ok except there was a bug. I use zonealarm so when the firewall popped up about this program trying to access the internet I decided to try blocking it's access. This caused the thread to never exit and the program to stay running in background even though you could still set the settings and click the ok button. Eventually multiple copies would be running in background until manually shut down. Checked in debugger and saw that the ShellExecute function never exits in this case. Read up on stuff. Now using new improved call to open webpage. SHELLEXECUTEINFOW shellInfo; ZeroMemory (&shellInfo, sizeof (SHELLEXECUTEINFO)); shellInfo.cbSize = sizeof(shellInfo); shellInfo.fMask = SEE_MASK_ASYNCOK; shellInfo.lpVerb = L"open"; shellInfo.lpFile = L"http://www.frankforce.com"; shellInfo.nShow = SW_SHOWNORMAL; ShellExecuteEx(&shellInfo); The key difference is the SEE_MASK_ASYNCOK which kicks control right back after the call. Seems to work well now. But I noticed a glitch maybe a security hole in zone alarm. If i disallow my program's access and then just rapidly click on the button that tries to load the webpage eventually it will load the webpage even though zonalarm should prevent it. What's going on here? - Frank Force

Infinite Recursive Crossword Puzzle

08 January 2009 - 06:26 AM

Hi! I just release the first demo of a project I am working on called "The Infinite Words Screensaver", the world’s first (and only) infinitely recursive crossword puzzle. Please try it out and send me feedback and also if you could enable "Show Fps" and tell me what it is on your rig. I posted a screenshot below but you really need to see this effect in motion. Download it at www.frankforce.com Thanks! Infinite Words Screenshot - Frank Force