• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
fir

mouse time resolution, ?

8 posts in this topic

Im wondering what is the mouse resolution (I mean mouse move events)

 

when i draw something like circle gesture it generates a series of points

in mouse move,

Is there some setting or something that say how dense (in time) is this point stream? Is this customizable? How order of sampling is that? What it depends on?

 

Is there a way of saying that when i do with my mouse 'circle gesture'

(dont know how long it takes say 1/4 os secont there is X points in this?

How many 7 ? 10 ? Is it some time sampling say 100Hz or domething?

 

 

0

Share this post


Link to post
Share on other sites

Mousemove gets dispatched at least once every time a pointer position change "in pixels" is detected. Use a high-resolution timer to obtain temporal information. Some "legacy" timers might also do it in theory but in practice their granularity is insufficient.

Raw input is dispatched every time the controller reports a state change. Because it is unfiltered, this will be much, much higher frequency.

As far as I've understood, the device produces a constant stream of data (to its integrated controller) at a steady rate, but I doubt the data to be steadily streamed to host. This is very likely implementation-dependent and you're not really concerned with this anyway.

1

Share this post


Link to post
Share on other sites

Mousemove gets dispatched at least once every time a pointer position change "in pixels" is detected. Use a high-resolution timer to obtain temporal information. Some "legacy" timers might also do it in theory but in practice their granularity is insufficient.

Raw input is dispatched every time the controller reports a state change. Because it is unfiltered, this will be much, much higher frequency.

As far as I've understood, the device produces a constant stream of data (to its integrated controller) at a steady rate, but I doubt the data to be steadily streamed to host. This is very likely implementation-dependent and you're not really concerned with this anyway.

 

I did not understood how you see it, If once a position change it pixels is detected imo it brings to

1) frequenzy resolution at which it is detected

2) if no it would be mean (as mouse ball move is probably continuous not hard jumps) that the mouse move should appear

afret each one pixel change, so gesture 400 pixels long should

move 400 mouse move events 1 pixel long each 

 

?

 

(though i must rethink the answer a bit yet)

 

Ps when i did some test it shows that mouse move events 

seem to depend on frame time, if I run my app with 100 ms

frame time It seem I got only one mouse move with sum up values - It seemed like windows would queue the mouse moves internally and on each query at message pump gives only one

sume up value - so it seem just that mouse reselotion depends on frame time (this is for normal wm_mousemove events,

I dont know how it is for rawinput)

Edited by fir
0

Share this post


Link to post
Share on other sites

if no it would be mean (as mouse ball move is probably continuous not hard jumps) that the mouse move should appear afret each one pixel change, so gesture 400 pixels long should move 400 mouse move events 1 pixel long each 
I don't know of any system giving granting this. You will get your messages in order and, by walking them first to last, you can reconstruct the total movement (which is just the difference end - start).

This is what you can assume.

when i did some test it shows that mouse move events seem to depend on frame time, if I run my app with 100 ms frame time It seem I got only one mouse move with sum up values...
I also observed this. I don't see much use in accumulating the results as it's counter-productive with regards to incremental movements. I'm not saying it's not happening, but it seems much more reasonable to think the device driver gets probed less often at high CPU load. I haven't investigated the issue in detail as I don't really care.

 

By the way, I haven't seen a mouse with the ball in a decade I think - they have sensors anyway and they are not necessarily continuous in nature as this would imply they would need to be finite range. Even if data is produced continuously, they would have to be converted to digital and this will have a non-continuous update.

0

Share this post


Link to post
Share on other sites

Different mice (and input connection methods) will report their data at different rates.

 

Most "gaming" mice are configurable and can be set to crazy frequencies like 1000Hz. I've seen these settings actually overwhelm some older games which I guess assumed that they would get 1 or less events per frame -- it caused these games to have serious delays input lag as their message buffers just filled up continually.

0

Share this post


Link to post
Share on other sites

Different mice (and input connection methods) will report their data at different rates.

 

Most "gaming" mice are configurable and can be set to crazy frequencies like 1000Hz. I've seen these settings actually overwhelm some older games which I guess assumed that they would get 1 or less events per frame -- it caused these games to have serious delays input lag as their message buffers just filled up continually.

 

Where i san set? can i set it in windows? If this mouse frequenzy is setteble how is it set by default?

 

As i said, It seems to me from my test  that when i drain queue

i got only one mouse move message per draining session, like

if windows internally has even 100 points for frame it will sum it up to one

 

I would like to get higher resolution to get smooth mouse cursor paths not 100 pixel jumps... How to obtain this?

 

(I will do some test with drawing this and can post the results 

to show )

 

EDIT

 

i found something in mouse advanced settings

 

[attachment=20620:mouse.jpg]

 

stiil not sure what it can mean 

the first value i can set form 20 up to 200

the second (buffer) up to 300

0

Share this post


Link to post
Share on other sites

not saying it's not happening, but it seems much more reasonable to think the device driver gets probed less often at high CPU load. I haven't investigated the issue in detail as I don't really care.

 

 

dont think so, for me its almost obvious that win  is probably receiving more points in given frame time but it just adds it

and gives to me added result in one query (one per frame) instetad of sending whole bunch of it 

 

but unknow is how often it probes the movement in underlying 

window subsystem

 

Other related question is mouse pointer question - On my eye it

does large jumps

- are those jumps equal to this mouse position probing frequenzy?

- or this is some rendering probing results (at how frequenzy windows draws mouse cursor? screen freguenzy? 70 Hz here for example?)

0

Share this post


Link to post
Share on other sites

i made some simple test how 'dense ' this point streem is like

 

https://www.dropbox.com/s/4rxqsxoxg5i7gmx/mouse_points_stream.zip

 

[attachment=20659:mousepointstream.jpg]

 
the highest resolution i can set in here is 200 points/per second
and this drawing  and test  seem to confirm this to, 
i dont know if this  200 points/s is stable 200 Hz probing but probably
 
if so the times between two points here is 5 milisekonds, this is normal
fast but not so fast mouse moving (I can probably make 3-4 faster mouse gestrures) so it shows that this probing is not so crazy dense * - I would like to be really 1000 Hz not 200 Hz, though slower gestures are quite well probed
(with deltas of 5 pixels or less)
 
* and this is 200 Hz so it is probably 2x of the default 100 Hz, which is acceptable but weak imo
Edited by fir
0

Share this post


Link to post
Share on other sites


I would like to be really 1000 Hz not 200 Hz, though slower gestures are quite well probed

This is less about the operating system, and more about the hardware and drivers of the specific mouse in question.  A cheap, basic mouse will report at a similar frequency to what you're describing, whilst as Hodgman said above a high-precision gaming mouse will report at a much higher frequency.

 

If you want higher precision, buy a higher precision mouse -- you cannot get higher precision out of a lower-precision mouse.

 

 

Complicating this slightly, issues have been reported where higher precision mouses are capped to a lower precision on some versions of Windows 8.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0