Tuesday, August 27, 2013


  A month ago (give or take a day) I released Nagai Yamiji!  So let's tally up those sales and see if I made that 1k goal... Well as of the time of writing, I've made 826 sales across PayPal (before they shut me down), Gumroad, and DLSite.  83% of the goal?  Well that's a B where I come from!

  In other news I'm going back to Gamemaker 8 for the next game, since the latest version of Studio completely removed any way to create a pause screen and it was already fuckin' hard enough.  So going back to 8 gives me my good ol' pal screen_redraw() which is just so freakin' useful it's not funny that there's no alternative to it in Studio (at least that I can figure out).

  It's also been part of the hold up on getting an uncensored version of NY out, since I've been trying to get the latest version of Studio to work for like a week (and I've been crazy procrastinating...)  So now I'll need to find some older version of Studio and just use that for NY :\


  1. Eh there were buttload of patches for studio and I hit bumps most of the time for labcoax. Most recently I came across with global variables not recognized. Did you encounter a similar thing?

    I too have yet to find a way around game pause. Congratulations on the sales!

    1. Interesting, no I didn't have that problem personally. Mostly just some functions being removed that messed with me the most.

      And thank you :) Quite pleased with sales myself!

  2. Doesn't the usual pause code work in studio? As in:

    create event (base entity object):

    step event (base entity object, first line):
    if !update exit;

    pause script:
    with (oEntity) update=!update;

    1. Also, just to be clear, I too think studio is shit, but reverting your code back to being gm8 friendly seems counterproductive in the long run :x.

    2. That would work but not if you want to have a pause menu :\

      But yeah, there's nothing I can really do to bring Nagai Yamiji back to GM8 without it being a complete and total bitch.

    3. How so? That's how I handle pausing in my games since I can remember, and they always have some sort of pause menu. Just stop shit from updating (usually it's just the entities and stage/world controller) and handle the menu through a controller object. I can be of some assistance if you want.

    4. Yeah that's how I would do it before Studio, but Studio removed the screen_redraw(), screen_refresh(), and io_handle() which are necessary for that.

      And now the latest version of Studio has also removed sprite/background_create_from_screen() and glitched out the ability to load graphical resources from external folders using background_add() and the like, so there's no way to take screenshot of the room and use that either.

    5. >>screen_redraw(), screen_refresh(), and io_handle() which are necessary
      Wut? None of those are necessary--don't stop the instances from drawing, only updating, then just draw the menu through the draw event (I'm assuming you'd do it in step, since that's the only practical use for screen_rexxxxx() that I can think of).

      >>removed sprite/background_create_from_screen()
      Are surfaces still intact? You can screencap onto a surface and then go from there.

      Anyway, studio has a lot of advantages over the previous versions of gm, that's why I think that it'd be worth it to simply learn the workarounds for stuff like this and just stick to it. That and the fact that as soon as you copy your current code into gm8, it'll all fall to shit.

    6. Yeah I'll make the pause to use surfaces from now on. I ported from gm8, and at that time, screen_create_bg seemed like the easiest manner to capture screen (efficiency was not top priority when I started lol). I'll also check the update=true, as I did not know this!

      Anyhow I'll likely be spriting for the time being and wait for a new little patch fixing (hopefully) the issues I have.

    7. Ah okay, I misunderstood what that code was meant to do. How I used to do it was to create a loop and then refresh the screen as the pause menu was drawn, which relies on those functions.

      Perhaps the only annoying thing about that, if I'm understanding correctly, would be that image_speed would continue to update the instance's animation. Would you have to store the current image_speed in a separate variable and then replace it when you unpaused? That seems messy to me :P Is there some simpler way? Regardless, thanks a ton! I had a thread on the GMC for over a week asking for how to make a pause menu through Studio and no one was of any help.

      So how would you use surfaces for that? Would you manually draw all the backgrounds/tiles/instances/particles to the surface (essentially emulating screen_redraw)? Also seems messy :P Maybe I'm just weird about my code, heh.

    8. @You both
      Well, taking a screencap and then drawing it under the pause menu isn't really necessary either. Just don't instance_deactivate(), and use custom variables instead for whether an instance should be updated and/or drawn, which is essentially the same as deactivating an instance but gives you more freedom on doing stuff with those inactive instances. Eg. I use 'update' to check whether one's step event should go through, and 'drawme' for the draw event. This way I can deactivate an instance but have it still being drawn. So when pausing I only have to call update=!update on all the instances, and that's basically a fully-functional one-line both-ways pause function (don't make it a loop, call it only once, eg. when you hit the pause key, and the same piece of code works for both pausing and unpausing).

      Here's an easy workaround. The pause script would have to look something like this:

      with (oEntity)
      if !update {_image_speed=image_speed; image_speed=0;}
      else image_speed=_image_speed;}

      Note the underscore prefix--it's good practice to name certain variables this way if you only want to temporarily store one var's value. Also, personally I don't use the native gm environment as much when it comes to objects and define everything with custom code instead, which is great because doing update=false will literally stop an instance dead in its tracks (not even its coordinates will be updated). This may sound a little black magic at first, but it's really just a few short lines of code.

      Sorry about the wall of text, but I hope it helps. :)

    9. Alrighty I got ya! It's workin' perfectly now :) I make my own variables for hspeed and whatnot, so it's not too much to ask for me to make another variable for image_speed :P I also just made the update variable a global variable, since I don't think I'll be pausing some things and not them all anytime.

      Thanks for that suggestion! The entire GMC didn't help as much as that did :P

  3. ///create event
    surface = surface_create(480,272); ///your resolution
    view_surface_id[1] = surface; ///hook it to a view
    can_create = 0

    if can_create = 0
    screenshot = sprite_create_from_surface(surface, 0, 0, 480,272, 0, 0, 0, 0);
    can_create = 1

    make view 1 match the first view. This will behave pretty much like sprite_create_from_screen()

    1. Woah, weird spacing there.

      Anyhow, just deactivate every object but your menu, and use that code to display the paused image behind it.

    2. That does work for most people, but the game will finally crash on certain systems after you pause enough times. Even though you use surface_free, it doesn't really remove it from VRAM--again, this is system dependent, rare, but worth considering. Oh and it's the same with sprite_create_xxxx.

      So anyway you can make it work for everybody by creating one surface upon game init and using it for all your surface needs. You'd only have to define what's on it upon pausing like you did (but clear it beforehand) and draw it with draw_surface (there's no need to create a sprite for what you already have anyway).

      Also, why don't other devs read my emails :(.

    3. According to the documentation, the surface is cleared from vram as soon as the vram is required by the system. As for the sprite, it won't add memory as long as you delete it after use, as far as I know.

      Also, because surfaces are cleared from vram, you can't actually create a surface and use it forever since it might not exist anymore. The doc recommends surface_exists for checking that.

    4. I was wondering about view_surface_id was supposed to work. I tried a few different things but nothing seemed to work out :\ Thanks for that suggestion too!

    5. @Kyrieru
      >>According to the documentation
      Of course this stuff won't be in the documentation (actually it's not just surfaces, it doesn't cover a lot of special-case scenarios)--it's like saying "our shit works, most of the time" and that's just bad business.

      Depending on your hardware, removing a surface/sprite will do exactly what you said, OR gm will just forget its index, which over time will lead to an overflow. And surfaces aren't just randomly being cleared from vram, the only two possibilities are either you clear it, or your OS does (eg. when you enter win7's task manager). This comes from my experience as a code nazi ;). I do this to not have to worry about any of this:

      //script canvasDefine
      surface_set_target(canvas); //this
      draw_clear_alpha(c_white,0); //is actually
      surface_reset_target(); //mandatory

      //main controller object

      //begin step
      if (canvas<0) canvasDefine(); //this is the same as surface_exists, only a lot faster

  4. did you still get the paypal money?

    1. Still waitin' on that. Hopefully they're releasing my funds by the 22nd.

    2. Dunno if you already heard, but gumroad is also cutting off adult content.

    3. I knew that their terms were against any content that was "harmful to minors" whatever the hell that actually means... If they crack down on me I'll try the same explanation that failed with PayPal in that I'm only selling a text file. Dunno if that'll fly with them, but I gotta hope.

  5. hey brooo, i know how to make an easy pause button in gamemaker studio.
    I can show you how, its like cut and paste, I already wrote the object.
    let me know if you need help, I'm also recruiting people to work with to make some random games. I can also convert any projects you have into gm studio from gm 8.
    And if you need free gm studio with ALL exports I can get it free.