- #Rts games with custom games like warcraft 3 how to
- #Rts games with custom games like warcraft 3 code
)Play your part in the player-driven society that runs in Archeage.Ĭlaim land and build from the ground up to greatness, or fight your way up and conquer land whilst honing your combat skills.Īrcheage has a larger focus on settlements, trade economy and alliances than many MMORPGs, and provides a new player experience for players. I never used paid assets before, but it looks like that the time has come. Thanks a lot for your reply and suggestions! I have checked this assets, and it's looks great. If I fail with this approach I will use megasplat. The only thing I'm afraid of is 9 texture fetches per pixel. And it is even possible to switch texture type of a tile in runtime by doing small VBO streaming (sorry for GL terms, don't know the right HLSL word for this yet). The final result will be blend toghether in fragment shader. Looks like it is possible by abusing the uv2, uv3, uv4 mesh params.Īnd in shader I will perform 9 texture fetches: 1 fetch for self tile texture, 4 fetches for splat maps and 4 fetches for neighbours textures. So, i need to pass 9 indexes to my shader. The same for RIGHT, TOP and BOTTOM neighbours. LEFT_NEIGHBOUR_TEXTURE_INDEX + LEFT_SPLAT_MAP_TEXTURE_INDEX MAIN_TEXTURE_INDEX - index in terrain_textures_array, POSITION, NORMAL, UV (respective to tile point, so left-bottom corner is 0,0 and the right-upper corner is 1,1) Now it comes shader works.Ģ) pack all available terrain textures into texture array, and pass it to shader.ģ) pack 1-dimentional splat textures into texture array, and pass it to shaderĤ) for every "tile" i will pass the following data to shader: Assign splat maps to the tiles - so the every tile knows the 4 indexes of splat maps for left, right, top and bottom neighbours. For example if power of GRASS_TILE > power of DIRT_TILE this means that when GRASS_TILE will be adjacent to DIRT_TILE, the GRASS_TILE will render its part on the DIRT_TILE location.ġ) For every adjacent tiles pre-calculate their relations in terms of power. For every tile texture appoint its "power". It seems that it gives all lightning & shadow calculations from the box, while I still can performe multi-texture splatting.Ġ) Generate tile map, and all needed vertex data first.
#Rts games with custom games like warcraft 3 code
As I see, it's relatively easy to code something based on unity's "surface shader". I digging a little into unity shaders for now, and temporary decide to write simple shader by my own. Ideas?Ĭlick to expand.Thanks a lot for your reply and suggestions! I have checked this assets, and it's looks great. The final result should look like Warcraft 3 / Empire Earth games. While I'm studying - the project will stand still =( The way number 2, requries me to learn the whole unity shader programming, that takes a lot of my time. So, what you thinkg about it? What is the best way to render 3D tile terrain?Īs I think, the way number 1 is works well for fast beginning, but may lead to huge fps problems in future. (We can generate elevations, but the textures is a big deal). And as I see, this terrain have no real option for "procedural generating" it from scratch. Basically this terrain for player walk over it. But it looks that it is well suited for RPGs or other kind of terrains. The last way is build-in unity terrain engine. But it looks that it is impossible to render tile-terrain by Standard shader.ģ. The Standard shader works well, and have light+shadows from the box. I can write shader for general map rendering, but I don't want to write such things as Light + Shadows for this. But, when I start to use unity, I really hopes that the engine will get the rendering work for me. This is not big problem for me, cause I have experience with OpenGL + glsl. But in this approach we have problem with textures - this one big mesh should use one material.Įven if I pass with each vertex the texture_index attribute for texture array, the "Standard unity shader" can not complain it.
#Rts games with custom games like warcraft 3 how to
I know that Unity has static batching option - so this may helps, but I'm not quite sure how to config/use this properly.Ģ. Fairy simple, but the core drawback is: drawcall number may be very high. Just use the Camera culling and render all stuff. Every tile is unity GameObject with simple tessellated geometry and relative texture. After researching the topic, I think that I have 3 options to render my terrain properly:ġ. Every tile represent 2m*2m surface, but the values may change over time. To cut a long story short, I have a tile grid-map, about 256x256 size. This is my first huge game project on Unity, and I'm a little bit confused about choosing best way to render my terrain. A few weeks ago I started to work on 3D rts game, like "Age of empires".