playMaker

Author Topic: GUI scale with screen resolution  (Read 1227 times)

EpicMcDude

  • Playmaker Newbie
  • *
  • Posts: 45
GUI scale with screen resolution
« on: July 20, 2020, 04:42:41 AM »
Hi all,

So I'm new to Playmaker, been using it for about 4 weeks now and I decided that I wanted to try and make a dialogue system using it.
I kinda managed to do that using the GUI Button and GUI Text Field styles and arrange them on the screen but they obviously don't scale with the resolution as they have no anchors.

I'm also using the Set GUI Skin to set options for font, style, position etc.

I have been googling around a lot and and I think I should be using some sort of rect transform action? And it also seems that the GUI I'm using is outdated?

I tried prototyping with the canvas and make text using Unity's UI since those have the anchor points but it wasn't near as flexible as Playmaker for branching dialogue.

I attached examples of my FSM and the game screen showing how the different resolutions affect the GUI.

Does anyone know how I can anchor these so that they don't overlap and the font stays the same size for each resolution?

If this hurts your head by how noob I am, sorry in advance!

Thanks!


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: GUI scale with screen resolution
« Reply #1 on: July 20, 2020, 03:16:17 PM »
Hi.
Can you tell why canvas limits flexibility?

GUI is indeed outdated and one issue with it is resolutions :)

EpicMcDude

  • Playmaker Newbie
  • *
  • Posts: 45
Re: GUI scale with screen resolution
« Reply #2 on: July 20, 2020, 04:01:21 PM »
Hi.
Can you tell why canvas limits flexibility?

GUI is indeed outdated and one issue with it is resolutions :)

Oh crap... so I basically can't use GUI.

When I was testing my possibilities I prototyped with 2 NPCS, one using Canvas dialogue and the other GUI, however with the canvas I still went with the GUI Button for the player responses, but Canvas for the NPC dialogue. I immediately noticed the NPC dialogue was fixed and scale properly but the player's responses weren't. I just assumed I would be able to fix that with some Playmaker actions.

Since it's a branching dialogue path and I want certain dialogue to happen once and certain actions happen after choosing a dialogue option, making it all in Playmaker with GUI and global variables seemed easier to me.

I'm not quite sure how to set something like that using only Canvas - can I make it like GUI Skin and have a different color when the cursor hovers above the dialogue choice etc? Do I use canvas Button instead of GUI Button to select dialogue choices?

I guess I'll have to test this further before I make any more stupid questions!

Thanks for the help djaydino! I'm going to prototype canvas dialogue.
 

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Re: GUI scale with screen resolution
« Reply #3 on: July 20, 2020, 04:51:12 PM »
I haven't done much dialogue with Playmaker, but I can't see why you would think canvas option is worse compared to GUI.
Anyway, from what I can tell listening to people who have done dialogue in Unity, I got this impression:
White dialogue in a different program that can format dialogue in a programming readable format, most likely in a JSON file or xml.
If you want an example of formatting, look up Ink by Inkle Studios.
Make your "read text from file" method in Playmaker and parse the data into the dialogue box based on the formatting.

Thats the gist of it anyway.