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 / RPG-style Messagebox

Author
Message
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 18th Jul 2004 08:47
Ok - I'm trying to make an rpg-style message box to display... dialogue when you talk to people. Being new to DBP I haven't a clue where to start so any help at all would be appreciated.

If you want an example of the kind of messagebox I want to create, think Final Fantasy VII, Harvest Moon or Legend Of Dragoon.

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 18th Jul 2004 12:43
sprites/images always work. not the best though
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 19th Jul 2004 03:27
So - how do youinsert a sprite at a certain point? and I suppose I just use the print command to write on the top of the box? How do you target your print command so that it prints at a certain point?

Also, does the print command have bold and/or italic properties? If it does, how do you change them?

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 19th Jul 2004 05:46
Well, sprites are inserted or placed with the sprite command as in;

Sprite number, x position, y position, image number
(optional: show sprite number)

Now, the tough part is building the image of the sprite first, which for your purpose would be an image of the dialog text. Use Get Image for that.

And yes, printing has font commands. Set font to bold, set fond to italic, set font bold italic, set font to normal, set font size X, set font transparent, set font opaque, set font face (string) and so on. I don't remember if they apply to print specifically but they do with the TEXT commands, which you'd probably be using for the dialog anyway.

S.

Any truly great code should be indisguishable from magic.
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Jul 2004 11:00 Edited at: 19th Jul 2004 11:11
Basically, you have two dynamic methods:

1. Use PASTE IMAGE to display a custom box and write words (using TEXT) on top of it. Pros, easy to do. Cons, you have to re-paste and re-write the message each sync/game loop.

2. Use alternate screen to paste an image, write your text, get the image, switch back screens and create a sprite. Pros, sprites always sit on top of other images, you do not have update them every sync, you can move and rotate them easily, and by using multiple sprites achieve translucency effects. Cons, building dynamic sprite images takes more time and is more complex to set up.

My VirMin graphical interface is a combination of both methods. The opaque frames are pasted images. The status bar function writes the status message every loop. The red menu areas are pairs of sprites. One is translucent and the other has text and borders which are opaque with 100% transparent backgrounds. As an example, check out some of the images on my work in progress page.

http://www.geocities.com/tzircher/tcom_gallery.htm
--
TAZ

[edit for typos and clarity]

Which method should you use? Well, it depends on the special effects you want to achieve and the other things that your program does with models, pasted images, and sprites.

History did not begin with PONG. -- Greg Costikyan

Game Beavers
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 21st Jul 2004 01:39
Thanks you three. I'll go give it a try.

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 21st Jul 2004 02:17
A problem with pasting an image and typing over it.... if my text reached the end of the text box it will not start a new line, will it? Can anyone make any suggestions as to how I could deal with that issue?

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 21st Jul 2004 02:27
When using the 'set text font' command. How come 'set text font "monotype corsiva"' works but 'set text font "georgia"' doesn't?

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]
PantheR RIP
21
Years of Service
User Offline
Joined: 7th Jul 2003
Location:
Posted: 21st Jul 2004 03:54
Emmm... You should write a function that will break a single string to many strings - depend on ow many characters you want to have in one string. After that - just print strings one below another.

i have the same problem with a dialogs for my RPG =) Now i'm searching for a best and more fast method...

Then you're using SET TEXT FONT - may be you haven't this font in your WINDOWS/FONTS folder?
PantheR RIP
21
Years of Service
User Offline
Joined: 7th Jul 2003
Location:
Posted: 21st Jul 2004 04:00
Hmmm... is there any examples of thigies like VirMin? or is it possible to download VirMin already?
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 21st Jul 2004 04:22
There is a yahoo groups called VirMin where you can download and earlier beta from the files section.

http://groups.yahoo.com/group/virmin
--
TAZ

History did not begin with PONG. -- Greg Costikyan

Game Beavers
Deleted
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 21st Jul 2004 04:32
They fonts I want to use are definetly in my windows/fonts directory. Thanks for the help with the string splitting idea PantheR RIP.

Totally
[img]"http://www.geocities.com/preview_ff/wedge.jpg"[/img]

Login to post a reply

Server time is: 2024-09-22 17:42:15
Your offset time is: 2024-09-22 17:42:15