kiigame / kiigame/adventure_engine
Allow background to partially hide objects
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 6
- Avg merge
- 2m
- Merged PRs (30d)
- 4
Description
It would be nice to allow parts of the background hide objects partially.
For example, in Lätkäzombit, the original graphics had the coat track overlap a bit with the locker, covering it slightly. The coat rack was made less wide to not cover the locker. Also, it would be cool if the surrounding darkness in the WCs could partially obscure some of the objects.
Currently, there are the background layer and the object layer. Objects in the object layer, if they overlap, the first one in the JSON is drawn first and therefore displayed on the bottom.
One solution would be to extract the coat rack from the background layer and add it to the object layer as a new, uninteractive object type. Code could be added to control this more explicitly.
There could also be a new layers - in this case, background, objects behind the coat rack, coat rack layer, and then objects in front of the coat track. There were performance concerns during the development - increasing the number of layers increases the number of checks when you're clicking on something. But currently the engine has been optimized enough that this might not be a problem. However, the coat track in the object layer solution is probably more flexible.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the background layer, object layer, and JSON object ordering control rendering and clicking. Compare the proposed uninteractive coat-rack object approach with additional layers, including the stated performance concern. Done means background elements can partially obscure objects while object interaction remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100