Created
March 6, 2018 15:03
-
-
Save jessefreeman/fcb43946beed3a3a0327224665df1671 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Pixel Vision 8 - Egghead 30 Second Demo | |
| ]]-- | |
| -- The Init() method is part of the game's lifecycle and called a game starts. We are going to | |
| -- use this method to configure background color, ScreenBufferChip and draw a text box. | |
| function Init() | |
| -- Here we are manually changing the background color | |
| BackgroundColor(32) | |
| end | |
| -- The Update() method is part of the game's life cycle. The engine calls Update() on every frame | |
| -- before the Draw() method. It accepts one argument, timeDelta, which is the difference in | |
| -- milliseconds since the last frame. | |
| function Update(timeDelta) | |
| -- TODO add your own update logic here | |
| end | |
| -- The Draw() method is part of the game's life cycle. It is called after Update() and is where | |
| -- all of our draw calls should go. We'll be using this to render sprites to the display. | |
| function Draw() | |
| -- We can use the RedrawDisplay() method to clear the screen and redraw the tilemap in a | |
| -- single call. | |
| RedrawDisplay() | |
| DrawSprite(1, 50, 50) | |
| -- TODO add your own draw logic here. | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment