1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Lightweight Objects (Structs) Alternatives

Discussion in 'Programming' started by zorngeist, Dec 3, 2019.

  1. zorngeist

    zorngeist Member

    Joined:
    Jun 9, 2019
    Posts:
    2
    I am completely new to GM (and programming in general) and have been looking for something akin to structs to use in my project. Anyone know if Lightweight Objects are going to make it in before 2019 is over? Described here: https://www.yoyogames.com/blog/514/gml-updates-in-2019

    A quick Google has returned a few alternatives to structs. It sounds like #1 is the easiest for the time being, but speaking as a complete noob, I wanted to get some input on this from the GM community. How do you guys handle structs in your projects?

    #1 Combining enums with arrays to make structs:
    https://forum.yoyogames.com/index.php?threads/can-i-make-a-struct-in-gml.57527/

    #2 A redditor's method using deactivated instances:
    https://www.reddit.com/r/gamemaker/comments/bdt6q4/gms2_presenting_struct_true_structs_in_gamemaker/

    #3 GMStruct:
    https://forum.yoyogames.com/index.php?threads/gmstruct-struct-generation-for-gamemaker-studio.29731/
     
    Kezarus likes this.
  2. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,442
  3. robproctor83

    robproctor83 Member

    Joined:
    Sep 30, 2019
    Posts:
    117
    I'd love to think they will release them any day now, however I get the feeling it's going to be pushed back... but, I have no idea really.

    @YellowAfterlife your GMEdit tool is really nice. I just downloaded it and gave it a run, very good. I'm not sure how much use I'll get out of it though, having to switch back and forth to run the game is a bit tedious, but for large scripting projects I would much prefer GMEdit. Any idea why there is a line across the screen vertically? See the attached image.
     

    Attached Files:

  4. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,442
    That's the print margin, you can disable it in code editor settings

    You can use builder plugin to compile from GMEdit, or a macro.
     
  5. zorngeist

    zorngeist Member

    Joined:
    Jun 9, 2019
    Posts:
    2
    Cool. I'll stick with enum arrays for the time being. GMEdit looks like an interesting tool to have available when I find myself needing more advanced features. Thanks for the input.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice