• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Multiple Surfaces Question, and Possible Optimization? (GMS 1.4)

WAVINDY

Member
Hey there GMC! I am back to game making after a long hiatus, and I am into the development of a survival exploring game that utilizes a top-down perspective, like that of LOZ, but a little more modern.

The problem I'm running into that I can't seem to wrap my head around, or find any info to supplement my problem, is that I already have a surface lighting system used at night. Which for this question might be beside the point, but nevertheless thought I should let you all know I understand surfaces at an intermediate level. I have trees that auto-populate from files I design levels in. They sway in the wind using code in their Draw Events, and randomly choose between 10 or so images I made for them so there is variety in the way they look. My main problem is, I want to make it so the smaller sized character I have made can go behind these trees and the player can still see things around him. I have tried a distance to point system that would affect the alpha, but even then the trees differ in height. So, how could I possibly subtract a circle out of the trees so I could let the player see behind?

Example of how it looks thus far:
1599697959868.png1599697995532.png

I would appreciate any help! If you wanna see code of specific pieces, lemme know! The surface for nighttime and basic game drawing is done in the gameController object.

Thanks so much! :D
 
Top