HELP! A simple menu is all I ask for!

A brief introduction, I suppose, so anyone marvelously wonderful enough to try to help me will understand the necessary level of simplicity necessary to get the point across to me…

I’m a Game Artist and Designer.

I’m NOT, by any twisted stretch of the imagination, a LEVEL Designer, and even less so a Programmer.

Unfortunately for me, I’m also a student.
A Game Art Design student.
And, by some nasty twist of fate, part of my required curriculum is programming AND level design.

I can struggle through the level design. I’ve designed a simple, 1-stage, 1-space game level with straight-forward trigger- and UI-scene-based gameplay, in some sort of attempt to make this project feasible for my non-program-capable self.

Well, that backfired, since I also designed a backstory that needs to be communicated to players.

Here’s my goal -

I’d like to create a MENU, not a floating window, not a UI event, but a solid, pre-gameplay MENU. I do not want the player character to be able to move. I do not want the level itself to be visible. I literally just want a black screen with some information on it (preferably in a scrolling text window, since the backstory is a few pages long). Either at the end of the scrolling text, or somewhere else on the nice, simple, non-playable black screen, I’d like a button that would let the player enter the playable level (preferably after the text, so the player actually reads - or skims - the information and can get the control info before jumping into gameplay).

I thoroughly read, and thought I understood, the manual and a slew of help topics through this forum and Unity’s help pages (5 hours and over 30 pages worth of information). I threw together codes into what I thought would have created a rudimentary, but functional, version of my menu. But it didn’t work. Once I stripped it of all its information and several components, I got something to work. But it was just a floating, scroll-able text area that appeared over the regular gameplay and wouldn’t go away.

To be honest, I’m pretty desperate. I have no idea where to look any more, and the project deadline is coming up.

I’m frustrated and angry that I can’t figure out something so simple, either.

It is simple, right? I’m not asking for the moon, just a standard game feature T_T

I don’t even want to think about how I will have to get more menu-like UI-scenes to happen later on, or how many hours I’ll struggle trying to figure out how to get a simple trigger code to work, which objects to put them on to get them to work, and any other horrid problems that are sure to fester in my project…

Depending what your time is worth, getting a EZGUI license might be very worth it.

Also assume that, as a student, I have absolutely no money. :frowning:

A very simple (an inefficient) way would be to write your backstory on a series of images. Then create one class that has an array of Texture2Ds. Plug in all your story images into the array and create two planes or cubes with Previous and Next images on them. Use OnMouseDown to detect when they press the button (you’ll need to assign colliders to the cubes/planes) and have it step forward or backwards through the array assigning the given texture to a plane that would display the text/image.

niosop:

I think I almost understand what you’re getting at…
But wouldn’t that require me to make a whole separate game space, and additionally need to script a transition into the different one?
I don’t know what a class or array is, either…
Wouldn’t the player still be able to just walk around the cubes or whatever, too? That’s one of my biggest problems, is getting an event that occurs with actual gameplay out of the picture and not able to be affected during the menu/scene event…

maybe I didn’t understand your problem well, but why don’t you start with something simple like that and expand it by using the unity
GUI scripting guide?

