|
Post by Xanthous on Mar 4, 2016 2:58:35 GMT
I cant seem to figure out this problem I have with my current project. I'm a beginner so any advice would be great. In your project your map is made up of instantiated tile objects that have the tile.cs script attached to them. However, what if your map was one huge imported 3D object? Below is an example of the project I'm working on. I created this map in unity. As you can see it's a pretty complex 3D object made up of "tiles" of varying slopes and geometries. (All the tiles have the same scale and the map is 10x15 units) My question is how would you go about creating tile-based movement, storing data in tiles, etc, on a map that is really just one big complex shape? Using raycasting and nodes? Grids/Arrays? I'm stumped...
|
|
|
Post by Admin on Mar 4, 2016 15:41:23 GMT
Your map looks nice, a lot better than the simple stuff I demo'ed for sure. There are a few ways you could go about it, but I think either way you are going to have to extend the system I built. One option I would consider would be to force even the model to be "step" based such that even the position a unit would stand on a slanted tile would be at one of those positions which can be calculated. However, it has been my experience that when you work on a team with talented artists, they rarely like to work within such constraints. In a scenario where you need greater "resolution" (freedom for the artist) it's always nice to find a way that you will not have to manually define this much information - especially if you want to be able to iterate on the level maps, etc. So, an option I would consider would just modify the editor script. If you defined the "range" of the board script (such as your 10x15 unit map) then it would be an easy thing for the editor to do a nested loop and perform ray-casts onto a mesh collider of your map thereby telling you the exact center positions for each of the tiles. You wouldn't treat this as a "step", but just the actual height of the tile. You could potentially use those locations as way-points and make use of Unity's nav-mesh for animation up the slopes etc. You still might need additional "hints" of one form or another that would indicate when jumps would be necessary, but its hard to imagine all of the fine-tuning polish until you really work on it yourself.
|
|
|
Post by Xanthous on Mar 4, 2016 18:50:36 GMT
Thanks a lot! I'll have to tinker with some of the ideas you mentioned. I agree, the fine-tuning will be the most challenging part of this. I've come to appreciate the work that goes into tactic games a lot more now
|
|
|
Post by Admin on Mar 4, 2016 23:07:19 GMT
Yup, I feel the same way. I knew it would be a huge project, but it is like the scale just keeps growing the further I wade into it.
|
|