• Register

A collection of single player and multiplayer domino games in one package where you can learn to play, challenge yourself against the AI or play with your friends locally and online for simple fun.

Post news Report RSS Optimization No 1

Simple and small things can be quite useful in big projects

Posted by on

A quick simple update:

since I am aiming to go from double 6 to possibly double 18 dominoes sets, I made a simple solution of modeling just one tile in blender that will contain two main materials:

  • the material for the whole tile
  • The material for the numbers of each side of the tile

Then for each number I prepared the 19 textures from 0 to 18 withe a normal map (needs work I know) and texture for the tile itself. So that in code I could replace the textures according to the tile I am creating and complete the set. My first test worked but something worried me:

With double 12 I was getting a performance hit, and the problem was easy to find: I was changing the texture of each material for each tile. The solution was simple too: create a map of the common materials and load them once, then for each tile I assign these materials to the tiles making them faster to load and it improved the performance quite a bit

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: