Help - Search - Members - Calendar
Full Version: Textbox/dialogue Example [link Fixed!]
Game Maker Community > Games > Game Maker Creations > Tools & Applications
Pages: 1, 2
J-Factor


Name: TextBox Engine V2D
Category: Example
Size: 99.54 KB
Version: GM6.gif (6.0/6.1)
Resolution: 420x160
Changes Resolution: No
Mulitplayer: No
Download Link: Link Fixed!

Thanks KC LC for fixing the link before!

This is a complete re-write of my original example. If you haven't seen my original, this example demonstrates how to create nice looking dialogue boxes. This is useful in a whole range of games: Talking in RPGs, Message Boxes in Platformers, etc.

Features:
  • Letter-by-Letter typing
  • Automatic line wrapping which DOESN'T split words in half
  • Portraits/Avatars
  • Continue sprite (small prompting sprite in bottom-right corner)
  • Show multiple textboxes if there is too much text!
  • Freezes game (Yes, this is a plus!)
NEW TO 2.0:
  • Color tags! RED, BLUE, any color!
  • Opening animation (textbox grows to true size)
  • Animated portraits!
  • Animated continue sprites!
  • Backgrounds!
  • Sound
  • Questions + Return values
If you want a GM5.gif (5.3a) version of my example, check the original in FAQ or my sig. I'm not planning on updating my GM5 version due to its lack of features and as I do not use GM5 too much.

Read the Game Info. The website mentioned in the Game Info doesn't exist (as of yet). It's a WIP...

Thanks.
Gimme a slurpee XD
very very nice. 9/10. good job
though the lips move kinda funny
LauriP
Cool, the animating is a good update and the colortags too,
i made a thing like that opening animation and also and closing animation...
btw, does the textbox stop the game ? I didnt test that.. smile.gif

ps : Could you do a select menu system ? That would make this rock biggrin.gif
J-Factor
QUOTE (Link92 @ Dec 5 2005, 10:25 PM)
ps : Could you do a select menu system ? That would make this rock  biggrin.gif
*


Sure, why not? A menu system would be basically a one-script game, and I already have that down biggrin.gif .

EDIT: Removed un-useful code.
gamer12345123452003
Does this text box work with 3D game maker games?
GMwave
Wow this is really nice. I was lookin around for one of these a while ago and found your old one but this one is soooo much nicer.
J-Factor
Thanks for the comments.

@gamer12345123452003: I guess so. I don't dabble in 3D much, but I don't see why not. Just treat it like an overlay and set an orthographic projection.
Tobias(NL)
This is very very sweet!!

Nice work max_buutz!!! lmaosmiley.gif biggrin.gif laugh.gif

Maby ill use this in my new game.!!
DF Team
Sweet! biggrin.gif

If you could make an answering system, like if the textbox says:
QUOTE (Textbox)
Want to sleep?
Z - Yes
X - No

And if I press Z, it sleeps and same with X.

I tried your old example, where I managed to do the answering myself, but I can't manage it with the new one.
If you made it, I would be happy!

Otherwise, 10/10 wink1.gif

EDIT: Off-topic: I tried your Transitions Example too, it rocks!!
Nexus Mind
hey,

Max this engine is great I have developed a conversation engine myself
unfortunately this puts mine to shame so now I must once again go off and recode it.

but I definitely hope you make more engines like this oh and if I ever release one of
my engines I hope you will review it as well,

I don't see how you could improve on this but I certainly hope you try.

Keep it up mate,

-Nexus
Fox-NL
This thing is amazing! biggrin.gif

I used the first version in one of my older games.. and i liked it..
But this version is even better!

In the example you can see that the mouth of the guy is actually moving.. which is cool biggrin.gif

Nice work on this!
- Fox-NL
teej
again you did a great job max.
there's no way i will not use this textbox engine.
J-Factor
@DF Team: I'm not sure if I understand what you are requesting... Do you want questions within textboxes?

@Nexus Mind, Fox-NL, Tobias(NL) and teej: Thanks for the comments smile.gif

I don't really see how I could update this, so I'll be getting back to work on my Transition Engine now... At this rate, I'll never get my own game finished tongue.gif .
DF Team
You don't get it? Hm..
Let me try to explain it again, I'm not so good at English, you see.

This is the code in the original TextBox example v. 1:
CODE
do {keyboard_wait();} until (keyboard_check(ckey));
// Freezes game until you press the 'Continue' key.


This is my edit: (This script is named show_question)
CODE
do {keyboard_wait();} until (keyboard_check(ord("V")) or keyboard_check(ord("B")));
// Freezes game until you press the 'Continue' key.

//Here's mine v
if keyboard_lastkey=ord("V") then return true
else if keyboard_lastkey=ord("B") then return false
//Here's mine ^


Then in the object which shall show the question:
CODE
ask = show_question(x1,y1,x2,y2,text(ex: Press V to return true, B to return false),sprite,img);
if (ask = 0) {show_textbox(x1,y1,x2,etc...)}
else if (ask = 1) {show_textbox(x1,y1,x2,etc...)}


Here's my question: I can't find this part in the v. 2.95, and asks if you can do it.

Hope you understand! wink1.gif

EDIT: I saw your edit! Thanks! wink1.gif
GmDude66
Someone want to mirror this? Link seems to be down..

~Derek~
Fox-NL
i have version 2 for you: download link

Maybe if someone has version 2a, he/she could upload it..

- Fox-NL
J-Factor
Thanks for stepping in there Fox-NL - really appreciate it. The only difference between the working URL and the broken one was a capital B... happy.gif

@DF Team: I added your suggestion.

To everyone else, have a nice non-denominational break period!
DF Team
Perfect! You're a wonderful GameMaker!! biggrin.gif
Sonic Stupidity
thisengine is absolutely fantastic, 'cept i found a bug in it:



Is this a bug or just a piece of code that works for GM6.1 and not 6.0? Thanx and great engine anyways! biggrin.gif
J-Factor
@Sonic Stupidity:

Ah! I forgot that hex numbers were GM 6.1 only. No problem - changed + reuploaded.

Thanks.
mysour
Top notch, I like this example alot, and I will use, and give your credit. smile.gif
Now add buttons, like yes or no, for questions. smile.gif
LauriP
The new version with the questions is good,
could you make an name or string insert place ?
Like :
CODE
"What is your name ?"
[_________________]

Inputfield, where you can put some text,
is that too hard to do ?
J-Factor
Thanks for the comments guys.

@mysour and Link92: Wasn't this meant to be a dialogue example?

It's not a question of hardness as all of these suggestions can be implemented, I'm just not sure if I'll be devoting all of this time to this example.

But you never know, I may implement these suggestions. However my other projects will have a higher priority.

Thanks again. happy.gif
oscar
I think you shall add smilies ph34r.gif
J-Factor
Last time I checked, smilies weren't a critical part of dialogue. How many RPGs use smilies? I don't think it would be worth the effort.

Thanks for the suggestion though.
MasterFunk
broken link
J-Factor
Typo, sorry.

(I keep writing TextBox instead of Textbox!)
gamedealers
I got a problem it says runtime error.
Do I need a registered version of gm.

Also does the resolution have to be the resolution you set it.
J-Factor
Runtime Error? ...Okay: That's not good. Well, it's working fine here so... I'm not sure.

You shouldn't need a registered version. I'm pretty sure I only used non-registered stuff (when it checks if you aren't registered).

Resolution? It doesn't set the resolution. If you are talking about the size of the room/textbox it is all customizable.
gamedealers
Its working now but the box is so small and the words I can't read it but I will look through the script and edit it so that I can view it.
Daniel-Dane
You sure you are allowed to use the Little Fighter 2 sprites ?
Knightmare
Doesn't even work. I'm registered and it just shows a gray screen until the text is done.
J-Factor
@Daniel-Dane: Well I'm a great fan of the game and I don't think the creator's would mind. I'm not making any money off of this and I provided a link to the little fighter website in the Game Info.

@Knightmare: Strange - it works perfectly for me and many other people.
Scooternew
The screenshots look like pure joy wrapped in chocolate. Knowing your work, I'm sure the textbox will be heaven on Earth.

EDIT:

The sound is annoying, but that can be changed. Also, the animation for the textbox appearing...is....not great. Try making it a little smoother. Otherwise, perfect, as usual.

Thanks for contributing, even thought I don't need it. I use my own textbox system designed to fit my game, but this will help people. Thanks smile.gif.
Knightmare
Oh, I forgot to mention that the old gm5 works but the new gm5 and all gm6 versions dont work. I use gm6 and I dont want the gm5.
J-Factor
@scooternew: Yes the sound can be turned off by setting it to -1. Also the animation was a last minute addition. Not my best work, but I found it interesting. Ah well - it can easily be turned off as well.

Thanks for the compliments. smile.gif

@Knightmare: I never released a new GM5.gif version. As you are the only one experiencing these problems with all of my versions (GM5, Old GM6, New GM6), I'm pretty sure the problem is on your end.

I've had the old versions out for an awfully long time and haven't received any serious bug reports.

Sorry. sleep.gif
Knightmare
Meh, but it's perfect for my RPG.
GStick
I used to use your old one, and now that I switched over to this version, (changed all the values to what I had them at in the old version), it now gives me a fatal error, thus restarting my computer. And I like this new version so much better...

-GStick
im_an_alien
Yes it works with unregistered, I am unregistered and it works for me
hanman
Hey, J-Factor! is there a way i can turn off the sprite image if i dont want to use it for a rpg?
J-Factor
@hanman:

Simple - Replace the sprite argument (argument0) with -1.

Example:

CODE
textbox(-1,-1,'Wow! No portrait sprite!');
Droolie
It's very good... it fits in my game. ( see link in my sig. ). I even used it!
hanman
ahhhhhhhhhhhhh no. It dont work in 3d mode! the game freezes, the continue key and escape key work but the textbox is not drawn! Is there a way it can work in 3d mode?
Joerdgs
Great example. I modified a few things, like that the '{' sign speeds the text up, and the '}' sign slows the text down. Also gave the script about 10 arguments instead of 3, to get more control. Really great job you did creating the original by the way! laugh.gif

Edit: Doesnt this topic belong in the example forum?
Another edit: BUG REPORT (or just something you forgot), in the 'textbox_question'' script provided in the example, it's no use entering the text speed. On the last part of the code you wrote 'sleep(40)' instead of 'sleep(40*speed_factor)', like in the original 'textbox' script. That way the text speed will always stay the same. sleep.gif
Arcalyth
This is great, just like all your other scripts.

One thing though, is it possible to have a version that doesn't stop everything?

-Halo
TheMagnitude
Wow cool textbox example 10/10!!
toopz
Very nice. Do you mind if I use it into the RPG Engine/Example I'm making? I was contemplating how to make a nice, easy to use text engine, then came across yours, which is much better than anything I could do.
turtleman
I dunno if this has been asked already, but how do I make it smaller.....way smaller, when I implent it in my game, everything goes smooth (suprise suprise) but the text box is so big, that only a quarter of it covers the entire screen!

please help ^^
J-Factor
You haven't provided enough info...

Are positioning the textbox based on the view?

The textbox should not be positioning based on the view variables (view_xview, etc.). It takes positions on the screen! You could use the view port variables instead.

If this isn't the problem, provide more info.
turtleman
ok...uhm, I have another question, How do I make it so that when I collide with the object that opens up the text box, it only opens the text box if I press a button, oh and how do I move the portrait?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.