mirror of
https://github.com/n0remac/2020GameJamPractice.git
synced 2025-12-10 08:05:19 -06:00
Pipfile and arcade window
This commit is contained in:
11
Pipfile
Normal file
11
Pipfile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[[source]]
|
||||||
|
name = "pypi"
|
||||||
|
url = "https://pypi.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
|
||||||
|
[dev-packages]
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.6"
|
||||||
39
platformer.py
Normal file
39
platformer.py
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import arcade
|
||||||
|
|
||||||
|
# Constants
|
||||||
|
SCREEN_WIDTH = 1000
|
||||||
|
SCREEN_HEIGHT = 650
|
||||||
|
SCREEN_TITLE = "Platformer"
|
||||||
|
|
||||||
|
class MyGame(arcade.Window):
|
||||||
|
"""
|
||||||
|
Main application class.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
# Call the parent class and set up the window
|
||||||
|
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
|
||||||
|
|
||||||
|
arcade.set_background_color(arcade.csscolor.CORNFLOWER_BLUE)
|
||||||
|
|
||||||
|
def setup(self):
|
||||||
|
""" Set up the game here. Call this function to restart the game. """
|
||||||
|
pass
|
||||||
|
|
||||||
|
def on_draw(self):
|
||||||
|
""" Render the screen. """
|
||||||
|
|
||||||
|
arcade.start_render()
|
||||||
|
# Code to draw the screen goes here
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
""" Main method """
|
||||||
|
window = MyGame()
|
||||||
|
window.setup()
|
||||||
|
arcade.run()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user