Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Terra Slicer & S.A.M.

Discussion in 'Assets and Asset Store' started by gilley033, Nov 5, 2013.

  1. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Hello everyone,

    I am happy to announce that the API is now available on my website. Enjoy!

    Link to API
     
  2. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    I am currently working on some great new additions that I think will be useful to a lot of people.

    1. The ability to setup your World's so they stay centered around the origin. This should serve as a remedy for floating point precision errors that crop up with extremely large non endless worlds. This method is also going to be used for endless worlds from now on as well.
    2. Ability to change what objects are loaded by your World at runtime (permanently). This feature will allow you to load variants of your terrain/objects, such as lower/higher resolution variants or ones with alternate textures.
    3. Ability to use a custom save/load solution. The current Persistent Data Controller method is not ideal, as it is predicated on using a key structure. So while it is useful for debugging in the editor, it's not really meant to be used on a production quality game. Most save solutions just serialize/deserialize an object to a file when saving/loading.
    By enabling the option to use a custom save/load solution, you can get an object which can be serialized/deserialized at will (using ComponentManager.GetSaveData), and then load that object at the start of your game. I am not 100% on the nature of this object, and would appreciate some feedback.

    At first, I considered a custom class which contained an array of ActiveGridSaveData, and array of WorldSaveData, and an additional string with some component manager specific data. I don't think that solution is ideal, however, as most serialization systems use some type of attribute system to mark classes/fields as serializable. If they all used [System.Serializable] and [System.SerializeField], it wouldn't be a problem, but they do not. UnitySerializer, for instances, uses [SerializeThis] for fields. There's no way to predict all the different attributes I'd need to apply to these internal classes, and even if I could, I'd have to somehow link to those serialization packages in my dll in order to access the attributes. So this option is out of the question, unless I'm missing something.

    I am leaning to using a string object. This will be easily serializable or saveable in any format you desire (if not using serialization). That is, unless someone has a better idea!
     
  3. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Added Known Bugs to OP, and also updated the Coming Soon section.

    Known Bugs (fixes coming soon, if you need them earler email me with your invoice number)
    1. When persistent data exist for an active grid which has a player associated with it, that grid is not 100% accurate (will be fixed in update 2.5)
    2. When using the Scene Loader or AsyncSceneLoader components, if your root objects in each scene have children, those children are not properly set to the correct layer.
     
  4. kinnik

    kinnik

    Joined:
    Sep 6, 2014
    Posts:
    17
    Wow. This asset is quite interesting! Good work (and ALOT of work I bet). I have a couple questions that I was unable to define after reading yout docs...

    Firstly, how does this solution work inside the editor? For example, I have a 'world' that has so many trees that the editor stalls and memory chokes. Will this let me have all those trees but only instanciate them when, say, the scene view camera gets in range of them?

    Next, how in the heck am I going to setup the naming conventions required when I'm painting 10's of thousands of tree's on my landscape, crossing the world grid boarders ect?! Would I not need to go and rename all these manually? Or only paint on one grid section at a time I guess?

    I'm totally intrigued and terrifically confussed (and I'm ok with that) :) Thank you for any answers! I hope I can wrap my head around this and fork the $ to start playing! Great work, keep it up!
    Sean
     
  5. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    If you split up your single world into multiple smaller pieces, once you've set up the scriptable object asset (called World Grid) and World component for your world, you can easily load smaller portions of your world very easily. You can define custom ranges (such as row 1 - row 3, column 2 - column 5, aka a 3 x 4 grid of terrains), and then load/unload all the terrains in that range.

    That is really the only editor tweak I've added. There is no automatic loading based on the scene view camera's distance from terrain pieces in the editor, though it is an interesting idea.

    As for the naming conventions, I'm not positive what you mean, as the names of the trees do not matter; it is only the name of the individual terrain pieces the trees are on that matters.

    The easiest way to make sure the naming convention is followed is to start with a single huge world, paint your trees, and then use the slicing tool. The trees will automatically be added to the correct "slice," and all the slices will follow the correct naming convention.

    Please let me know if that answers your question, and thanks for your interest!
     
  6. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    Saw the update today. I am going to try out the new world re centering feature tonight.

    Thanks for the great update.
     
  7. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Thanks! I'll be working on a couple new videos today showing off the new features (what they do, how to setup, etc.). I'll also make one going over the changes to the scene loading components, as these changes are the most likely to cause issues for people. In the meantime, if using the scene loading components, please refer to Chapter 4, Section 3 of the Full Guide.

    The API has also been updated on my website to reflect the 3.0 changes.

    Finally, there's an issue with the Table of Contents on the Full Guide including in the package. I've attached one with a valid Table of Contents if you need it.
     

    Attached Files:

  8. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    I will wait for the video. My first 2 attempts failed. My scenes were loading in a row instead of a square.

    Since you are making videos I will make a tutorial request

    1) Start with large terrain 20,000x20,000
    2) Slice it up into 8x8
    3) Create Scenes for UnityPro Async scene pooling
    4) Place First Person Controller with loader
    5) Enable the world re - centering Option

    That was what I attempted , but I must be doing something wrong.

    Thanks
     
  9. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    @SuperNewbee

    Can you copy/paste your project, open it up, remove everything not related to your world/the kit, zip it up, and send it to me?

    If so, send it to kgillen@deepspacelabs.net.

    This will make it easier to figure out what's going on. If that's not an option (project size is too large, for example), email me anyway or send me a message on the forums so we can try to get to the bottom of what's going.

    As an aside, when you say "Place First Person Controller with loader," what is the loader you mention?
     
  10. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    FYI, somehow the CreatePersistentActiveGrid method in the ComponentManager class got switched to private (it should be public). As soon as I confirm SuperNewbee's issue isn't bug related, I will submit an update with the fix.
     
  11. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    I will create a project right now and send. Thanks
     
  12. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    Ok. It looks like it was just user error. I seems to be working as expected now. The terrain scenes are loading properly in a square grid now with the async scene loading.

    The only thing I did different this time was to read the "DynamicLoadingKitInstructions_PLEASE_READ" file more carefully and slowly.

    My bad. Sorry for the noobness.
     
  13. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    That's okay. Can you explain what the user error was? I ask because if you had a problem, chances are someone else will too.

    While the documentation is robust, there is a lot of information to sift through and the instructions for certain things could definitely be made clearer. In this way, the tutorial videos are probably a much better way to learn how to perform initial setup, though I'm aware that scene setup is not really covered. I will definitely be rectifying that soon, especially since the new update includes some big changes to how scenes are handled.

    I am also considering adding some kind of all in one tool that performs slicing, scene setup (if required), and the initial setup of the Dynamic Loading Kit. Would you guys find that useful?

    I will also add some example scenes with different configurations. I've avoided that up until now because I didn't want to bloat the project size too much, but that's probably a poor excuse, and I could just use small Terrains to keep the size down.
     
  14. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    I don't really know what went wrong on my first 2 tries. I did have a fumble because my main scene was not saved before running the scene creation tool. (I hit cancel but was forced to save after scene creation started - I didn't know what I was saving so I pointed the folder to the scene folder.- so that's where my main scene got saved originally - just noticed that now - this may have caused the issue but I am not sure.) I also fumbled with the unique IDs a bit but I don't think that was the problem.
    I am pretty novice so I tried to follow the quick setup instructions instead of reading the full manual.

    While going threw the process I was wishing there was an example scene so I could be sure of my settings. I also kind of guessed on where to put the Dynamic Loading Manager. I originally put it as a child of the First Person Controller but I kept falling threw the ground. I raised the FPS Controller up 20 units and added the Dynamic Loading Manager as a child positioned at -10 and that seems to work better.

    I bought this asset a really long time ago on a whim because it looked like a lot of features would be added (which have), but I never really put any effort into learning it. Last time I got stuck on the different column/row format of terrain composer, but I will probably be able to figure that issue out on my own now.

    I am hoping I will be able to use this alongside terrain composer and my FPS controller (Realistic FPS Prefab asset) which comes with a world re center to origin script in order to make a truly large dense world. I have not been able to find anything that is able to load scenes into the world after the players origin has moved, but I think this asset may be able to do that.

    I think example scenes are the easiest and fastest thing for you to make. Project size does not matter to me at all.
    Videos are great also ( Maybe just record the above example scene creation process)

    All in one tool sounds good but the built in wizards are pretty good already. But if its easy for you to add great.

    Thanks
     
  15. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Excellent feedback, thank you!

    Before addressing your feedback, I'd like to point out that there is a video tutorial series available. It covers the initial setup of the kit, and is definitely more useful than the full guide for getting things set up. Here is the first video in the series.

    Indeed, if you're base scene is not saved before hand, you'll get a prompt asking you to save. This is necessary since the creation of the scenes for the Scene Loader components requires new scenes to be opened/saved. If your initial scene wasn't saved, you'd lose your work! With that said, there are two points I want to address.

    1. You say you hit cancel but were still forced to save your scene. That should definitely not happen and I will look into it.
    2. It doesn't matter where you save your initial scene, as long as whatever name you give it does not conflict with the names of a scene created using the scene generation tool. The scene generation tool uses the same names as your prefabs, so avoiding name conflicts should be fairly straight forward.
    The unique ID's should only be an issue when using multiple components of the same type in a single scene. If you have two Active Grid's for example, their ID's should be different. If you only have a single World, Active Grid, and Component Manager (note, there should only ever be one component manager in a scene), then you won't need to worry about the ID's.

    For Worlds, Active Grids, and Component Managers, you can have duplicate ID's when the components are in different scenes. For example, if you have an Active Grid in scene 1, and an Active Grid in scene 2, they can both have an ID of 0.

    This differs in the behavior with the Persistent Data Controller's Scene ID, which needs to be unique for every component in your project, even if the controller's are in different scenes.

    I will definitely add some example scenes, in the meantime, the videos provide insight into problems like these!

    How does this script work exactly? My world re centering functionality automatically moves the player when necessary, so you shouldn't need another script to do anything. In order to keep the player from falling through the world when moved, however, you will probably need to implememnt a PlayerMover class. Specifics can be found in the Full Guide, though, and I've provided some more info as well as an example under TerrainSlicing/OtherScripts/DynamicLoadingScripts/PlayerMoverControllers.

    I will also be making a video covering this topic, as it is somewhat advanced.

    Again, thanks for the great feedback! I'll get working on the example scenes so I can add them with the fix I mentioned in a previous post.
     
  16. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Update 3.0.2, which contains some critical bug fixes, is now available on the Asset Store. Changes include:
    1. The method CreatePersistentActiveGrid on the ComponentManager class is now correctly set to public.

    2. If the root object in a scene is set to the "Visible Layer" (as assigned on the Scene Loader component you are using), the DLK will now correctly interpret that this object should not be moved. Note that assigning the root object's layer to the "Visible Layer" should only be done when you know the object will not need to be moved. For example, this technique should not be used when using an endless world or world re centering.

    3. Removed error that would occur if a World component was in an Idle state when the application exited.

    4. Fixed bug that would cause the World.ChangeGroupName method to never complete when called while the World is in an idle state.

    5. Fixed NullReferenceException bug when using the World.ChangeGroupName method.

    6. Fixed table of contents on Dynamic Loading Kit_Full_Guide.pdf/doc.

    7. Added zip files containing source for the Dynamic Loading Kit and Terrain Slicing Kit. You can delete the Unity Package source files, as they will not be used in the future. Please read source_code_instructions.txt in the Instructions folder for details on using the source!
     
  17. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    I just noticed that you already have video tutorials for DLK. Don't know why I did not notice this before.

    Is there a new tutorial video in works by any chance?

    Thanks
     
  18. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Hi @SuperNewbee, yes, right now I am planning on making the following videos (at least some will be completed this week):
    1. Tutorial detailing how to create and setup scenes for use with the Scene Loader components. This will cover using the Generate Scenes Tool and creating the scenes manually.
    2. Video detailing world re centering (what it is, how it's useful, how to setup, etc.).
    3. Video going over the new custom save/load options.
    4. Video detailing the new ability to change a World's Group Name (allowing you to change what objects are loaded at run time).
    5. Misc videos detailing some of the more useful methods of the API, such as the methods that allow you to move a player to another location (possibly on a different world), or the methods for creating Active Grid's and World's at runtime.
    The videos will be prioritized as they appear in the list, and I'll post them as they become available.

    If you have any request, please let me know!
     
  19. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    I've finished the scene loading videos (broken into five parts), and I'll post them tomorrow after doing some editing.

    Also, I've found a bug with the Scene Generation tool. When you use layer hiding and have a prefab with objects parented to your root cell object, the root object is not correctly set to the hidden layer. This will be fixed soon.
     
    Last edited: Dec 11, 2014
  20. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    Ahh, Great.

    I look forward to the videos.

    Thank you
     
  21. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    New videos have been uploaded, and are available here.

    You can also find the link at the top of the OP.

    Please let me know how they are. I suggest watching all of them in order. Even if you are planning on using the Scene Generation Tool, I still suggest watching the Manual Setup, as it goes into more detail on the scene hierarchy possibilities.

    I'll probably remake the scene generation tool one after the next update to the kit, as there will be a couple of changes to the layout of the tool.

    Enjoy!
     
  22. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi there!
    I will soon buy this amazing tool.(maybe today after work)
    I finished to watch all the tutorials and I am currently reading the doc, very well written by the way.
    Just two simple questions :

    1)The trees on my terrain are not painted (so are not part of the terrain) but placed as single objects (this in order to access to them and eventually modify). When I slice the terrain and create the prefabs is there any special way to make them load with the terrain ? I mean by using the Dynamic loading kit

    2)when the slices of terrain are unloaded, what happens for example to the NPC? or the animated objects?

    3)If the terrain is modified (for example a hole in the terrain) when is loaded/unloaded it will maintain the hole?

    thanks in advance!
     
  23. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Hi micuccio, thanks for your interest.

    Question 1
    There are two ways to do that currently:
    1. Parent the trees to the individual slice they fall within, and they will be loaded when the slice loads. Unfortunately this will have to be done manually, as the slicing tool does not currently collect the objects that fall within each individual slice's boundaries and parent them to it, though I plan on adding this option in the future.
    2. Create a separate world that is basically the same as the world for your slices, but have it load only the trees or other scene objects. You would need to parent all of your trees/scene objects to an empty game object in this case that follows the correct naming convention.
    Option 1 is definitely easier, but option 2 would probably result in better performance. Currently option 2 is not supported as well as I'd like. You have to create a separate World and Active Grid, for instance, which is basically a waste. How I'd like it to work (and how it will in the future), is you create one or more groups in addition to your main group. The main group would be for your terrain/main objects, and the additional groups would be for scene objects, such as your trees. The Dynamic Loading Kit would load the main object's first for each cell, and then the additional groups after (unload would occur in reverse).

    Question 2
    As long as they are parented as described in Question 1 above, they'll be unloaded. You could also write custom components which search the dimensions of the terrain that is about to be unloaded for any NPC's or animated objects that fall within its boundaries, and disable/unload them. It depends on whether they are static or dynamic. How to deal with such things is just way too specific for each game.

    I've tried to include a lot of options for customization within the kit, so that these types of issues can be resolved.

    Question 3
    I've never worked with assets that allow you to place holes in a terrain, so I can't say it will 100% work.

    To test, just create a prefab out of the terrain with the holes. If you can use Instantiate on the prefab and the holes are still there, then you should be good to go in regards to the Dynamic Loading Kit.
     
  24. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Hey guys, I've decided to pull Videos 2-5 of scene loader setup.

    I've decided to make a few more changes to how the scenes should be setup. If you've already watched the videos or read the docs, you'll know that currently, you can use a deactivated node or layer hiding.

    The deactivated node method is great, but I want to phase out the layer hiding. To be clear, it will still be supported, as I don't want to mess with backwards compatibility (although there will be a few new settings on the Scene Loader components that you will need to take a look at). However, layer hiding is really not the best way to go about loading scenes without the user seeing them before they are positioned.

    Instead, the terrain/mesh/other objects should be deactivated at first, moved, and then activated. Of course this only applies if your scenes need to be moved. It's possible that they are fixed, in which case they can be loaded in an activated state (since they won't need to be moved).

    The deactivated node method uses this system, however, currently if you're using terrain, the terrain needs to be the root object in the scene and therefore cannot be deactivated. I am changing this so an empty game object can be used as the root object, and the terrain can be parented to it and deactivated (meaning it will be the "deactivated node"). I'll hopefully be submitting the update that has these changes tonight, but at the latest it will be by Sunday.

    On Monday, I'll record new videos that reflect these changes. I could leave the current videos up, but I really want to encourage people to use the new hierarchy setup, and I feel that leaving the videos up may lead to confusion down the road.

    I apologize for this. There shouldn't be any more changes in relation to scene loading in the future!
     
  25. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Version 3.0.3 submitted for approval. Here's the change log.
    1. Layer Hiding is now discouraged when using scene loading. If your scenes are not fixed/static, you should now do the following (note, this applies to manual scene setup only; the Scene Generation tool automatically does this for you if "Are Scenes Fixed" is disabled):
      1. Create a new empty game object to serve as your root cell object. Set its tag to the unbound object tag, and give it the correct name (should be the same as your scene, something like "Slice_1_1"). Set it's layer to whatever you want ("hidden" layer is no longer used). It's imperative that this root object be in an activated state. You should also change this new root object's position to the position of the previous root object.

        Note that the root object can have components, and indeed, if using Cell Actions, they must be added to the root object. However, there should be no components which render anything!

      2. Create a "deactivated node." A deactivated node is simply a game object who's state (in the inspector) is disabled. Parent this game object to the root object created in Step a. Note that you can choose to make your Terrain/Mesh/Other main object your deactivated node, but you don't have to.

      3. Parent all other objects in your scene to the deactivated node. They will be deactivated in the hierarchy, but will retain their activeSelf state. Once the root object has been positioned correctly by the scene loader component, it will activate the deactivated node, which will in turn activate any objects which have their activSelf state set to true.

        Ensure the terrain/mesh/other main object, which was probably previously the root object in your scene, is positioned correctly. If you set the new root object created in step A to the position of the previous root object, the terrain/mesh/object should have its position set to 0. If it doesn't, this may (but does not necessarily) indicate that your root object was not positioned correctly.
    2. Modified Scene Generation Tool. Some options removed, and "Are Scenes Fixed" option added. The tool will now create the hierarchy described above when 'Are Scenes Fixed' is disabled. If this option is enabled, each scene will simply contain each prefab as is.

    3. Removed option to deactivate the prefabs created using the Slicing Tool, since deactivation of prefabs when using the Prefab Instantiator is no longer necessary.

    4. Fixed NullReferenceException errors that would occur when trying to tile the outer edges of a terrain group using the TileableTerrainMaker tool, when the terrain group has a missing terrain in the inner section.

    5. Chapter 4, Section 3 of Dynamic Loading Kit_Full_Guide has been rewritten, and some other sections have been slightly updated. Also added the version of kit to top of guide, so users can identify which version they're using for when trying to receive support.
     
  26. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Thanks a lot for the reply. I am gonna be a buyer :)
     
  27. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Awesome, thanks for the support!
     
  28. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    FYI, the new videos for the Scene Loader components are ready, but I think I am going to wait until Update 3.0.3+ is published before uploading them, since the update specifically applies to the kit post 3.0.3.

    I also meant to add some sample scenes to 3.0.3, but didn't get to it. I'll get those finished right away and submit update 3.0.4. When a submission is in review and another version is submitted, the new submission overwrites the previous one. This means 3.0.4 (or possibly greater) will be the next version available on the Asset Store.
     
  29. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Version 3.0.3 is now available on the Asset Store, which means the new videos detailing the Scene Loader components will be uploaded tomorrow (it's a little late tonight). I've also upload a video showcasing the Tileable Terrain Maker tool. I'll be adding some similar videos detailing miscellaneous tools and/or useful features of the kit.

    I was hoping to get version 3.0.4 submitted before 3.0.3 was accepted, but they worked very quickly in granting approval! 3.0.4 has been submitted however, and contains one critical and one simi-important bug fix, so I advise updating to it when it's available.

    I do apologize for the chaotic nature of this kit. I know some systems have had major revisions which may have potentially caused headaches for some users, but the good news is most, if not all systems should be stable at this point (that is, don't expect any additional major revisions). There will potentially be some new systems, but they will offer alternative ways of doing things rather than completely replacing existing systems.

    Unfortunately with a kit like this that is based on code rather than physical assets (textures, meshes, etc.), there is quite a bit more opportunity for bugs. I have spent so much time on this kit that I haven't had much opportunity to use it (luckily, that is starting to change), and while I do try and test, some issues slip by.

    With that out of the way, here is the full change log for v 3.0.4:
    1. Fixed a bug that caused Terrains to not be neighbored correctly when using an endless world, world re-centering, and the World.ChangeGroupName method.

    2. Fixed a bug with Terrain Slicing Tool which caused 'Disable Alphamap Blending' option to not do anything, and also caused the blending width to always be 1 when using alphamap blending.

    3. Added Example Scenes showing a standard setup and a setup using an endless re-centering world. More examples will be added in the future. If you have any request, please make them here.

      I will probably not add any examples utilizing the Scene Loader components, however. Remember, each scene's root object has to be set to a custom tag, so you'd have to create this tag (if it isn't already), and then go through the scenes and manually set each root object to the correct tag. You would also have to add each scene to your Build Settings. Basically, there's just too many hoops to jump through to get an example scene up and running.
     
  30. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    The scene loader component videos have been re uploaded. I've also added a new playlist for miscellaneous tools of the kit (currently, only the tileable terrain maker tool is covered). Links to all videos can be found at the top of the first post.
     
  31. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    I am happy to report that v 3.0.4 is now available on the Asset Store. Enjoy! This should be the last update for a little while.
     
  32. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I want to know if i can use this asset for great terrain in a multiplayer network game (unity´s own network code or photon)?
    I read something about network in your first post but it is unclear to me.
    The problem is the floating point precision on very large terrains and as i understand it right you are solved the problem by not move the player but the terrain (chunks) but then i thought it must be a problem that way for multiplayer games or can you explain me how that should work, please?
     
  33. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    I have very limited experience with networked multiplayer games so I will never say definitely that my kit will work for your multiplayer game.

    I will probably try to prototype something soon just to have a proof of concept and an example for how you could get the kit working with networking, but for now I don't mind saying that I strongly believe the kit will work fine with multiplayer games. However, it won't just work straight out of the box.

    This is namely because every multiplayer game is different and it would be impossible to design something that works for everyone. With that said, here is how I theorize it could work (for this example, let's just assume there are two players, Player 1 and Player 2):
    1. Each player has two sets of position coordinates. Their Unity transform position, which is the position of the player in the scene on their local machine, and their "real" position, which is the position of the player in your game world. The real position would need to be stored via some floating point immune system, which would be dependent on how large you want your game world to be.

    2. Whenever the player moves, both positions are updated.

    3. There are two copies of each player (in this instance. If there are more players than obviously there will be more than two copies). For instance, Player 1 has a copy of himself that he sees in his game, and a copy that Player 2 sees in his game (only while within proximity of each other, of course).

      Each copy, while maintaining the same "real" position, may be at different positions within Unity's world space. So Player 1 may have a transform position of 0, 0, 0 on his own machine and a transform position of 5000, 0, 5000 on Payer 2's machine.

    4. Because of the different positions, you may need to only use the "real" position for physics and other calculations. I am not positive about that however.

    5. Each player's local machine would run its own dynamic loading solution independent of the other players' solutions. So what happens on Player 1's machine doesn't necessarily happen on Player 2's machine, even if the two players are in the same general area (in terms of their "real" position).

    6. This setup would allow each player to have their world reset as required in order to avoid the floating point precision problem, without effecting any other player. To be clear, here is how I avoid the floating point problem with my kit:
      1. You specify boundary values on the World component. These boundary values dictate how far the player can get from the World's origin before a Reset occurs.

      2. During a Reset, the terrain chunks are not actually moved. Instead, new copies of the terrain chunks are loaded back near the origin, the player is moved, and then the old chunks are removed. This means you will have two of your worlds loaded at the same time, which in terms of memory, is obviously not ideal.

        Unfortunately, this is the only way to avoid the player noticing any sort of change when his position is changed. If someone can think of another way that doesn't involve loading duplicate worlds, please let me know (as an aside, this method also keeps us having to move a static Terrain, which is not a good idea).

        This means you will need to test to make sure your game can support having a duplicate world in the scene.

        So in regards to your question, the player is actually moved in my kit.
    7. Keep in mind that the local copies of each player would need to be moved along with the main player on each machine. So when a reset occurs for Player 1, the copy of Player 2 would need to be moved along with Player 1 (assuming they are in range of each other).

    8. There might also be different states that need to be synced between the different player's machine, such as the state of NPC's or objects in the world.

    9. When it comes to updating the position of NPCs and objects, I would not send concrete positional values to each player's local machine over the network. Instead, I would send updates on how much the object has moved. So instead of sending "NPC Z is at position x = 100, y = 4, z = 36," send "NPC Z has moved +3 in x direction, 0 in y direction, and -2 in z direction." This is necessary since the position of terrain/objects will most certainly be different on each player's local machine.
    There are undoubtedly many more issues to tackle, and remember, this is pure theory. Hopefully though, it's enough to get you started. If you do decide to purchase the kit, have a look at the sections of the Dynamic Loading Kit_Full_Guide.pdf that cover run time created Active Grids, as you will probably need to use them for networking code.

    Good luck, and let me know if you have any further questions!
     
  34. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Hello, I am planning to use this for an android game where there are 16 maps of 8192 resolution and 4096 heightmap each, what do you think ? Can this do the trick ? Because I get out of memory all the time.
    Thank you :)
     
  35. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    @ApteryxK
    Memory wise it may do the trick, but I doubt very much that the performance will playable on Android. I can try to test some sample terrain at the resolution you'll be using (I have a Samsung Galaxy S4) to see how it works out.

    Let me make sure I understand your resolution needs first, however. You have 16 maps in a 4x4 grid, correct? Each with a heightmap resolution of 4096. What are the other resolutions (basemap, alphamap, detail resolution?). Also, when you say the 16 maps have a 8192 resolution, what do you mean? Are you referring to the x and z size of the terrain?

    Thanks!
     
    ApteryxK likes this.
  36. ApteryxK

    ApteryxK

    Joined:
    Feb 8, 2015
    Posts:
    40
    Yes, sorry I meant :
    There are 16 maps.
    Each have 8192x8192 as X Z resolution (the actual size).
    1000 as max height (Y).
    The heightmaps (RAW files) are 4096x4096 resolution for each of the 16 maps.
    ------
    So in theory a big square with 4*4 of these 8192x8192 resolution maps would give a big square of 32768x32786.
    Converted to KM it gives 32KM. And 32² = 1024KM² (this is the surface of the whole map).
    This is to give you an idea of the size of the map.
    I will give you the map in 10 minutes.

    Kiwi.

    Edit : I have no Idea how to give you the maps... Should I go into my file explorer and give you the map.assets files plus the scene file... :/

    Second Edit : After reading what you wrote above, and as my game will be multiplayer, I don't want you to bother to test this as I am likely to not buy your product because the multiplayer can be very hard to do. But I thank you for answering so fast and asking to help me :) this is very nice.
     
    Last edited: Feb 19, 2015
  37. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    No problem. I would definitely do some prototyping just to make sure your idea is possible on Android. There are serious limitations to the mobile platform, and Unity's Terrain system is not very optimized for mobile.

    Good luck on your project!
     
    ApteryxK likes this.
  38. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Hello everyone,

    As you've no doubt heard by now, Unity 5 is removing the pro only engine features, which is awesome news for users of this kit, as it means all users can now use the Async Scene Loader Components. Async scene loading has gotten a major boost with Unity 5, so hopefully this will make creating massive worlds a real possibility (no promises until I conduct further testing!).

    While the kit is not currently compatible with Unity 5, I've already completed the updates that will make it so. Once I finish the new quick guide document I've been working on, I'll submit the update to the Asset Store (this will be done by Friday at the latest). Of course, anyone who has already purchased the kit and who wishes to get the update faster can email me with their purchase invoice number.
     
    ApteryxK likes this.
  39. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
    @gilley033 with this toolkit would it be possible to create a level selection menu similar to farm heroes saga :http://img.softmonk.com/farm-heroes-saga-2.0.13-4_320x568.jpeg

    basically I have a map sprite for each area this map area contains buttons to certain levels.
    What would be the best, optimized way of doing it.
    I tried with simply creating,
    Canvas with fixed size with extend with a scroll rect component.
    i added a map holder object with horizontal layout element and a content size fitter.
    in there I added 40 different maps with different textures.
    while it runs on a device. as you can image loading all the resources is painfully slow, and the scrolling is very choppy, I can only image it will get worse with time.

    So is it possible using your kit to create something like that and if not are you aware of anything that could help me with task. I'm surprised I haven't found anything like that on asset store.

    Thank you.
     
  40. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    That should absolutely be possible, but let me test out a sample to make sure (if you want to send me one of your map sprites, then I can really give you an accurate answer). I haven't worked with the new GUI much so there may be some issues there but I doubt it. I also make heavy use of coroutines which may cause garbage related issues on mobile. I'll check that out also and let you know.
     
  41. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
    @gilley033 e-mail or skype? my skype is Neophenz
     
  42. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
    and the main focus for me is mobile.
     
  43. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
  44. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
  45. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Got it, thanks! I've got some other stuff going on today but I plan on working on this tonight, so expect to hear back from me either tonight or tomorrow (I'm in the US, it's 2pm here currently). I'll shoot you an email.

    Cheers
     
  46. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
    Ok thanks! Really appreciate it!
     
  47. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    This is exactly what I've been looking for. As soon as the Unity5 version is out I'll buy it immediately.
     
  48. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    I found a couple of bugs (some relating to Unity 5, some not), but the main delay is the quick guide. I'd say it's about halfway done. I should have it done by Thursday.

    If anyone wants the update now without the quick guide, please email me with your invoice number. Unfortunately the package is too large to send via my primary email, so I'll have to send it to you from a different one (which I'll specify in an email from my primary account).

    Thanks!

    ps: I've updated the Quick Guide work in progress. Please let me know what you think!
     

    Attached Files:

  49. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    Awesome news :)
    One question that popped up in mind was, how does TS&DLK deal with pathfinding, namely Unity's navmesh ?
    Do I bake the navmesh for each scene and it will work naturally without any extra effort?
     
  50. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,181
    Good question. Last time I checked navmesh wasn't setup to work with dynamic content. I'll look into whether there's been any headway into fixing that, and what work arounds are available if it hasn't been fixed.

    As of now, though, navmesh isn't compatible with the kit.