Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
bg tiles, new maps, save file fixed & much more
Browse files Browse the repository at this point in the history
  • Loading branch information
Abyz08 committed Jul 2, 2024
1 parent 22d51f1 commit 630d4ff
Show file tree
Hide file tree
Showing 71 changed files with 1,726 additions and 9,904 deletions.
4 changes: 0 additions & 4 deletions README.md

This file was deleted.

1 change: 0 additions & 1 deletion REQUIREMENTS.md

This file was deleted.

3 changes: 3 additions & 0 deletions data/gameplayloop.wav
Git LFS file not shown
Binary file added data/images/bgtiles/stone/00.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 data/images/bgtiles/stone/01.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 data/images/bgtiles/stone/02.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 data/images/bgtiles/stone/03.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 data/images/bgtiles/stone/04.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 data/images/bgtiles/stone/05.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 data/images/bgtiles/stone/06.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 data/images/bgtiles/stone/07.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 data/images/bgtiles/stone/08.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 data/images/bgtiles/stone/09.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 data/images/bgtiles/stone/10.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 data/images/bgtiles/stone/11.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 data/images/bgtiles/stone/12.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 data/images/bgtiles/stone/13.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 data/images/bgtiles/stone/14.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 data/images/bgtiles/stone/15.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 data/images/bgtiles/stone/16.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 data/images/bgtiles/stone/17.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 data/images/bgtiles/stone/18.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 data/images/bgtiles/stone/19.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 data/images/bgtiles/stone/20.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 data/images/bgtiles/stone/21.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 data/images/bgtiles/stone/22.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 data/images/bgtiles/stone/23.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 data/images/bgtiles/stone/24.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 data/images/bgtiles/stone/25.png
Binary file added data/images/bgtiles/stone/26.png
Binary file added data/images/bgtiles/stone/27.png
Binary file added data/images/bgtiles/stone/28.png
Binary file added data/images/bgtiles/stone/29.png
Binary file added data/images/bgtiles/stone/30.png
Binary file modified data/images/buttons/settings_bg.png
Binary file modified data/images/fonts/small_font.png
2 changes: 1 addition & 1 deletion data/maps/0.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/maps/1.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/maps/2.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/saves/save.SAVEFILE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"level": 2, "checkpoint": [50.93699550628662, 114.5]}
{"level": 0, "checkpoint": [0, 0]}
2 changes: 1 addition & 1 deletion data/saves/settings.SAVEFILE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"keybinds": {"left": 1073741904, "right": 1073741903, "jump": 122, "down": 1073741905, "dash": 120, "menu": 109, "respawn": 114, "restore defaults": "the gloop"}, "keybindingvalue": ["LEFT", "RIGHT", "Z", "X", "M", "R", ""], "window_size": [987, 588]}
{"keybinds": {"left": 1073741904, "right": 1073741903, "jump": 1073741906, "down": 1073741905, "dash": 120, "menu": 109, "respawn": 114, "restore defaults": "the gloop"}, "keybindingvalue": ["LEFT", "RIGHT", "Z", "X", "M", "R", ""], "window_size": [987, 588]}
3 changes: 2 additions & 1 deletion editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self):
'grass': load_images('tiles/grass'),
'large_decor': load_images('tiles/large_decor'),
'stone': load_images('tiles/stone'),
'bg_stone': load_images('bgtiles/stone'),
'spawners': load_images('tiles/spawners'),
'checkpoint': load_images('tiles/checkpoint'),
}
Expand Down Expand Up @@ -203,7 +204,7 @@ def run(self):
try:
self.tilemap.load('data/maps/' + str(self.level) + '.json')
except FileNotFoundError:
self.tilemap = Tilemap(self, 8)
self.tilemap = Tilemap(self, 16)
if event.key == pygame.K_SPACE:
self.right_clicking = True
if self.shift:
Expand Down
169 changes: 83 additions & 86 deletions game.py

Large diffs are not rendered by default.

979 changes: 0 additions & 979 deletions game.pyx

This file was deleted.

1 change: 0 additions & 1 deletion map.json

This file was deleted.

1 change: 0 additions & 1 deletion save.SAVEFILE

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def update(self, mouse_rect):
if self.collide(mouse_rect):
return True
def render(self, surf, font):
font.render(surf, self.text, self.pos, scale=self.scale, colour=self.fontcolour)
font.render(surf, self.text, self.pos, scale=self.scale)
Empty file removed scripts/editor_utils
Empty file.
4 changes: 2 additions & 2 deletions scripts/musicmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, game):

self.music = {
'base' : pygame.mixer.Sound('data/music.wav'),
'base2' : pygame.mixer.Sound('data/slodrum.mp3'),
'base2' : pygame.mixer.Sound('data/gameplayloop.wav'),
}
self.music['base'].set_volume(0.5)

Expand Down Expand Up @@ -62,7 +62,7 @@ def fadebetween(self, musicid1=None, musicid2=None, timeinms=0, goalvolumeout=0.
self.channels[musicid1].fadeout(timeinms)
if not(musicid2 == None):
self.channels[musicid2].set_volume(goalvolumein)
self.channels[musicid2].play(self.music[musicid2],-1, fade_ms=timeinms)
self.channels[musicid2].play(self.music[musicid2], -1)

#self.channels[musicid2].set_volume(0.0)

Expand Down
18 changes: 10 additions & 8 deletions scripts/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def update(self, tilemap, movement=(0, 0)):
self.collisions = {'up': False, 'down': False, 'right': False, 'left': False}
self.nearcollisions = {'right': False, 'left': False}
self.killcollisions = False
self.frame_movement = (movement[0] + self.velocity[0] , movement[1] + self.velocity[1] )#* self.game.dt
print(self.frame_movement)
self.frame_movement = (((movement[0] + self.velocity[0])), (movement[1] + self.velocity[1]))#* self.game.dt

if not self.lockplayer:
self.pos[0] += self.frame_movement[0]
entity_rect = self.rect()
Expand Down Expand Up @@ -101,7 +101,7 @@ def update(self, tilemap, movement=(0, 0)):

self.last_movement = movement

self.velocity[1] = min(5, self.velocity[1] + 0.1)
self.velocity[1] = min(10, self.velocity[1] + 0.1)

if self.collisions['down'] or self.collisions['up']:
self.velocity[1] = 0
Expand Down Expand Up @@ -133,16 +133,18 @@ def update(self, tilemap, movement=(0, 0)):
self.air_time = 0
self.game.sfx['spring'].play()


checkpoint = 0
for rect in tilemap.checkpointcollisions(self.pos, self.game.display):
if self.rect().colliderect(rect):
if not [rect.centerx, rect.centery] in self.game.checkpointscollected:
self.game.hascheckpoint = 1
checkpoint = 1
self.game.checkpointscollected.append([rect.centerx, rect.centery])
self.game.reload_enemies = self.game.enemies.copy()
self.game.respawnpoint = [rect.centerx, rect.centery]


if not checkpoint:
self.game.respawnpoint = [0, 0]

self.isspark += 1
self.air_time += 1

Expand Down Expand Up @@ -225,9 +227,9 @@ def update(self, tilemap, movement=(0, 0)):
self.wantscale[0] = (abs(self.velocity[1]) * -1)

if self.velocity[0] > 0:
self.velocity[0] = max(self.velocity[0] - 0.1, 0)
self.velocity[0] = max(self.velocity[0] - 0.2, 0)
else:
self.velocity[0] = min(self.velocity[0] + 0.1, 0)
self.velocity[0] = min(self.velocity[0] + 0.2, 0)

self.last_collisions = self.collisions

Expand Down
6 changes: 5 additions & 1 deletion scripts/room-maps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import pygame

#code for room based system
#code for room based system
#what i want:
#each tile map is seperated into a room, with each room being a connected in some way
#stylegrounds and triggers
#each room is loaded individually and unloaded.
Loading

0 comments on commit 630d4ff

Please sign in to comment.