13 RONIN - DevLog #2 - Lightning

posted in ERASERHEAD STUDIO for project 13 RONIN
Published May 09, 2018
2D C#
Advertisement

Banner950x297

Ok, It hasn't been a full month since my first post here, but I still think it's time for an update, and from now on I plan to post a major news article at the beginning of every month containing a summary of what I've been up to lately. For anyone interested in more I recommend my blog at Eraserhead Studio where you can find random news, animations, images, sound and code that hopefully can help you out in your own game project.

So, what have I been up to lately?

Well, due to an aching hand, the result of too much asset drawing, I've let my hand rest from the tablet and instead focused on doing some proper coding. The result is two quite flexible engines: one for rain and the other one for lightning.

Rain

Since a few of the levels will take place in bad weather it's important for me to be able to generate some good looking rain. I talked about my rain engine already in the last post but since then I've fixed a few bugs, added some properties and posted a higher quality demonstration video on YouTube.

The engine has a lot of settings, all which will help me make a living and varied rain. Some of these are:

  • Drop velocity
  • Drop acceleration
  • Density
  • Drop creation interval
  • Wind
  • No of splashes at ground contact

There are still some minor features to add, such as individual ground height at different z-level, but majority of the engine is now done.

If you want to do something similar for you own project please check out the demonstration video at YouTube .

And why not download the source code from BitBucket .

Lightning

For an even more dramatic effect I want thunder and lightning in the game. I started doing a lightning bolt, then a lightning branch and finally a lightning engine sending randomized bolts and branches through the sky.

As with the rain engine this engine also has a lot of settings, some of these are:

  • Lightning length
  • Lightning angle
  • Interval between lightning strikes
  • Lightning duration
  • Animation
  • Fade
  • This was quite fun to code and I'm quite pleased with the result. Things left to add is sound for thunder and maybe a flashing background.

Check out the demonstration video on YouTube  and get the source code from BitBucket .

A big thank you to Michael Hoffman whose awesome article was a big inspiration for this work. Other inspirations have been google images and YouTube. Internet is just awesome!

Shaders

Working with the lightning I spent a few hours and reading up on HLSL and including shaders in MonoGame. It was interesting and fun, but also quite time consuming. There will be a number of shaders included in the end product, but for now it will be a type of coding I will save for the polishing phase.

For anyone getting started with MonoGame and HSLS I highly recommend the article My First Pixel Shader(s) .

I'd be very happy for recommendations on other good HSLS pages.

Home page

I'm using WIX for the Eraserhead Studio page but unfortunately the WIX-editor is both slow and buggy. I've spent a number of hours in the editor trying to achieve a nicer looking and easier to use site than the previous one but WIX doesn't make it easy. I've still got two active tickets at the WIX-support regarding bugs I can't find any solutions for, but hopefully the site will still be better than the last one. The short lesson being - don't use WIX.

Dev forums

Besides writing and publishing this post I've also drawn avatar, logo and banner and added those to my profiles on:

When I've got a finished demo I'll also get on Facebook and Twitter. Do you have recommendations on other sites where you think I belong? Please let me know.

Please visit Eraserhead Studio for more. 

Happy coding!
/jan.

NOTE. As always, everything I publish here or on any other site is work in progress and subject to change.

0 likes 2 comments

Comments

Awoken

I like looking at pictures, you should throw up some pics!

May 10, 2018 02:12 PM
ERASERHEAD STUDIO

You're absolutely right. I haven't had much content to show, but hopefully I get a lot of drawing done during the summer.

Thanks for the feedback,

jan.

June 06, 2018 11:43 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement