Hi there!
I'm in need of assistance in calculating display-coordinates. The problem I've run into is trying to get the illusion of 3d. To be exact, projecting sprites on a 3d-rendered image based on the characters "real world" locations in a 1600x1600 game world. I don't know much about trigonometry and I got my current results pretty much just by dumb luck. I even thought I'd gotten it right the first time before I noticed that the sprite locations didn't match the objects real world coordinates.
I created a chessboard scene and an overhead minimap, displaying the objects real world location, to make sure the coordinates matched. It was quite a bit off. Here's a video showing the problem (there's also some further info in the vid descripion):
I've since had the problem explained to me and now realise the depth is wrong and also that the x-coordinates of the sprites just appear to be correct, due to the squares having the same width.
In my game world, the coordinates start in the top left corner, while in a 3d scene they would be in the center of the scene, so I've adjusted that. I also looked up a guide on using trigonometry to get the correct 3d effect. While I managed to follow it and made the sprites display as in the guide, I couldn't figure out how to apply it to my scene.
The effect I want is for the chessboard surface to act as the full 3d world, and for the sprites to be displayed on it exactly corresponding to the real world coordinates. The camera in this scene was rotated slightly downward when I rendered the image, which might have been dumb as I guess I'll have to account for that angle too.
Thanks for reading! Hoping someone can guide me through this.