Summer DIGM 540 - Shader is not going well


Overview

The implementation I aim to achieve this week is the spotlight effect on the game character, as mentioned before. I have spent most of my time learning and experimenting with shaders and masks in Unity, but progress hasn't been as smooth as I hoped. Nevertheless, I managed to implement some other core mechanics in my game. Next week, I will focus on achieving the spotlight mechanics for my character in the game.

Spotlight Mechanics Development

The effect I want to achieve:
https://www.youtube.com/watch?v=UkGaAxvHouI&list=LL&index=2

For the spotlight implementation, I try to research some documentation or some tutorials to follow but didn't find any that would be much useful for me. One of them is a tutorial on 3D shader use which seem more closely to what I want, but still, I wasn't able to achieve the effect that I was aiming for in my game.

Tutorials I found for 3D shader:
https://www.youtube.com/watch?v=LLYPFTYJafQ&list=LL&index=1

Through the progress of learning, I do understand that I need to have the shader to calculate the transparent circle for my game character and follow it around, but I could not achieve that effect and I made the game scene completely dark.


The alternative approach I thought of was using a transparent image to follow the player around, but it doesn't seem to be working to achieve the desired effect either.


Mechanics Development

Apart from researching and developing the spotlight effect (which is not quite going well), I have successfully implemented two other mechanics required for my game. One of them involves the ability to pick up light sources, and the other allows the player to use these light sources to complete the levels.

Both of them achieve using a collider. Once the player collides with the light source or the exit. The script would check for the condition and achieve the mechanics.

The light source would check for the collision if is from the player and updated a boolean in the player script to indicate that player picked up the source.


The exit used a similar logic which as the player collides, it would check to see if the player already has the light source or not. If yes, the level will be completed and bring the player to the next level in the build.


Demo


Next Week

In the next week's plan, I will continue to reseach and implement the effect of the spotlight. I hope that next week I can make this effect more in line with my expectations. After that, I will start working on the framework of the storyline.




Comments

  1. The demo looks neat so far, I do wonder how many levels are you planning on making for this game? Also for the shader bit, I trying to see if I could think of something that could help I did found this video which seem like maybe something that could help if added to a shader to make the rest the game dark, but make the player visible https://youtu.be/S5gdvibmsV0.

    ReplyDelete
    Replies
    1. Thank you so much! I did not see the comment until today, but I saw the video you shared looks so helpful to me, I will give it a try on that see if I could use it for myself. Thank you so much!!

      Also for the level that you have mentioned, I do figure out some ideas this week related to the game plot, I will mention that on this week's blog, but for the level I foresee having 10.

      Delete

Post a Comment