Hiya...
Have installed DB Classic on Win 7 x64 and having no problems. However, DB Classic will not respond to upkey, downkey, leftkey, rightkey and scancode returns 0 when anything is pressed.
I am using the following sample code (which was working). Weirdly enough a similar problem exists when using DB Pro, but AppGameKit seems to be fine.
Any thoughts
Thanks in advance
`turn on windows mode
set window on
`set screen resoltion to 800x600 at 32 bit colour
set display mode 800, 600, 32
`tell DB that refresh is under program control
sync on
`set refresh rate to 30 frames per sec.
sync rate 0
`hide mouse pointer
hide mouse
`load
load image "player.png", 10
`set start position of image
xPosition = screen width() / 2
yPosition = screen height() / 2
`position the player
sprite 1, xPosition, yPosition, 10
`play title music
play sound 1
`sleep 4000
`all games need a loop
do
cls
text 100,100, str$(timer()) + " : " + str$(scancode()) + " : " + inkey$()
`check for movement
gosub CheckPlayerMovement
sync
loop
```````````````````````````````````````````````````````````````````````````````````````````````````````````````
CheckPlayerMovement:
`check for key movements
if upkey() = 1
yPosition = yPosition - 5
endif
`task 1 - code the other keys so that the player can move around the screen.
if downkey() = 1
yPosition = yPosition + 5
endif
if leftkey() = 1
xPosition = xPosition - 5
endif
if rightkey() = 1
xPosition = xPosition + 5
endif
`task 2 - run the game, what do you notice, how can we fix the problem.
if yPosition < 0
yPosition = 0
endif
if yPosition > 575
yPosition = 575
endif
if xPosition < 0
xPosition = 0
endif
if xPosition > 783
xPosition = 783
endif
`move the player
sprite 1, xPosition, yPosition, 10
return