Today I added static cameras views to the game for easier navigation around the world.
The issue was that you couldn't really see anything behind the camera. So entering the apartment was easy, getting back out provided to be tricky.
The solution was to port of code I created for static cameras I created in a older project. The difference being that this is 2D sprites instead of 3D models.
This has created a new set of issues to deal with as rotating the camera 90 degrees means some objects will need to be draw up to 4 times to show each angle.
The other and much larger issue is I now have to deal with sprite animation from different orientation. Currently its simple, you can move left, right, up and down but once you rotate the camera you need to adjust all this to match. A early bug had the Yeen moon walking backwards when you entered the door way. The direction of movement was correct the animation wasn't.
I now need to adjust all the actor systems to now take this into account.
If the camera currently rotates the player looks correct but other actors will suddenly be facing the wrong way. They will move correctly but will slide sideways. To correct this I need to add something like the Doom prototype I created a while back where each actor is aligned to the camera view.
While this will make every scene that has fixed camera views more complex I think the pay off will be much better, giving a more dynamic view to what is essentially a 2.5D adventure. If it becomes to much of a hassle I can drop it and just go back to only having left and right movements with a single camera.


No comments:
Post a Comment