1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

GML [Tool] GMEdit

Discussion in 'Game Design, Development And Publishing' started by YellowAfterlife, Dec 25, 2017.

  1. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    You should be able to use
    Code:
    file:///C:/.../<GM doc path>/$1
    
    (also note that API changes only take effect after restarting GMEdit)
    GMLive has approximately nothing to do with the docs so I'm not sure why you'd be using it's server for this.

    Thank you!
     
  2. CameronScottCreations

    CameronScottCreations Member

    Joined:
    Dec 1, 2018
    Posts:
    68
    @YellowAfterlife Hey I ended up downloading this and it's even better than I could have imagined. It's so lightweight and elegant! :)
    I do have a question though in regards to the backups. I'm working on project for a company on GMS1 and I push changes to a master using source control and would rather not have to push my backup folder. Is there a way to change the storage of the backup folder to my desktop or something? If not, is it that necessary to maintain the backups? I noticed in the settings I can reduce the number of backups from 2 to 0 and may do just that. However, there were a couple of times working on the project where the IDE noticed a conflict between an older version of a file and a newer version. Each time I chose the newer version of the file, but these conflicts gave me pause in reducing the backup count from 2 to 0. Thanks!

    Edit: So it seems this is necessary protection when working with GMS1. Still, if you have a way of moving this folder away from the repository folder that would be great!
    If not, I can always just take the folder out manually before adding and committing my changes although that would be a slight hassle.
     
    Last edited: Dec 12, 2018
  3. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    Thank you!

    Just add
    Code:
    /#backups/
    (or /project/#backups/ if it's in a subdirectory)
    to your .gitignore file.

    If you are using a git GUI client, you should have an option to add file(s) to gitignore to the right-click menu when picking them for a commit, and there's usually a "ignore the directory" option to make things easier (but in the end this still just adds a line to .gitignore)
     
    CameronScottCreations likes this.
  4. CameronScottCreations

    CameronScottCreations Member

    Joined:
    Dec 1, 2018
    Posts:
    68
    @YellowAfterlife One of the projects I'm working in is constantly indexing.

    indexing.png

    Is this something I should be worried about and/or something that has a known solution?
     
  5. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    Press Ctrl+Shift+I and copy me the error message from console tab, that's usually the only cause of that
     
  6. Samuel Venable

    Samuel Venable Time Killer

    Joined:
    Sep 13, 2016
    Posts:
    996
    When is YoYo going to hire you as an official developer of GM? Have you ever looked into that? I think with your level of expertise, you'd be surprised.
     
    immortalx likes this.
  7. CameronScottCreations

    CameronScottCreations Member

    Joined:
    Dec 1, 2018
    Posts:
    68
    Code:
    app.js:288 hello!
    app.js:15272 Uncaught TypeError: Cannot read property 'startsWith' of null
        at Function.parsers_GmlSeeker.runSyncImpl (app.js:15272)
        at Function.parsers_GmlSeeker.runGmxObject (app.js:15504)
        at Function.parsers_GmlSeeker.runSync (app.js:15523)
        at next (app.js:14648)
        at tryToString (fs.js:449)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436)
    64ace.js:3999 misspelled option "foldStyle"
    warn @ ace.js:3999
    app.js:15272 Uncaught TypeError: Cannot read property 'startsWith' of null
        at Function.parsers_GmlSeeker.runSyncImpl (app.js:15272)
        at Function.parsers_GmlSeeker.runGmxObject (app.js:15504)
        at Function.parsers_GmlSeeker.runSync (app.js:15523)
        at next (app.js:14648)
        at tryToString (fs.js:449)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436)
    app.js:15272 Uncaught TypeError: Cannot read property 'startsWith' of null
        at Function.parsers_GmlSeeker.runSyncImpl (app.js:15272)
        at Function.parsers_GmlSeeker.runGmxObject (app.js:15504)
        at Function.parsers_GmlSeeker.runSync (app.js:15523)
        at next (app.js:14648)
        at tryToString (fs.js:449)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436)
    app.js:15272 Uncaught TypeError: Cannot read property 'startsWith' of null
        at Function.parsers_GmlSeeker.runSyncImpl (app.js:15272)
        at Function.parsers_GmlSeeker.runGmxObject (app.js:15504)
        at Function.parsers_GmlSeeker.runSync (app.js:15523)
        at next (app.js:14648)
        at tryToString (fs.js:449)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436)
    36ace.js:3999 misspelled option "foldStyle"
    warn @ ace.js:3999
    
     
  8. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    643
    This looks really good! I also love that you extended GML in this editor.

    I don't know if anybody has suggested it yet, but maybe, just maybe, you can add in the support for multi-threading the same way as Mishmash does it:
    https://forum.yoyogames.com/index.p...eading-in-gamemaker-no-dlls-networking.44268/

    I'm not certain if you can make this compatible with GMEdit,and maybe there are legal problems with this you want to avoid, I don't know, but I would go nuts if there's decent support for multi-threading in GameMaker :)
     
  9. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    Thanks! That did happen for a bit.

    Hm, ideally I'd need a sample of the project where this happens.
    If you open dev tools prior to loading the project, you can switch to Sources tab, tick "pause on exceptions" button on the right, and then check what file this happens in when it pauses on an error (so that you know what you need to isolate).

    I am working on a thing like that actually - and it's not just multi-threading.
    In fact, oftentimes you don't even need multi-threading because it's possible to squeeze far more performance out of algorithmic code (which is what my tool allows to do).
    The tool also offers easy-to-use C++ injection and makes it easy to debug/profile YYC projects in Visual Studio - from automated setup to matching up GML/C++ files for ease of navigation to making VS debugger display GML-specific values in a coherent way (not just as "{...}" mystery values):
    upload_2018-12-25_23-35-45.png
    So a pretty big deal for those concerned.

    But... yeah. This doesn't have very much to do with GMEdit - sure, you can now specify C++ types via type magic or use #import syntax to write code that doesn't just look object-oriented, but is object-oriented, but an editor has no part in the actual process.
     
  10. Samuel Venable

    Samuel Venable Time Killer

    Joined:
    Sep 13, 2016
    Posts:
    996
    Oh yeah, idk how I forgot that. lol

    *leaves so everyone can focus on the topic at hand*
     
  11. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    643
    Whoa whoa whoa, that looks amazing!

    Can't wait to get my hands on that :)
     
  12. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    New version is now out! This is a big one
    spite-view.gif
    Bigger additions:
    • Code editor now has a context menu
      • It has a pretty dumb "show references" thing
    • There are now tooltips for mouseovering functions, macros, variables, and so on
    • You can now import GMS1/GMS2 code editor colors as themes (see wiki)
    • There is now a sprite viewer for both GMS1 and GMS2
    • There is now regular expression search
    • Most code tabs are now restored when reopening a project
    Smaller additions:
    • `///prefix ...` now gets a `ace_startswith_prefix` CSS class
    • You can now view GMS2 extension functions/macros via context menu.
    • Local variables inside #lambda functions now get a separate color
    • Global search can now show search results in #lambdas inline
    • Added a preference to control how GMS2 events are ordered for display
    • <html> now gets a hasFocus attribute in case you want your themes to change depending on window focus
    • You can now do `#import func in Name:method` or `#import prefix_* in Name:`
      (without turning every func into Name.method - only the ones for var v:Name)
    • Added a preference to open resource tree items with one click
    • GMEdit now has a taskbar icon thanks to JustFredrik
    Improvements:
    • Thumbnails are now generated on-demand and perform much better in very large projects
    • NTT projects now have thumbnails for images
    • The item in resource tree now flashes a few times when you pick "show in resource tree"
    • Themes are now detected in the data directory so that you can remove the program directory and lose nothing
    • Auto-completion for namespaces now pops up when you type `var v:`
    Breaking changes for themes:
    • Code editor rules now use `#main .ace-tm` (the editor) instead of `#main .gml` (the whole right side) so you'll need to find-replace that in your themes to be `#main .ace-tm`
    • Numbers are now just .ace_numeric instead of .ace_constant.ace_numeric to avoid requiring CSS priority
    Changes:
    • You can now add a "//!usevars" line to your gmedit_lambda.gml after creating it to auto-workaround this bug (GMS <= 2.2.2).
    • Recent project list is now saved into the data directory rather than localStorage.
    • Newly created scripts now open automatically for editing
    Fixes:
    • Fixed local variables sometimes not immediately highlighting in newly added GMS2 object events.
    • Fixed replace.gml being too greedy, thus causing xstart/ystart to go missing from highlighting
    • Fixed "use tabs instead of spaces" setting not getting saved.
    • Fixed projects opened via command-line argument adding duplicate entries to recent projects list
    • Fixed GMEdit using uppercase GUIDs while GMS2 uses lowercase (causing GMS2 to lowercase them when it changes that file)
    • Fixed "#event name|desc" (no-space comment) not setting starting line to 2
    • Fixed it being possible to corrupt code with conflicting #import declarations (#import a in v + #import b in v)
    • Fixed "invisible characters" being light gray in dark theme
    • Fixed code indexing being able to get stuck due to errors
     
  13. Ludorverr

    Ludorverr Member

    Joined:
    Jun 20, 2016
    Posts:
    33
    love the progress

    here's a theme
     
    Last edited: Jan 13, 2019
  14. immortalx

    immortalx Member

    Joined:
    Sep 6, 2018
    Posts:
    161
    What an update! @YellowAfterlife is there a way to save the code editor setting "Keyboard Handler"? When I set it to emacs, it does remember it for the current session but everytime I re-launch GMEdit it resets to ace.
    I noticed these settings are stored in aceOptions.json, but there's no entry for keyboardHandler. Tried to add it myself with no success.
     
  15. YellowAfterlife

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

    Joined:
    Apr 21, 2016
    Posts:
    2,098
    Thank you! I added a link to your itch page to the theme list on wiki

    Ah! Was it you that asked about this? I was trying to find what was off about keyboard handlers but couldn't find who asked and what. I think the deal with that is that it's not actually a variable at all, thus you can't get/set it like that. I'll take a look at it for a smaller update soon
     
  16. immortalx

    immortalx Member

    Joined:
    Sep 6, 2018
    Posts:
    161
    Well, it wasn't me who asked but I'm glad it's not just me with weird requests :D
     

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