dcd93doucette
Member
I have a room that is pretty big in size. So naturally I'm using a camera and view. I can pan around, zoom in, zoom out, and resize the window. I've got all that working pretty good. I'm only using view[0] and its default camera.
What I'm trying to achieve:
This game is grid based and it is important that the player is able to see grid lines on the game world. It is easy enough to add a simple repeating background or draw the lines in a few for loops, however this is presenting me with an issue.
The issue:
In this game you can zoom out to view the entire room, or zoom all the way in to view everything 1:1. When viewing anything other than 1:1, the grid lines do not scale well. Some of the line get interpolated to be invisible while others are still visible. While you are actively zooming in or out and the zoom value is continuously changing (this support multi-touch pinch zoom), the grid line produce an effect that could give one an epileptic seizure.
Finally, the part I'm asking for help with:
What I would like to do to solve this is draw the grid line in a for loop, directly to the view surface before the camera and therefore, untied to the my scaling system. My view camera is not snapped to the grid. So how do I draw this aligned with the in-room grid? I'm just a bit stumped on how to translate those positions from the room to the surface so that they line up. I would do more research, but I'm not even sure how to put that into one phrase.
I'll grab some screenshots here soon if any of you want them
What I'm trying to achieve:
This game is grid based and it is important that the player is able to see grid lines on the game world. It is easy enough to add a simple repeating background or draw the lines in a few for loops, however this is presenting me with an issue.
The issue:
In this game you can zoom out to view the entire room, or zoom all the way in to view everything 1:1. When viewing anything other than 1:1, the grid lines do not scale well. Some of the line get interpolated to be invisible while others are still visible. While you are actively zooming in or out and the zoom value is continuously changing (this support multi-touch pinch zoom), the grid line produce an effect that could give one an epileptic seizure.
Finally, the part I'm asking for help with:
What I would like to do to solve this is draw the grid line in a for loop, directly to the view surface before the camera and therefore, untied to the my scaling system. My view camera is not snapped to the grid. So how do I draw this aligned with the in-room grid? I'm just a bit stumped on how to translate those positions from the room to the surface so that they line up. I would do more research, but I'm not even sure how to put that into one phrase.
I'll grab some screenshots here soon if any of you want them