From 2d5764b14b660bbee7fb221d16bc38d20ec55694 Mon Sep 17 00:00:00 2001 From: "theo@manjaro" Date: Sun, 21 Nov 2021 12:28:27 +0100 Subject: [PATCH] Refractored --- gamedata/assets/icon.png | Bin 909 -> 14543 bytes gamedata/game.py | 4 +-- .../{TulipFields => Level 1}/background0.png | Bin .../{TulipFields => Level 1}/background1.png | Bin .../{TulipFields => Level 1}/background2.png | Bin .../{TulipFields => Level 1}/background3.png | Bin .../maps/{TulipFields => Level 1}/base.png | Bin .../maps/{TulipFields => Level 1}/filler.png | Bin .../maps/{TulipFields => Level 1}/map.json | 15 +++++++----- .../{combat => ingame}/ennemies/balloon.py | 2 +- .../{combat => ingame}/ennemies/crate.py | 2 +- .../{combat => ingame}/ennemies/ennemy.py | 2 +- .../{combat => ingame}/ennemies/robot.py | 2 +- .../{combat => ingame}/ennemies/spring.py | 2 +- .../objects/ingame/ennemies/waterchange.py | 23 ++++++++++++++++++ gamedata/objects/{combat => ingame}/hitbox.py | 0 .../objects/{combat => ingame}/manager.py | 0 .../objects/{combat => ingame}/movable.py | 0 gamedata/objects/{combat => ingame}/player.py | 2 +- .../objects/{combat => ingame}/tileset.py | 11 +++++---- gamedata/objects/{combat => ingame}/water.py | 7 ++++-- gamedata/scenes.py | 21 ++++++---------- 22 files changed, 59 insertions(+), 34 deletions(-) rename gamedata/maps/{TulipFields => Level 1}/background0.png (100%) rename gamedata/maps/{TulipFields => Level 1}/background1.png (100%) rename gamedata/maps/{TulipFields => Level 1}/background2.png (100%) rename gamedata/maps/{TulipFields => Level 1}/background3.png (100%) rename gamedata/maps/{TulipFields => Level 1}/base.png (100%) rename gamedata/maps/{TulipFields => Level 1}/filler.png (100%) rename gamedata/maps/{TulipFields => Level 1}/map.json (99%) rename gamedata/objects/{combat => ingame}/ennemies/balloon.py (94%) rename gamedata/objects/{combat => ingame}/ennemies/crate.py (93%) rename gamedata/objects/{combat => ingame}/ennemies/ennemy.py (98%) rename gamedata/objects/{combat => ingame}/ennemies/robot.py (97%) rename gamedata/objects/{combat => ingame}/ennemies/spring.py (98%) create mode 100644 gamedata/objects/ingame/ennemies/waterchange.py rename gamedata/objects/{combat => ingame}/hitbox.py (100%) rename gamedata/objects/{combat => ingame}/manager.py (100%) rename gamedata/objects/{combat => ingame}/movable.py (100%) rename gamedata/objects/{combat => ingame}/player.py (99%) rename gamedata/objects/{combat => ingame}/tileset.py (95%) rename gamedata/objects/{combat => ingame}/water.py (88%) diff --git a/gamedata/assets/icon.png b/gamedata/assets/icon.png index 79b5283769d6eccd00b0960e99be33e3f863df9e..5b433e9e39916498dab18d65f1510b9a84932a16 100644 GIT binary patch literal 14543 zcmeHtWmH^E)-J9I?%KG!yKAuE4h`M7I|PEeLvWYi1PJc#?!hg%Td+Vb$@|WHGwXhT zX03bwP4_z8=Tz6|SNr^A?E!2?7G*t(>f+>gzY{?*jqu^)u?F$rb{F zhSN)3+eH=V4sdX?H?y<>16({EzyPp^r5OZ-$8u$+r5h1nMa3^?YNrM-xA&IZr9$VD5r$J@z9uFj9YPJQk^`tN_f)_8Qt<2Mq)%kiDsenJp7 z8WLdO1$>pfgBPi*vYIX5E z1GYJ=gH^ipuphc+<#o9EkBbCx*&~1+V?=ECzSswTIyKP*PxD z{Mb-I6#w!8=3Sa&QJQ(0Yr|5C5zwEMq3Y|ARk?km<7Z;`WzQ4?_m$^OE1FbHW&Vdx zYRUr7YgR0^FBf;H6?=x7*Ndu;{a1Ee>rA_+7)lNaAdWZEIF8zFLomE`DdRS-Y+gD_ z+_mGF*uxw{lo?Dkk-+YzEak!WrHT8&{I9DbOXHvJhwWbMnan{gB6X{=Zcigt?<_40 zBZc0VNY(ov?CiI?8MP*?p;qmkMkd7?j8&a;s4bH~GpCrx1RJ}9M0^TgAbvEl^W-Q-wyeMuqB>_xyoNMFKafdd~U?CWNzmyXt+!Pi!YoGIJz9Kp#pk zh5vNg)Ardsq~2<#+EK{cnonp^^4;7q4!g3(#Pc9>N(xnhpke zt-7D5wPqx&!QbEk3h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K}eLzTRX3y8coH?E9NyB|-P6w9z+JfDl~f*k4`MdJ9ls z<@O2=AC%3Xw0{F!UgrFZpx*^CEiZSf24iXy02rk}0$A?mt{wpjPB&QR4v+#HoF?udi<-3Eu5!;5*ZOaxetZP! z0lk8I0p70a&#ij10ah7PFaUgY_cnj~^zL!|K?*Xlwz>nXb$~3OKwI7@2;6$T9s=&I zpppT3M1MfwHb1}i0m+4mvmm4G5+HrDxe7Y2HR`LMQ2gaJxDvK`+oS6a{hZ=jBggwgmhrq)=@a+oPwmk!fH@TsRFK3 zE`aper$~z3EV5UOZJhK`Y_1-V4)@L4}8h_{qK)S)+(-+P=aS6jQhc-$v4@bQTNU~EYNG?Dk zJ9N=U9~WJgC%+tamB9ELd{%(K0%XlD;4HrV&#kk7@(@5`zWsmd{{U!oAZg=*{yqQz N002ovPDHLkV1lPMpXLAn diff --git a/gamedata/game.py b/gamedata/game.py index 635fc0b..e835985 100644 --- a/gamedata/game.py +++ b/gamedata/game.py @@ -11,7 +11,7 @@ class Game(): self.DISPLAY_WIDTH, self.DISPLAY_HEIGHT = 1280, 720 self.window = pygame.Surface((self.DISPLAY_WIDTH,self.DISPLAY_HEIGHT)) self.realwindow = pygame.display.set_mode((self.DISPLAY_WIDTH,self.DISPLAY_HEIGHT)) - pygame.display.set_caption("kfr 2 ???") + pygame.display.set_caption("Overflown") pygame.init() pygame.mixer.init() @@ -100,7 +100,7 @@ class Game(): self.pasttime = time.time() # Je charge la scene de base - scenes.fight(self) + scenes.ingame(self) def set_camera(self,posx,posy): self.globals["camerax"], self.globals["cameray"] = posx,posy diff --git a/gamedata/maps/TulipFields/background0.png b/gamedata/maps/Level 1/background0.png similarity index 100% rename from gamedata/maps/TulipFields/background0.png rename to gamedata/maps/Level 1/background0.png diff --git a/gamedata/maps/TulipFields/background1.png b/gamedata/maps/Level 1/background1.png similarity index 100% rename from gamedata/maps/TulipFields/background1.png rename to gamedata/maps/Level 1/background1.png diff --git a/gamedata/maps/TulipFields/background2.png b/gamedata/maps/Level 1/background2.png similarity index 100% rename from gamedata/maps/TulipFields/background2.png rename to gamedata/maps/Level 1/background2.png diff --git a/gamedata/maps/TulipFields/background3.png b/gamedata/maps/Level 1/background3.png similarity index 100% rename from gamedata/maps/TulipFields/background3.png rename to gamedata/maps/Level 1/background3.png diff --git a/gamedata/maps/TulipFields/base.png b/gamedata/maps/Level 1/base.png similarity index 100% rename from gamedata/maps/TulipFields/base.png rename to gamedata/maps/Level 1/base.png diff --git a/gamedata/maps/TulipFields/filler.png b/gamedata/maps/Level 1/filler.png similarity index 100% rename from gamedata/maps/TulipFields/filler.png rename to gamedata/maps/Level 1/filler.png diff --git a/gamedata/maps/TulipFields/map.json b/gamedata/maps/Level 1/map.json similarity index 99% rename from gamedata/maps/TulipFields/map.json rename to gamedata/maps/Level 1/map.json index f6c8850..74522af 100644 --- a/gamedata/maps/TulipFields/map.json +++ b/gamedata/maps/Level 1/map.json @@ -4925,14 +4925,17 @@ {"name": "Balloon", "id": 37, "_eid": "16494694", "x": 1360, "y": 160, "originX": 0, "originY": 0}, {"name": "Balloon", "id": 38, "_eid": "16494694", "x": 1264, "y": 128, "originX": 0, "originY": 0}, { - "name": "Spring", - "id": 39, - "_eid": "24018769", - "x": 912, - "y": 336, + "name": "WaterChange", + "id": 40, + "_eid": "48957583", + "x": 208, + "y": 208, "originX": 0, "originY": 0, - "values": {"angle": 180, "strength": 7} + "nodes": [ + {"x": 240, "y": 240} + ], + "values": {"Speed": 1} } ] } diff --git a/gamedata/objects/combat/ennemies/balloon.py b/gamedata/objects/ingame/ennemies/balloon.py similarity index 94% rename from gamedata/objects/combat/ennemies/balloon.py rename to gamedata/objects/ingame/ennemies/balloon.py index 57d5705..3eb4d32 100644 --- a/gamedata/objects/combat/ennemies/balloon.py +++ b/gamedata/objects/ingame/ennemies/balloon.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.ennemies.ennemy import Ennemy +from gamedata.objects.ingame.ennemies.ennemy import Ennemy class Balloon(Ennemy): diff --git a/gamedata/objects/combat/ennemies/crate.py b/gamedata/objects/ingame/ennemies/crate.py similarity index 93% rename from gamedata/objects/combat/ennemies/crate.py rename to gamedata/objects/ingame/ennemies/crate.py index 76c35fb..d6e60a5 100644 --- a/gamedata/objects/combat/ennemies/crate.py +++ b/gamedata/objects/ingame/ennemies/crate.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.ennemies.ennemy import Ennemy +from gamedata.objects.ingame.ennemies.ennemy import Ennemy class Crate(Ennemy): diff --git a/gamedata/objects/combat/ennemies/ennemy.py b/gamedata/objects/ingame/ennemies/ennemy.py similarity index 98% rename from gamedata/objects/combat/ennemies/ennemy.py rename to gamedata/objects/ingame/ennemies/ennemy.py index 579fe09..42c2807 100644 --- a/gamedata/objects/combat/ennemies/ennemy.py +++ b/gamedata/objects/ingame/ennemies/ennemy.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.movable import Movable +from gamedata.objects.ingame.movable import Movable class Ennemy(Movable): diff --git a/gamedata/objects/combat/ennemies/robot.py b/gamedata/objects/ingame/ennemies/robot.py similarity index 97% rename from gamedata/objects/combat/ennemies/robot.py rename to gamedata/objects/ingame/ennemies/robot.py index d4b0ffd..17635ca 100644 --- a/gamedata/objects/combat/ennemies/robot.py +++ b/gamedata/objects/ingame/ennemies/robot.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.ennemies.ennemy import Ennemy +from gamedata.objects.ingame.ennemies.ennemy import Ennemy class Robot(Ennemy): diff --git a/gamedata/objects/combat/ennemies/spring.py b/gamedata/objects/ingame/ennemies/spring.py similarity index 98% rename from gamedata/objects/combat/ennemies/spring.py rename to gamedata/objects/ingame/ennemies/spring.py index f70fcdf..0643dfa 100644 --- a/gamedata/objects/combat/ennemies/spring.py +++ b/gamedata/objects/ingame/ennemies/spring.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.ennemies.ennemy import Ennemy +from gamedata.objects.ingame.ennemies.ennemy import Ennemy class Spring(Ennemy): diff --git a/gamedata/objects/ingame/ennemies/waterchange.py b/gamedata/objects/ingame/ennemies/waterchange.py new file mode 100644 index 0000000..4b2e25a --- /dev/null +++ b/gamedata/objects/ingame/ennemies/waterchange.py @@ -0,0 +1,23 @@ +from gamedata.objects.ingame.ennemies.ennemy import Ennemy + +class WaterChange(Ennemy): + + def __init__(self,*args): + + super().__init__(*args) + self.rect[2] = self.tileset.tilew + self.rect[3] = self.tileset.tileh + self.canhit = False + self.candie = False + + self.objective = self.nodes[0]["y"]+8 + self.speed = self.customvalues["Speed"] + + def step(self): + super().step() + if self.rect.colliderect(self.player.rect): + self.water.destinationy = self.objective + self.water.speed = self.speed + + def draw(self): + pass diff --git a/gamedata/objects/combat/hitbox.py b/gamedata/objects/ingame/hitbox.py similarity index 100% rename from gamedata/objects/combat/hitbox.py rename to gamedata/objects/ingame/hitbox.py diff --git a/gamedata/objects/combat/manager.py b/gamedata/objects/ingame/manager.py similarity index 100% rename from gamedata/objects/combat/manager.py rename to gamedata/objects/ingame/manager.py diff --git a/gamedata/objects/combat/movable.py b/gamedata/objects/ingame/movable.py similarity index 100% rename from gamedata/objects/combat/movable.py rename to gamedata/objects/ingame/movable.py diff --git a/gamedata/objects/combat/player.py b/gamedata/objects/ingame/player.py similarity index 99% rename from gamedata/objects/combat/player.py rename to gamedata/objects/ingame/player.py index 67439d7..c4cfc56 100644 --- a/gamedata/objects/combat/player.py +++ b/gamedata/objects/ingame/player.py @@ -1,4 +1,4 @@ -from gamedata.objects.combat.movable import Movable +from gamedata.objects.ingame.movable import Movable class Player(Movable): diff --git a/gamedata/objects/combat/tileset.py b/gamedata/objects/ingame/tileset.py similarity index 95% rename from gamedata/objects/combat/tileset.py rename to gamedata/objects/ingame/tileset.py index a493c28..684f842 100644 --- a/gamedata/objects/combat/tileset.py +++ b/gamedata/objects/ingame/tileset.py @@ -1,8 +1,9 @@ from gamedata.objects.base import BaseObject -from gamedata.objects.combat.ennemies.robot import Robot -from gamedata.objects.combat.ennemies.crate import Crate -from gamedata.objects.combat.ennemies.balloon import Balloon -from gamedata.objects.combat.ennemies.spring import Spring +from gamedata.objects.ingame.ennemies.robot import Robot +from gamedata.objects.ingame.ennemies.crate import Crate +from gamedata.objects.ingame.ennemies.balloon import Balloon +from gamedata.objects.ingame.ennemies.spring import Spring +from gamedata.objects.ingame.ennemies.waterchange import WaterChange class TilesetRenderer(BaseObject): @@ -60,7 +61,7 @@ class TilesetRenderer(BaseObject): self.layers = [] self.spawns = [] spawnlists = {"Spawns":self.spawns} - ennemies = {"Robot":Robot,"Crate":Crate,"Balloon":Balloon,"Spring":Spring} + ennemies = {"Robot":Robot,"Crate":Crate,"Balloon":Balloon,"Spring":Spring,"WaterChange":WaterChange} self.queue = [] # For spawning ennemies after beeing initialized if "layers" in json.keys() and type(json["layers"]).__name__=="list": solidlayer = False diff --git a/gamedata/objects/combat/water.py b/gamedata/objects/ingame/water.py similarity index 88% rename from gamedata/objects/combat/water.py rename to gamedata/objects/ingame/water.py index 2cba052..245eabe 100644 --- a/gamedata/objects/combat/water.py +++ b/gamedata/objects/ingame/water.py @@ -2,11 +2,14 @@ from gamedata.objects.base import BaseObject class Water(BaseObject): - def __init__(self,y,game): + def __init__(self,game): + + self.tileset = game.gameloop.findname("TilesetRenderer")[0] + y = self.tileset.spawns[0].center[1]+game.globals["camerah"]/2 + self.destinationy = y super().__init__(0,y,game,game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT) - self.destinationy = y self.speed = 10 self.depth = 2 diff --git a/gamedata/scenes.py b/gamedata/scenes.py index a551320..ae7b062 100644 --- a/gamedata/scenes.py +++ b/gamedata/scenes.py @@ -4,11 +4,11 @@ from gamedata.objects.bg.menubackground import MenuBackground from gamedata.objects.menu.optionmenu import OptionMenu from gamedata.objects.sliders.bgmslider import BGMSlider from gamedata.objects.sliders.sfxslider import SFXSlider -from gamedata.objects.combat.player import Player -from gamedata.objects.combat.manager import FightManager -from gamedata.objects.combat.hitbox import Hitbox -from gamedata.objects.combat.tileset import TilesetRenderer -from gamedata.objects.combat.water import Water +from gamedata.objects.ingame.player import Player +from gamedata.objects.ingame.manager import FightManager +from gamedata.objects.ingame.hitbox import Hitbox +from gamedata.objects.ingame.tileset import TilesetRenderer +from gamedata.objects.ingame.water import Water def main(game): game.scaleCamera() @@ -18,17 +18,12 @@ def main(game): game.gameloop.summon(bg) game.gameloop.summon(menu) -def fight(game): +def ingame(game,level="Level 1"): game.scaleCamera(416,234) game.gameloop.reinit() - mapname = game.lib.choice(list(game.levels_lib.keys())) - manager = FightManager(game) - game.gameloop.summon(manager) - tileset = TilesetRenderer(0,0,game,mapname) + tileset = TilesetRenderer(0,0,game,level) game.gameloop.summon(tileset) - box = Hitbox(100,80,game) - game.gameloop.summon(box) - water = Water(250,game) + water = Water(game) game.gameloop.summon(water) p1 = Player(game) game.gameloop.summon(p1)