|
Post by matthew on Jan 7, 2013 22:18:45 GMT -5
Wow, very nice looking game Joe. For a start I think the way that you're updating the Screen is faulty. I noticed that before I watched the Play, the Mouse Pointer was moving around quite slowly. But after I clicked the Run Button the Pointer started moving much faster but started leaving 'Trails' behind it. (Probably because the Screen wasn't being Cleared and Redrawn) The problem you're having regarding erasing the lines which have been drawn before the Play could be easy to solve depending on how you've structured your Code. Just place all your Code which draws the Playing Field in a Subroutine, then when the Player is ready just call the Subroutine again to redraw the entire scene and remove the lines.
|
|
|
Post by joeschmoe on Jan 8, 2013 12:34:00 GMT -5
Thanks very much, Matthew.
When I run it straight out of the editor, it runs smoothly. From the standalone, it's got that lag. Never saw that before with other standalones. But I've never had to deal with running as admin before and the weird things that's causing.
Let me ask this:
It seems to be working OK up until you select Run. When you hit run it does the following,
1) Use GL to clear and redraw field without the assignment lines. 2) Use a for/next to zero certain variables and return all players to non-selected color. 3) Enter a loop to allow the mouse to be active while the players move. 4) Use a for/next to examine each players position against the position he's supposed to move to and update current position.
I use DrawText() and SwapBuffers() at the end of each of these steps, including inside the for/next loops. Is that too many? Or does it matter?
|
|
|
Post by matthew on Jan 8, 2013 19:34:27 GMT -5
Yeah apart from the lag, the game appears to do what it's supposed to.
When you reinstalled Basic4GL did you install as an Administrator?
The problems regarding the Executables running slowly was reported many years ago on the forum, it was supposed to have solved when Tom released a new version of Basic4GL. Are you using the newest version?
I only ever use DrawText() and SwapBuffers() once each in my main-loop. The fact that you're using them more than once might be causing the problems.
|
|
|
Post by joeschmoe on Jan 9, 2013 4:43:39 GMT -5
I have to admit that I'd never encountered that before this computer. So, no. It is the latest version, though, as far as I know. OK, my ignorance is showing. I must use DrawText() and SwapBuffers() dozens of times. But...I'm learning!
|
|
|
Post by matthew on Jan 9, 2013 5:47:43 GMT -5
Last night I asked a question on the Basic4GL Facebook group, to see whether any Windows 7 users had encountered any problems creating or running Executables. The answer was no they hadn't, so it looks like a problem at your end Joe. These problems with Basic4GL (which I've had myself from time to time) are usually solved just by reinstalling.
|
|
|
Post by joeschmoe on Jan 9, 2013 14:20:45 GMT -5
OK. I'll continue to fool around with that and see if it can get corrected. I'll also rethink the way I attempted to get the players moving...something really messed up, there. Thanks for your help, Matthew. I'll be back.
|
|