Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

[Answered] Audio cue with error

A topic by FantoMan created Jul 11, 2021 Views: 191 Replies: 4
Viewing posts 1 to 5

First, let me state that GMLive.gml is a life-saver. Without it I don't think I would use GameMaker since the development process would be too slow. Even if it cost $200 I would pay for it.

Now, it's commercial extension, so I bring two suggestions, for quality-of-life improvements.

The point of using GMLive.gml is to cut down development time by partially eliminating recompiles. However, often while live coding you have no clue whether an error has crept into the code, since the program is silent. You're supposed to check the output log, but by doing that you may be spending unnecessary time, not to mention it's cumbersome. Actually, I often would rather recompile than check the log, which betrays the purpose of the extension.

So, wouldn't it be great if an alarm sound is played whenever GMLive detects an error? That way you will only check the log when you know there's an error.

It would also be nice if a following like macro is added to obj_gmlive:

#macro LIVE if (live_call()) return live_result;

By typing LIVE rather than the whole function it makes things easier to read and use.

Finding or creating good, free sound effects shouldn't be a problem, but I made two that's better than nothing for your instance here.

Thank you for your work!

Developer (2 edits)

Thanks!;

  1. I can add a callback that you can define (like with room reload) to be fired whenever there’s an error, but I’m definitely not making it do sounds by default - should this be in a step/draw event, you’ll be hearing the sound repeatedly until the issue is resolved.

  2. I do not offer this kind of a macro out of box since it would not support script arguments, and it is not currently possible to pass script arguments into a macro without hacks.

I don't believe in complaining. I think that the worst thing with GameMaker is the slow compile times (compared to the competitors). It makes for slow iterations. So rather than yelling at YoYo Games, I decided to do something about it and for this sole purpose bought an expensive customized computer with a CPU five times faster according to the benchmarks. The results? It only cut down the compile times by 37.5%. I returned the computer. Better stick with GMLive.

I still think that it would be nice with a feedback somehow when you make an error. But I realize that you can adapt and live without it. An idea I haven't thought about before is this: since the game is running in fullscreen, and I would hate to scale the window down, I can offset it vertically 100 pixels to have the underlying output panel with the IDE show. This will make it quick to peek at the log, I can still code in Notepad++ and there's no alt-tabbing involved. I will do this from now on.

Developer

The new version (1.0.54) now has a log_level argument in live_log_script, so you can do

// in the end of obj_gmlive's Create:
live_log_script = function(text, level) {
    show_debug_message(text);
    if (level == 2) {
        // make a beep
    }
}

Wow, amazing, just what I wanted! And it works both with update and error.