are visible within the window, and convert their actual, world coordinates to the pixel coordinates you need to display them correctly. Once everything is updated, you go to the camera object, and determine what tiles, objects, particles, etc. It might help if you also designed the camera to be an entity, so that you can update the position of your camera just like any other object. If it helps, imagine that you have a gigantic screen that can show everything at once, and calculate everything as normal. What you would do is do the bulk of the work using the actual coordinates of each entity in your game. In essence, what you need to do is to distinguish between the "actual" coordinates, and the "display" coordinates of each object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |