• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Stage Select (Sonic Generations Style)

N

Noan2102

Guest
Hello! Good afternoon! I'm Brazilian, so forgive me if my English is bad. Anyway, this is my first post, precisely because I have a terrible doubt that is tormenting me because I don't know how to do it.

I would like to know how to create a 'Sonic Generations' style selection menu (see image below)

where this small screen appears to start the level.

I use Game Maker Studio 1.4

Thank you for your help

stageselect.jpg
 
H

Homunculus

Guest
Hey there, and welcome.

What exactly are you having problems with? I'm not familiar with the game, but from the screenshot you posted I can assume every stage has a "preview" image that, if static, could very well be part of the background, if that's what you are asking. Maybe a video of the whole thing could be useful to better understand how it all comes together.
 
N

Noan2102

Guest
Basically, it works like this: for each stage, there is a small door. When we press the upper button, this small window opens, where the stage name appears and everything. the selection options also appear ... it's something at that level.

I may not seem very clear, but I will leave a link to a video to better understand

18:24 - 18:30 (
)

Thank you very much for responding and good afternoon!
Hey there, and welcome.

What exactly are you having problems with? I'm not familiar with the game, but from the screenshot you posted I can assume every stage has a "preview" image that, if static, could very well be part of the background, if that's what you are asking. Maybe a video of the whole thing could be useful to better understand how it all comes together.
 
H

Homunculus

Guest
I looks like a background that pops into the screen after you press the button, with some text drawn on top. In fact, due to the animations, it's probably a composition of a few background images like the yellow spiky background, the decorative shapes on the sides, the specific level title, and the stage preview (a background / sprite as well). On top of that you have the description and the best time, which is probably drawn text.
It doesn't need to be composed of that many parts honestly if you want to go for something simpler, but that's the idea.

Out of all of the above, what exactly is troubling you? Is it the animation? The text? You really need to be a bit more specific, you can't expect to be given a tutorial or the full code for something like this in a forum post...
 
N

Noan2102

Guest
I looks like a background that pops into the screen after you press the button, with some text drawn on top. In fact, due to the animations, it's probably a composition of a few background images like the yellow spiky background, the decorative shapes on the sides, the specific level title, and the stage preview (a background / sprite as well). On top of that you have the description and the best time, which is probably drawn text.
It doesn't need to be composed of that many parts honestly if you want to go for something simpler, but that's the idea.

Out of all of the above, what exactly is troubling you? Is it the animation? The text? You really need to be a bit more specific, you can't expect to be given a tutorial or the full code for something like this in a forum post...
What I want is basically to open a menu / window when I press a button in a certain area, where I can choose the option to go back (close this window) or start the stage (Go to the next room (stage room))
 
H

Homunculus

Guest
I get that, but have you even tried?

Anyways, I'd probably do it in the following way (I'm obviously oversimplifying, but should give you an idea):

- Create a background that includes: the yellow part, the decorations on the left and right, and the white text box (without the text)
- Create a "screenshot" for every stage, and import is a background or sprite
- Create a background / sprite for the stage name, for every stage (alternatively, if you graphic is simpler, you can avoid this and just draw the text on top using draw_text)

Then, prepare an object (with a low depth, so it will be drawn on top) that will be created when you need to open the level selection overlay. This object needs to get all the required information to display the correct level data, such as screenshot, description, best time, ... I can imagine the create event being something like this:

GML:
stage_name = ""; //either the string or the sprite with the stage name
stage_description = "";
stage_room = -1; //room you will be sent to once you accept
stage_time = "--:--"; //best time
stage_sprite = -1; //the small stage preview image
In the draw event, you put together all the information you have in order to compose the whole stage selection screen. Something like this:
GML:
draw_background(x, y, bkg_stage_select); //draw the yellow background
draw_background(x + WHATEVER, y + WHATEVER, stage_sprite); //draw the screenshot

/* set your font, color, etc... as usual for drawing the text */
draw_text(x + WHATEVER, y + WHATEVER, stage_name);

/* set your font, color, etc... as usual for drawing the text */
draw_text_ext(x + WHATEVER, y + WHATEVER, stage_description, -1, YOUR_DESCRIPTION_WIDTH); //use draw_text_ext in order to have your description go to a new line when reaching the border of the white box

/* set your font, color, etc... as usual for drawing the text */
draw_text(x + WHATEVER, y + WHATEVER, stage_time);
You can then create a script that can be called whenever you need to display the stage select screen. The script is in charge of creating an instance of the object above with the stage information passed as arguments:

GML:
///open_stage_selection(stage_name, stage_description, stage_room, stage_time, stage_sprite)

var _inst = instance_create(0, 0, obj_stage_select);

_inst.stage_name = argument0;
_inst.stage_description = argument1;
_inst.stage_room = argument2;
_inst.stage_time = argument3;
_inst.stage_sprite = argument4;

return _inst;
You can then call the script somewhere else, for example in collision with a portal, whatever your condition is:
GML:
open_stage_select("Green Hill", "Your stage description", rm_green_hill, "13:02", bkg_green_hill);
You just need then to set the key or whatever action confirms the selection on the player part to go to the room stored in the stage_room variable.


I know the above is very generic and definitely oversimplified, but your question is not specific either.
 
Top