Compare commits

...

2 Commits

Author SHA1 Message Date
theo@manjaro 50887b4c02 Removed useless files 2021-11-27 23:30:18 +01:00
theo@manjaro 2d3f08a7d1 Intro cinematic 2021-11-27 20:24:50 +01:00
86 changed files with 67 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

BIN
gamedata/assets/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

View File

@ -105,7 +105,7 @@ class Game():
self.pasttime = time.time() self.pasttime = time.time()
# Je charge la scene de base # Je charge la scene de base
scenes.overworld(self) scenes.boot(self)
def set_camera(self,posx,posy): def set_camera(self,posx,posy):
self.globals["camerax"], self.globals["cameray"] = posx,posy self.globals["camerax"], self.globals["cameray"] = posx,posy

View File

@ -0,0 +1,60 @@
from gamedata.objects.base import BaseObject
from gamedata.objects.transition import Transition
class Cinematic(BaseObject):
def __init__(self,game):
super().__init__(0,0,game)
text = """More and more trash is being thrown away
It's up to you now to clean everything up
Watch out for the baddies !"""
self.lines = text.split("\n")
self.sprites = []
for i in self.lines:
self.sprites.append(game.getchars(i))
self.currentlines = 1
self.timer = game.lib.Timer(5)
self.textpadding = 10
self.depth = 2
self.fill = game.pygame.Surface([self.game.globals["cameraw"],self.game.globals["camerah"]])
self.fill.fill([62,33,55])
self.totalheight = len(self.lines)*9+(len(self.lines)-1)*self.textpadding
self.offset = (self.game.globals["camerah"]-self.totalheight)/2
self.title = self.game.sprite_lib["title.png"]
self.sfx = self.game.sound_lib["sfx/return.wav"]
def step(self):
if self.currentlines < len(self.lines)+2 and self.timer.tick(self.game.dt):
self.currentlines += 1
if self.currentlines == len(self.lines):
self.timer = self.game.lib.Timer(5)
elif self.currentlines == len(self.lines)+2:
# Spawn transition
t = Transition(self.game)
self.game.gameloop.summon(t)
self.sfx.play()
def draw(self):
self.game.window.blit(self.fill,[0,0])
if self.currentlines<=len(self.lines):
for i in range(self.currentlines):
cx = self.game.globals["cameraw"]/2
self.game.lib.drawcenter(self.game,self.sprites[i],cx,self.offset+i*(self.textpadding+9))
else:
cx = self.game.globals["cameraw"]/2
cy = self.game.globals["camerah"]/2
self.game.lib.drawcenter(self.game,self.title,cx,cy)

View File

@ -2,9 +2,9 @@ from gamedata.objects.ingame.player import Player
from gamedata.objects.ingame.tileset import TilesetRenderer from gamedata.objects.ingame.tileset import TilesetRenderer
from gamedata.objects.ingame.water import Water from gamedata.objects.ingame.water import Water
from gamedata.objects.results import Results from gamedata.objects.results import Results
from gamedata.objects.cinematic import Cinematic
def ingame(game,level="Level 2"): def ingame(game,level="Level 2"):
game.scaleCamera(416,234)
game.globals["camerax"] = 0 game.globals["camerax"] = 0
game.globals["cameray"] = 0 game.globals["cameray"] = 0
game.gameloop.reinit() game.gameloop.reinit()
@ -16,9 +16,13 @@ def ingame(game,level="Level 2"):
game.gameloop.summon(p1) game.gameloop.summon(p1)
def overworld(game): def overworld(game):
game.scaleCamera(416,234)
game.globals["camerax"] = 0 game.globals["camerax"] = 0
game.globals["cameray"] = 0 game.globals["cameray"] = 0
game.gameloop.reinit() game.gameloop.reinit()
tileset = TilesetRenderer(0,0,game,"Overworld") tileset = TilesetRenderer(0,0,game,"Overworld")
game.gameloop.summon(tileset) game.gameloop.summon(tileset)
def boot(game):
game.scaleCamera(416,234)
c = Cinematic(game)
game.gameloop.summon(c)