Make a Title Screen + Character Select?

Discussion in 'Programming' started by Edmen12, Jun 29, 2016.

  1. Edmen12

    Edmen12 Guest

    Hello everyone! I am wondering how to create a Title Screen (for an RPG) where after you select Play, you have the ability to create your character. Or rather simply select the race (i.e. Elf, Dwarf, Human, etc.) and then after that select the class (i.e. warrior, paladin, archer, wizard, mage, etc.).

    From what I know, you will need different objects for each of these right?

    For example would it be like one object is "obj_player_human_warrior" and another is like, "obj_player_elf_mage" and ect. for the different combinations.

    Is that a correct assumption to make?

    Then after I have created these different obj's and stats / move scripts / attack scripts for each one I'd need to make the menu display "Select Race" and then a "Select Class" and have game maker load each object individually depending on what the player selects.

    And after that I'll need to update the room for the obj_view that follows the player to be an if statement right?

    So that if the player chooses "obj_human_warrior" then that object will spawn in the room and what not.


    So, I just need help with how to create a Menu Screen with an array to select "Play" then "Select Race" and lastly "Select Class" then after those two things are selected I'd need it to load the appropriate objects into the room.

    Can anyone help me with this? I'd appreciate it very much if someone could, thanks!
     
  2. Aura

    Aura Guest

    There are two easy approaches that you could go for: First, create different objects for different characters. Second, keep a single object and change the sprites depending on the character chosen.
     
    Edmen12 likes this.
  3. NeoShade

    NeoShade Member

    Joined:
    Jun 21, 2016
    Posts:
    166
    Personally, I'd take Aura's second approach here, otherwise the number of objects you'd need to create could quite easily get out of hand.
     
    Edmen12 likes this.
  4. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,955
    For visual side of things, a simple approach is to have a variable that tracks the current state of selection process, let's call it for example TitleState. When TitleState equals "Idle" game is waiting for Play button press. When it equals "SelectRace" game is waiting for race selection. When it equals "SelectClass" the game is waiting for class selection. A logical place for the variable would be a titlescreen object, which runs all logic related to that room's actions (I normally have one object for each special room in game, like obj_titlescreen, obj_highscores, obj_settings and so on). You check for the variable's state in the draw event and create clickables on screen accordingly. You set it to "idle" in create event so it starts with displaying a Play button every time the titlescreen room is entered.
     
    Edmen12 likes this.
  5. Edmen12

    Edmen12 Guest

    Firstly, I want to thank you both SO much for responding to my help request!
    Secondly, I'm still really, really new to game maker and coding / programming. Recently I've been following a tutorial by Heart Beast on youtube on how to make an RPG in gamemaker.

    So if there is a page number in the help manual where it speaks directly how to do all this menu stuff, could one of you direct me to that page?
    Or, preferably if either one of you are willing to work with me on a more personal level if we could arrange a date / time for a skype screen share and call, that would be fantastic and super helpful too!
     
  6. Aura

    Aura Guest

    The Manual does not teach you how to implement game mechanics sadly. But the second approach I talked about is really simple to implement.

    You can set a global variable (declare it in the creation code of character selection room) to a string related to the chosen character. Say if you choose an elf as your character, set it to "Elf".

    Now in the Create event of the player object, you can declare some variables to hold sprites related to the chosen character.

    Code:
    if (global.character == "Elf")
    {
        s_walk = spr_elf_walk;
       s_idle = spr_elf_idle;
    }
    else if (global.character == "Mage")
    {
        s_walk = spr_mage_walk;
       s_idle = spr_mage_idle;
    }
    // ...
    
    Now whenever you need to change your sprite, use those variables.

    Code:
    sprite_index = s_idle;
    
    I hope that helps! :3
     
  7. Xer0botXer0

    Xer0botXer0 Member

    Joined:
    Jun 29, 2016
    Posts:
    670
    Whoops I misread,

    You can use an array with predefined classes as values, then in character creation use a variable that's incremented or decremented by one every time an arrow is selected, then a submit button will save that variables value to your characters personal properties. or just move onto the next stage.

    You can use a switch statement to change what's being loaded onto the screen, changing the value when you've saved your settings and moved onto the next step of character creation.
     
    Last edited: Jun 29, 2016

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