PlaceholderGames / 2020-yr1-group-7

CS1S464 2020 Group 7
1 stars 0 forks source link

Y Axis movement and map scrolling #6

Closed DoctorMikeReddy closed 4 years ago

DoctorMikeReddy commented 4 years ago

Jozsef reported issues with Y axis movement not working. While the character could move by distinct tile based jumps in the X axis, the movement in the Y axis was minimal, with the character disappearing after only a few downward steps, of only one pixel or so, rather than the 64 that would mean a successful movement from one tile row to the next; this is the same as for the columnar movement horizontally.

There was another error in the camera scrolling as well, but this was not yet apparent, as the character never moved far enough to trigger scrolling of the map. Specifically, there were errors in the Game.py and Player.py files, which have been corrected and commented.

DoctorMikeReddy commented 4 years ago

Can Jozsef please confirm that the main branch code now executes the way that was intended, and that the bug has been eradicated? I have created a new map file, map2.txt, in order to make the scene wide enough to need sideways scrolling, as well as downwards. The source code was changed in order to use this new map. A few small mathematical corrections were made to ensure that the character had full movement across the whole map. It is possible that these were introduced to try to fix the original problem.

nimshi89 commented 4 years ago

Wow, it works perfectly fine! Thank you so much. So I did want to add the X-axis just wanted to make it work first on the Y-axis and then copy the method and change the data to X-axis. I did add more tiles to the map and now the player can walk off the screen which I did implement a method so that won't be able. But the camera is working fine and now the player has more ground to move on.

nimshi89 commented 4 years ago

Fixed it :) Thank you so much for the help Mike.