4 Commits

Author SHA1 Message Date
Neal Finger
176d89ea14 take out print
take out print
2023-02-04 23:20:57 -07:00
Neal Finger
4b8eb17ba1 player animation fix
edited throop, player
2023-02-04 22:58:07 -07:00
CostaRic
8ad6236ff7 Create flowerpetal.raw
flowerpetal.raw added to repository
2023-02-04 20:50:55 -07:00
CostaRic
d0cf8f2a20 Throot Art asset update Added ThrootTiltle.raw to repository
Throot Art asset update

Added ThrootTiltle.raw to repository
2023-02-04 20:48:59 -07:00
5 changed files with 79 additions and 11 deletions

View File

@@ -118,7 +118,7 @@ class GameLoop(Room):
# Draw the entities # Draw the entities
for entity in self.entities: for entity in self.entities:
entity.render(tpf, self.current_depth, prev_depth) entity.render(tpf, self.current_depth, prev_depth)
self.player.update_draw(self.current_depth, prev_depth) self.player.update_draw(self.player.y)
thumby.display.drawText(str(self.score), thumby.display.width - (len(str(self.score)) + 2) * 5, 1, 1) thumby.display.drawText(str(self.score), thumby.display.width - (len(str(self.score)) + 2) * 5, 1, 1)
thumby.display.update() thumby.display.update()

63
ThrootArtAssets.py Normal file

File diff suppressed because one or more lines are too long

BIN
ThrootTitle.raw Normal file

Binary file not shown.

1
flowerpetal.raw Normal file
View File

@@ -0,0 +1 @@
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?؟؟7هك<D987><D983><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>؟؟؟s<><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>هـَ<D980><D98E><EFBFBD>؟<EFBFBD><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ّ<><D991><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ك<><D983><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ُُ<D98F><D98F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>د<><D8AF><EFBFBD><EFBFBD><EFBFBD>ا<EFBFBD><D8A7><EFBFBD><EFBFBD><EFBFBD>ه<><D987><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>هد<D987><D8AF><EFBFBD><EFBFBD><EFBFBD>ا<><D8A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ُ<EFBFBD>؟<EFBFBD><D89F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@@ -65,17 +65,17 @@ class Player:
self.y = int(self.ysub) self.y = int(self.ysub)
# animation # animation
self.anim.update_phys(self.x, self.y, CONST_PL_SCREEN_Y) self.anim.update_phys(self.x, self.y, CONST_PL_SCREEN_Y, current_depth)
def update_draw(self, current_depth, prev_depth): def update_draw(self, plworldy):
# debug draw # debug draw
if self.debugvisible: if self.debugvisible:
pix_x = self.x pix_x = self.x
pix_y = int(current_depth - self.y) pix_y = int(self.y - plworldy + 20)
thumby.display.setPixel(pix_x, pix_y, self.isdecend) thumby.display.setPixel(pix_x, pix_y, self.isdecend)
# animation # animation
self.anim.update_draw(current_depth, prev_depth, self.isdecend) self.anim.update_draw(plworldy - 20, self.isdecend)
class Camera: class Camera:
@@ -101,7 +101,9 @@ class PlayerAnimation:
self.debugrandomrange = self.RANDOM_RANGE self.debugrandomrange = self.RANDOM_RANGE
self.debugposrange = self.POS_RANGE self.debugposrange = self.POS_RANGE
def update_phys(self, plworldx, plworldy, plscreeny): def update_phys(self, plworldx, plworldy, plscreeny, current_depth):
#print(plworldx, plworldy, plscreeny, current_depth)
### exit if player y pos less than random range ### exit if player y pos less than random range
# # debug change random range # # debug change random range
@@ -157,19 +159,21 @@ class PlayerAnimation:
# self.poslist.append((plworldx, plworldy)) # self.poslist.append((plworldx, plworldy))
### remove the fist item in the list if its full line is off screen ### remove the fist item in the list if its full line is off screen
#if self.poslist[1][self.POS_Y] < plworldy - plscreeny: if self.poslist[1][self.POS_Y] < plworldy - plscreeny:
# self.poslist.pop(0) self.poslist.pop(0)
#print(len(self.poslist)) #print(len(self.poslist))
def update_draw(self, current_depth, prev_depth, isdecend=1): def update_draw(self, topleft, prev_depth, isdecend=1):
### draw line from first position to next ### draw line from first position to next
#print(topleft)
for i in range(len(self.poslist) - 1): for i in range(len(self.poslist) - 1):
thumby.display.drawLine( thumby.display.drawLine(
int(self.poslist[i][self.POS_X]), int(self.poslist[i][self.POS_X]),
int(current_depth - self.poslist[i][self.POS_Y]), int(self.poslist[i][self.POS_Y] - topleft),
int(self.poslist[i + 1][self.POS_X]), int(self.poslist[i + 1][self.POS_X]),
int(current_depth - self.poslist[i + 1][self.POS_Y]), int(self.poslist[i + 1][self.POS_Y] - topleft),
isdecend isdecend
) )