Image

Imagehappypenguin wrote in Imagecpp 😡frustrated

I had a really long question written out for here but then I realised it didn't make any sense, so I'm going back to basics. I'm writing a game at the moment that has a terrain covered in snow. The snow is deformable so that I can do effects like tracks. My current idea for implementation is to have an abstract Map class, with two implementating classes Terrain and Snowlayer. Map contains x and y values for the extent of the area, and a height value for the z value. The overall terrain is calculated by taking the Terrain instantiation and displaying it, then adding it's height values for each point to the Snowlayer instatiation's height values and layering it on top.

So, is the abstract parent / two children idea the right way to go about it? Would it be better to keep the Map class as instantiatable and hold the x and y values within it? Am I looking at this in totally the wrong way?

P.s. I'm coming from a Java background here ^_^