SCUMM template (Visionaire RC0)

  • #30, by afrlmeSunday, 14. May 2017, 18:24 7 years ago
    In regards to the attached screenshot... are you trying to show us that the positioning has been offset when the cursor was positioned near to the top of the screen?

    Seems like standard behaviour to me. You could adjust Sebastians script to offset action text below cursor or to left or right of cursor if cursor is too close to the top, left or right hand side of the screen as to obscure the text.

    Personally I think it's neater to have the text show up in a specific section of an interface or not at all than having it display by the cursor as it never looks that nice when positioned based on cursor as it depends on how you create each cursor sprite/animation, whether or not they all have same canvas size, animation center & so on. & then you have the issue with action text getting a forced offset if the cursor is moved too close to the edge or the text not being visible because it ends up off the screen instead.

    Imperator

    7278 Posts


  • #31, by sebastianSunday, 14. May 2017, 19:08 7 years ago
    I guess the action text polygon he set for the action text in the interface is a bit "off placed" so that the text appears at the left side of the cursor.

    A further down point (yet) to my system is that the action text doesn't recognize  the screen border and by that appearing text may get cut off. I see no easy way to fix this...


    Thread Captain

    2346 Posts

  • #32, by afrlmeSunday, 14. May 2017, 19:52 7 years ago
    I guess the action text polygon he set for the action text in the interface is a bit "off placed" so that the text appears at the left side of the cursor.

    A further down point (yet) to my system is that the action text doesn't recognize  the screen border and by that appearing text may get cut off. I see no easy way to fix this...


    The only solutution to that is to check cursor position on screen. getCursorPos() returns mouse position of current camera viewport & not the entire scene which is why game.ScrollPosition is also needed to find absolute cursor position. Anyway, with just getPosition on it's own you could check if x more than 100 (or something) then offset text to right hand side of cursor, elseif x more than game default resolution - 100, offset to left elseif y more than 100 offset to bottom of cursor. Not pretty, but would sort out any screen edge issues.

    Imperator

    7278 Posts

  • #33, by gabartsSunday, 14. May 2017, 20:01 7 years ago
    Started again a new template on higher res, all is working so far apart the action text of course... I will do some tries then I'll post the file when I'm at good point.

    Forum Fan

    137 Posts

  • #34, by sebastianSunday, 14. May 2017, 21:04 7 years ago
    I guess the action text polygon he set for the action text in the interface is a bit "off placed" so that the text appears at the left side of the cursor.

    A further down point (yet) to my system is that the action text doesn't recognize  the screen border and by that appearing text may get cut off. I see no easy way to fix this...


    The only solutution to that is to check cursor position on screen. getCursorPos() returns mouse position of current camera viewport & not the entire scene which is why game.ScrollPosition is also needed to find absolute cursor position. Anyway, with just getPosition on it's own you could check if x more than 100 (or something) then offset text to right hand side of cursor, elseif x more than game default resolution - 100, offset to left elseif y more than 100 offset to bottom of cursor. Not pretty, but would sort out any screen edge issues.

    The problem here is that the text is positionated  centered above/under the cursor with my mentioned interface approach. 
    The interface itseld has no width and the text has no automatic line break here.

    And because you don't know how much text gets displayed in the first place when hovering an object at the screen border you need to determine the text width dynamically with
    graphics.fontDimension("the action text").x and check if this/2 would will fit to the left or right (depending on the edge your cursor is at) and if not add -1/+1 to its offset so often until the action text fits again. 

    By that it would simulate the normal "draw action text at cursor" behaviour only with the text centered...
    Questionable if its really necceccary ^_^

    Thread Captain

    2346 Posts

  • #35, by gabartsSunday, 14. May 2017, 21:54 7 years ago
    Is not a must, that effect is from Thimbleweed park but classic SCUMM is usually a fixed action text. Now I'm fine, I've set up an action text in the upper part, now I'm trying to understand how hotsposts and way points works. The main problem I think is working on this old template full of conditions that maybe can be easily avoided with just some basic script (which obviously I can't code) smile

    Forum Fan

    137 Posts

  • #36, by sebastianMonday, 15. May 2017, 00:06 7 years ago
    yeah... right now im preparing assets for my coming tutorials to hopefully replace the old templates:

    Thread Captain

    2346 Posts

  • #37, by afrlmeMonday, 15. May 2017, 00:18 7 years ago
    Is not a must, that effect is from Thimbleweed park but classic SCUMM is usually a fixed action text. Now I'm fine, I've set up an action text in the upper part, now I'm trying to understand how hotsposts and way points works. The main problem I think is working on this old template full of conditions that maybe can be easily avoided with just some basic script (which obviously I can't code) smile
    All games are made up of conditions & values - even AGS games. Have you watched any of the youtube videos created by Redspark or Andi? They can all be found on the tutorial section of the wiki. I think Redspark has explained pretty much all of the basics in his tutorial series.

    Imperator

    7278 Posts

  • #38, by gabartsMonday, 15. May 2017, 11:13 7 years ago
    Yes, I've watched all. They are good but still I think lot more needed for more deep aspects of the software. Then of course know how to code in LUA also helps... smile

    @Sebastian
    GOOD! It's what I need. Basically I wanted to start a "modern" style game but the old look beauty of SCUMM system is always attracting me smile btw are you doing in German or also in English? The template i'm working on is in english (even if some variables I've made in italian but you can easy understand them. But basically is a little updated version of the good template of maniac mansion you found here).

    Forum Fan

    137 Posts

  • #39, by sebastianMonday, 15. May 2017, 11:44 7 years ago
    @Sebastian
    ...  btw are you doing in German or also in English? The template i'm working on is in english (even if some variables I've made in italian but you can easy understand them. But basically is a little updated version of the good template of maniac mansion you found here).
    the youtube tutorials will be in german but i will use english names in my template for all stuff, so its usable for everyone. I plan do do english subtitles for the video and a little handbook/guidethingy (also english) here, too

    Thread Captain

    2346 Posts

  • #40, by afrlmeMonday, 15. May 2017, 12:30 7 years ago
    Yes, I've watched all. They are good but still I think lot more needed for more deep aspects of the software. Then of course know how to code in LUA also helps... smile
    Lua script isn't an exclusive scripting language belonging to Visionaire Studio. It's used by various other game engines, applications & even sometimes in website programming. I recommend checking out phailed.me as his blog is really easy to understand for the basics of Lua script. As for the VS exclusive Lua script you need look no further than the scripting & data structure pages on the wiki. If you read through the information, then you should get a grasp more or less on what you need to do; though shorthand scripting method isn't documented at all - it's hard because I don't know what works with shorthand & thus is mostly down to trial & error.

    Imperator

    7278 Posts