Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Console Screen Buffers

Console Screen Buffers

Scheduled Pinned Locked Moved C#
tutorialcsharpdata-structuresquestionannouncement
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jblouir
    wrote on last edited by
    #1

    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.

    L 1 Reply Last reply
    0
    • J jblouir

      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.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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]

      C 1 Reply Last reply
      0
      • L Luc Pattyn

        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]

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • C Colin Angus Mackay

          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

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          OK :laugh:

          Luc Pattyn [My Articles] [Forum Guidelines]

          J 1 Reply Last reply
          0
          • L Luc Pattyn

            OK :laugh:

            Luc Pattyn [My Articles] [Forum Guidelines]

            J Offline
            J Offline
            jblouir
            wrote on last edited by
            #5

            Thats like asking why would someone rather learn C++ than C#. =)

            L 1 Reply Last reply
            0
            • J jblouir

              Thats like asking why would someone rather learn C++ than C#. =)

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              I would rather re-implement an ancient adventure game than learn an ancient language...

              Luc Pattyn [My Articles] [Forum Guidelines]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups