From 736a3f14a0543e642702f60188558ef332f29de0 Mon Sep 17 00:00:00 2001 From: duckduckdoof Date: Tue, 21 Jan 2025 16:45:24 -0500 Subject: [PATCH] Initial commit --- maps/bulidings.tsx | 28 ++++++++++++ maps/colony-sim.tiled-project | 14 ++++++ maps/colony-sim.tiled-session | 29 +++++++++++++ maps/default-map.tmx | 56 ++++++++++++++++++++++++ maps/world-tiles.tsx | 16 +++++++ res/connector.aseprite | Bin 0 -> 388 bytes res/crops.aseprite | Bin 0 -> 411 bytes res/factory.aseprite | Bin 0 -> 383 bytes res/ground.aseprite | Bin 0 -> 451 bytes res/housing.aseprite | Bin 0 -> 383 bytes res/hydropower.aseprite | Bin 0 -> 452 bytes res/iron.aseprite | Bin 0 -> 373 bytes res/logger.aseprite | Bin 0 -> 377 bytes res/miner.aseprite | Bin 0 -> 442 bytes res/powerpole.aseprite | Bin 0 -> 428 bytes res/trees.aseprite | Bin 0 -> 375 bytes res/water.aseprite | Bin 0 -> 374 bytes template.py | 16 +++++++ test-demo.py | 79 ++++++++++++++++++++++++++++++++++ 19 files changed, 238 insertions(+) create mode 100644 maps/bulidings.tsx create mode 100644 maps/colony-sim.tiled-project create mode 100644 maps/colony-sim.tiled-session create mode 100644 maps/default-map.tmx create mode 100644 maps/world-tiles.tsx create mode 100644 res/connector.aseprite create mode 100644 res/crops.aseprite create mode 100644 res/factory.aseprite create mode 100644 res/ground.aseprite create mode 100644 res/housing.aseprite create mode 100644 res/hydropower.aseprite create mode 100644 res/iron.aseprite create mode 100644 res/logger.aseprite create mode 100644 res/miner.aseprite create mode 100644 res/powerpole.aseprite create mode 100644 res/trees.aseprite create mode 100644 res/water.aseprite create mode 100644 template.py create mode 100644 test-demo.py 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,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,4,4,4,4,4,4,4,4,4,4,4,3,4,2,4,4,4,4,4,4,4,4,4,4,4,3,3, +3,3,4,4,4,4,4,4,4,4,4,4,4,4,3,4,2,2,2,4,4,4,4,4,4,2,2,4,3,3, +3,4,4,4,4,4,4,4,4,4,4,2,4,4,3,4,4,4,4,4,4,4,4,4,2,2,2,4,4,3, +3,4,1,1,4,4,2,4,4,4,4,4,2,4,3,4,4,4,4,4,4,4,4,4,2,2,2,4,4,3, +3,4,1,1,4,4,2,4,4,4,4,4,4,4,3,4,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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 + + + 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 0000000000000000000000000000000000000000..16531211396c7eea1ee58dc837e0b20f78f637a9 GIT binary patch literal 388 zcmZo+WMFu(l#xLJ41pYm6d*)}PiDX?C zkj=sX6jcB+loU){HEhx>4g15a?-#1wT#)we@T}jT%w|3f$l7OMJ|)jPQ$NUC#mL6e z-oC^jp(#4=Ve;(%@n@f$zWwL_|NpbsZf~h;&&RMxDbTd5pdiAdU>0Vv= z2J#@A6qtb|4EzT&*cp5hD^rUU3`2n&Rt1REeyADL{+>3Ji=OK?VUJqy>-$n*Qq}3)of`pao(;%&q{o63MzO zAe)5&D5?NtC@Gk@YS^S%8uo`--!D|VxghP`;aR^wnaz9}khRaid`g~orhbsOijj?_ zy?u#6LQ{0!!{pij0QqQS$p8QV literal 0 HcmV?d00001 diff --git a/res/factory.aseprite b/res/factory.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..0cc57b0811f2277fe505a827ae5e7e1f9703ad2c GIT binary patch literal 383 zcmbr}e zfjr121!f=#10WZ&Gx#J{rWPp}1^_v%3J|IPOb{C6Dg}m$Id3l>?E6;6P#w$?2mrU9SV{l@ literal 0 HcmV?d00001 diff --git a/res/ground.aseprite b/res/ground.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..e5bc1da93e7fe6a2f9aecca275284641747dbddd GIT binary patch literal 451 zcmX@i$iVPmDIyADL{+>3Ji=OK?VUJqy=yWn*Qq}3)of`pao(;%&q{o63MzO zAe)5&D5?Nt%$+;;|NsB{)QlhGcYE4sFG*2)-D&v!QMSH^pG&9I;&bZKYDNs=vef^o(o4RxZ2mMTSko0;RiBVF|TyuB$ue*XNq`1yn9P;mb7`I_DPUv=D( gx5oqa|Nq|Icjh5bPyf8;`B3nG{r)1oHTI_E05Ot&!~g&Q literal 0 HcmV?d00001 diff --git a/res/housing.aseprite b/res/housing.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..59a63f816c9ff54ad1b0454377ca21d8e8a69746 GIT binary patch literal 383 zcmbr}e zfjr121!f=#10WZ&Gx#J{rWPp}1^_v%3J|IPOb{C6Dg}m$Id3m+6l5^qU^aZe-^BAI tlcLC{yW3YNc)ITT`gh0K=bwK{|C#>y{eS!U=bwLmUURmbVRk|OQvjLlSiS%N literal 0 HcmV?d00001 diff --git a/res/hydropower.aseprite b/res/hydropower.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..f63fbf681c809a70f700c8206c5a717510bebfb3 GIT binary patch literal 452 zcmX@Y$iVPmDIyADL{+>3Ji=OK?VUJqy=yRn*Qq}3)of`pao(;%&q{o63MzO zAe)5&D5?NtC@Gk@YS^S%8uo`--!D|VxghP`;aR^wnaz9}khRaid`g~orhbsOijj?_ zy?u#6LQ{0!!{pij>ly@eKsn8nl>+I z-*W%(Z+aVlUaKi@ee}AnHmx%6rsxl`)74^$>o=9})b=;Kf9mTmqjv&dP3`~jFWPtg O$J+WVrtj~5djkLtt#vQ} literal 0 HcmV?d00001 diff --git a/res/iron.aseprite b/res/iron.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..48e6dd0bbc698491fc221aa4ba510cf479289df3 GIT binary patch literal 373 zcmXSAWMFu(l#xLJ41pYm6d*r}e zfjr121!f=#1OI^xb_Sos%G4qSLpLCYRe^!w!~YNe|1-gqI50RcRLpsMcq1nR0|)bl b^K-f8#hx$lRG66?5{d$@UT0tOrYRBt#dS~@ literal 0 HcmV?d00001 diff --git a/res/logger.aseprite b/res/logger.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..8dc459a8a4e599395a156ab2473d5b742677b3a4 GIT binary patch literal 377 zcmbr}e zfjr121!f=#1OI^xb_Sos%G4qSLoXnQRRJRPp9w;PT&2KJG3V{sjhqYyJS-dU*Jmz2 n%W&{W1beu)=h1&ptnKEXfByMrP2Kwci!%4^eaZa2M@|y}d*@R< literal 0 HcmV?d00001 diff --git a/res/miner.aseprite b/res/miner.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..35f2579cd76709f30314d7d19086cdd1d799b2ee GIT binary patch literal 442 zcmdnR$iVPmDIyADL{+>3Ji=OK?VUJqy?}7n*Qq}3)of`pao(;%&q{o63MzO zAe)5&D5?NtC@Gk@YS^S%8uo`--!D|VxghP`;aR^wnaz9}khRaid`g~orhbsOijj?_ zy?u#6LQ{0!!{pijRy4{Elgw#*fAYW?iM=^>Y5(_Fn|$6_ zqjLC_ZFB#>{OiX*l<#i+vfz>% literal 0 HcmV?d00001 diff --git a/res/powerpole.aseprite b/res/powerpole.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..2ae5671e86c8c7fd64c95ef39d8f2fcd19bc8ed0 GIT binary patch literal 428 zcmZ3($iVPmDIyADL{+>3Ji=OK?VUJqy^9cn*Qq}3)of`pao(;%&q{o63MzO zAe)5&D5?NtC@Gk@YS^S%8uo`--!D|VxghP`;aR^wnaz9}khRaid`g~orhbsOijj?_ zy?u#6LQ{0!!{pijQPu)MADOmlzfnVOP=EsMJhr@4fm)-Mu(%#n>7#{?jr~?3YKyX3; literal 0 HcmV?d00001 diff --git a/res/trees.aseprite b/res/trees.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..c711f916723f4a805b658de5ef9169f6df741b5d GIT binary patch literal 375 zcmXSCWMFu(l#xLJ41pYm6d*r}e zfjr121!f=#1OI^xb_Sos%G4qSLk}Q_Re^!w!~YNe|1-gqI50RcRLpsM*pQcjfrHt= dlVhgPA8rYwid#!=W`=~KfUDQp_j@QF1^_N%PX_=1 literal 0 HcmV?d00001 diff --git a/res/water.aseprite b/res/water.aseprite new file mode 100644 index 0000000000000000000000000000000000000000..2580e417de709da0fe2b9096e84d6a483206bb6c GIT binary patch literal 374 zcmXS8WMFu(l#xLJ41pYm6d*r}e zfjr121!f=#1OI^xb_Sos%G4qSLw6vDRe^!w!~YNe|1-gqI50RcRLpsM*pQcjfrHs# b;pc|*DLj%kxtGqEtwIH_UNa}1n^X<}LLyY3 literal 0 HcmV?d00001 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