Author Topic: Hey- Character Portraits in messages?  (Read 25658 times)

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Hey- Character Portraits in messages?
« on: 2008-04-20, 08:02:28 PM »
HEY IS THERE ANY WAY TO MAKE THIS?

You know, RPG styled character portraits to certain messages?
(the portrait is on the left and the message is on the right)
« Last Edit: 2008-04-20, 08:05:38 PM by Pizzaman »

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Hey- Character Portraits in messages?
« Reply #1 on: 2008-04-20, 09:09:45 PM »
It wouldn't be hard to edit the message-displaying function to draw the box a little larger and draw some tile graphics in the expanded area.  It's more hassle than I want to deal with myself at the moment, but shouldn't be terribly difficult.

Richard Kain

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: Hey- Character Portraits in messages?
« Reply #2 on: 2008-05-13, 10:27:56 AM »
If you have any experience with C#, it shouldn't be too hard. Like he said, all you need to do is extend the message box a little and fill the extra area with some frame graphics. It wouldn't be too difficult to animate the frame graphics using a series of sprites to make it look like the character's mouth is moving as well. I've always been pretty keen on this sort of thing. Obviously, the ultimate goal would be to enable full lip-syncing support for "talkie" characters. Your best bet for that would probably be Papagayo from Lost Marble, or perhaps the .Net framework 3.0. (although I wouldn't really recommend .Net 3.0, as it requires Vista)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Hey- Character Portraits in messages?
« Reply #3 on: 2008-05-13, 11:08:27 AM »
I don't believe .NET 3.0 requires Vista.  Some aspects of it (or .NEt 3.5) might rely on Vista (WPF graphics, for example, might rely on DirectX 10, which might rely on Vista), but I'm developing full time on .NET 3.5 under XP at work and haven't seen any problems.

Richard Kain

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: Hey- Character Portraits in messages?
« Reply #4 on: 2008-05-13, 08:19:26 PM »
Really!? Perhaps I should have another look at 3.0, then. I am absolutely not going to upgrade to Vista. But if I can get 3.0 running on XP, I would certainly like to take advantage of some of its features. Specifically, I know that 3.0 has voice recognition functions that would make implementing a lip-sync system fairly easy.

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Hey- Character Portraits in messages?
« Reply #5 on: 2009-05-07, 01:39:50 PM »
I am resurrecting this thread!  :pray:

I just started making the modifications for integrating character portraits in messages.  As I can see, correct me if I'm wrong, the messages are a kind of layer that behaves like other layers.  I already made a custom function called ShowDialogMessage rather than ShowMessage.  With this function, the size of the message box is fixed and there is a space reserved for a character portrait.  The function takes a string and spritedefinition as parameters.  I just need to insert the sprite in the proper location.  Of course, the sprite def is meant to be the character portrait. 

I didn't spend a lot of time on this yet, but I couldn't figure how to make the sprite appear in the message box, even with the right spritedef received in parameter.  I looked at the AddSpriteAtPlan function to get code example but the sprite does not appear.  (It compiles and runs without any error though...)  ???

Before I spend more time with this approach, does anyone as a better suggestion to make the sprite appear?  Should I use another part of code as example?

Thanks a lot!  ;D
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Hey- Character Portraits in messages?
« Reply #6 on: 2009-05-07, 04:21:48 PM »
Ah sh**!  Just found out that Message Layer inherits from ByteLayer and not from LayerBase...    That might be my sprite isn't drawn on the message layer...  hmmm...  Need a hand here please! :-[
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Hey- Character Portraits in messages?
« Reply #7 on: 2009-05-07, 06:41:25 PM »
Don't use sprites!  Use a tileset that has the face image as one of the tiles
Edward Dassmesser

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Hey- Character Portraits in messages?
« Reply #8 on: 2009-05-07, 07:38:40 PM »
Hum...  Yes I could I guess...   :suspious:

But wouldn't it be simpler, when the sprite is drawn, to switch it's states to make it talk, move, etc?   ???

Ah well I guess the same can be done with animated tiles... 

Okay, you're right Durnurd!  I'll use tiles to show the portrait. :)  Thanks! :D
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Hey- Character Portraits in messages?
« Reply #9 on: 2009-05-08, 01:01:52 AM »
wohoo! go for it Vincent!

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Hey- Character Portraits in messages?
« Reply #10 on: 2009-05-08, 01:15:00 AM »
<insert motivational poster here>

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Hey- Character Portraits in messages?
« Reply #11 on: 2009-05-08, 05:33:15 AM »
The message in the sample game shows an animated portrait in the message.  Have you seen the visual message editor in SGDK 2.1?
« Last Edit: 2009-05-08, 05:36:35 AM by bluemonkmn »

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Hey- Character Portraits in messages?
« Reply #12 on: 2009-05-09, 02:44:02 PM »
Well I think that's done! :)

The sample project was a good example indeed bluemonkmn! :)

I extended the GeneralRules partial class.  Pretty much everything is explained into the code I added.  It's in a separate file called "ShowDialogMessage.cs".  I've haven't tried with animated portrait, but I don't see why it wouldn't work.  Same as any other animated tile.

Here's a pic of what it looks like in my game.
I am also attaching the code.  Simply add it in your project to make the ShowDialogMessage function available.  To customize the size of the portrait or the size of the message box, some values can be changed in the source code.  They are identified, so it's not difficult to find them.

The code is certainly not perfect, but it does the job.  Thanks for your help and support everyone! :D
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Hey- Character Portraits in messages?
« Reply #13 on: 2009-05-11, 07:04:16 AM »
Huh?  ???

Why are the files gone?  I verified that they were ok when I posted them, but today they're gone?   ???
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Hey- Character Portraits in messages?
« Reply #14 on: 2009-05-11, 11:55:07 AM »
Dreamhost just moved all my sites to a different server.  Apparently any files uploaded during some time period the day before yesterday or yesterday were not transferred.  I'm not exactly sure what that time period was.