Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: eirsik on January 31, 2014, 09:00:20 PM

Title: Terrain data and save current scene for later
Post by: eirsik on January 31, 2014, 09: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
Title: Re: Terrain data and save current scene for later
Post by: MeachWare on February 02, 2014, 04: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  ;)
Title: Re: Terrain data and save current scene for later
Post by: eirsik on February 02, 2014, 05: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.