Keyboard Scanning
BlitzMax Forums/BlitzMax Programming/Keyboard Scanning
| ||
I am developing a Space Invaders Game in 'c', I've come acroos a stumbling block however, it seems you cannot call unblocking keyboard entry. To this end, I'm contemplating running a BMax or B3D executable in parallel with my C space invaders, potentially writing keyboard entry to a file from BMax/B3D realtime - and periodically attempting to access the same file from within my C executable to 'move' the players tank at the bottom. This is my first attempt at interfacing BMax / B3D with a C executable, any help appreciated. Regards, BlitzPlotter. |
| ||
I've come acroos a stumbling block however, it seems you cannot call unblocking keyboard entry. Of course you can. My wip console module uses it to allow things like text entry to work at the same time as having stuff running in the background. Of course, you'll need to ask someone who knows what the API is for it... but it certainly works. |
| ||
Does anyone knows what the API is for the wip console module that Brucey uses ? (Thx by the way brucey) |
| ||
Well, have discovered a TCP Client in B3D that I'm going to try communicating with my C Exe... Any other suggestions greatfully received. |
| ||
Repeat after me.... Google is your friend.... Google is your friend... :-p Anyhoo, here are some pages that discuss the kind of things you are after. Whether or not they'll directly solve your problem or not, it might be a start... Link Link - win32 Link - win32 HTH :-) |
| ||
Google is your friend... Cheers Brucey, Seems like it's a bit of C++, gotta get around to doing that yet... |
| ||
Yay, just worked out how to call 'C' code (i.e. my space invaders function) inside C++ code which will detect key presses. Thanks again Brucey. |
| ||
Should be a tad better than running a separate exe :-) |
| ||
Yep, I'm now torn whether to attempt to call my Space Invaders as a function - or to charge in learning C++. It's nice to have choices. (;-) Am swithering towards the C++ option, CProgramming.com has a great tutorial on C, I can olny presume their C++ is equally as good. I still had a linked list tutorial to do on C, but C++ just seems so much more appealing. The entity relationship stuff your working on looks pretty swish Brucey, it would have been handy for my database design and anlysis module last year. You've a pretty comprehensive set of libs there, I only wish I'd the time to play.... Once I master C & C++ Regards, BP. |