Updated game over screen
@ -1,12 +1,12 @@
|
||||
# Textures
|
||||
|
||||
All the textures are edited by myself to fit the [Famicube palette](https://lospec.com/palette-list/famicube)
|
||||
I edited some textures to fit the [Famicube palette](https://lospec.com/palette-list/famicube)
|
||||
|
||||
## Tileset
|
||||
|
||||
[Buch - OpenGameArt](https://opengameart.org/content/the-field-of-the-floating-islands)
|
||||
|
||||
## Little characters
|
||||
## "Pinmik" sprite ( I made the recolors )
|
||||
|
||||
[GraphxKid - OpenGameArt](https://opengameart.org/content/arcade-platformer-assets)
|
||||
|
||||
@ -21,3 +21,7 @@ All the textures are edited by myself to fit the [Famicube palette](https://losp
|
||||
## Font
|
||||
|
||||
[Front End Dev - Grape Soda](https://fontenddev.com/fonts/grape-soda/)
|
||||
|
||||
## Dust particles
|
||||
|
||||
[GraphxKid - OpenGameArt](https://opengameart.org/content/items-and-elements)
|
||||
|
BIN
gamedata/assets/particles/balloons/blue.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
gamedata/assets/particles/balloons/red.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
gamedata/assets/particles/balloons/yellow.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.9 KiB |
BIN
gamedata/assets/particles/confetti/blue/0.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
gamedata/assets/particles/confetti/red/0.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
gamedata/assets/particles/confetti/red/1.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
gamedata/assets/particles/confetti/red/2.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
gamedata/assets/particles/confetti/yellow/0.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
gamedata/assets/particles/confetti/yellow/1.png
Normal file
After Width: | Height: | Size: 597 B |
BIN
gamedata/assets/particles/confetti/yellow/2.png
Normal file
After Width: | Height: | Size: 602 B |
@ -1,6 +1,8 @@
|
||||
from gamedata.objects.base import BaseObject
|
||||
from gamedata.objects.button import Button
|
||||
|
||||
import random
|
||||
|
||||
class GameOver(BaseObject):
|
||||
def __init__(self,game):
|
||||
super().__init__(0,0,game)
|
||||
@ -14,6 +16,8 @@ class GameOver(BaseObject):
|
||||
btn.click = fnBack
|
||||
game.gameloop.summon(btn)
|
||||
|
||||
self.depth = -1
|
||||
|
||||
# Updating highscore
|
||||
self.highscore = False
|
||||
self.newunlocks = []
|
||||
@ -70,6 +74,28 @@ class GameOver(BaseObject):
|
||||
# Launch particles
|
||||
self.launched = True
|
||||
|
||||
if self.highscore: # Balloons
|
||||
offy = self.game.DISPLAY_HEIGHT+40
|
||||
for i in range(2):
|
||||
for direction in [-1,1]:
|
||||
for color in ["yellow","red","blue"]:
|
||||
sprite = [self.game.sprite_lib["particles/balloons/"+color+".png"]]
|
||||
offx = self.game.DISPLAY_WIDTH/2-direction*self.game.DISPLAY_WIDTH/2*1.2
|
||||
velx = (random.random()*3+1+2*i)*direction/2
|
||||
vely = (random.random()+2)*-1
|
||||
self.game.addParticle(sprite,offx,offy,velx=velx,vely=vely,flipx=direction==-1,fps=0.3)
|
||||
|
||||
# Confettis
|
||||
for j in range(30):
|
||||
for i in range(8):
|
||||
color = random.choice(["red","blue","yellow"])
|
||||
sprites = self.game.getSpriteDir("particles/confetti/"+color+"/")
|
||||
offx = random.randint(0,self.game.DISPLAY_WIDTH)
|
||||
offy = -40*i
|
||||
velx = random.random()*2-1
|
||||
vely = random.random()*5+2
|
||||
self.game.addParticle(sprites,offx,offy,velx=velx,vely=vely,flipx=random.randint(0,1),fps=2)
|
||||
|
||||
if self.launched:
|
||||
self.flashtimer.tick(self.game.dt)
|
||||
|
||||
@ -78,6 +104,9 @@ class GameOver(BaseObject):
|
||||
self.displayscore = int(self.game.globals["score"])
|
||||
|
||||
def draw(self):
|
||||
# Display night sky
|
||||
self.game.window.blit(self.game.pygame.transform.scale(self.game.sprite_lib["skies/night.png"],[self.game.DISPLAY_WIDTH,self.game.DISPLAY_HEIGHT]),[0,0])
|
||||
self.game.window.blit(self.game.sprite_lib["vignette.png"],[0,0])
|
||||
# Display score
|
||||
txt = self.game.fontfilebig.render("Score : "+str(int(self.displayscore)),False,self.color)
|
||||
txt = self.game.pygame.transform.scale(txt,(round(txt.get_width()*self.scale),round(txt.get_height()*self.scale)))
|
||||
|