Jump to content


Racing Games


  • You cannot reply to this topic
4 replies to this topic

#1 jfz83

    New Member

  • Members
  • Pip
  • 2 posts

Posted 18 June 2006 - 04:16 PM

hello, i have a doubt and i hope somebody can helpme, well:
In the games racing such as, life for speed, need for speed or colin mcrae, richard burns...... etc
The speed is an variable that change with the aceleration, gear and brakes.(in real time)

But that speed we can see it in the screen, when we played.

How i can capture the variable speed to use it in my own program??(in real time)

Thanks for helpme

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 18 June 2006 - 06:19 PM

Your physics system will calculate the speed. (Actually it will calculate the velocity vector, whose magnitude is the speed). Velocity is just the integral through time of the acceleration, just as the position is the integral through time of the velocity.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 893 posts

Posted 18 June 2006 - 06:21 PM

It wouldn't be impiossible to get it directly from the game, since the speed is most likely stored somewhere as a vector of floats. Sometimes, of course the speed is not stored, but calculated as the difference of 2 positions. But it would still be possible...

...If you can find that position in the computer memory. (Wich is highly unlikely.)
...And you can actually acess that memory in the first place. (Wich Windows normally won't let you do.)



My best bet would be to do a live OCR of the speed meter on the screen. It would just require a webcam and some coding skills. (WinAPI for webcam, OCR for the image processing.)


May I ask why?

#4 jfz83

    New Member

  • Members
  • Pip
  • 2 posts

Posted 19 June 2006 - 02:48 PM

good idea, but where i can find information about Live OCR, or information to make that program ???

Thanks

#5 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 893 posts

Posted 19 June 2006 - 07:01 PM

Google is your friend.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users