User Tools

Site Tools


notes:unix:fall2023:projects:fwgx

Moving Projectiles/Objects

  1. “Projectile.X or Y =+ ProjectileSpeed;” and that will move your projectile in whichever axis you want.

Creating a scoreboard

  1. One way to create a scoreboard is to first add a score variable to the struct that the player identifies with. Next, when initialing the player, make sure the starting score is set to zero. The score data will need to be converted so that it may be presented on screen. Ideally, this will occur inside the game loop. An easy way for the score to count is to set another loop inside some type of process happening in game. For example, if the game is measuring enemy collisions, have the loop count up by one each time the collisions happen. Lastly, set up a drawing point or a “print_at” to display the array information that the score should have been converted and sent to.
notes/unix/fall2023/projects/fwgx.txt · Last modified: 2023/11/08 18:22 by gsalce