![]() ![]() ![]() It’s the exact same technique and looks at it from a side on platformer style game so for some people that will be easier to follow.įor some people the above description will be enough to replicate the concept, for us other mortals let’s look in more detail at how it works and then I will put the code I have used.įirst I start by making a surface the same size as the room that I can draw all these debris on. If you are new to this kind of thing I have written a very similar guide for doing blood on surfaces in GameMaker which is slightly easier to follow. So this surface is used for displaying both the mess on the floor AND any holes in the walls. On top of this I am using the same surface to draw all of the walls onto, once I have done that I can erase any parts of those walls to make it looks like bullet holes in them and display another image underneath. But after a second or two they are actually just combined into an image which is always drawn and doesn’t care if it only has one bullet case on the floor or if you somehow manage to fill in every single pixel with damage from the walls. ![]() So yes each one of those wreckages and rubble does start off as its own object that bounces around and creates sounds. The secret is that as soon as they are stationary I draw them onto a big surface and delete the object. In the above demo it can certainly look like there are hundreds or thousands (and if you play long enough tens of thousands) of tiny bits of bullet casing and debris bouncing around and scattered on the floor but this is an illusion. How can it be unlimited destruction without racking up ram? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |