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 / Iam making a text game please help me with one thing.

Author
Message
BlackXStudios
21
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 4th Jul 2003 00:35
When I run the game it doesnt show the text and its blank, please help.

Heres my code:

`************************
` Dark Stones
`************************
`Author: Christopher Pawliuk

`Set system settings
set display mode 800,600,16
sync on
sync rate 0
disable escapekey

`Hide mouse
hide mouse

`Intro
print "DARK STONES"
print " By: Christopher Pawliuk"
print
print
print
print
print " What is being safe really mean? Being with freinds and family? Or just not have any fears?"
print "In the world of the Dark Stones being safe means not haveing or seen with the Dark Stones."
print "In 1623 AD, a group of mages were about to be destoryed by a powerfull force, the Dark Stones."
print "The Dark Stones had the power to kill any living person, but with out a evil person and the stone the power of it is nothing."
print "As the story says, only one with the Light Stones can defeat the power of the Dark Stones."
print "The story was true, but the group of people that had it did not know of its power."
print "They placed the Light Stone in a temple which was not know to us now."
print "With the power of you and the Stone we you can do it. First of all you must gather some iteams."
print "Good Luck!"
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print
print " PRESS SPACE BAR"

`Sync
sync

`When space bar is pressed
if spacekey()=1 then cls

`Disable escape key
disable escapekey

`Simple loop
do

`Manual escape key exit
if escapekey()=1 then exit

`End of loop
loop

`Enable escape key
enable escapekey
http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
BlackXStudios
21
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 4th Jul 2003 01:06
Can any one help?? I really need to make it so it doesnt go blank, please try this code on your computer and try to find out the problem, I have and i couldnt.

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 4th Jul 2003 01:14
The problem here is that you dont have a sync command in you do..loop, so it doesnt update the screen. The program shows the text for 1 cycle, then falls into the do..loop with no syncing, effectively crashing the program. Also, since the
if spacekey()=1 then cls
line is not in a loop, it is only executed once, i.e it works for 1 cycle, and because nothing is pressed it continues through the program and gets trapped in the non-syncing loop. This code will work:



Whatever I did I didn't do it!
BlackXStudios
21
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 4th Jul 2003 01:20
thanks.

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 4th Jul 2003 01:30
No problem .

Whatever I did I didn't do it!
Red Giant 2183
22
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 15th Jul 2003 14:16
hey, I saw this and you probably wont read this since this thing is kinda old, But ,if this is a pure txt game, do it in c++. I promise the exe size will be very , {very } small in comparison to the db. {db is a great compiler, but , for a txt game,that doesn't need all that, its kinda overkill !! )

Login to post a reply

Server time is: 2025-05-19 19:04:36
Your offset time is: 2025-05-19 19:04:36