BASIC

Author Topic: MOUSEAXIS fails  (Read 784 times)

Offline Snoopy

  • Mr. Polyvector
  • ***
  • Posts: 224
    • View Profile
Re: MOUSEAXIS fails
« Reply #15 on: 2019-Feb-23 »
Do you have an example of your problem, Hemlos ?
Not your main code, just an example that sums up the problem you have in your pricinpale program.
Your problem intrigues me ;)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: MOUSEAXIS fails
« Reply #16 on: 2019-Feb-23 »
imagine flying around space in a space ship and your only control, the mouse, stops responding as you are flying into an asteroid field.
asteroid dinner my friend
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Snoopy

  • Mr. Polyvector
  • ***
  • Posts: 224
    • View Profile
Re: MOUSEAXIS fails
« Reply #17 on: 2019-Feb-25 »
  :D Indeed, it's a very big problem for the player
Your problem interests me because I'm also developing a 3D project and have a similar problem, but not exactly the same as you.
But it's an FPS and not a spaceship simulation, that's probably the reason for the difference.

Glad you're found a solution and good luck on your project, Hemlos  :good:

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: MOUSEAXIS fails
« Reply #18 on: 2019-Feb-28 »
  :D Indeed, it's a very big problem for the player

Indeed it is....players will uninstall (i would)  :giveup:

Quote
Glad you're found a solution and good luck on your project, Hemlos  :good:

The solution is more like a workaround.
I did notice some more glitching after testing this workaround for several hours.
The failure still exists, just... not as bad though.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Snoopy

  • Mr. Polyvector
  • ***
  • Posts: 224
    • View Profile
Re: MOUSEAXIS fails
« Reply #19 on: 2019-Mar-01 »
Too bad  :(
With my solution, I totally solved my problem, even if yours is not quite the same, try anyway because I don't think it's a GLB bug, I think is one of the reasons why there is always an option in a 3D game to control the sensitivity of the mouse  ;)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: MOUSEAXIS fails
« Reply #20 on: 2019-Mar-01 »
Too bad  :(
With my solution, I totally solved my problem, even if yours is not quite the same, try anyway because I don't think it's a GLB bug, I think is one of the reasons why there is always an option in a 3D game to control the sensitivity of the mouse  ;)

How do you control a failure in output?
Im willing to try anything, but im pretty sure its a bug in glb, it has something to do with the internal timers somehow.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: MOUSEAXIS fails
« Reply #21 on: 2019-Mar-01 »
Code: GLBasic [Select]
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.14.721 SN:a3f75373 - 3D, NET
Wordcount:3007 commands
compiling:

linking:
success
_______________________________________
*** Finished ***
Elapsed: 16.1 sec. Time: 19:37
Build: 1 succeeded.

Start debug session.
DECLARE entry not found: GetPointerTouchInfo
DECLARE entry not found: EnableMouseInPointer
_______________________________________
Injection started

I just noticed this in v15 debug mode output during compile.
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: MOUSEAXIS fails
« Reply #22 on: 2019-Mar-09 »
Figgured it out..

MOUSEAXIS outputs are realtime, and you have to try and capture the output all through your program.
Even at the end of all nested loops.
What i mean is, MOUSEAXIS value can and does change several times between showscreen calls.

so i used this setup to capture the mouse output many times in the program loops:
function detectmouse
mX = MOUSEAXIS
self.CaptureX = mX

and then at the end of the main loop, just before the showscreen update the delta api mouse

function update_mouse
deltamouseX = CaptureX
delta stuff
CaptureX = 0 // RESET (showscreen should be next)
endfunction

ensure to reset the value so you can start capturing again, after the showscreen

« Last Edit: 2019-Mar-09 by Hemlos »
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)