Any possible ideas/plans for a keyboard handler in FB? - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: General (http://qbasicnews.com/newforum/forum-6.html) +--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html) +--- Thread: Any possible ideas/plans for a keyboard handler in FB? (/thread-5361.html) |
Any possible ideas/plans for a keyboard handler in FB? - Adigun A. Polack - 12-15-2004 Dearest all of you fine QB45/QB71/FB community: Konnichiwa!!! (That means âHelloâ in Japanese.) ! Kicking this off, I can remember right up front that there were keyboard handlers for QBasic/QuickBASIC that were so extremely useful for game programming and stuff, mainly due to the fact that when you press/hold a key, your character(s) just simply moved and kept going and going and going rather instead of that syndrome of âstep, stop, and goâ on the characters, which can grow very mundane and tiresome to at least some people, you know? The three (3) examples in QB based on what I am talking about in this are: _______________________________________________
And, the QB-created games that I simply know of that had their keyboard handlers successfully implemented were Mono Space, Wetspot II, and the continually-developing Frantic Journey to name just a few. =b So, with all of that in mind now, do any of you people have a fresh idea or more for building some sort of keyboard handler like that in FreeBasic? All plans and suggestions pertaining to this topic are *most* welcome!! And, any lib at all presented in FB that has a built-in keyboard handler is also allowed in this topic, too! ^_^ ! Well, I thank you all so very much for your wonderful time and consideration. Talk to you soon. :king: WITH SUCH BRIGHT SUCCESS TO YOU, Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ Any possible ideas/plans for a keyboard handler in FB? - Jofers - 12-15-2004 FB can use popular libraries that already exist for windows and such. GetKeyState has been added to the Windows API routiens that come with FB, but I'm not sure if it has been released yet. SDL is also a popular library that contains keyboard routiens. Any possible ideas/plans for a keyboard handler in FB? - barok - 12-15-2004 it's not too hard to use sdl's commands, and i'm not sure, but since qbgfx4fb uses sdl, wouldn't you be able to use sdl's routines as well? Why not just use sdl's getkeystate command? Just use sdlkeyb.bi as a reference. Any possible ideas/plans for a keyboard handler in FB? - Sterling Christensen - 12-15-2004 Quote:and i'm not sure, but since qbgfx4fb uses sdl, wouldn't you be able to use sdl's routines as well?Yep. I second that. ^_- - Adigun A. Polack - 12-15-2004 To Barok: So far, I am gonna agree with Sterling here, man. =b And you know something, while I havenât as of yet experienced FB programming for myself (though I would *really* love to do so someday, ESPECIALLY with Sterlingâs own lib already out and an FB version of Rellib waiting in the wings here! ), I have just looked at the file âsdlkeyb.biâ recently at the time that I am writing this message here. Just for reference reasons, here now is some code that I discovered from that file in one of the original FB builds showing the actual constants of the keyboard scan-codes: Code: const SDLK_UNKNOWN = 0 WHOA, talk about quite a mouthful there, that code! :o ! But seriously though, it is at least pretty fascinating to look at as an idea for an *awesome* custom keyboard handler if I do say so myself, Barok! (And to the rest of you people, you might want to take a closer look at that same code here as an inspiration piece in this topic, even for those of you especially willing to try FB out for the first time yourselves! ;*) ) And to Sterling and Jofers: If you both and/or anyone else have already tested the built-in keyboard routines in the file âsdlkeyb.biâ on FB, could some of you please show us the stats of how well its handler has fared, just to give some ideas on making sure it is at the caliber of the three QB keyboard handler routines that I gave you the names of from the top of this thread? It would be much appreciated, and thanks so much!! I will be seeing you all later, Barok, Sterling, Jofers, and I like your ideas on this very much. ! - Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ Any possible ideas/plans for a keyboard handler in FB? - adosorken - 12-15-2004 Quote:FB can use popular libraries that already exist for windows and such. GetKeyState has been added to the Windows API routiens that come with FB, but I'm not sure if it has been released yet. SDL is also a popular library that contains keyboard routiens.I released a version of user32.bi that included GetKeyState as well as all the constants it uses. The original user32.bi comes with GetAsyncKeyState, which operates slightly differently. I'm about half done with the final conversion of user32.bi, I should be able to release it in a few days and hopefully v1ctor can make it an official part of the FB project. Well, so far, so good now. - Adigun A. Polack - 12-15-2004 To Adosorken: Very good. Look, as soon as you do release your latest conversion of âuser32.biâ, I would like some clear stats on it (based on what the latter part of my previous post is talking about on seeing how well its keyboard handler does), okay now? Thanks so much! You know what, I wanna wish both you and v3cz0r excellently well on making it one of the best quality keyboard handlers there ever is in FB just like Multikey successfully did for QB! =b - Adigun Azikiwe Polack One of the Founders of âAura Flowâ Continuing Developer of âFrantic Journeyâ Current Developer of âStar Angelic Sluggerâ Webmaster of the âAAP Official Projects Squadâ Any possible ideas/plans for a keyboard handler in FB? - adosorken - 12-16-2004 Uhh...GetKeyState and GetAsyncKeyState are native win32 API calls, aka they're already built into Windows. And for the record, the final conversion of user32.bi should be done in a couple of days. I've found a few API calls to which there's no documentation or examples, neither in winuser.h, the msdn, or anything on google. I'd say it's safe to assume that these few functions aren't really needed for user applications and are probably only used within the OS itself. But I don't know that for sure either. Any possible ideas/plans for a keyboard handler in FB? - relsoft - 12-16-2004 AAP: SDL_GetKeyState is like multikey Code: dim k as ubyte ptr |