Closed SpiritBlues7 closed 3 years ago
I've just read through your ticket and noticed that you are planning on implementing a way to render assets separate to the lighting engine. I will direct you https://github.com/UQdeco2800/2021-studio-6/wiki/Sprint-3---Unlit-Renderer as this was a feature that I had to implement last sprint for player related stuff so the base is already there. As IndependentAnimator is currently the only RenderComponent which I had to completely implement, all you should have to do is add the necessary functions to whatever other component you plan on using (Texture or AnimationRenderComponent). Just follow what I've written on the wiki and look over the IndependentAnimator. If you need anything else, feel free to ask me.
Additionally, I'll direct you to https://github.com/UQdeco2800/2021-studio-6/pull/218 incase you haven't already seen it, as it appears Matt has already created a way to detect light and darkness but I'm not too sure how exact the functions are. Still, it should help give you a basis if nothing else.
On another note, there is a issue with rendering items in the correct layer with the two render systems in place, as anything unlit will be rendered over the top of over assets (i.e. the player cannot appear behind lit assets as unlit is rendered last). Not sure how that will impact things but its just something to think about. I had a look at trying to change it but I haven't come up with anything yet. Won't effect layering for assets in the same renderer though.
Yes I saw that the unlit renderer had already been implemented when I was walking through on how to implement it. Reading through the docs, all you have to do is call unlit() I assume? With #218, that implements a way to access the function to find if a point is in a light in the Lighting class. I have already created a component that has the functionality without the wrapper in our branch unfortunately, but I think this is useful if we need to have raw access to that function.
Description
Task: Darkness Feature: #217 Enemies: Darkness, Reactions, and AI
The lighting engine currently provides ambient lighting and atmosphere that is purely cosmetic. This aims to attach functionality to the lighting and allow other components to act based on the current lighting conditions.
This feature will make users want to stay in the light which:
Detect light level
A component to notify if an entity is within a light source or not.
Decrease visibility
Adjust lighting settings to have a moodier feeling.
Allow way to ignore dynamic lights
Create lighting layers that allows some sprites to ignore the dynamic lighting.
Dependencies
No dependencies for this task
Milestones
Completion Deadline: 22nd Oct
Extras
Documentation
Sprint 4: Darkness
Member