Mouldy Apples #2

Posted by spike1 on April 9, 2014, 1:03 a.m.

Another devblog :)

Quick List:

Not sure what I can talk about in this one lol, the title sums it up pretty well. Discovered that as I worked several folders in my game were disappearing so I quickly started to back everything up, didn't loose too much and have several hard-drives spare so its not a big deal :).

Started working on various weather effects. I decided to start off with rain, as its the most complex in my opinion :D. As I realized I was going to need a rather large particle system(Due to the level of detail needed when close to surfaces), that can emit the rain, do water splashes etc, I started to optimize the scene a bit(More on that later). After that I started working on the particle system, that was pretty easy. It didn't really look good enough, so I started looking into changing the lighting. More on that in Colour Grading.

I also started to work on wind, hot days, and others, but I'll save those for a later blog.

.The rain changing lighting lead me to Colour Grading, an interesting filter that lets me use RGB curves to change the contrast of those colours. I programmed the rain to making the scene somewhat desaturated and blue when it begins to rain, it turned out looking pretty great :D

Not the best pic(It looks better in motion AND its night time so the colour grading is hard to see lol, ah well :D)

I realized that my idea wouldn't work due to the moss that you plant having no impact on the later game, so all you'd do is spam click as you ran towards different destinations which kinda sucks. I decided to let the moss follow you, and make it a lengthy process to grow more. You can guide all the moss with the main character, or select one and control it on its own. The types of moss will all be affected differently by weather and be targeted separately from enemies. You can also switch out the mosses with other species better suited for the situation. Using this system I can create interesting puzzles and have quicker gameplay.

Started working on the moss itself as well, was pretty simple. I gave it a basic AI that lets it follow the player and attempt to avoid obstacles by moving around them(Scans with Ray Casts). I also gave them the ability to swim and jump when there's a ditch. Several of these abilities will be changed depending on the species of moss(Especially swimming).

I just did the funnest optimization I think I've ever done :D. I managed to increase the FPS by 20, in such a simply way. As it turns out, unity's function call for OnGUI has an insane amount of overhead, so much in fact that by moving my code from it and into the Update one, it increased the fps pretty happily :D.

I did another one for the water as well, as whenever it was in view the fps would halve. The problem was that the water rendered its own texture that it could use to distort, however this duplicated all the shadow and draw calls, and all the texture swaps. I realized that it would still care about the entirety of the huge terrain, even though its a tiny patch of water :D.

First I exported the terrain as an OBJ, then deleted the areas around the pond. A quick uv map later and it was in Unity. I then positioned it perfectly to where the previous pond was, and gave it its own layer. I then made it invisible to the normal camera, but visible to the water. I then hid the terrain from the water camera. The FPS went up by another 20! I then added some code to the start event of the player that loops through all the foliage on the terrain and re-creates the ones underneath the water on the correct layer, so vegetation would work as well :).

The average FPS on my computer is now 80 on Great Quality :D.

So yep, its all progressing pretty well I think :)

Also damn that took a long time to put together lol :D.

Comments

Pirate-rob 10 years, 8 months ago

*looks at pretty pictures*

*stares at own lack of progress*

I'm just gonna weep in this corner over here, k.

No seriously, that shoreline/pong in the third picture looks so good