  | |  | Minimum-effort in-game console? | Minimum-effort in-game console? 2003-11-23 - By Tim Conkling
Back It's necessary that I have an in-game console (a la any first person shooter since the original Quake) in the game I'm writing. This console really only needs to be very bare-bones -- I'd like the user to see what he or she is typing, and for the game to execute the user's input when they hit enter or return.
Clearly this is not a hugely difficult task. However, being lazy, I'd prefer that somebody else do my work for me. It would be awesome if there was a (portable) way to capture cin, for example, into a std::string, character-by-character (in a function that could be executed repeatedly in my game loop). Failing that, it would be almost as nice to be able to use a console somebody else has already written and adapt it to my code.
This seems like it must be such a common task that I couldn't pass up the opportunity to ask for a handout on this list. I could roll my own (with Carbon Events, for example), but what I'm really looking for is something written in ANSI C++ that won't cause problems if I ever decide to port this. I'd also rather not spend my time debugging every little nuance of the text input (non-English Alphabet characters, diacritical marks or whateverthehell they're called, how exactly the delete key should work, etc).
If anyone can point me in the direction of some free sample code or some functions in the C++ Standard Library that I'm unaware of but that would make this task easy, I would be really grateful! And it would mean I'd have to do less work, which is what's really important anyway :)
Thanks, Tim __ ____ ____ ____ ____ ____ ____ ____ ____ ____ mac-games-dev mailing list | mac-games-dev@(protected) Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac -games-dev Do not post admin requests to the list. They will be ignored.
Earn $52 per hosting referral at Lunarpages.
|
|
 |