![game maker studio 2 particle effects game maker studio 2 particle effects](https://i.ytimg.com/vi/d_9pRLDlPu0/maxresdefault.jpg)
Set the surface target to the new surface instead of the application surface My viewport is only 352 by 512 so I created a surface that size inside of my create event. You are able to find the size of your view by going into the room editor and looking at the section “Viewport and Cameras”. The only major difference is that instead of making a surface that is the size of the room, it will only be the size of the view / camera. To start with this process I made a create event that is very similar to the one in the Zach Bell Games tutorial.
![game maker studio 2 particle effects game maker studio 2 particle effects](https://i.pinimg.com/originals/9e/a3/6d/9ea36ddaf92422e8a64df46fbd6b3af0.jpg)
#Game maker studio 2 particle effects code
The tutorial, at Zach Bell Games, didn’t get into making a lighting system that only covers the view (as seen in that code block), so I needed to do it myself. This method doesn’t work with my endless platformer, because if a surface gets too big it will cause my game to crash. They are making a surface the size of the entire room to create the darkness effect. Surf = surface_create(room_width, room_height) You could also create a surface the size of the current view, but I won't get into that Create a surface the size of the current room The only issue with the Zach Bell Games tutorial is that this is designed for a platformer with a fixed room size, which you can tell from this little section of code. The Zach Bell Games tutorial requires that you know a thing or two about surfaces in Gamemaker Studio 2, and even if you don’t it’s pretty easy to follow along. Keeping in mind that this game is about the player falling further and further down a hole in the ground, I thought that it would make sense that the visibility of the player would get progressively more restrictive the further down the player fell.Īfter some quick googling I found a simple little tutorial done by Zach Bell Games that looked perfect (Also if you don’t follow his work, you really should). Another idea was to have some sort of mechanic that would make my game more difficult the further you went along. The easiest change, that I thought of, was to make my game endless.
![game maker studio 2 particle effects game maker studio 2 particle effects](https://i.ytimg.com/vi/rhELbwE0jB0/maxresdefault.jpg)
After I started working on my new platformer, I made some tweaks to it to try to separate it from the game that served as the original inspiration.