Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

wyrd

ASCII/Text based games...

This topic is 5637 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been browsing these forums and noticed a couple of references to ASCII/Text based games, such as Tetris and Pong. I''d love to get started on games, even if it''s silly little ASCII/Text based games (need to start somewhere). These sound easy enough, however I believe I don''t have enough knowledge to actually put together the moving parts here, heh. I''m a little confused as to how you make text move on the screen constantly and still accept input from the user at the same time. cin stops and waits for the user to imput something, and that''s obviously not good as you''d want to keep the ball in pong moving. So, am I missing something here? I was thinking that maybe I need knowledge of the API so I can detect key strokes from the user. But still, how would one give the illusion of moving text? Clear the screen and re-draw everything like you would with a 2d game? I''m pretty familiar with the basics of C/C++, unfortunately my knowledge doesn''t extend to the windows API. If API is needed I''m usually doing the project in .NET. In this case, however, I feel it''s vital that I learn how to do this in C/C++ if I''m going to program any real games in the far future. If someone could clue me in here and fill my missing gap, that''d be great. Even just a link to a tutorial would work fine. If I do indeed need to learn windows API, I would love to know what a good book for that would be.

Share this post


Link to post
Share on other sites
Advertisement
Do you know where one might find more information on kbhit? I found CONSOLE_SCREEN_BUFFER_INFO in vs.net itself, but neither of the two showed up in an msdn search...Thanks much.

Share this post


Link to post
Share on other sites
CONSOLE_SCREEN_BUFFER_INFO was found here...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/console_screen_buffer_info_str.asp

kbhit() seems to be a little harder to pinpoint, I searched google for it and came up with this...

http://www.nibbleguru.com/probs/162/5

Share this post


Link to post
Share on other sites
Is there any actual info on that nibbleguru site? He says its in conio.h but I understand that conio.h isn''t standardized and as such is a bad idea to use...is that the case ehre as well?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!