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.

DarkBASIC Professional Discussion / how do you input text to the screen without input command

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 18th Jan 2003 15:18
o.k.
i have a problem
i am writting a lan game
i want to set up a sort of chat room where you can send messages to each other while playing the game.
i don't want to use input because this stops the game from running.
could anyone give me the code to do this
(just the input code)
TO DISPLAY THE INPUT THIS IS HOW YOU WOULD DO IT
print "",message$(1)+message$(2)+message$(3)+message$(4)+message$(5)
(5 LETTERS WOULD BE DISPLAYED
BUT HOW DO YOU input the text in the first place?
help please! this is the final stage in my game before i finish it!
I have a word of advice...
..don't piss on an electric fence!
Kangaroo2
23
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 18th Jan 2003 17:49
Without using input the only way is writing your own routine to either display text, sprites or textured plains, letter by letter as the user types. You can get it to add them all together / break them appart as a string by writing a memory routine. Personally I just get DBP to make a txt files and write to it one letter at a time always adding them to the end. Then you can read from the text file one letter at a time, and voila! (Sorry I don't currently have time to write an example ) Good luck

randi
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United States
Posted: 19th Jan 2003 02:38
I would just do something like this.

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 19th Jan 2003 15:25
thankyou so much!
i totaly forgot about inkey$
[img] [/img]

I have a word of advice...
..don't piss on an electric fence!
Shadow
23
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 19th Jan 2003 21:14
you might also be able to use entry$(). With both inkey$() and entry$() it gets more complicated if you dont want a rectangle every time you press a non-character key (like return or delete).

Login to post a reply

Server time is: 2026-06-13 21:03:26
Your offset time is: 2026-06-13 21:03:26