Final blog post: DONE!

This week concludes the assignment, and I am happy to announce that on Monday I found the final bug preventing guards from moving properly. We have a working game! This week consisted of adding a total of 19 (10 new) levels to the program, adding a second level select screen for 9 of the 10, implementing an Easter-egg twist for the 10th, and implementing a credits screen and reset-able progress-remembering by loading to a file. It's been packed, but everything is working just fine.



- How successful the game was
The game is a fully-functioning puzzling game, with totally functioning duplication, buttons and gates, guards, and automatic progress tracking and level navigation screens. It has a help screen, progress-reset options, and the graphics are all working great. Overall I'm very happy with how the game turned out, and am pleasantly surprised that it went so well.

We had several play-testers, as outlined in the final…


This week we got a working program! This started out with a monstrous amount of debugging - once that was done I found the logic error preventing movement by checking through the code and adding flags throughout, like so:

# checks if moves are valid to avoid illegal moves def move_valid(move, row_ind, col_ind, person_type): # checks directionally print('move = ' + move) print('level:', *level, sep='\n') print(f'person coordinates: {row_ind}, {col_ind}') if move == 'r': # can't move off edge of board if col_ind == 4: return False # have to check along its row, from its square onwards. # the row will remain constant, while col_ind increases for extra_ind in range(1, 5 - col_ind): print(f'Checking {row_ind}, {col_ind + extra_ind}') check_sq = square([row_ind, col_ind + extra_ind]) if check_sq[2] == CL_G: print('there\'s a closed gate')…

Wrapping up

This week we finished off some loose ends in game functionalities, and began the process of merging logic and pygame into a finished game. Here's an updated portion of code, including some image definitions:

import pygame
from pygame.locals import *
clock = pygame.time.Clock()

'''---------------------------------------DEFINE CONSTANTS---------------------------------------'''

# these are for level design - variable names make it easier to visualise levels,
# and they can be linked to graphics in dictionaries (obj:img).
# ----------------------------------------------------------

# path graphics variables
global P_R
P_R   = pygame.transform.scale(pygame.image.load(os.path.join(os.path.dirname(__file__), 'dead end straight.png')), (150, 75))
global P_D
P_D   = pygame.transform.scale(pygame.transform.rotate(pygame.image.load(os.path.join(os.path.dirname(__file__), 'dead end straight.png')), -90), (75, 150))
global P_L
P_L   = pygame.transform.s…

'Orientation' week

Hello! As may have been noted, I have stopped numbering weeks. This is because I've lost count - but the titles have become more descriptive.

We realised that we haven't exactly been very clear on who's doing what, and how evenly or unevenly the task is split up. So here's a list of everything that had to be done, and who did what.
We had to first come up with an idea for a game and what sort of mechanics it may entail - that we did together.
We had to create an IPO chart and an algorithm for our game, which I did.
I've also done most of the data side of programming - data structures, functions that define movement and statuses, and so on. I will continue to work on this, adding what we're missing in the coming weeks.
Liam has done graphics - the storyboard, creation and storage of images and access to them by the program. He will continue to add this, and will soon move on to programming the movement of characters and guards.

Our code has been updated, and it …

Another week!

This week nothing particularly new happened. We broke what remains of the program into remaining aspects; killing characters, duplicating them, moving guards, guard target direction defining, and so on. We started programming for them all, but still have a little way to go! The other main things we did is finish all the planning aspects - storyboard, algorithm and IPO chart - and finished creating all the images we'll need for path graphics. We are hoping to start desk checking very soon.

A very full month!!

During the holidays and this first week of term we have made leaps and bounds in our progress.

We broke the game up into a set of functions so that we could both work on the assignment and see where things were going, always attempting to be as clear as possible on what type of data would be released by each function. Here's the code we wrote:

import pygame
from pygame.locals import *

'''---------------------------------------DEFINE CONSTANTS---------------------------------------'''

# these are for level design - variable names make it easier to visualise levels,
# and they can be linked to graphics in dictionaries (obj:img).
# ----------------------------------------------------------

# path constants

p_r   = 1
p_d   = 2
p_l   = 3
p_u   = 4
p_rd  = 5
p_rl  = 6
p_ru  = 7
p_dl  = 8
p_du  = 9
p_lu  = 10
p_rdl = 11
p_rdu = 12
p_dlu = 13
p_rlu = 14
p_all = 15

# path graphics

path_graphs = {
    p_r   : 0,
    p_d   : 0,
    p_l   : 0,
    p_u   : 0,
    p_rd  …