Hello everyone!
How are you?
I’m finishing rebuilding a game from the 80s, FatCat, originally programmed by Randy Salo in 1981 at the request of HP.
(Still awaiting formal authorization to publish…)
I’m in the final stages, and I’m racking my brains to solve a problem with the “Mouse” control.
At first, I started using KeyDown and soon realized (and was told) that I was going the wrong way.
// wdwGame → keyDown Event
Select Case key.Asc
Case 30
c_game.myMouse.Move("UP", c_game)
Case 29
c_game.myMouse.Move("RIGHT", c_game)
Case 31
c_game.myMouse.Move("DOWN", c_game)
Case 28
c_game.myMouse.Move("LEFT", c_game)
End Select
The correct option was to use Keyboard.AsyncKeyDown, so I can control the speed of the “Mouse” movement
// inside a timer, every 100ms
// and of course, i can speed up or down, just changing the perio
If Keyboard.AsyncKeyDown(getKeyCode("Arrow Up")) Then
c_game.myMouse.Move("UP", c_game)
ElseIf Keyboard.AsyncKeyDown(getKeyCode("Arrow Right")) Then
c_game.myMouse.Move("RIGHT", c_game)
ElseIf Keyboard.AsyncKeyDown(getKeyCode("Arrow Down")) Then
c_game.myMouse.Move("DOWN", c_game)
ElseIf Keyboard.AsyncKeyDown(getKeyCode("Arrow Left")) Then
c_game.myMouse.Move("LEFT", c_game)
End If
The problem I’m having, and I can’t solve, is that I feel like I’m mistiming the “Mouse” direction. Sometimes it changes before, sometimes after… I can’t quite explain it!
So here’s a copy of the game, only one level, compiled for Mac.
https://fatcat.alemac.com.br/FatCatDemo.zip
And for windows:
https://fatcat.alemac.com.br/FatCatDemoWin.zip
(still need to create an installer exe)
If anyone with gaming experience could give it a try and shed some light on it, I’d be immensely grateful.
Alex