-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement async timers to power the movement of game pieces #6
Comments
Just as an update - working on this, however converting my Ticker API to the second level has had a bit more complexity than anticipated, lots of circular references to sort out. Got it figured (I think) so should be on its way soon:) |
@Greedquest Hey - I've been so swamped with work lately that I haven't had time to work on this at all. But, with the holidays, I'm starting to get some free time again. Really curious to see what you had come up with for this, even if its not working. Hope you are well. |
Yeah tell me about it! Let me catch you up on what I found: So I got the timer addin integrated as another reference. The main functional change was in this commit Greedquest@657f112 It was pretty easy to get working (your code is very clean as a starting point!) although there's an intermittent issue with refresh rate which needs to be addressed (Excel doesn't seem to be generating/ processing WM_PAINT messages sufficiently quickly - DoEvents forces a repaint but is what we're trying to avoid. It's possible manually posting paint messages will magically fix this, or a small scroll or something). It was in diagnosing this issue that I got a bit sidetracked. The reason I created the asynchronous timer addin was to make developing with WinAPI timers easier. Actually stress testing in a real project has been a great learning experience and has revealed a number of things, most importantly:
A ray of hope in fixing problem 2 is thanks to problem 1. The fixes tend to be quite complex, but in brief, you'll be aware I'm sure of RD's unit testing? They have a clever way of invoking VBA methods by accessing the COM interface to them directly rather than through the VBE (CallByName) which means they can gracefully handle stop button presses without leaving the thread unresponsive. This method of calling should be possible to replicate in pure VBA, and I'm hoping by putting the calling code in an addin it will still be "alive" to handle the stop button press. Sorry bit complicated and I haven't explained it super well, but it's covered in my musings in these 2 issues:
Anyway those are development issues and don't affect the functional capabilities of the Pacman code. Back to this project, I think these 2 things would be good to focus on:
|
Lets explore using @Greedquest 's async timers framework.
The text was updated successfully, but these errors were encountered: