Jump to content


Photo

Character Speech


  • Please log in to reply
59 replies to this topic

#1 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 03 February 2010 - 11:23 PM

Character Speech
© Kolink 2010

This Extension provides an easy way of creating RPG-style speech boxes, and you don't even need coding knowledge! Drag-and-Drop actions are provided, and can do everything the GML version can do (although of course the GML version will be tidier).

ZIP file - includes working example.
GML-only version - LITE FRIENDLY
Documentation

Please do let me know what you think of this.
I know the action button images are rubbish, I just couldn't be bothered to do nice buttons XD

Created and tested in GM8. Should be compatible with GM7, but currently untested. For Lite-edition users, you can PM me for a GML-only version.

Functions: (All of these have Drag&Drop equivalents, arguments not listed here but are fully documented in the Help file)
CS_init() - Initialises the system, must be called once and once only.
CS_show() - Show a text box with the given string and (optional) mugshot
CS_set_text_coords(), CS_set_mug_coords() - adjust coordinates of text and mugshot so they fit nicely inside borders
This extension provides support for "blocks" of text, where one block is displayed, then the user presses the "action key" (defined in the CS_init() call) to view the next one.
CS_set_wait_sprite() - choose a sprite to use to show that the user must press the button to continue
CS_set_wait_coords() - set position of wait sprite
CS_set_wait_speeed() - set image speed of the wait sprite
[...] More functions are there to fine-tune results.

Edited by Kolink, 19 February 2010 - 10:02 PM.

  • 1

#2 Blue Leader

Blue Leader

    GMC Member

  • New Member
  • 467 posts

Posted 03 February 2010 - 11:54 PM

RPG text boxes are something people ask for a lot, I'm surprised a GEX hasn't been created earlier for this. If there was I haven't seen it (besides the Windows-like pop-up box ones).

Anyhow, my PC is in for repairs right now, but when I get it back I'll download this is give it a whirl.

However, here's a couple things you should probably include in your post...
What GM version is this compatible with? GM7, GM8, or both?
What are its actions and functions?
  • 0

#3 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 03 February 2010 - 11:55 PM

Okay, they are listed in the Help file, but I guess people will want to know that before downloading XD I'll edit that in now.

Am I really the first to do this??
It only took me two hours to make B-)

Edited by Kolink, 04 February 2010 - 12:02 AM.

  • 0

#4 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 06 February 2010 - 05:28 AM

I'm surprised nobody has given you credit for this.
This is absolutely fantastic! I'm using at the moment in my game.

Yeah sure its simple, but due to this simplicity it is incredibly user-friendly and easy to use!

Thanks a bundle for this!
  • 0

#5 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 06 February 2010 - 08:15 AM

Cool, thanks for the comment :GM074: I love hearing back from users of my stuff, even if it's to tell me how bad it is!
  • 0

#6 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 07 February 2010 - 10:03 AM

I suppose the only improvement you could make is giving the user the option to add a sound effect once the player has pressed the 'action key', at the moment you only allow during the writing of the speech.
Also, the initialiser sets the background of the text boxes, therefore you can't reset/change the image you want to use for the text background. (Unless I haven't figured it out haha).

Apart from that a very good effort!

Edited by Myster, 07 February 2010 - 10:04 AM.

  • 0

#7 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 07 February 2010 - 10:13 AM

That's a good idea. I'll probably be adding that to the next release. I'll also try and allow yes/no questions, and then later on more advanced questions.

You can change the background resource used with the CS_set_bg_text() function (see the "Late Adjustment" section of the help file). :)
  • 0

#8 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 07 February 2010 - 10:22 AM

That's a good idea. I'll probably be adding that to the next release. I'll also try and allow yes/no questions, and then later on more advanced questions.

You can change the background resource used with the CS_set_bg_text() function (see the "Late Adjustment" section of the help file). :)


Damn thats a fast response haha

I was hoping to correct myself as I just discovered that in the help file.
I read you're terms of use 'send us a free copy of the game' haha.
Tell you what, if I go on to create the full version of my game (as I'm only working on a demo atm due to competition '05's 10MB filesize limit), I'll be sure to send you a copy of the game :)
Otherwise if you want you can download the demo like anyone else can once I finish it and upload it to the site :unsure:

Was looking around on the game maker website/forum and I noticed they didn't have many (if any) extension packages like this let alone with GUI icons.
If you enjoy doing this then you should definately come out with a second version - I'll definately use it ::lmao::
  • 0

#9 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 07 February 2010 - 10:26 AM

I'm subscribed to the topic with instant email :)

That sounds cool :) I'm glad you like it.

I could probably do to make some better buttons for the actions :$ They were very rushed.
  • 0

#10 Blue Leader

Blue Leader

    GMC Member

  • New Member
  • 467 posts

Posted 07 February 2010 - 11:34 PM

Unfortunately it seems that this doesn't work with GM7, or at least the example doesn't. Bummer. >>;;
  • 0

#11 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 07 February 2010 - 11:44 PM

The example was made with GM8, so it won't work in 7... but the extension should work fine.
  • 0

#12 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 12 February 2010 - 04:37 AM

I've completed my game! (or the lite version at least)
Check it out at:
http://www.yoyogames.com/users/Kultur

The game is called 'Gary (Lite Edition)'
Its for the upcoming competition05.

If you wouldn't mind I'd appreciate it if you could take a look at my other game, 'Kultur', too and give me some feedback about its potential (as its a WIP).

If the above link isn't working you can download it from megaupload.com with the following link:
http://www.megaupload.com/?d=PPSPWGS7

Thanks!
  • 0

#13 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 12 February 2010 - 09:03 AM

I do hope you didn't use my extension in your game, because that would get you disqualified from the competition. And if you didn't use it, then you shouldn't be posting here...
  • 0

#14 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 12 February 2010 - 09:16 AM

I do hope you didn't use my extension in your game, because that would get you disqualified from the competition. And if you didn't use it, then you shouldn't be posting here...


Sorry I thought you wanted me to tell you?
  • 0

#15 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 12 February 2010 - 09:19 AM

Well yes, but I tried both games and I don't see the extension being used :S
  • 0

#16 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 12 February 2010 - 11:59 AM

Well yes, but I tried both games and I don't see the extension being used :S

Maybe you just haven't gotten far enough :)
  • 0

#17 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 12 February 2010 - 12:10 PM

Well, I can't get past the first level on your comp05 game, the moving platforms over the water are impossible >_>
  • 0

#18 Myster

Myster

    GMC Member

  • GMC Member
  • 69 posts
  • Version:GM:Studio

Posted 12 February 2010 - 03:00 PM

Well, I can't get past the first level on your comp05 game, the moving platforms over the water are impossible >_>


Ah thank you for telling me that!
It appears that what you are experiencing is a stretching of the screen, you call tell by the fact that the cloud is stretched and the water is no longer rippled.
This problem does not occur on my PC running XP SP2, however when emulated on my friends Vista Home OS this problem tends to occur.

I'm not sure as to what the problem is however I'm working on finding a solution ASAP.
Rest assured when I do find and fix the problem you should be able to resume your game (as the game auto-saves).
Tell me, what Windows are you operating on?

Thankyou.
  • 0

#19 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 12 February 2010 - 03:33 PM

Windows 7 Home Premium.
Used to run Vista, upgraded to 7 the day it came out :D
  • 0

#20 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 13 February 2010 - 11:37 AM

Ahh, I see now. Gotten far enough :D Nice job.
  • 0

#21 Ace

Ace

    GMC Member

  • GMC Member
  • 372 posts

Posted 13 February 2010 - 09:46 PM

If you could make this have a few frames of animation (stretch its dimensions from a minimum size to a full size) it would really rock, especially if it took into account the view while stretching. I think it would be very visually appealing if you did something like that and were able to keep it centered to some x,y coordinate (that the user could specify) such as the center of the view for example.

Do you think you could do this? I'm actually having problems figuring out the math needed for something like that last part in my own textbox display script.
  • 0

#22 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 13 February 2010 - 09:51 PM

That's what I've done on my Comp05 game. I didn't add it to this because there's only so much I'm going to do for you :)
  • 0

#23 Ace

Ace

    GMC Member

  • GMC Member
  • 372 posts

Posted 13 February 2010 - 10:07 PM

Would you mind sharing the math you used to actually display the background centered at an x,y position? I've already got my own version I'm using, so as good as your extension is, I probably won't use it. I literally only need to correctly display something like this centered on the screen.

