Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Starting very small -- MUD like text game help

Author
Message
Dragon of Logic
21
Years of Service
User Offline
Joined: 10th Sep 2003
Location:
Posted: 21st Nov 2003 18:06 Edited at: 21st Nov 2003 18:09
For my first project, I'm creating a very basic MUD (or, since it's single player, should be SUD? heh), just to get used to some basic non-graphical commands and variable manipulation in DB.

I already know how to send text to the screen. Not difficult in the slightest. But when the screen is filled up with text, I want all of the text to shift up one line so that the next line of text has room to appear at the bottom. I don't want to ever clear the screen. It would be preferable to have a scroll bar in place.

How do I code so that all text currently on the screen is scrolled up when new text appears? I'm certain it involves a position check with the cursor, but I'm not sure how to do it. Thank you for your assistance
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 21st Nov 2003 19:20
if your a begginer, i would forsake a scrollar bar.....in my experience, scrollar bars are very difficult to create...if anyone knows how to do it easier, then by all means post a code....thanx

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st Nov 2003 19:25
there are some plugins out there that may make your life easier. I am not sure but there may be one that lets you have a windows form with a scrollable/multi-line text box that you could write your data to. Or another thought would be to shell notepad.exe and write the data to that, although I am not sure how you would persist its instance and append data.

sorry for thinking out loud and doing nothing to help -

-RUST-
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 22nd Nov 2003 03:09
A single player MUD?
You mean a text adventure?

Well, it might be simplar to use something like ADRIFT, or another high level creator. Allthough you lose a lot of controll.

If you really want to make it in DB, then you could create a database for the text lines on the screen.
Each new text for the player gets added to a new element at the bottom of the database.

You can then have the screen display only elements in a specfic range (done with a simple loop).
THe player could then use two keys (pageup/down) to scroll the range, and hence the text


This is needed if you want the player to have referance to much earlier text.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard

Login to post a reply

Server time is: 2024-09-21 09:45:13
Your offset time is: 2024-09-21 09:45:13