Skip to content

Commit

Permalink
Updated the visuals with new ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
akirbaes committed Aug 25, 2019
1 parent b319a4d commit 7e0fc8b
Show file tree
Hide file tree
Showing 46 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ def lc():
font2=pygame.font.Font("freesansbold.ttf",12)


colors=( (255,0,0),(255,255,0),(0,255,0),(0,255,255),(0,0,255),(255,0,255),(255,255,255) )
colors=( (0,255,255),(0,180,0),(200,100,0),(150,100,50),(100,80,50),(80,50,20),(70,40,10) )
22 changes: 14 additions & 8 deletions game_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,10 @@ def draw(self,screen):
color=(0,0,0)
pygame.draw.rect(screen, color, (gx+ts*j, gy+ts*i, ts, ts))
else:
color=tuple(a*(j+1)/12 for a in colors[i])
color=tuple(a*(j+3)/14 for a in colors[i])
pygame.draw.rect(screen, color, (gx+ts*j, gy+ts*i, ts, ts))
if(i==6):
screen.blit(gradtile, (gx+j*ts, gy+i*ts))
else:
pygame.draw.rect(screen, color, (gx+ts*j, gy+ts*i, ts, ts))
if(data[i][j]=="D"):
screen.blit(boostdown, (gx+j*ts, gy+i*ts))
elif(data[i][j]=="U"):
Expand Down Expand Up @@ -200,14 +199,21 @@ def draw(self,screen):
#pygame.draw.rect(screen, (0,0,0), ((0,gy+ts*2.5),(ts*1.5,gy+gh)))

if(self.show):
if(self.jumpers>0):
for i in range(self.jumpers):
screen.blit(boostnote,(ts/2,wh+i*ts*1.5-5*ts))
if(self.jumpers>=0):
for i in range(3):
if(i<self.jumpers):
screen.blit(boostnote,(ts/2,wh+i*ts*1-5.5*ts))
else:
screen.blit(boost_socket,(ts/2,wh+i*ts*1-5.5*ts))

elif(self.jumpers==-1):
screen.blit(infinity,(ts/2,wh-5.5*ts))

for v in range(self.life):
screen.blit(heartsurf, (ts*v,ts))
for v in range(3):
if(v<self.life):
screen.blit(heartsurf, (ts*v,ts))
else:
screen.blit(emptyheartsurf, (ts*v,ts))
screen.blit(leveltitle,(ww/2,0))
screen.blit(scoretitle,(ww/2,ts))
screen.blit(boosttitle,(ts/2,4*ts))
Expand Down
File renamed without changes
Binary file added graphics/bonus_carrot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/boost_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/boost_new_design_2.gal
Binary file not shown.
Binary file added graphics/boost_socket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/boosting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/boosting_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed graphics/boostnote.png
Binary file not shown.
Binary file modified graphics/boostup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/heart_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/icon.ico
Binary file not shown.
Binary file modified graphics/infinity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/item_boost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mole0000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mole0001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/mole0002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/molechar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/natural_boostup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/unused_boost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/bonus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/bonus_heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/boost_new_design.gal
Binary file not shown.
Binary file added graphics/work/boosting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/heart - Copie (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/heart__empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/heart__empty_w.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/work/icon.ico
Binary file not shown.
Binary file added graphics/work/infiniboost.png
Binary file added graphics/work/infiniboost_slot.png
Binary file added graphics/work/infinity.png
Binary file added graphics/work/new_boost0002.png
Binary file added graphics/work/new_boost0005.png
Binary file added graphics/work/new_boost0010.png
Binary file added graphics/work/new_boost0012.png
Binary file added graphics/work/new_boost0013.png
Binary file added graphics/work/new_boost0014.png
Binary file added graphics/work/orange_heart.png
File renamed without changes
2 changes: 1 addition & 1 deletion levels/level0.rawdata
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0
1
abcdefghijk
123456789GH
0123456789G
Expand Down
2 changes: 1 addition & 1 deletion levels/test.rawdata
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0
1
Map has a name : Test
11 7
000000000D0
Expand Down
15 changes: 10 additions & 5 deletions sprites_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@
boostingsurf= pygame.image.load(os.path.join('graphics', 'boosting.png'))
#boostingsurf.convert_alpha(screen)
heartsurf= pygame.image.load(os.path.join("graphics", "heart.png"))
emptyheartsurf= pygame.image.load(os.path.join("graphics", "heart_empty.png"))
#heartsurf.convert_alpha(screen)
lifevial=pygame.image.load(os.path.join("graphics","bonus.png"))
lifevial=pygame.image.load(os.path.join("graphics","bonus_carrot.png"))
#lifevial.convert_alpha(screen)
starsurf=pygame.image.load(os.path.join("graphics", "star.png"))
#starsurf.convert_alpha(screen)
infinity=pygame.image.load(os.path.join("graphics", "infinity.png"))
#infinity.convert_alpha(screen)
boostnote=pygame.image.load(os.path.join("graphics", "boostnote.png"))
boostnote=pygame.image.load(os.path.join("graphics", "boost_icon.png"))
#boostnote.convert_alpha(screen)
boost_socket=pygame.image.load(os.path.join("graphics", "boost_socket.png"))
boost_icon=pygame.image.load(os.path.join("graphics", "boost_icon.png"))

marker=pygame.image.load(os.path.join("graphics","marker.png"))
#marker.convert_alpha(screen)
Expand All @@ -42,9 +45,11 @@
scoretitle=myfont.render("Score :", False, (255,255,255))
boosttitle=font2.render("Boost",False,(255,255,255))

gradtile=pygame.Surface((ts,ts))
for i in range(ts):
pygame.draw.line(gradtile, (128-i*128/ts,128-i*128/ts,128-i*128/ts), (0,i),(ts,i))
gradtile=pygame.Surface((ts,ts), pygame.SRCALPHA)
for j in range(ts):
for i in range(ts):
gradtile.set_at((i,j),(0,0,0,(j/ts)**1.5*260*(j%2)*(i%2)))
#pygame.draw.line(gradtile, (0,0,0,128-i*128/ts), (0,i),(ts,i))

def reload_character():
datafile=open(os.path.join("levels","level0.rawdata"))
Expand Down
3 changes: 2 additions & 1 deletion spt.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ def puzzle_loop(screen,clock):
mode="Puzzle"
loader._load(puzzle_list[current-1])
loader.init_level()
loader.jumpers=-1
loader.jumpers=-1 #for the initial frame
step=0
elif mode=="Puzzle":
loader.draw(screen)
loader.jumpers=-1
loader.life=3
screen.blit(quitmessage,(0,0))
screen.blit(startmessage,(0,ts/2))
Expand Down

0 comments on commit 7e0fc8b

Please sign in to comment.