Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Goblin's Gold Board Game
#3
Thumbs Up 
Hi Donald, good to see from you again!
Quote:I wanted to mention, sometimes it takes several mouse clicks before the game will respond to that board position. If someone can figure out what is causing this to happen, that would be great. Thanks in advance.

Try this code substitution for same section of code:
Code: (Select All)
GetMoveInput:
Do While _MouseInput: Loop  ' this is proper way to poll the mouse don't put stuff inside this loop except to get _Mousewheel
For Z = 0 To 20
    For Y = 0 To 20
        If _MouseX > BoardX(Z, Y) - 19 And _MouseX < BoardX(Z, Y) + 19 And _MouseY > BoardY(Z, Y) - 19 And _MouseY < BoardY(Z, Y) Then selected = 1 Else selected = 0
        If _MouseButton(1) = -1 And selected And Playable(Z, Y) Then _Delay .25: GoTo CheckWizzardMove ' delay should be enough time for player to release button
    Next
Next

A$ = InKey$: If A$ <> "" Then If Asc(A$) = 27 And FullScreen = 0 Then FullScreen = -1: _FullScreen _SquarePixels , _Smooth Else If Asc(A$) = 27 Then FullScreen = 0: _FullScreen _Off
GoTo GetMoveInput

Besides the Mouse Polling that looks like nicely written game <300 LOC no assets needed!
b = b + ...
Reply


Messages In This Thread
Goblin's Gold Board Game - by Donald Foster - 05-02-2023, 05:10 AM
RE: Goblin's Gold Board Game - by Donald Foster - 05-02-2023, 12:54 PM
RE: Goblin's Gold Board Game - by bplus - 05-02-2023, 02:40 PM
RE: Goblin's Gold Board Game - by Donald Foster - 05-02-2023, 04:12 PM
RE: Goblin's Gold Board Game - by bplus - 05-02-2023, 07:39 PM
RE: Goblin's Gold Board Game - by Donald Foster - 05-02-2023, 08:16 PM



Users browsing this thread: 1 Guest(s)