Downbeat Game Development Log

About
I decided that I wanted a side project to help me learn about larger scale projects and to practice what I learn in class. I decided to make a game. I have been using pygame which essentially means that I have had to make an engine before I can truly make the game.

Here is the concept that I decided on
Downbeat is a simple 2d platformer. The primary concept is that there is a different song for each level and whenever it hits the downbeat the gravity changes directions. It is heavily inspired by “Super Meat Boy” and “Geometry Dash”, but is unique enough to be its own game. Below are my dev logs and you can see my github repository for the game on my projects page. Thanks for reading!

7/7/2022 5:21 PM
I have neglected to make some dev logs so here’s what I’ve done since last time. I made a scrolling feature so that when the player or other focus sprite (given when the class is called) moves out of a center rect, the screen will follow the focus rect. I have also made it so that the scene would read from a json level file instead of being a hard coded level. I also made a simple level editor, but it could not be saved.

Now however, I have a fully functional level editor! It is quite simple, but it gets the job done for now. It uses jsons to keep track of level data. The json is structured like this Dictionary{List[Dictionaries{}]}. The top dictionary is the whole level. The keys to each list are the sprite groups, and each dictionary within those sprite group lists is a single entity. Here is an example json level

{
	"Walls": [
		{
			"cx": 200,
		 	"cy": 200,
			"w": 500,
			"h": 50
		},
		{
			"cx": 100,
		 	"cy": 100,
			"w": 500,
			"h": 40
		}
	]
}

The player location is hard coded for now, but I can change that later. Anyway, the level editor writes a json file using json.dump() and the game reads from the level file by passing the individual sprite dictionaries to the wall sprite maker function. This can be easily expanded to include players, hazards, and all sorts of other sprites.

Then, I added the ability to scroll with the arrow keys. This way the editor can make levels that are larger than the display. Whenever the arrow keys are pushed it adds to an offset variable. This offset variable is then added to all of the sprite display locations and to the cursor coordinates when a sprite is being added. It works perfectly!

2/28/2022 8:41 PM
I made resets! Player now has a method should_reset which checks if the key r has been pressed. Player inherits get_input from Character and then adds to it. If should_reset has a value then the position of Player is set to its initial position and sets its velocity and acceleration are set to 0.

2/27/2022 6:34 PM
I reverted to the old collision so that I can work on other parts of the game!

2/23/2022 4:24 PM
This is a project that I have taken a big break on, but I think I know how to come back to it. Over winter break I worked on a simple game using pygame because I got bored. The reason I took the break was because I hit a horrible bug that I simply could not fix. I had issues with clipping. The player sprite kept going through wall sprites at higher speeds. I attempted to fix this by writing my own collision detection, but that didn’t work properly. I realized that I should really leave that problem for later and focus on the game. I can do things to make a working version of the game and I think that that would be the best way for me to get back into it. I am proud of the progress I have made on this project and I would hate for it to fall to the wayside. So I think that I am going to return the collision detecting and handling to how it previously was and focus on other parts of the game.