![]() ![]() Let's say you setup a grid that divides the level in 32x32 cells Let's say a visual range of 1 is a hole punching sprite size 32x32 well maybe a little more to cover the corners. this is also needed when you use a surface as it may be obliterated and needing to be recreated again, check the forum and see why you have to constantly call surface_exists everywhere.Ī unit is walking, it has a visual range of 1. so that later you can loop through the grid cells in view and punch holes in the surface where the cell has been flagged. when a unit goes off, you would flag the cell he's on. The most efficient way to maintain were holes were punched is to have a ds grid with cells for the entire room that would split the room in 32x32 or 64圆4 grid cell size regions. and that is a problem because returning to a visited location you need to re-punch the holes for the fog in the view. If you are using views, you will need to have your surface the size of a the view in room. the resulting pixel math with punch holes in the surface with smooth edges. You create and hold on to a surface that is cleared with alpha 1 c_blackĪnd you draw that sprite on the surface with bm_subtract. The proper way to do this is to have a sprite that is fully white in the center that fades to black on the edges. ![]() ![]() ![]() That function only accepts bm_normal, bm_add and bm_subract. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |