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 Discussion / Accepting text inputs while running a game

Author
Message
Javaguy
20
Years of Service
User Offline
Joined: 26th Sep 2005
Location: London, the UK
Posted: 8th Oct 2006 20:22
hello everyone!
Im developing a small, retro style 2D game, and for the user interface a command based method seems to be by far the best option for simplicity and ease of code

anyway, I had a look a the input command, as that seems to be the only way of accepting input, but there are problems. 1.) the game stops when the input is bought up (with an if statement), this is.. fine.. but not really great. Anyway to have the game running and accepting keystrokes, like for a chatbox?

another much more annoying problem is that all the text, which is lots of strings with the text commands in the main loop, dissapears when I do the input command, and the inputted letters flicker. Its very annoying.

so, any ideas?

thanks

Hello everyone! :p
dab
21
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 8th Oct 2006 20:27
Look at the Entry() command, and the clear entry buffer.

Your mom has been erased by a mod from you telling too many "your mom" jokes.
Bluestar4
20
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 9th Oct 2006 03:35
here is an interesting question for you. while the subject is up but how do you limit the player to only inputing say 20 characters?
for example, I want the player to input a string, but I dont want the string to be more than 20 characters long so that the cursor wont go all the way accross the screen and ruin the other graphics

dab
21
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 9th Oct 2006 06:49
Here ya all go, its even in a function.

I don't want to think about a timer based backspace, so when you hit backspace, it'll all be gone. So, that's for you guys to figure out.



Your mom has been erased by a mod from you telling too many "your mom" jokes.

Login to post a reply

Server time is: 2026-07-07 03:45:46
Your offset time is: 2026-07-07 03:45:46