Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DerDicke · Jun 28, 2017 at 10:09 PM · isometric

Dungeon Keeper like game

I'm thinking about making a Dungeon Keeper (DK) like game using Unity. Aiming at doing it the Unity way, i created 3 prefabs for the 'tiles' and constructed a basic map to get an idea of how performant this approach might be. To give you an idea. here's the 'scene': ![scene][1] This is what would be seen during playing: ![View][2] [1]: /storage/temp/96791-big.jpg [2]: /storage/temp/96792-view.jpg

The view is around 60 fps if disabling cast shadows, so that would be very ok. I just want to know what are your thoughts about this approach? Did anyone try anything similar or has any knowledge in this area?
Thanks guys!

big.jpg (258.8 kB)
view.jpg (51.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Jun 29, 2017 at 01:08 AM

This approach is not feasible for all but the smallest maps. Even a tiny 16x16 tile map would mean 256 gameobjects.Instead, do it like DK and similar games did it and create a mesh ,ideally divided into chunks, which represents your tiled terrain. There are dozens of tutorials on Minecraft-style mesh generation, and a good starting point is the Mesh class Scripting API in combination of knowledge of how to use 2-dimensional arrays.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by DerDicke · Jun 29, 2017 at 10:04 AM

@Cherno Thanks for your opinion. Is it based on any evidence? I'm a programmer myself and wouldn't do it this way, but wanted to try. And results are pretty good. Performance wise dynamic batching does a very good job and can keep the framerate at 60fps (see view.jpg) in the scene (big.jpg, roughly 100x100 tiles). It should be able to improve this by hierachically ordering tiles and disabling parts not visible.

Memory wise this whole build is around 40 MB, so besides textures, which are referenced, how much more can this get? 100MB for a 100x100 map? Probably not much more. Sounds ok.

Big time advantage would be that changing the tiles is an exchange of a GameObj and would happen every few seconds at maximum rate (not every frame). A very easy scheme compared to building some mesh, isn't it?

I'll have a look into your reference so far, thanks!

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Jun 29, 2017 at 10:46 AM 0
Share

Your dynamic batching is only that good at the moment because your entire level appears to be created using identical cylinders that share a single, untextured material. I'm guessing your actual prefab tiles are going to have different material instances? In which case your static batching will be blown.

avatar image DerDicke tanoshimi · Jun 29, 2017 at 11:37 AM 0
Share

static batching will be out of question because 'tiles' (prefabs) must be exchangeable at runtime (your creatures will dig through dirt to create a dungeon).

avatar image Cherno · Jun 29, 2017 at 11:04 AM 0
Share

Unity just can't handle the amount of gameobjects that result from having each tile or tile sperate. Especially if there also have to be resources for the actual game entities like creatures, furniture, effects, and so on.

avatar image DerDicke Cherno · Jun 29, 2017 at 11:41 AM 0
Share

Do you mean Unity Editor or runtime? Right, for the Editor there must be some kind of work around, for the runtime I've to see how things turn out... but according to the test above it looks like the way to go.

avatar image Cherno DerDicke · Jun 29, 2017 at 12:18 PM 1
Share

Be sure to test terrain alteration, too. Instantiating lots of prefab clones at the same time is also pretty resource consu$$anonymous$$g.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

68 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I create a customizable isometric grid system? 0 Answers

3D Character in a isometric 2D world 1 Answer

Using 2d Sprites in 3d 1 Answer

I need help with moving a character in Unity2D c# but just along a path 0 Answers

GameObject rendering behind the top half of my isometric map 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges