-
Couldn't load subscription status.
- Fork 1
Overview
Tor edited this page May 16, 2017
·
1 revision
- The game client in
game.htmlinitiates thegame. - The game has a
worldwhich is a stack of layers, each with a 2d array oftiles. Empty tiles are null, and occupied ones haveactorsin them. - The game client in
game.htmlhandles passing keyboard input to thegame. - The
gameruns by itself even without therenderer. - The
renderertakes thegame'sworld, iterates through itsactorson alllayersand draws them out every frame. - Every frame, the
rendereralso handles things like rendering the pause menu, drawing health, the minimap, and other UI elements based on the state of thegame. - Every frame, the
rendereralso handles lighting by darkeningfogged(fog of war) tiles and emulates lighting by using a falloff equation to determine how much black to mix into aspritestintattribute.