A second night, not as long as the first, but still productive. Tonight I added a very nice "flowy" camera that bases its position around certain things happening in the game (collection of important objects locations, velocity of player) and smoothly moves around. The camera also adjusts the orthographic size based on the events happening in the game as well. If you are moving really fast and fighting the boss, the camera would likely be at its maximum size (what would look like the camera zoomed out) whereas if you are simply standing there idle, it would be more zoomed in.
When just the player is in view, the camera will base its position on the players position and velocity. (It will try to position itself in front of the player so you can see more of what is ahead). I'm still deciding if I want to also add a variable in there that positions the camera based on the way the player is looking. If there are any enemies (or anything important) within a reasonable distance, then the camera will also take them into consideration for their position. The system is set up such that each important object is like a magnet with different levels of pull... The player and bosses would have a fairly high level of importance, so their pull is much stronger than some simple enemy and the camera will tend to float more towards their locations.
I also added a very simple damage function, that works half-way as of now. There is no HP in the game yet, so I can't actually deal damage to the player, but what I can do is temporarily disable the players control of the character and knock the character back from the location they were hit.
There are like 30 variables that need tuned already... I need to start getting a few people to try it out and give me some feedback so I can tune it for the greater good.
When just the player is in view, the camera will base its position on the players position and velocity. (It will try to position itself in front of the player so you can see more of what is ahead). I'm still deciding if I want to also add a variable in there that positions the camera based on the way the player is looking. If there are any enemies (or anything important) within a reasonable distance, then the camera will also take them into consideration for their position. The system is set up such that each important object is like a magnet with different levels of pull... The player and bosses would have a fairly high level of importance, so their pull is much stronger than some simple enemy and the camera will tend to float more towards their locations.
I also added a very simple damage function, that works half-way as of now. There is no HP in the game yet, so I can't actually deal damage to the player, but what I can do is temporarily disable the players control of the character and knock the character back from the location they were hit.
There are like 30 variables that need tuned already... I need to start getting a few people to try it out and give me some feedback so I can tune it for the greater good.
The image below shows how the camera reacts with a boss in the room.