Forum rules - please read before posting.

Rooms as Scenes questions

Hi all.

I was wondering about making a different room in game as a new Scene. Is this the best practice for room changes?

When moving to a new scene, do things like Cameras and other gameplay staple things have to be copied over to each new scene, or can you set things as global?

Or is there a better way to organise rooms, not using scenes at all, perhaps having all rooms at different Z axis depths and making the camera teleport when changing rooms. Does this get crazily convoluted?

Very interestered to here your opinions on how its set up in your games and what are best practices for room changes.

Thanks.

Comments

  • 2D or 3D?

    Generally it's really a matter of preference, and convenience depending on the situation. If you have an NPC moving between the different rooms, for example, then it'd be easier to rely on one scene. Otherwise, it's generally more manageable to stick to one room per scene.

    If you are working in 2D, and wish for multiple rooms in a scene, you should arrange them along either the X or Y axis. If they're along the Z axis, it'll be difficult to view in Unity's "2D" mode in the Scene window.

    New scenes are created in isolation - you don't copy anything over, just create a new scene using the Scene Manager. I don't know what you mean by "setting things as global".

  • Thanks Chris, some food for thought.

    My game is a 2d first person point and click adventure.

    For copying things over, I suppose I meant camera settings, perhaps audio continuing when move scenes. Also some interactions (gameplay mechanics) I'd probably copy over and swap out objects.

    It's interesting to hear that some projects are built completely in only one scene with different camera changes. That may well work better for my game.

    The "setting things global" comment was about trying to get the gameplay operational in the same way throughout the game, without rebuilding it for each scene. This sounds vague so I'll give an example:

    In my game the player can click on an object and a close up image of that object appears on the screen. I've done this through action lists. This will be a common gameplay feature throughout the game, yet I will have to set this up with each new scene with new objects and close up images. I figure there must be a way to have this gameplay available globally throughout the game (and in different scenes), then in the backend to just to add in all the objects and their corresponding close up images once and for the mechanics to pull the correct result depending on where the player has clicked. Instead of copy pasting the action lists (mechanics) and swapping out the objects and images for every interaction.

    I do wonder if its possible through some clever usage of Action Lists?

    For Example: Is there a way to add objects (sprites) to a container, wherein the objects can be turned on or off through variables or a switch, and then it is the container which is called on through an Action List when the player clicks on a hotspot, displaying whichever sprite happens to be switched on?

  • ActionLists can accept parameters, which allow you to override fields at runtime. This makes it possible to "recycle" ActionLists that perform common tasks.

    For more, see the Manual's "ActionList parameters" chapter, this text tutorial, and this section of the 3D game tutorial.

    When you mention container, I don't know if you mean the AC logic type "Container", which deals with storing inventory items locally within a scene. If you're instead talking about a way of just showing a close-up sprite, you can again rely on animation to change which sprite is displayed in a Sprite Renderer component.

    Since you're making a 2D first-person game, I'd also recommend checking out the "Movement template: 2D first-person" package on the Downloads page.

  • Thanks Chris. Lots of food for thought.

    That 1st person 2d demo is interesting and I see there you've put many rooms in one scene. I noticed they are in "Nodes". Is that just a parent naming convention or are Nodes something with a special function?

  • Just a naming convention - but the Nodes script is part of the download, and not an "official" AC class.

  • I've been thinking. In regards to this:

    In my game the player can click on an object and a close up image of that object appears on the screen. I've done this through action lists. This will be a common gameplay feature throughout the game, yet I will have to set this up with each new scene with new objects and close up images. I figure there must be a way to have this gameplay available globally throughout the game (and in different scenes), then in the backend to just to add in all the objects and their corresponding close up images once and for the mechanics to pull the correct result depending on where the player has clicked. Instead of copy pasting the action lists (mechanics) and swapping out the objects and images for every interaction.

    Could I perhaps achive this with a custom Menu?

  • It'd depend on how interactive you want the close-up to be. If you want regular interactions, manipulation etc, then Hotspots would be recommended.

    Certainly you can use a Menu to add an "Exit close up" button - see something similar in the 3D tutorial video.

    If you just needed to show a simple graphic of the close-up object, you could try creating a Unity UI menu that stored the texture in a single Image component. Through animation, you could control which texture is shown - and then control animation playback with the Object: Animate Action.

    Another option to consider might be the use of sub-scenes, whereby your close up is a separate scene file, and added via Scene: Add or remove.

  • Thanks for all the suggestions, I'll look into them.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.