[i]Welcome to "Game Mechanic Mondays!" where we'll be covering in-depth how things were actually programmed in [b]Smiths & Legends[/b]![/i]
Just in time for a cold Christmas, today we'll be covering...
[b]Episode 2 - Weather Effects![/b]
[img]{STEAM_CLAN_IMAGE}/42414937/10f4a5609fadd28cf1a807030c742817005bdf37.gif[/img]
How does the snow falling effect in this level work?
Well, there are two main ways that this can be done - [b]Post-Process[/b] or [b]Particles[/b].
[b]Post-Process[/b] is like adding a Snapchat filter on the screen at all times. This means nothing is actually spawning in the world so it's just a visual effect on screen.
[b]Particles[/b] mean we're actually spawning some tiny object in-game that may or may not have a physical component.
In general, post process has the lower performance impact but usually looks a bit more artificial. Smiths & Legends uses both of these for certain effects, but we'll focus on Particles because that's how the snowfall effect above works. #NoFilter
[b]Particle Effects [/b]
[img]{STEAM_CLAN_IMAGE}/42414937/ce0cb6978c1baf15e488b595051033cceb9cf989.png[/img]
Particles are a powerful configurable thing used in many games. Essentially we're spawning tiny white balls and can control how frequently they spawn and what direction they move. In Smiths & Legends we change these in the level to affect visibility. In other levels, I might change these balls to be brown so it looks like sand or purple to look like mushroom spores. [i]Balls. Everywhere.[/i]
The cool thing is, the particles aren't actually falling over the entire level, they're just falling in your view which makes it [i]look[/i] like it's falling everywhere.
[img]{STEAM_CLAN_IMAGE}/42414937/9c630f5d2e4988340f9499183ab20488e3b17cb3.png[/img]
It's like there's a cloud floating on your camera at all times. Video games contain a lot of these "cheats" that developers use to save on performance.
Thought that was useful?
Let us know in the comments below or in the Discord or Facebook Communities!
[url=https://discord.gg/MFD9rJE9C5]Discord[/url]
[url=https://www.instagram.com/p/C05QJWbt0o3/]Instagram[/url]
[url=https://twitter.com/AnsarincGames]Twitter/X[/url]
[url=https://www.facebook.com/SmithsLegends]Facebook[/url]
[b]What caused the bug in the Monster Spawn last week?[/b]
Aha did you think I forgot? Well here is the fix below...
[img]{STEAM_CLAN_IMAGE}/42414937/300ac88d39e8346aa0ae296b4cee93224ea4f22e.png[/img]
The issue was that the "Switch on Int" only went as high as 5 - but "Enemy Count Current" can keep increasing and go higher than 5! To solve this, we use a [b]clamp[/b] - which makes sure the random number picked to determine the level of the enemy only goes as high as 5.
Of course... some levels might have monsters that are even higher level than 5! Good luck Blacksmiths!