Win32 Input Library [Public Version 1.0]

Started by
19 comments, last by Drew_Benton 17 years, 9 months ago
I finally got back to working on some updates after a few days break (been playing Silkroad Online [grin])

Here are the version 0.9 changes:
  • Redid some of the logics of input recording and playback. The file written and read can now be specified in the new API functions.
  • New API functions for input recording and playing.
  • On Input playback, when paused, the time paused is tracked to properly keep input relative. This functionality has not yet been tested though.
  • Moved pricate defines out of this header file into the proper location.
  • The input recording/playback system uses its own custom structure rather than a MSG.
  • Updated examples for playback and recording as well as the how-to.


Now, the input playback and recording system is a lot better than it was before. However, I am not yet happy with it, well the concept of it. THe thing is, input can be played back just as its entered, but how do you handle getting input from the user concurrently while playing back the old input without interfering with the data that is being played back? I was thinking of adding a flag that represents events from played back data, but I'm not sure how much that would help, if any. I was thinking about adding another event loop for played back data, but that would be way too complicated. Anyways, I'll think about it some more later tonight, time for a game break. As for other parts of the library, I think everything is still holding together, but if anyone runs across anything fishy, please let me know!

[Edited by - Drew_Benton on June 16, 2006 10:45:21 PM]
Advertisement
Cool! I'll use it for my Irrlicht-powered Fatal Freedom: All or Everything. I was looking for a non-SDL input library for some time now.



-Anteater (www.decapgames.2ya.com)


This looks great, clean api, excellent documentation and nice license.
I would like to use it, I don't want to be annoying but any idea when you will make the source available? The problem is I want to use it with D, there is a tool to automatically generate bindings but the COFF object file format is not supported by the digital mars linker, so I'll have to recompile the thing with the DM C compiler.
I have to say again that the documentation is great, and looks good too!
This looks pretty nice!

I might just have to use this in my 4E5 entry.
I'm having linker troubles with GCC/MinGW. Does this library work with MinGW or just MSVC?
Quote:Original post by Anonymous Poster
I'm having linker troubles with GCC/MinGW. Does this library work with MinGW or just MSVC?


It should work with MingW, I've tried it out, but I did not yet make a release for it. I'll do that soon, I will spend maybe one more day looking over it and then relase 1.0 w/ source [smile] It does compile though with those two, its just the package is for MSVC right now. I'll get that updated.
Ok guys sorry for the delays, been slacking [wink] Here is version 1.0 which represents the first public release after all of my testing and stuff. Nothing has changed since the last version though. If anyone runs into trouble using it, finds bugs, or anything else, just let me know! Complete documented source is included as well as the docs in a Natural Docs format. Included in the final package is just the docs, which are also online, as well as the header and implementation file. They can just be added to your existing project. I've tested this with a wide varitey of compilers, so it should work fine with DevCpp and all VS versions from 6.0 and above.

Input Library 1.0

I hope you guys enjoy it! If you have any trouble with the source just let me know, I'm around [smile]
Wonderful job, it was very nice of you to keep this "developper log" on this thread, it was interesting to note your progress.

I'm going to start using your library right away!
I agree with Trillian, I had bookmarked this and it was a very nice effort of presenting your work and making it usable for others. While I won't use the lib I will look at natural docs, never heard of this until now
Thanks guys, I appreciate it!

Sadly though, I'm going to hae to axe support for SDL and all my "intuitions" that this library should work with any 3rd party library. It would seem that in SDL, TranslateMessage is not being called along with DispatchMessage, so certain messages are never received. Furthermore, there is something else going on so I'm getting 2x of each event that I'm not supposed to.

Now seeing this, I'll make the updates to the library docs so it's more accurately represented. I fixed the TranslateMessage problem with SDL, but I'm still looking for the other bug where 2x events are being processed. I think I'll switch frameworks for my little 2D lib I'm working on. Tis a shame, maybe I'll try to get on the mailing list to see why certain Win32 stuff is not being used with SDL.

I'll also be on the lookout for more bugs and any improvements, now that I have a chance to use it in practice. While I'm at it, for anyone using OpenGL and needs a GUI, check out SXML GUI (by JavaCoolDude). Aside from the two bugs I found with SDL itself, I was able to easily integrate that GUI and my input system together, so I'm very happy with the design of both [smile] I'm going to be switching frameworks to GLFW probabally, so I'll post either a new reply here or a new thread showing the relation of the input library with the GUI lib and the rest of my code.

Cheers and thanks for the feedback!

This topic is closed to new replies.

Advertisement