Tag Info

New answers tagged

1

The Windows API includes "character mode" functions, which deal with consoles and console input at a lower level than the C++ standard library functions. You can make use of these to create a real-time text-based game loop (there are also useful functions in the API for drawing large blocks of characters at a time, which is helpful for creating smooth ...


0

Instead of using a blocking function such as getline, you will want to get input without blocking. On Windows, you may implement the message loop and check for keyboard events. You then add the pressed key to your input buffer. When the user presses return you evaluate the input just as you do right now. When the user presses delete, you move back one ...


0

If you are using windows, I would suggest building a simplified GUI with a text-input field. However, you have an option in the .NET framework to use System.Console.KeyAvailable with System.Console.ReadKey. This is the solution I would use in C# (but also available for C++) For Windows: The SO questions in this thread suggest using conio.h which is a ...


1

One approach would be to create a second thread (CreateThread() I think?), in addition to the one that's waiting for input. The second thread could run continuously, check the actual time, update state, and so on. (Probably with a small Sleep, also, so it doesn't pin the CPU at 100%.) Messages should be passed from your console-reading loop to the game loop ...


0

I have one primary answer to your question, but first a few thoughts: There seem to be two forces you have to balance between with commands; helping a new user by supporting more natural and less idiomatic syntax, and helping minimize growing frustration with long/expressive syntax. Prepositions can be really useful, because you can have a short list of ...


0

I think you are going at this the right way. Always keep in mind the English grammar (predicate, object) with adjective in between. If a second sentence is concatenated with "and" you have to re-run the parser again. I would implement much more verbs, objects and adjectives than are used in the game. That way you can recognize the sentence structure even if ...


0

Ah, it's a new bug in Gamemaker Studio. The string functions don't work whilst in fullscreen, but if I start in windows mode, it works fine.



Top 50 recent answers are included