playMaker

Author Topic: Terrain data and save current scene for later  (Read 1033 times)

eirsik

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Terrain data and save current scene for later
« on: January 31, 2014, 07:00:20 PM »
Hello all!

I have a few questions that I have issues with.

1)
In my game the player is able to interact with the trees and chop them down etc.
This was easily achieved when the trees were placed manually by drag 'n drop and then just add the script to the tree.

However placing a lot of trees and not using the Terrain tree painter sucks the life out of performance and I have over 1000 draw calls which I want decrease.

I read on the unity forums that it is possible with script to interact with trees painted with tree painter but it is a little more complex as you need to get info from terrain data and find the closest tree to the player etc... You get the drift.

So I was wondering how something like this would be achieved with FSM?

2)
I have cave that the player can enter and then loads the cave scene. But then I need to save the other scene the player came from so that when the player returns to the scene it was just the way he left it. With the buildings he build is still there, trees chopped down is still gone etc.

How is this achieved with FSM?

Thank you all for taking time to read this fairly long thread :)

Best
Eric
« Last Edit: January 31, 2014, 07:02:42 PM by eirsik »

MeachWare

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Re: Terrain data and save current scene for later
« Reply #1 on: February 02, 2014, 02:29:50 PM »
It sounds like you should switch to a voxel based terrain / design as an FSM will not be of any help.

FYI On mobile draws calls greater than 15 on newer hardware are pushing it (used to be > 4!)... 1000 wow... you've got a good GPU  ;)

eirsik

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Terrain data and save current scene for later
« Reply #2 on: February 02, 2014, 03:29:52 PM »
I found a somewhat solution: Use the same scene just another part far out of sight, and group all the different part of the game into different empty gameobjects and use script to disable the gameobject, and it works pretty well, with good performance.

This is a game for the PC so I can have a lot more than 15 :)
Got it down to 500draw calls and I have an FPS around 160-200.

Got it to run with 10FPS on a 3years old laptop with pentium lol.