In this episode of the game development show, we add a day & night cycle to Project Skyring.
We employ GameMaker’s surfaces to get the job done, using one to hold the semi-transparent black rectangle that lies on top of all of the other graphics in the game, giving them a darker tint. We then employ the trick we used in Project Spaghetti to cut light sources out of the dark surface for objects like the player character. (in a manner similar to cutting cookies out of dough)
To make the night more dangerous to players, and to give the players a time limit to push them to explore, we lower the amount of energy from the sun they can recharge as night progresses and make enemies faster.
One problem we are left with, however, is that surface rotation, while possible, is impossible if there is a link between the things on the surface and the objects behind it, because one is rotated, while the other is not. One possible solution would be to draw everything (aside from the night surface) to yet another surface and rotate that as well, but that’s a lot of surfaces and a lot of drawing – something that could easily bog the game down.
We came to the decision after the show to drop the use of surfaces for the night effect and instead rely on just drawing the semi-transparent night rectangle under important objects. This means there is no longer a glow effect around the player, but, given the trade-off, this is where we will likely stay.
Game Development Show Tasks Worked on This Episode:
- Create a Day/Night Surface
- Make Time Pass
- Objects like the Player Emit a Radius of Light
- Enemies are More Dangerous at Night
- Player Doesn’t Recharge at Night
Although it was a quiet show, we appreciate Sirus, DecentScrimp, and everyone else who dropped by!