The reason I'm making a lighting system is to try and dynamically emulate the gradients I managed to achieve in the concept art and, by extension, give the scene more depth and mood.
This gif shows my first attempt at a lighting system. It's literally just a colored circle with a fading opacity that follows bullets.
The shading on pieces of ground was flat so in an attempt to give it lighting texture I placed pixels of ground color on top of the ground that draw above the lighting to break it up.
I ended up scrapping this lighting engine because I came up with a better one
They change opacity based on their distance to the player, bullets and lights (no lights in the above scene). Because they incorporate bullets and players together as separate sources of light, the bullet creates a kind of mussel flash as it's spawned from the player due to lights in that location being close to both; a happy accident.
One potential issue with this lighting system how inefficient it is, code-wise. For example, this 640x360 pixel room / 8 means it has 3600 8x8 pixel light squares. All of which are calculating their opacity 60 times per second. That's 216,000 calculations per second!
However, the frame rate still stays well above 60FPS on my computer so for now I think I'll keep the lighting engine but give players an option to toggle it off/on (unless I make a better one).
I recently watched THIS GDC VIDEO about the art of Owlboy and one of the things they mentioned (around 7 minutes) is that they started to add movement to objects in the background to give the scene more life.
So to give my levels more depth and interest I made little environmental props that I could procedurally animate.
The squares in the background move up and down and tilt using [sin(N)*(random(60)+20)] where N is increasing very slowly every tick. The amount of vertical movement and total tilt is also randomized but limited by this algorithm.
Also, the number of squares spawned and where they spawn is pseudo-random too, giving each play a slightly different feel, which should improve longevity of the game.
The ground blocks also have random change of spawning a drip if there are no ground blocks below them.
I've also been working on redesigning the Molten Core area.
The molten Core is generally much spikier and dangerous than the caves and the little details in the environment reflects this.
I use the same technique as in the caves concept art to make this piece, for both ease and consistency.
I wanted the molten core to feel much more dangerous so, the tiny squares that move down the screen are blown by a heavy wind caused by lava heat and the huge spikes in the background move up and down to give the feeling of being inside a gigantic, otherworldly monster.
No comments:
Post a Comment