Originally Posted by
sarvsav
HI Alpo,
I have a doubt here, as I am loading all images and sounds in Game class, so, what is the need of extra class for Image, Sound.? Because no other class is going to use that class Image, which is responsible for loading/rendering images, and same for sound?
There are 2 cases here:
1) Game class load everything: player image, map image, game sounds.
2) Game class call Player class, Player class then load player image/sound using Image/Sound class, Enemy class load enemy image/sound.
2nd case is undoubtedly good as per structure, but will take lots of extra effort. and as per performance, is first case better than second? because there is a single inheritance, whereas in second case, every class need to inherit Sound and Image class? Kindly help.