Console Screen Buffers
-
Hi guys, I am currently writing a console text adventure in C#. My last version just diplayed text depending on their input and actions, clearing the screen each time and displaying new information about the room its name etc. What I would like to do now is set up two different screens, or buffers in the console window. One thats like an information bar which sits at the top, and the bottom half will contain everything they have typed and all the input thats come from their actions, and I would like it so they can scroll up and down the bottom bar. I have had a look at screen buffers and the different settings that go along with it, I am just not exactly sure how to declare them. If the matter is too big to describe maybe someone can point me to somewhere where I can read up on it? (I find it difficult to find information for console application programming in C#). Anyway to give you an example of what im aiming to achieve... (In the console window) Top section +-----------------------------------------------------------+ |Room: Blue Room Directions: North South East | | | |Description: This room is blue! | | | |Visible Items: Tree Chair Desk | +-----------------------------------------------------------+ Bottom Section south You are here north You are here get tree You got the tree! Input: _ the bottom section is like a chat window that scrolls up and down, the text looks like its moving under the top window but your just moving the buffer up or whatever.
-
Hi guys, I am currently writing a console text adventure in C#. My last version just diplayed text depending on their input and actions, clearing the screen each time and displaying new information about the room its name etc. What I would like to do now is set up two different screens, or buffers in the console window. One thats like an information bar which sits at the top, and the bottom half will contain everything they have typed and all the input thats come from their actions, and I would like it so they can scroll up and down the bottom bar. I have had a look at screen buffers and the different settings that go along with it, I am just not exactly sure how to declare them. If the matter is too big to describe maybe someone can point me to somewhere where I can read up on it? (I find it difficult to find information for console application programming in C#). Anyway to give you an example of what im aiming to achieve... (In the console window) Top section +-----------------------------------------------------------+ |Room: Blue Room Directions: North South East | | | |Description: This room is blue! | | | |Visible Items: Tree Chair Desk | +-----------------------------------------------------------+ Bottom Section south You are here north You are here get tree You got the tree! Input: _ the bottom section is like a chat window that scrolls up and down, the text looks like its moving under the top window but your just moving the buffer up or whatever.
Why do you insist on using a console ? seems to me a simple Windows app with say a textbox on top, and a scrolling listbox at the bottom would fit your requirements. And it would look a lot nicer. :)
Luc Pattyn [My Articles] [Forum Guidelines]
-
Why do you insist on using a console ? seems to me a simple Windows app with say a textbox on top, and a scrolling listbox at the bottom would fit your requirements. And it would look a lot nicer. :)
Luc Pattyn [My Articles] [Forum Guidelines]
Nostalgia.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
Nostalgia.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
OK :laugh:
Luc Pattyn [My Articles] [Forum Guidelines]
-
OK :laugh:
Luc Pattyn [My Articles] [Forum Guidelines]
-
I would rather re-implement an ancient adventure game than learn an ancient language...
Luc Pattyn [My Articles] [Forum Guidelines]