diff --git a/README.md b/README.md index 66a54ba..0240956 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,3 @@ This project uses: * [Python Arcade](https://api.arcade.academy/en/latest/index.html) as the game engine (instead of PyGame) * [Tiled](https://www.mapeditor.org/) for tilemapping * [Aseprite](https://www.aseprite.org/) for tiles/textures. - diff --git a/maps/bulidings.tsx b/maps/bulidings.tsx new file mode 100644 index 0000000..1f2c848 --- /dev/null +++ b/maps/bulidings.tsx @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maps/colony-sim.tiled-project b/maps/colony-sim.tiled-project new file mode 100644 index 0000000..d0eb592 --- /dev/null +++ b/maps/colony-sim.tiled-project @@ -0,0 +1,14 @@ +{ + "automappingRulesFile": "", + "commands": [ + ], + "compatibilityVersion": 1100, + "extensionsPath": "extensions", + "folders": [ + "." + ], + "properties": [ + ], + "propertyTypes": [ + ] +} diff --git a/maps/colony-sim.tiled-session b/maps/colony-sim.tiled-session new file mode 100644 index 0000000..e8717b0 --- /dev/null +++ b/maps/colony-sim.tiled-session @@ -0,0 +1,29 @@ +{ + "Map/SizeTest": { + "height": 4300, + "width": 2 + }, + "activeFile": "", + "expandedProjectPaths": [ + ], + "fileStates": { + "bulidings.tsx": { + "dynamicWrapping": true + }, + "world-tiles.tsx": { + "dynamicWrapping": false + } + }, + "last.exportedFilePath": "/home/goose/dev/mycropolis_game/my-sim-game/maps", + "last.imagePath": "/home/goose/dev/mycropolis_game/my-sim-game/res", + "map.lastUsedExportFilter": "All Files (*)", + "map.lastUsedFormat": "tmx", + "map.renderOrder": "1", + "openFiles": [ + ], + "project": "colony-sim.tiled-project", + "recentFiles": [ + ], + "tileset.lastUsedFormat": "tsx", + "tileset.type": 1 +} diff --git a/maps/default-map.tmx b/maps/default-map.tmx new file mode 100644 index 0000000..922e1d0 --- /dev/null +++ b/maps/default-map.tmx @@ -0,0 +1,56 @@ + + + + + + + + + +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3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+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + diff --git a/maps/world-tiles.tsx b/maps/world-tiles.tsx new file mode 100644 index 0000000..593b83b --- /dev/null +++ b/maps/world-tiles.tsx @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/res/connector.aseprite b/res/connector.aseprite new file mode 100644 index 0000000..1653121 Binary files /dev/null and b/res/connector.aseprite differ diff --git a/res/crops.aseprite b/res/crops.aseprite new file mode 100644 index 0000000..b1823e9 Binary files /dev/null and b/res/crops.aseprite differ diff --git a/res/factory.aseprite b/res/factory.aseprite new file mode 100644 index 0000000..0cc57b0 Binary files /dev/null and b/res/factory.aseprite differ diff --git a/res/ground.aseprite b/res/ground.aseprite new file mode 100644 index 0000000..e5bc1da Binary files /dev/null and b/res/ground.aseprite differ diff --git a/res/housing.aseprite b/res/housing.aseprite new file mode 100644 index 0000000..59a63f8 Binary files /dev/null and b/res/housing.aseprite differ diff --git a/res/hydropower.aseprite b/res/hydropower.aseprite new file mode 100644 index 0000000..f63fbf6 Binary files /dev/null and b/res/hydropower.aseprite differ diff --git a/res/iron.aseprite b/res/iron.aseprite new file mode 100644 index 0000000..48e6dd0 Binary files /dev/null and b/res/iron.aseprite differ diff --git a/res/logger.aseprite b/res/logger.aseprite new file mode 100644 index 0000000..8dc459a Binary files /dev/null and b/res/logger.aseprite differ diff --git a/res/miner.aseprite b/res/miner.aseprite new file mode 100644 index 0000000..35f2579 Binary files /dev/null and b/res/miner.aseprite differ diff --git a/res/powerpole.aseprite b/res/powerpole.aseprite new file mode 100644 index 0000000..2ae5671 Binary files /dev/null and b/res/powerpole.aseprite differ diff --git a/res/trees.aseprite b/res/trees.aseprite new file mode 100644 index 0000000..c711f91 Binary files /dev/null and b/res/trees.aseprite differ diff --git a/res/water.aseprite b/res/water.aseprite new file mode 100644 index 0000000..2580e41 Binary files /dev/null and b/res/water.aseprite differ diff --git a/template.py b/template.py new file mode 100644 index 0000000..0bce1ef --- /dev/null +++ b/template.py @@ -0,0 +1,16 @@ + +""" +template.py + +author: Caleb Scott + +Template file for arcade program. +""" + +# IMPORTS ----------------------------------------------------------- + +# CONSTANTS --------------------------------------------------------- + +# CLASSES ----------------------------------------------------------- + +# MAIN -------------------------------------------------------------- diff --git a/test-demo.py b/test-demo.py new file mode 100644 index 0000000..de0a67b --- /dev/null +++ b/test-demo.py @@ -0,0 +1,79 @@ +""" +test-demo.py + +author: Caleb Scott + +This is basically just a test-class to get my "sea legs" for Arcade. +""" + +# IMPORTS ----------------------------------------------------------- + +import arcade +import os + +# CONSTANTS --------------------------------------------------------- + +SCREEN_WIDTH = 800 +SCREEN_HEIGHT = 600 +SCREEN_TITLE = "Test Demo with Arcade" + +# CLASSES ----------------------------------------------------------- + +class GameBoard(arcade.Window): + """ + Main app class + """ + + def __init__(self, width, height, title): + super().__init__(width, height, title) + arcade.set_background_color(arcade.color.AMAZON) + + def setup(self): + """ + Used for initializing game objects, etc. + """ + pass + + def on_draw(self): + """ + Main rendering function + """ + self.clear() + + def on_update(self, delta_time): + """ + Updates/movements/game logic + """ + pass + + def on_key_press(self, key, modifiers): + """ + Handling keypresses + """ + if key == arcade.key.UP: + print("Key press: UP") + elif key == arcade.key.DOWN: + print("Key press: DOWN") + else: + print("Some other key pressed...") + + def on_key_release(self, key, modifiers): + """ + Handling key releases + """ + if key == arcade.key.UP: + print("Key release: UP") + elif key == arcade.key.DOWN: + print("Key release: DOWN") + else: + print("Some other key released...") + +# MAIN -------------------------------------------------------------- + +def main(): + window = GameBoard(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) + window.setup() + arcade.run() + +if __name__ == "__main__": + main() \ No newline at end of file