Well, you’d set it up as it’s own stage. Then after the last slide, the next button would call LoadLevel to actually load the playable level. If you wanted it for a menu that pops up then you could set it up outside your level with a different camera. Then pause your game somehow (either setting the timescale way down, or via your own pause logic, then switch to the second camera that’s pointing at your menu stuff.

If I get some time later I’ll whip up some code for you.

Toasty: I tried reading the scripting guide… I’m not a programmer, I only barely grasp the concept of variables and programming language, which isn’t enough to actually understand it, make it work, or apply the different sections that the guide covers. I tried. I spent 6 intensive hours just trying to get a functional black page to show up and block out the gameplay, and I couldn’t even get that to happen. As “simple” as niosop’s suggestion may be, I don’t understand it.

On top of not being a level designer, or a programmer, I’ve also never touched Unity before in my life. I’ve only had it on my computers for about 6 weeks, most of which was spent figuring out how to navigate the interface, set up prefabs, and get the scale to quit being automatically set to infinitesimal, then working around the strange grid-snap options to get my level placeholders put where they needed to be.

niosop: What do you mean by “stage”? It’s relatively safe to assume that I am completely ignorant of all of Unity’s jargon, lingo, terminology (whatever else you’d like to call it), and a complete and total foreigner to most programming jargon, too. You’re being a huge help, I just don’t have the vocabulary basis to understand all of what you’re suggesting T_T

By stage I mean level or scene. A project is made up of at least one, but usually more, levels. So at the beginning of the game you can have it load your backstory level, which is just a camera pointing at your story textures. Then when you’re done displaying that, it can call LoadLevel, which will load your actual game level. Adding an in game menu is a little different, since you don’t want to unload the current level. Which did you need, or both?

I need the start menu. After that, I planned on having little pop-up events, but no actual menu. The only menu-like feature I’ll need is a close or continue button.

Ex: In regular game, the Player finds object1 and clicks on it (clicking is the interaction button). Object1 will be marked as a trigger (easy enough to check the IsTrigger box) that is activated by clicking on the object (have no idea how to accomplish this part, though). The object/trigger will cause several things to occur at the same time. Obstacle1 and Object1 will be deactivated, while BrokenObstacle1 will be activated. Last, but not least, a pop-up window will interrupt the player’s regular gameplay to inform the player that they “picked up” object1 and give a little bitty story (like a role-play game) explaining the change in the Obstacle. That pop-up doesn’t need any kind of scrolling text or anything - in terms of web design, I could easily make it a single image with a small image-mapped section serving as the “continue gameplay” link. That’s all I’m looking for there.

With both of these events (the start “menu” with scrolling text and a start button, and the smaller, gameplay events), I just wanted it to serve as a basic interrupt, similar to a pause menu. But I don’t want the player to call it up at will - each trigger would have its own scene and other effects.

Part of this project is keeping a blog. It’s obviously not complete (I’m supposed to have a fully functional level in less than two weeks, and all the stages of development documented), but maybe some of the info there will help? http://falenkulproject.wordpress.com

I have to say, that’s a good thing, since I think artists understanding something about programming can help with appropriate game art, in the same way that understanding how art is made can help programmers with game programming. Even if it’s a struggle, and you never program again, I’d say it’s useful.

In any case, the OnGUI system in Unity is heavily programming-oriented. You can use GUILayout to automate some of the more tedious parts. The basic idea is to have a level with a camera and the GUI script on it, and the script would load another level:

import UnityEngine.GUILayout;

var storyText : TextAsset;
var margin = 50;

private var scrollPosition : Vector2;

function OnGUI () {
	BeginArea (Rect (margin, margin, Screen.width - margin*2, Screen.height - margin*2));
		
		scrollPosition = BeginScrollView (scrollPosition);
			Label (storyText.text);
			if (Button ("Start")) {
				Application.LoadLevel(1);
			}
		EndScrollView();
		
	EndArea();
}

That assumes the menu level is level 0, and you have another level (level 1) to load. You can use the name of the level instead of the number if you want. The levels have to be set up in the build settings.

–Eric

Eric, that was pretty helpful! I don’t begrudge the fact that we dabble in programming - my qualm lies in the fact that my entire class grade depends on successful programming. I can grasp some programming necessities - that doesn’t mean that I, myself, am any good at it. Having my GPA at risk over my lack of a knack for programming ticks me off, since programming was never something that was marketed as part of the degree.

If I’m understanding this all correctly, there’s no way to simply get a pop-up effect or UI-scene?

If you’ve ever played a Fallout game, or a Final Fantasy game, you press the menu button, and the menu comes up - but your player and the level or area your player is in doesn’t change or go away. In fact, in Fallout, you see a freeze-frame of the area behind the menu:


If you look, the edges of all these shots are different - it’s all visual information taken right from the player’s active environment. I don’t plan to have anything at all resembling a Pip Boy (the in-game device that is, effectively, the menu, shown in the above pictures). But, for the pop-up events, I was thinking of having a similar effect - where the pop-up only takes up part of the screen, and the level is still visible in the background, in a frozen or paused state, until the player presses the continue button on the pop-up object.

Now, I know they use all their own game engines to achieve this effect, so if it’s not possible in Unity, it’s not possible. Most of the past weeks of work I’ve done planning for that gameplay will be useless, but sh** happens, right? It figures that what I thought would be the simplest way of handling the situation turns out to require programming expertise the likes of which the world has never known…

EDIT: Oh! Also, the vector information in the script… I read something about that while I was doing my initial research. How does it work? How do you set that vector? I was under the impression you had to create an external vector file for the script to reference, is that right? Or do you just plug in all the information in the code somehow?

You can do basically anything you can think of, it’s “just” a matter of programming it. Some things are, naturally, more complex than other things.

The BeginScrollView function returns a Vector2 that says where the scroll position is. It’s a Vector2 because it can do both horizontal and vertical scrolling, though only vertical scrolling is used here. By feeding that back into the BeginScrollView function, it allows scrolling to work. You don’t have to set it to anything aside from the initial variable declaration. It might have been better if I’d written “private var scrollPosition = Vector2.zero;” just to make it explicit. That’s what scrollPosition is initialized to anyway the way I wrote originally, so it doesn’t make any difference in practice, but it’s not as obvious.

–Eric

So given my inability to program, I’ve set myself up with a project that I can’t complete. Which translates to failing a class and indefinitely postponing my graduation. Can’t say this is a positive development.

Playmaker, $100, poor student or not I’m sure you can bum that off someone for a short time, and it’ll more than pay for itself. Will do what you’re asking, without needing to script it.

Edit: From what I can pick up for what you’re trying to do. It sounds like you could do it with just some timed images, a couple of buttons, some duct tape and additive loading of scenes.

Oz: Considering I am only dabbling in Unity, and programming, for the sake of this one class, which will be done in less than three weeks, I don’t see a $100 product paying for itself, even assuming I had a way of getting $100 in the first place. Sorry. I looked at it, and it does look like a good product, but I don’t plan to continue any serious work in Unity at any point in the foreseeable future, so it would be a pointless investment for me.

I’ve been advised to try to do this using GUITextures.

I’ll be making 12 of them, minimum. Actually, a lot more, since scrolling text isn’t an option and the intro has lots of text…

First 1-? will be the backstory. Image after image with text across the whole thing and forward and back buttons for the appropriate pages. Last page of the intro sequence will have a button to “Start” the game, pretty much.

Next 10 Textures will be simple, 1-image Textures that are triggered to appear after the player performs a specific task in the level (8 will require an object interaction, while 2 will be exploration-triggered… hopefully with a trigger volume or something equivalent). Each of these will contain a button or key-press command to “Continue”.

The final Texture (hopefully only one) will deliver a closing story to the Player and will have an “Exit Game” button.

So, my new slew of problems include:

  1. How do I get the game in the background to be unplayable while the Textures are up? The default GUITexture settings display a permanent interface image that acts more or less like a sticker on the player character’s POV camera lens. Is there a pause or freeze gameplay script I can attach to the trigger/call for the GUI Textures so the player camera and character can’t move around while the GUI Texture is active?

  2. Which would be easier? Making GUI Texture buttons, or using a key-press command? (i.e. “Press Enter to Exit” versus a button that says “Exit”) Both are equally valid options for my gameplay, but I need the simplest, most efficient method.

  3. Does Unity have anything as simple as Unreal’s Trigger Volume? I know there is an OnTriggerEnter command, but I’m at a loss as to how to apply it without making a mesh or something.

Getting lots of feedback, hope to hear more!

bump?

learn to script like the rest of us artists.

Although it’s not the best way of doing things… maybe this will help, or you can combine it with the other suggestions already provided.

It’s a small project where:

  • I created a plane and attached a texture to it. For your purposes, you would create ‘storyboards’ to convey whatever.
  • There are two buttons on the initial load that either go to the next ‘storyboard’ or hide them both and show the game scene behind.
  • From the game scene you also have a button that ‘returns’ to the menus.

What it does:

  • It loads the ‘menu’ scene on to the ‘game’ scene.
  • It finds the game objects (storyboards), in the scene and turns them on or off to show your menus.
  • It uses a ‘skin’ for the buttons.

Some additional thoughts:

  • If you plan on being a ‘game artist’, perhaps you might have started more in the ‘graphic design’, ‘concept artist’ or ‘animation’ fields instead; or move in that direction for the future. It’s kind of hard to be a ‘game designer’ without having some type of training in one of these areas.
  • I completely agree with Eric5h5… learning the various disciplines will absolutely benefit you in the future.
  • If you plan on being in games, I think you’ll find that Unity is a great place to start for any game design role you decide to pursue. It would be unfortunately to invest a bunch of time into it now, and drop it as you indicated you might do.
  • Stick with your project, it can be frustrating when you hit a roadblock, or a thousand of them for that matter… :stuck_out_tongue:

Best of luck!

P.S. You need to load and play the ‘level’ scene first. It ‘brings’ in the menu.

523881–18539–$HelloWorld.zip (1.12 MB)

One more thought… while Unity provides a lot of accessibility, a ‘Simple Menu’ quickly becomes much more complicated when you start wanting increased functionality and more. What ‘seems’ easy and should only take a bit of time, can end up consuming hours, days or weeks… especially when you’re learning any new tool.