Today I wanted to build something with the engine, like a little house, just to show the potentiality of the system...the big problem I faced, is that for each object I needed to set everything up from scratch. For every block on screen i had to write a lot of code, and the only difference was the position ad maybe the size...so I decided to allow the engine to copy objects, so that i can make a copy and modify just the different parts.
It required the use of copy constructors, which do this process allowing to also duplicate the eventual pointed values inside the copied object.
The system is fine, and i can copy model and game objects. I think i'll extend it to light also, and maybe I'll write a common interface called iCopyable, but there are a few tricky things to handle, so I'll leave it for last.
In the picture I just imported an horrible model to test everything on a more complex environnement, and indeed the shadows were a little messy and i needed to change a few settings of the bias.

Nessun commento:
Posta un commento