I've made some major improvements to the functionality (and the graphics!). I've implemented mouse-aiming, shooting of enemies (they die after 10 shots), enemies looking at the player, bullets with an owner, major improvements to the organization of code.
I got the polymorphism to work and now I update all objects with one Vector. I also implemented a GetType() function in the GameObject (and deriving classes) to easily check what types are colliding. Also fixed some bugs which made all the objects update twice and give Acces Violation errors.
I noticed that I needed to load every sprite from file every time I made an object, so I made a TextureManager which loads textures/sprites into a hashmap for easy access. "player" will give me the fancy new blue person sprite as seen below. Also using dynamic memory allocation in various situations now.
Next up will be enemies that will shoot back! Perhaps even a life-bar for the player and a fancier environment.
I got the polymorphism to work and now I update all objects with one Vector. I also implemented a GetType() function in the GameObject (and deriving classes) to easily check what types are colliding. Also fixed some bugs which made all the objects update twice and give Acces Violation errors.
I noticed that I needed to load every sprite from file every time I made an object, so I made a TextureManager which loads textures/sprites into a hashmap for easy access. "player" will give me the fancy new blue person sprite as seen below. Also using dynamic memory allocation in various situations now.
Next up will be enemies that will shoot back! Perhaps even a life-bar for the player and a fancier environment.
0 comments:
Post a Comment