Future Enhancements
Here are a few more ideas for extending the code in this chapter:
- Add acceleration to the MovingTransform3D. This way, objects would smoothly speed up until the desired velocity is reached and then sustain that velocity. This would give a more realistic feel to the player movement.
- Add circular movement to MovingTransform3D. This way, objects could "orbit" around other objects.
- Allow GameObjects using a MovingTransform3D to make smooth turns around corners. The player can make smooth turns using the keyboard and mouse, but game objects are a different story. Instead of walking forward, stopping, turning, and then starting to walk again, it would be cool if the object could turn while moving. The object might have to slow down to limit the turn radius (just like you slow down to make a turn while driving a car).
- Extend OBJ and MTL support. Solid colors defined in the MTL could be easily implemented by creating a subclass of Texture that represents just one color.
- Add more imagination! You can do a lot more with game objects, such as making baddies that move around in a circle, robots that actually move their legs to walk, or ghosts that chase players only when they aren't looking. You'll be able to do even more with game objects when we tackle collision detection in .