I'm personally not doing this for a game of any sort, I just want to add the functionality to make it available for others to use who aren't skilled with GM. I really only want to know how to center a rectangle of any arbitrary size to some x,y position. Even if you're not willing to do a good deal of work for others, I don't really mind personally. I just want the knowledge so I can do it myself. Unfortunately I kind of suck at math. :/

Edited by Ace, 13 February 2010 - 10:10 PM.

  • 0

#24 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 13 February 2010 - 10:11 PM

Let w be the rectangle width and h be the rectangle height, and x and y be the coordinates of the center.
draw_rectangle( x-w/2, y-h/2, x+w/2, y+h/2, false);

  • 0

#25 Ace

Ace

    GMC Member

  • GMC Member
  • 372 posts

Posted 14 February 2010 - 12:09 AM

lol, that was suprisingly simple. Thanks!

It's interesting but I've created a full on platform engine and state system, and yet somehow, such simple math still seems to escape me. D:

Anyway, I also just wanted to say that even if you might not want to do too much work for people in order to encourage them to learn, you may want to rethink that attitude. Like me, some people just want to make cool games but don't quite have certain skills yet or simply don't have the time to learn them. For example, I'm just an art guy, not a computer scientist. Though game design and game art tend to be my specialty, it's tough learning everything you need to know to make games work the way you might envision them without the gritty experience of intense programming. The good thing about code (in my opinion) vs art is that, unlike a complex piece of art, complex code can be reused a lot if it's designed well. One RPG textbox differs greatly to another in terms of appearance for example, but, in functionality, as long as the same features are there in some form, they can still work the same way, even if those features are placed in very different places on the screen or have different graphics associated with them. If you program well, you probably tend to modularize your code for later use. Lay out the groundwork like you've done here, and show people how it works, and others will very likely pick it up and expand upon it if they have the knowledge. That means if someone does something cool with your stuff, you've successfully taught them something rather than just expecting them to want to learn on their own something that wasn't exactly made to help them and be disappointed when they don't make something very cool with your stuff.

People don't buy games because they don't know how to make their own, they buy games to use them as a source of fun. However, if they play games a lot, they might actually want to learn how to make them too, which is a LOT harder to do than simply playing them. A lot of awesome software is made on this forum by seeing flaws and bugs with other attempts at doing the same thing. In fact, you kind of gave me the right direction to finish up my own RPG system with after looking over yours and thinking about the features it needed. Thanks to you sharing your knowledge with me, I'm actually able to do it using some of your ideas to do it better than I might have done it on my own. Sharing knowledge is better than doing something for people, but, thanks to you doing both, I came up with a pretty decent system using some of your physical example as a base for some of my own ideas. If you don't want to release your source for that animated textbox, that's cool, but since my system isn't an action library, you've got free reign to release the best one out there for people to use -- if you wanted to of course.

Anyway, sorry for lecturing you. I guess I just feel pretty strongly about allowing people to learn by example, and I feel that, if your example isn't as good as it could be, it kind of defeats the purpose. Sure you may create the best RPG stuff anyone can use, but the stuff they could learn about displaying the messages, such as positioning, string manipulation, message organization, etc. would be pretty invaluable to other aspects of making a game as well - far outside the scope of simple RPG textbox stuff. It all really depends upon the level of the user and the uniqueness of your concept and/or method of doing something. Either way, that's just my two cents. Take it however you wish. :)

Edited by Ace, 14 February 2010 - 12:10 AM.

  • 0

#26 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 14 February 2010 - 12:16 AM

Well, I was being a little sarcastic in my post B-) Look where that got me :)

I may well add more to future versions of this, but right now my main focus is getting my competition entry done.
  • 0

#27 Jalage

Jalage

    GMC Member

  • New Member
  • 29 posts

Posted 16 February 2010 - 09:09 PM

Lite-edition-friendly, I think. If someone could confirm this, I would appreciate it.


I don't think you can use extensions in lite. :D
  • 0

#28 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 16 February 2010 - 09:21 PM

Dur, of course. I realise that now. *goes to remove*
Well, actually, I can provide a GML version which is Lite-edition-friendly.
  • 0

#29 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 19 February 2010 - 10:02 PM

UPDATE: Added GML-only version and a link to the documentation - see OP
  • 0

#30 Masterjohn74

Masterjohn74

    GMC Member

  • New Member
  • 358 posts

Posted 23 February 2010 - 11:44 PM

when i downloaded the extension it said it was damaged why?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users