User Tools

Site Tools


notes:comporg:spring2025:projects:mtb2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:comporg:spring2025:projects:mtb2 [2025/02/27 04:03] – [determining computer paddle movement] amelvil2notes:comporg:spring2025:projects:mtb2 [2025/02/28 05:03] (current) – [score storage] bdildine
Line 6: Line 6:
 For our purposes, we can check if the ball's x position has exceeded 640 or subceeded 0 For our purposes, we can check if the ball's x position has exceeded 640 or subceeded 0
 ====score storage==== ====score storage====
 +You can store the score and other variables you may use such as x and y positions to locations in memory by defining it, for example: 
 +<code> 
 +%define LScore    0x00000000 
 +</code> 
 +You can then load each score into a register before use so you can use the same score tracking function for both the right and left players scores by loading different scores before calling the function.
 ====score display==== ====score display====
 Displaying the player's scores is where things start to get more complex, as we no longer have built in 'itoa' or 'print' functions, so we will have to build them manually. Displaying the player's scores is where things start to get more complex, as we no longer have built in 'itoa' or 'print' functions, so we will have to build them manually.
notes/comporg/spring2025/projects/mtb2.1740628999.txt.gz · Last modified: 2025/02/27 04:03 by amelvil2