anand1310 / summer-code-jam-2021 Goto Github PK
View Code? Open in Web Editor NEWThis maze game was developed by the team Benevolent Bonobos, during the Summer Code Jam 2021 held by Python Discord.
License: MIT License
This maze game was developed by the team Benevolent Bonobos, during the Summer Code Jam 2021 held by Python Discord.
License: MIT License
Teach user how to play
Dialogues are stored in the json file in the following way:
{
"dialogues": [ [ [6,0], [4,2], "This is a box. You know what to do ;)"],
[ [6,18], [-3,16], "Oops, I think you are trapped. Fortunately you have echo location"]]
}
This says that when player reaches location (in matrix) (6,0), the text "This is a box. You know what to do ;)" appears in (4,2) (matrix location) and so on.
if start_frame == True:
block. (assuming (6,0) is starting location)if val.is_sequence:
block.level_design
from here.I have added the logging statements but had to do some work so I have pushed all my updates in #57 .
Saving and loading a mae map to file. This will be from np.array to a text file.
class Box:
def __init__(self, location: Tuple):
self.maze :np.ndarray
self.location = location
def show_maze(player_location: Tuple):
""" Returns a string that draws the box and associated maze based on player location"""
The player should be able to move the cursor with arrows. It should not hit the walls that will be generated from the diagram.
This can be easily done by changing term.inkey(timeout=3)
to timeout=0.05
. But the levels need to be more efficient. For example it should not refresh the screen at each frame.
We can also rewrite each levels in levels.py
. Adding level specific losing criteria in __init__
.
Currently Level
class loads the maze with Maze.load()
. We can clone this class to create Level2
, Level3
and just add some code in proper places to detect loss.
Saving and loading a box to a file
it is wired when there is no wall
Probably most important rn. It can be incorporated in parent Scene
class.
This can be done by simply moving starting position a little deep into the maze and close the wall behind.
Camera needs to move with the player
Let the player make a sound, the sound travels towards the direction player last moved. (If I am going right and then stop to make the sound, the sound travels right. If my last movement was moving upwards, then the sound would travel upwards) The sound then bounces back from the wall it was travelling towards and the player hears it. This forces the player to make some tactical decision instead of just moving blindly.
Player
class. The update
function gets current maze
which will be helpful.Level
(say e
) that will make sound for the player.maze.matrix
to figure out the wall locations.maze.screen2mat(self.avi.coords)
to figure out player's location in the matrix.play_echo(direction, distance)
to make the sound (I have requested @Jason11ookJJ to add that)To place boxes automatically
File related: maze.py
Our current plan is to divide the maze into 4 quarters and in each quarter, there will be at least one box
We need to first be able to generate a maze
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.