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

GML Speeding up cutscenes/gameplay event coding

Discussion in 'Programming' started by AlessioForlanteDev, Dec 1, 2019.

  1. AlessioForlanteDev

    AlessioForlanteDev Member

    Jul 11, 2018
    Hey guys. I'm making a game that is based on missions, during which I have to control things such as enemy behaviours, dialogues, cutscenes, ecc.
    Hello :)

    I am making a game that has alot of missions and cutscenes.
    The way I code them right now is by having the main mission script with a "missionstage" variable, and I play with that to start and end events. I just then "inject" actions into the actors, so that they move during cutscenes and all that.

    Now, this method works, but it takes AGES to make missions, and if I don't speed this up considerably it's going to take years to only to code the missions. This isn't ideal.

    The problem is that even basic actions need a lot of code and testing.
    For instance, let's talk about a small cutscene I worked on. It required the player to get to a point, the camera would then move to a certain point, a character would spawn with certain settings that made him cutscene-friendly, move to a point, do some actions and the cutscene would be finished.

    This took me like 3 hours to do. That's way too much.

    The first issue I have is that I have to "hardcode" everything. Every time I spawn a guy, I need to code his settings. If a player needs to get in a car during a cutscene I have to do all sorts of funky **** under the hood to actually have the cutscene play, and this is for all things missions, cameras, ecc.

    The actual gameplay parts don't take much long at all, it's just these kinds of sequences that take ages.

    So I have been thinking of making some scripts that I can reuse for these actions, so that I wouldn't have to code so much every time but oftentimes I find myself in different, unique situations, so I'm here looking for ideas, something like a mission scripting language that I could build.


  2. NightFrost

    NightFrost Member

    Jun 24, 2016
    You've already done a lot of code on your system, so I'm not sure how useful looking at another would be (unless you start from scratch) but here's one cutscene tutorial series, by FriendlyCosmonaut.

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