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 / why can't I print text to the screen and see it?

Author
Message
The Cubist
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 13th Sep 2003 09:29
I've tried to print text to the screen so I can grab the characters as sprites but I just get blank sprites. Shouldn't this code print text to the screen so I can see it?
The admiral
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 13th Sep 2003 09:59
You need to use set cursor x#,y# then print under neath that command...be sure to change the x# and y# to whatever coordinates you want to print the text.

[href]www.vapournet.com/~flyer[/href]
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Sep 2003 11:52
you can use print like you did (but it won`t linewrap), the problem was that you printed characters below chr$32, anything lower than 32 is a control code and can have weird effects on your printout (some are codes for colour or cursor movement and other stuff the computer uses internaly when it displays text), this works...

INK RGB(255,255,255),RGB(0,0,0)
FOR I=32 TO 255
PRINT CHR$(I);
NEXT I
SUSPEND FOR KEY

and a link to what the codes mean

http://www.jimprice.com/ascii-0-127.gif

for example printing chr$(10) would make the print statement start a new line, or chr$(28) would move the print cursor one place to the right, at one time we used codes like this to get the printout to the correct position on the screen (any old Vic 20 users here?), by printing different lenths of control codes to the screen you had a "print at" capability, cheers.

Mentor.
Richard Davey
Retired Moderator
24
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 13th Sep 2003 12:29
What you're doing should work (although see the advice posted so far) however you need to sync before you "get image" otherwise your sprites will contain no data.

Cheers,

Rich

The sky above the port was the colour of television, tuned to a dead channel.
Your brain's just like any other appliance: it works better if you plug it in...

Login to post a reply

Server time is: 2026-07-24 00:18:45
Your offset time is: 2026-07-24 00:18:45