Finally! An actual visual update of the assembly project! The second paddle has been added, with a generic function now controlling the collision of a paddle and drawing a paddle, instead of drawing and colliding the paddle.
The tricky part, I discovered, was the increased slowness and extended cycle count of adding an extra paddle. Turns out that when drawing a rectangle moving from left to right, you can draw the non-overlapping portion of the bitmap over the previously drawn rectangle. The frame-rate has improved immensely, and may even allow three or four paddles. The possibilities!
I also had to make another input register for player 2's controls. It's a bit bothersome for two players to fight over the same input, so two sets of player inputs are tested per frame. Fortunately the second paddle does not detach the ball, so it only needs two inputs.
After that, sounds! The part that truly brings a little project like this to life. The standard player can only play one sound at a time, but if one loads in multiple sounds to the DirectX player, one can play music and other related sounds at the same time.
Very soon, this project nears completion. That, or anything else I can add onto the top.
No comments:
Post a Comment