• 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!

Mac OSX Twin Viewports Functionality?

A

Albert Frankel

Guest
I've been away from development for many years (most recent experience was with UE3) and I'm attempting to jump back in with a simple project to refresh my level design and writing abilities. I've never used GMS2 before, but it seems like the perfect fit for this concept. I'm not a programmer, but I'm fairly comfortable in visual editors (DnD/Kismet) What I'm hoping for is direction towards tutorials or any instructional resources that can help me breeze past the technical setup for my project and move on to level design. I've been through GMS2's built-in tutorials already.

The game is a grid-based, top down puzzler visually akin to Pokemon R/B. The interface requires two square viewports allowing navigation of separate but (nearly) identical levels, as well as a text box. The idea is that the player controls a character in one viewport, and another character in the second viewport responds with (nearly) identical controls. The challenge comes from learning where the controls differ. So for example, in one level, moving the player character up may actually cause the secondary character to move left. Or another room may have a different scattering of objects than the one the player character is in. The levels cannot be completed unless both characters exit simultaneously.

I need to have the ability to alternate the functionality of the viewports, so that text can be displayed in one or another if the story requires navigation of just one level. Really just interested in narrative and puzzle design, so the faster I can get the UI functionality set up the happier I'll be.

Sorry to say: I'm a writer first, so building this on my Mac.
 

Yal

🐧 *penguin noises*
GMC Elder
To elaborate, views are numbered from 0 to <whatever the max number is>, and every object has a draw event for each of these.
So code like this will only result in visible output for one view:
Code:
if(view_current == 0){
  draw_text(x,y,my_string)
}
Also, this implies that having two views consumes twice as much resources during the draw event than having just one, so be aware of this when you have heavy visual effects (textured primitives, dynamic lighting, etc).
 
Top