This is a complete (and fun!) little BYOND game, including the source code. The code is filled with comments explaining exactly how the game works.
A good way to start on your first game is to take this code and start changing it to do what you want.
Thanks to TheMonkeyDidIt for the overhaul of this demo!
Thanks to LordAndrew for maintaining it!