Byttemos / CV-RPG

This is a RPG-style digital resume. Not much else to it
Other
0 stars 0 forks source link

Revise movement to sidescrolling relative to the player #1

Closed Byttemos closed 1 month ago

Byttemos commented 1 month ago

Right now the character sprite is moving around the canvas. This limits the usable space (and effectively disqualifies the game as a sidescroller). The character sprite should be fixed in the middle of the screen, and the world should move relative to it.

Requirements for issue:

Byttemos commented 1 month ago

Summary:

Character is now stationary relative to the canvas. The speed and position variables now control a large image, which then moves in the background. Character facing and position increments/decrements have been inverted to fit the new movement scheme.

Slight code cleanup was performed by moving the keyboard input logic to a dedicated function, decluttering the draw function.

Some foliage was introduced to the game in order to verify movement scheme.