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 / rpg message box?

Author
Message
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Feb 2003 10:56
Any ideas on this one? Ive tried some things but I have trouble getting the text to work quite right. What Im looking for is a library or something of a gui in 3D that could work as an rpg message box.. thanx for the help
Galdor
22
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 12th Feb 2003 11:42
I've an idea. Create a function who sleep the game, rending screen darker, paste the image of the textbox, print the text, paste 2 buttons(ok and cancel).

[url=http:katark.free.fr]Katark[/url]
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Feb 2003 14:21
A message box? If you just mean where the characters words are displayed, Id just open up a paint proggy and make it in there, then make it a sprite!

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Feb 2003 15:29
that would work, but it would be easier in the long run to have text printed.. I kinda have an idea of how the thing should work, but its very hard to implement^_^ thanx anyways
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Feb 2003 23:17
OK then, just go ahead and print your text on the screen! Same thing, just no background!

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 13th Feb 2003 01:06
if you use sprites you won't be able to print text on top of them

instead you can use the paste image command, you can print text on top of that... if you're working in a 3d game, you just paste that image and the text every frame within a loop. when you want the messagebox to disappear just exit that loop...

it would be handy if you placed the whole thing in a function... then it will be very easy to use messageboxes when programming (by just typing (for example) messagebox(charactername$,text$) )

you could paste a longer image when there's more text in the text$ string

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 13th Feb 2003 03:26
no you can still print text on top of sprites.....

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 13th Feb 2003 16:58
thanx ill try out some of those ideas..
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 14th Feb 2003 17:43
ok got it runnin now..i have a new question too, but ill make a new topic for it^_^
Leade
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 18th Feb 2003 18:56
This should help "i think"

Sorry 'bout the formatting.....



So a quick run down
the first function creates a bitmap of a certain size then pastes an image at the 0,0 coordinates of the bitmap. then you can paste text on the bitmap after at different offset coordinates evertime.
this will make it look like multiple line.
the call the final function to show the bitmap as a sprite.

Gota go now.
CloseToPerfect
22
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 18th Feb 2003 20:40
how do you print text on a sprite, I can't, use paste image instead, and its faster.

freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 18th Feb 2003 21:53
paste image is indeed faster and avoids flickering problems which you can have with sprites

you can't print text on top of a sprite...
Leade
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 21st Feb 2003 18:15
Ok ok basically what i meant was this:

In darkbasic once you specify a new bitmap any on screen drawing is redirected to that bitmap.

So you
1. create a new bitmap,
2. paste an image onto the bitmap
3. draw text onto the bitmap, which will be on top of the pasted image,
4. get the image from the bitmap
5. make a sprite from it.
6. delete the bitmap and restore drawing to the screen.

The result will be a sprite wich looks like the original image but will have text on top of it.
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 21st Feb 2003 18:22
Yes, but that would be rather laggy I believe. You could infact make your sprite and draw the sprite to the back (defaultly drawn to front) then your text would show fine

RPGamer

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Leade
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 21st Feb 2003 19:14
Draw to back tell DB to draw all 2D drawing behind 3D rendering. (So the instruction say)

Unless someone has a better idea, please put us out of our misery.

"Purple monkey dish-washer"
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 21st Feb 2003 19:21
You cannot "print" text on-top of a sprite IF the sprites are set to draw on-top of any 3D.

Better to use text on sprites (or images).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming

Login to post a reply

Server time is: 2025-05-10 04:45:28
Your offset time is: 2025-05-10 04:45:28