Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game space coordinate system not working properly #3

Closed
Mushy-pea opened this issue Nov 22, 2020 · 1 comment
Closed

Game space coordinate system not working properly #3

Mushy-pea opened this issue Nov 22, 2020 · 1 comment

Comments

@Mushy-pea
Copy link
Owner

When the on_screen_metrics setting in "config.txt" is set to medium the engine displays both the FPS and the current coordinates of the player character during game play. However, when either of the player's horizontal plane (u and v) coordinates are at or above 20 they are displayed incorrectly. I missed this rather glaring bug through doing initial testing on a map that was too small to encounter the issue.

I'm confident the problem is within Game_logic.showMapPos (or possibly Game_logic.convMsg) but to get an idea of the context you might like to also look at the functions below. It's also worth looking at "The game state" section within the GPLC specification in the repo as this explains what is held using the Play_state0 type.

Game_logic.collectMetrics
Game_logic.updatePlay
Game_logic.showText
Main.showFrame
Main.handleMessage0

The key logic involved is that each Int in the [Int] returned by showMapPos represents a message tile (texture) that can be found within the \Models folder in the release 3 assets package. You'll need to download this package and place the engine executable in the top level folder to be able to run it. Within \Models there are texture files named "char0" through to "char82". If showMapPos were to return [57] the texture "char56" would be displayed on a message tile on screen (note the 1 base to 0 base shift). So, resolving the issue will come down to ensuring showMapPos returns the correct list of message tile references for the full range of possible player coordinates (which should never exceed the bounds (99, 99)).

@Mushy-pea
Copy link
Owner Author

This issue has been fixed in commit d87f7b0 by a change to Game_logic.convMsg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant