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 / text based games

Author
Message
Fridge R Raider
20
Years of Service
User Offline
Joined: 16th Nov 2004
Location:
Posted: 22nd Nov 2004 14:47
I was wondering how many ppl have tried to make text-based games using db. Im in the middle ofmaking one right now and have noticed that you can actually make a text game look really good. But there is one thing that i dont know how to do. Can someone give me an example of an input statement that checks for CAPs and checks for d-keys. Thanks!!!

I'm a man on a mission, a mission so huge it could mean life or death, a mission to the fridge.
Epsilon
21
Years of Service
User Offline
Joined: 30th Jul 2003
Location: North West, UK
Posted: 22nd Nov 2004 20:54
i think if you want to check for capitals or the d key you need to use keystate() putting the ascii number in the brackets.

Caps should be a different number than the lower case keys, i am only new to dbasic but have a look at that function it might point you in the right direction.

Hope it helps
Epsilon
21
Years of Service
User Offline
Joined: 30th Jul 2003
Location: North West, UK
Posted: 22nd Nov 2004 20:56
Sorry i think i might of miss read a bit because of the spacing, if by d-keys you mean direction keys its if upkey() = 1, if leftkey() = 1, etc for the arrow keys if you want to make use of them.
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 22nd Nov 2004 20:58
my first game was a bomb game were you should defuse bombs.
I have just coded this little text based game were you need to defuse a bomb.


Here is the code: (works in DB and DBPRO)






The Nerd

wanna join Waggames?
then visit our site at : http://www.freewebs.com/waggames
my old forum name was: The Nerd

Login to post a reply

Server time is: 2024-11-27 14:37:37
Your offset time is: 2024-11-27 14:37:37