playMaker

Author Topic: Multi VS single scene & how to implement it in PlayMaker  (Read 1741 times)

OctoClo

  • Playmaker Newbie
  • *
  • Posts: 1
Multi VS single scene & how to implement it in PlayMaker
« on: May 15, 2018, 11:52:16 AM »
Hi,

I'm currently working on a post-apocalyptic 2D game entirely made with PlayMaker with a sidescrolling view. I have already worked on Unity but I'm quite new to PlayMaker.

The game is about a heroin who repairs robots in her home and uses them to extract resources like iron, oil, etc in a dungeon made of 10-15 rooms. Each room contains spots which can be exploited by the robots to extract resources if the heroin orders them to. Each robot, when exploiting a spot, spawns a little robot at regular intervals. This little robot has to go to the house to drop the newly extracted resources, and then go back to his parent robot, wait for some time, go again... until the spot is empty.
The player bumps into these little robots and sees them moving to the house or back to their parent.

Another thing is that each room (including the home) is a looping room, as in Odin Sphere (example : https://youtu.be/mBneHdeondY?t=49s). The doors are just sprites and the player has to press an arrow in front of them to go through. In order to do the looping, I divided each room into 3 blocks which I then translated depending on the current camera position and bounds.

I have done the home scene, with robots, spots, house, all of this works well.

My main question is : would it be better for me to have each room of the dungeon on a different scene, or all of them in a single scene, with the home ?

If they are all scattered into multiple scenes, I don't know how to implement the fact that the robot which is extracting something in Room 13 for instance spawns its little robots at regular intervals which then have to find their way through all the rooms (thus through all the scenes) to go to the home, and do the same thing in real time with all the robots in the dungeon, whatever the player scene.

If they are in a single scene, wouldn't there be too much loading at the beginning, or too much processing for handling all the robots ? I would also have to store each block of each room for the looping process, and move the camera and the player each time the player go through a door.

Sorry for this long post, I hope you understood what I am trying to do.
Thanks !

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Multi VS single scene & how to implement it in PlayMaker
« Reply #1 on: May 15, 2018, 01:53:41 PM »
Why don't you try and see how long will it load? If things are happening while the game is being played, i'm afraid you'll have to to everything in one scene.

I don't think you have to worry about the processing, that doesn't eat too much cpu time.

As for moving the camera, you can set a predefined spot for camera for each type of room, that shouldn't be hard.

You can always put some tips and something interesting for player to read while the game is loading.
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Multi VS single scene & how to implement it in PlayMaker
« Reply #2 on: May 16, 2018, 02:56:25 PM »
Hi.
You can use 'Load Scene async' 'additive' (and 'Unload Scene Async')

You would have a main scene which would include an object to hold all the data you need.

On the video there was this 'exit'
You can use that to trigger the load, but if it would load to slow, i would suggest to have a trigger somewhere before and after the exit.
So you could load already (without activating it) before reaching the 'exit' and unload if you passed by the 'exit' without using (triggering) the exit.

I made a video recently about load scene async, but i am planning to make another one with something similar as in your case.
The video does have different cameras used for each level, but it can also be done with set positions as well as for the player.
The video might still help to understand how this works, so here it is :