Jump to content
  • Advertisement
Sign in to follow this  
xorjesus

Curious about recording input on harddrive for later access in game loop

This topic is 5089 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently having a blast programming right now. This is the first time i've ever done what I consider real programming and it sure is fantastic. I'm using fixed time steps right now, and my input function is seperate from my logic and renderer. I need a way for my input and text strings to later communicate with my game logic and the renderer. I was reading somewhere that saving the input and text logic to the harddrive for quick access later on the game loop is a really great system for my current programming paradigm. Have any of you tried this? How many ms does it take to read and write to the harddrive? We're not talking War and Peace here, probably just an average of a byte or two. Spikes of 100 or 200 bytes when chatting is going on. Also it seems very flexible if later I want to add the feature of a user recalling old text. and stuff. Thanks for any help or ideas. Creating Games rox! *Sorry for any grammatical, spelling, or otherwise sloppy errors. Programming and school is replacing sleep, and caffinee is effecting my dexterity. This is a good thing when I'm coding of course :] 120+ wpm! Oh and the brain is a little.. Non-Linear at times.*

Share this post


Link to post
Share on other sites
Advertisement
Saving to the hard drive for later use in the loop? That seems like a lot of extra work and a potential performance problem. How about using a standard queue in memory?

Share this post


Link to post
Share on other sites
That's what I think would be the most effecient method as well. But I'm still curious to hear what other people have tried with this, or just their ideas.

Share this post


Link to post
Share on other sites
disk I/O sloooooooow. memory big. use a dynamic memory structure like the std::queue mentioned before. writing to a file will make your app run like molasses.

-me

Share this post


Link to post
Share on other sites
What I do (which probably isn't the best way) is set up a seperate input class in my games. I then make various event duch as KeyUp, MouseRightDown, MouseMove, etc. I then use my driver class (Form1) to collect these messages then send them to the appropriate classes on the next render loop (mainly the camera class). These classes will then handle the input however they need to. I like this method because it is easy to set up (at least in .NET/MDX) and it runs fairly efficiently.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!