Replaced the integers by doubles to improve the aiming and speed accuracy of the bullets.Changed the coloring of the bullets to fade out after time to live expires. Changed the structures a bit to keep the data with the object it belongs to instead of having static variables covering all objects of the same type. The ship has two turrets of which the rate of fire can be controlled by both he analog triggers on the XBOX controller.... read more
Added a dispenser to the main ship structure. It contains an array of 100 bullet structures which contain position, state and type of bullets. A timing mechanism in the main render loop is used to trigger firing. Firing a bullet sets the x and y position to the ship's current location, and the time to live to 150 cycles. Cycles are counted down with one each frame. When time to live reaches zero, the bullet's fired state will be set to false and the coordinates will no longer be updated.... read more
Added a game structure header, which will contain descriptions and methods on the structures. Tried displaying circle at the main ship's location. Next step will be controlling the green circle using the XBOX controller, filtering the speed setpoint.
Added more messaging on the XBOX thumb controls, x and y deviations are now detected, and messages are posted at an approx 50ms interval. Direct3D initialisation added.
At the moment it is only possible to detect the input from one controller. The function needs to be expanded to handle more (up to 4) controllers. The controller number corresponding with the detected deviation will be sent as the lParam with the message. Work in progress...
Hobby project just launched. Everything is hooked up and ready to go... Let's see where this will be heading.