Game Maker Flashlight Tutorial @rexfurry
Game Maker Flashlight Tutorial  @rexfurry
Uploaded February 2014 | Updated September 2026, 2 weeks ago
In this tutorial I'll be showing how to create a flashlight. I'm sorry for the somewhat poor quality in this video, I've tried to re-record it over and over with different settings but for some reason this is the best I could get it : ( Hopefully everything will be back to normal next tutorial : )

Code used in tutorial:

obj_light:

Create Event:

//Setting up black surface for our light shine through

dark = surface_create(room_width,room_height)
surface_set_target(dark)
draw_clear_alpha(c_black,0)
surface_reset_target()

Step Event:

//Setting up where we want our light to be created, in this instance
we want the light to stick with to the player's x & y positions

x=obj_player.x
y=obj_player.y

End Step Event:

//More surface stuff, you don't need to worry anything here besids the
mouse_x/mouse_y, that's how we move the light, you can change it if
you'd like to

surface_set_target(dark)
draw_clear(c_black)
draw_set_blend_mode(bm_subtract)
draw_sprite_ext(spr_light,0,x-view_xview,y-view_yview,1,1,point_direction(x,y,mouse_x,mouse_y),c_white,1,)
surface_reset_target()
draw_set_blend_mode(bm_normal)

Draw Event:

//Drawing this surface

draw_surface(view_xview, view_yview,dark)

Link to download example:

dropbox.com/s/7iepo555l6f8py4/flashlight_example_rexfurry.gmk

Link to RealTutsGML Tutorial:

youtube.com/watch?v=D6stK7GFwoE
Game Maker Flashlight TutorialRexfurrys earlier game projectsRexfurry Animated UpdateGame Maker Sprite Image TipsRexplays: Crystal Universe Aftermath - [4]Custom Bone Rig (UPDATE #1) - Anime StudioGame Maker - Angle Directional Movement TutorialGame Maker Online Highscore TutorialLets Draw in Game Maker - Holiday Special - Part 1Lets Draw in Game Maker   Geletin Part 2Game Maker Cutscene Tutorial (Revised)Lets draw in Game maker - retro spider creature
rexfurry |

Game Maker Flashlight Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER