aiiadict@gmail.com wrote:
David Schmenk wrote:Honestly, there is much game logic and more sprite graphics to add which will impact the framerate a great deal. I hope it remains playable once that is doneone way to speed it up is to stop relying on joystick for input, it 1)discharges a cap 2)charges a cap, and increments a counter the joystick routine takes more/less cycles depending on the current stick position.. there is an article on the net to easily interface a NES control pad to the gameport.. then you get digital information and it takes less time.. Rich
One of my previous excursions into improving joystick reading performance resulted in an algorithm to read both axis simultaneously while outputing sound. This is used in the raycaster demo. I didn't add any tones so it is currently quiet. The advantage is that it is constant time to read the joysticks, regardless of position. The downside is the accuracy is reduced to a range 0..63 instead of the usual 0..255. Using the keyboard isn't practical on pre-IIe keyboards and requiring a special built joystick interface isn't a viable option. There are many areas in the final code that I am sure will be a greater cause of slowness. Only time will tell.
Dave...