|
-
April 16th, 2003, 07:30 AM
#1
Possible?Non-scrolling text based game diplay
Hello all.
Do you know if it is possible to make a game with a display which
is "immobile"?
In other words, I have a console application with display which does not scroll when user gives commands. Is this possible?
If so, how? (I'm thinking about Windows, text based game, but
other alternatives are also welcome).
I'm writing the code with c++ and I have the game basics done.
For example, I have a game board which looks like this:
XXXXX
XXXXX
XXXXX
XXXXX
Give coordinate:
When user gives a coordinate, (0,0) the board stays at the same place (doesn't scroll forward), but draws '0', now the board is situated in the same place on display with this stuff on it:
0XXXX
XXXXX
XXXXX
XXXXX
Give coordinate:
BR,
Toby
-
April 16th, 2003, 08:33 AM
#2
Win32 provides a good set of Console API, which you can use. Start by looking at AllocConsole() :
http://msdn.microsoft.com/library/de..._functions.asp
-
April 17th, 2003, 01:43 AM
#3
You have to issue a "reposition at the top left" before you start your redraw. If you are using an ANSI terminal (xterm, dtterm or DOS prompt with ANSI.sys loaded), you could try
printf ("\033[0;0H");
Alternatively if you are using TurboC it is something like gotoxy(0,0).
When it comes to the prompt line, you have to wipe out the entire line and rewrite.
Succinct is verbose for terse
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|