How do i make a hubworld, and a level goal?

Discussion in 'Game Design, Development And Publishing' started by GamingDragomachina, Jan 2, 2019.

  1. GamingDragomachina

    GamingDragomachina Member

    Jan 2, 2019
    I played around with Game Maker abit and am attempting to create a 2d platforming video game similar to mario.

    I know how to create sprites, but i need help with coding it using drag and drop coding (the style im using since im a noob) to make a level goal that will give a summary of points earned and add to a overall total of points from previous levels.

    Also, i want the player to be able to go to the levels through a hub world.

    having a room with a portal of sorts to all the different levels.

    So uuhhhh... How exactly do i do that? Any help is appreciated!
  2. dialgpalkia

    dialgpalkia Member

    Jan 2, 2019
    I'd say use global variables for the Overall Score; Use an Code Block with global totScore = 0;
    Then in the Collision with End Event add a code block that says totScore = totScore + currentScore where currentScore is the score you change during the game.
    As for moving to different rooms; use Collision Event with Go To Room block.
  3. Yal

    Yal Member GMC Elder

    Jun 20, 2016
    Break it up into two simple steps:
    • Have portal objects that lets you change rooms. Ideally you want to give them a "my_room" variable whose value is set in the room editor using Instance Creation Code, so you can make each portal go to a different room with just a single object.
    • Figure out a way to store game state and transfer it between rooms, like having a global array to store the status of each level (locked, unlocked, cleared), which is used by the portal to see if they will be interactible or not.

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