This goes hand in hand with this example of lighting in GameMaker I made. It is programmed in GameMaker and was designed to work in browsers so this is fully compatible with the GameMaker HTML5 extension. If you are new to Masking in GameMaker I have a guide here. This could be used for lighting (for example if the player was holding a torch) or for detecting what enemies are in front of the player. Exe and App versions work perfectly.Ībove we can see an example of casting a cone in front of the player that shows the area that is not blocked by walls. I could change it to not draw shadows behind the player etc, however the code is the most efficient way of doing it for every other platform, so I didn’t want to fundamentally move away from the best practices for a small group of people on a platform my readers are unlikely to be using. For users using Chrome the above example can be a little choppy in Chrome because it doesn’t like drawing lots of primitives.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |