You are browsing as a guest. Sign up (or log in) to start making projects!

Pygame Platformer

  • 34 Devlogs
  • 94 Total hours

An impossible platformer game that you cannot complete . I dare you !

Ship #1

What I made: an "impossible" platformer in Python/pygame — 4 characters each with their own move (dash, wall cling, ground pound, frog leap), 2 player mode, 5 levels, and traps like saws, a sliding rock head and a swinging spiked ball. Packaged it so it also runs in a browser through GitHub Pages, not just as a local script.

What was challenging: making the abilities feel actually different from each other but still fair took a lot of back and forth, and the web version being randomly laggy took a while to actually track down instead of just guessing. Turned out it was checking collisions against every object in the whole level every single frame instead of just the stuff near the player, plus redrawing the background from scratch 238 times a frame.

What I'm proud of: getting it running properly in a browser instead of just as a local file makes it feel like an actual finished thing rather than a script sitting on my laptop. It's still a bit laggy on the GitHub Pages version, but running it locally on my own machine there's no lag at all, so the game itself is solid — it's specifically the web packaging that still needs work.

  • 34 devlogs
  • 94h
  • 9.02x multiplier
  • 850 Stardust
Try project → See source code →
Open comments for this post

2h 14m 53s logged

i turned my code into a format that can be uploaded onto itch.io so i can begin getting ready for shipping this project … i then lowered the spiked swinging balls so its possible to jump across the gap in level 5 when finsihing the level … have a look !!

0
0
12
Open comments for this post

2h 33m 56s logged

i fixed placement of traps and enemies to make the levels dooable and also make the levels harder … im also planning to add and have started to add different level screens , so each level takes you to a different screen each time you complete it … also i made it so that you have to collect 40% of the coins available in each level to move onto the next level so dont be skipping coins … i also made all the characters have double jump because i felt bad for all you guys that will be playing the game …

0
0
16
Open comments for this post

6h 45m 59s logged

i have nearly finished the game !!! We’re getting really close to finishing the game now! This session was focused on adding the final gameplay features before polishing everything up.The biggest addition was the 2-player system, which is now fully implemented. It still needs a few tweaks and bug fixes, but the core mechanics are working well and make the game much more enjoyable.I also added a sprite selection screen, allowing players to choose their character before starting. Each sprite now has its own unique special ability, making every character feel different and encouraging players to experiment with different playstyles.Content-wise, I created two brand new levels, giving players more challenges to complete. To make these levels more interesting, I also introduced two new trap types along with another enemy variant, adding more variety and requiring players to think more carefully about how they progress through each stage.At this point, the game is almost complete. The remaining work is mainly polishing, balancing gameplay, fixing bugs, and making sure everything feels smooth before the final release.

0
0
5
Open comments for this post

1h 58m 13s logged

i have fully gone over each level refining the placement of each and every object … i then played the game multiple times just to make sure it is actually possible …. i set up the code so that i can begin adding the abilities for each new characer … i then made sure there are no bugs so that when the second player is added nothing silly happens because there will be more inputs and more possibility of things going pear shaped … i know this is a boring devlog but it is neccesary … please come back for the next one it will be good .. i promise …

0
0
3
Open comments for this post

4h 55m 24s logged

ok … lets get this going … today i done a full code run thru as i could not find out why the player was still being immune to the spikes when double jumping .. but its now fixed .. not suprising for a genuis like me lol …. anyways - then i added yet ANOTHER level … making it the hardest one yet which includes all the traps and enemies and hard to reach coins .. i then implemented a theash hold which makes it so you have to get a certain amount of coins befroet the checkpoint activates … then i added a sprite selector to make it so that the player can choose the sprite and each sprite has a special move … still not yet fully decided the moves but they will be decided soon - hopefully next devloog … then i went ahead and tried to add a 2 player mode where 2 players can play on the same keyboard (player 1 : up , left , right ) (player 2 : w, a ,d) … there are a total of 6 enemies to face throughout … lets get this going .. we are nearly there at he end …. woooooooooooooooohooooo

0
0
1
Open comments for this post

1h 52m 6s logged

i finished working on the level i was working on in the previous devlog . i then came across a major issue … if i spam doublejump on spikes - i dont die … like i become superman - not good at all … i had to fix this , and i fixed it to have a longer cooldown when using you double jump so , basically you have enough time for your sprite to hit the trap …

0
0
3
Open comments for this post

3h 58m 41s logged

i feel like a real dev that spends hours in the cave and comes out with 2-3 new features lol … today i worked on yet another level and added some new respawning and eliminating animations … i also animated the coins and added some secret special easter eggs within the game … you will need to wait for the game to be fully developed before finding out … again - any other features be sure to comment below on what features to add .

0
0
3
Open comments for this post

1h 15m 32s logged

i worked on implementing the new traps i mensioned in the previous devlog … i then continued adding a new level … this then led me to an idea of a level selector so you can replay levels if you wanted to . - genuis …. which i started to implement … thanks ;)

0
0
2
Open comments for this post

6h 15m 13s logged

i worked on creating a token/coin that you collect while trying to complete the level , i am debating wether to have a coin threthhold . so if you dont collect x amount of coints in the level you cannot activate the checkpoint … i also worked on a reset character reset game , resume interface where you can click esc to pause then you have the 3 options … i then created more sprites for the user to select what chatacter they want to play as … i am looking at adding different powers for each character in the next devlog … i added another level and i added smarter and more enemies that come to delete you off the game … lol … let me know what else i should add !!!….also i almost forgot , i added some new traps that i havnt put in the game yet but i have added the backend logic for - cant wait … thanks again!!

0
0
1
Open comments for this post

4h 8m 13s logged

Another long session finished. This time it was all about the little details that make a game actually feel good to play. I spent most of the time polishing existing features rather than adding new ones. I adjusted movement, tweaked animations, cleaned up the UI, and made small improvements throughout the game that most players probably won’t even notice—but together they make a huge difference.I also tracked down a few more bugs that somehow managed to sneak in. There were some visual glitches, a couple of edge cases where objects weren’t behaving correctly, and a few issues with level transitions. After a lot of testing (and breaking the game several times), everything is now much more stable.It’s funny because I barely added any “new” content today, but the game honestly feels so much smoother than it did this morning. I guess this is what real game development is like—hours of polishing for improvements that are hard to see but easy to feel.Anyway… that’s another 5 hours gone. Time to call it a day. Thanks for watching, and I’ll see you in the next devlog!

0
0
5
Open comments for this post

5h 27m 43s logged

i5 hours later … and this devlog is mainly focused on polishing, fixing bugs and making the game feel much smoother. First, I spent a lot of time going through the code and cleaning up some problems that were starting to appear as the game got bigger. I improved the overall efficiency of the game by removing unnecessary checks, optimising some of the update loops and making sure objects were not being processed when they did not need to be. This should help the game run better, especially when more enemies and level elements are added later. …. Next, I worked on fixing a bunch of smaller bugs that were affecting gameplay. I fixed some collision issues where the player could sometimes get stuck inside blocks, improved the respawn system so the player resets properly every time, and fixed some problems with the enemy behaviour after the player dies. There were also some annoying issues with jumping and movement that caused inconsistent results, so I spent time making the controls feel more reliable. …. WOW , i feel like a real game dev working ovetime lol …. Thank you , see you in the next one . that was a mouthful …

0
0
5
Open comments for this post

6h 19m 54s logged

wow this is going to be a big devlog ! …. first i created a homescreen that players can log in / sign up for future scoreboard featuers …. and possible 2 player or singleplayer selector ….. next i began adding sound effects to the game - like when you die and respawn and jump - there is a delay but i will fix that in the next devlog …. then i made the enemy smarter and i decided to allow it to pass through block like a ghost …. the only block it doesnt pass through is you so it can elimiate you when its hitbox crosses your hitbox …. i then fixed some major respawning and hit box bugs that come about after double jumping which took FOREVER ….i finished completing level 2 which i have to say , well done to the creator of the game lol because this game is going to be epic !!! , see you in the next one !

0
0
2
Open comments for this post

1h 18m 40s logged

i worked on improving the self moving enemy … im still deciding wether to give it the ability ro move through objects or if i should have it move like a nomral player … i managed to get it to float so it can easily move terrain and it has got immunity to traps so it can even follow you through traps … but (theres always a but) you can easily get rid of the enemy by jumping over it from left to right a few times …. i want to fix this in the next devlog …

0
0
2
Open comments for this post

4h 38m 15s logged

i worked on creating the program that works in the background … it is a program that powers and gives the enemy its own brain… it follows the enemy (YOU!) , i am working on making it smarter and faster - its a bit dopey at the moment :( ….. the enemy kills you just by you touching it or it touching you - still working on that (give it some time !!) ….. i then worked on making the second level (i made it hard for you , yes YOU) …. hopefully we have a little enemy running around next devlog ?!

0
0
7
Open comments for this post

1h 21m 16s logged

i fully fixed the trampoline bug that gives you immunity to traps after jumping on it [i actually did now :) ] …. i then had some trouble with making more objects with the new layout of the code …. i then got around that and began tweaking the first level and planning the second level . i then began addind a enemy block - the green one in the image , and a new spikey enemy which follows you like a mario bloomba . i havnt added the logic for this but i will hope to add it in the next devlog :-)

2
0
94
Open comments for this post

2h 31m 26s logged

i worked on fixing the oop problem i had in the previous devlog … i then changed the whole structure of the code to make it easy to read and add changes in future devlogs …. i then added the animation for the trampolines and tested them … they change your gravity when you jump on them making it like a trampoline u jump on … there is a image attached of me testing one over a floor of spikes … the animation works perfectly now …. and before u would survive afrer falling on spikes when coming off the trampoline for some reason , i have that fixed now …… i hope ;D

0
0
3
Open comments for this post

1h 22m 32s logged

i finished creating the first level … and the checkpoint actually works !!!, . i then had a problem with the creation of the objects , i decided to change the way the objects are created from lists into OOP , so classed and objects , this then broke my entire game :( …. i began fixing this and will hopefully be finished by the next devlog …. ;)

0
0
5
Open comments for this post

2h 37m 4s logged

i worked on adding more the very first level , i made it decently simple with a hint* double jump involved … i fixed the saw animation as it looked like it was a glitchy looped gif but now a smooth continuos animation …. i added a wall of blocks so you cannot go the other way …. i am hoping to replace this with a wall of invisible blocks which you cannot pass instead of visible blocks …. i also want the platform to extend on for many more blocks which i added which allows me to create more levels in sequence . next i hope to finish level 2 so i have 2 fully working levels to play . the end goal is “impossible” levels which are close to impossible to complete and keep sane while playing them

0
0
5
Open comments for this post

1h 18m 6s logged

i worked on fixing major respawning bugs , the character respawns back where it is supposed to respawn but the character sprite disppears , this was really hard and long to debug . i also created the animation for the saw trap which allows the saw blade to spin which makes the game more realsitic and enjoyable to play

0
0
4
Open comments for this post

4h 31m 21s logged

i continued creating the level … i added 2 paths , a harder bottom path with required speed and accuracy or a easier top path which is easier but requires patience …. i am yet to finish the top layer on the level as i need to code the logic and animation for the trampoline which will be the core for most of the game … it gives you a jump boost + float which allows you to travel quite some distance when jumping off of it . the flame of the fire wasnt dealing damage so i fixed that by updating its hitbox . i then added a standing player animation so it moves up and down as if its breathing when idle ….

0
0
2
Open comments for this post

8h 22m 3s logged

i worked on a log in / sign up screen which authenticates users before they play the game to allow for future add ons such as leaderboards etc etc … i then added trap logic and a checkpoint flag which i didnt quite get to work … hopefully i get it to work in the next devlog , this will allow me to create lots of levels … i also added spikes with spike logic .. so if the player touches any part of the spikes the spirte detects it and the character respawns to the latest touches checkpoint … i later want to add lives so if u fail more than 3 times you respawn right back to the very beginning …. i also added 2 more traps that are spinning saws and a fire … which opperate the same way spikes do but are of different dimentions - the fire is smaller and the saw is bigger and wider … a mixture of these will hopefully begin to create a really hard level to completre … i also added double jump for the character / fixed double jump …. to stop players from abbusing double jump there is a small cooldown for double jump so its not exploited …. for the next devlog i would like to create a working level with a checkpoit that works on the other end .

0
0
3
Open comments for this post

1h 52m 35s logged

I started by creating a new object type called Checkpoint.
Unlike blocks and traps, checkpoints don’t damage the player.
Instead they:

Detect collision with the player

Store a respawn location

Become “activated” when touched

This is the first non-hazard interactive object in the game.

Added Respawn Position Variable
Previously the player always returned to:

0
0
3
Open comments for this post

1h 48m 48s logged

Added Collision-Based Damage System
Until now, traps were purely visual. The player could walk through fire without consequence.
I extended the collision system so that objects can now affect the player based on their name property.
This is the first time the game starts behaving like an actual platformer.

Introduced make_hit() Logic
Instead of instantly killing the player, I added a hit state system:

Player gets flagged as hit

Small delay before respawn logic runs

Allows future animation / sound integration

This also prepares the system for:

spikes

saws

lava

checkpoints

First Basic Death/Respawn Logic
At this stage, respawning is still very simple:

If player touches hazard → reset position

No checkpoint system yet

No lives system yet

But this is the foundation for it.

Problems Encountered
Problem 1: Player kept dying multiple times per frame
Cause
Collision was being detected continuously every loop tick.
Fix
Added a simple hit lock

0
0
0
Open comments for this post

1h 46m 24s logged

Now that the level system is working, the next logical feature would be the first hazard.
At this point in development, most students don’t immediately build fire, saws, spikes, trampolines, checkpoints, menus, sounds, etc. Instead, they usually start by experimenting with one animated trap to learn how animated world objects work.
The fire trap is the most likely candidate because it uses the same sprite-sheet system you’ve already built for the player.

0
0
1
Open comments for this post

1h 12m 36s logged

After implementing the camera system, I noticed that the level still looked very basic because platforms were being drawn as plain black rectangles. During this development session I focused on creating a more professional level system using actual game assets.
I created a general-purpose Object class that could be used as the foundation for future game elements such as blocks, traps, checkpoints, and interactive objects. This significantly improved the organisation of the project and reduced code duplication.
I then created a Block class which inherits from the Object class. Instead of drawing rectangles, blocks now load an image from the terrain sprite sheet. This made the level look much closer to the final game.
To support this, I also created a helper function called get_block() which extracts a specific terrain tile from the terrain sprite sheet and scales it appropriately.

0
0
2
Open comments for this post

1h 43m 54s logged

up until this point the game world was effectively limited to a single screen. While the player could move and jump on platforms, the entire level was always visible at once.
To fix this and move closer to a real platformer, I implemented a camera system using an offset value (offset_x).
This allows the player to move through a much larger world while the screen follows them smoothly.
Instead of drawing everything at fixed positions, all objects are now rendered relative to the camera position.
This is one of the most important structural changes in the entire project, because it transforms the game from a “static scene” into a scrolling level.

Problems Encountered
Problem 1: Everything moved incorrectly after adding camera
After introducing offset_x, all objects appeared shifted or misaligned.
Cause:
Objects were still being drawn using absolute coordinates.
Fix:
Updated draw calls to subtract camera offset:

0
0
2
Open comments for this post

2h 17m 23s logged

focused on expanding the system into a full animation framework.

Instead of using one image, I implemented a sprite sheet loader that splits images into multiple frames. This allows the character to animate smoothly while running, jumping, and idling.

A major improvement in this session was introducing direction-based sprite flipping, which means the same animation can be reused for left and right movement without duplicating assets.

I also started restructuring the Player class so that animation is handled separately from movement logic. This makes the code much more scalable for future additions like enemies and traps.

Problems Encountered
Problem 1: Sprite sheets not splitting correctly

At first, animations were broken because frames were not being sliced properly.

Cause:
Incorrect calculation of sprite width division.

0
0
2
Open comments for this post

1h 10m 53s logged

I spent this development session researching sprite sheets and learning how animations are typically handled in platformer games. I downloaded the character assets and experimented with loading images into Pygame.

To avoid repeating code for every animation, I created a function that loads images from a folder and stores them in a dictionary. This will eventually become the foundation of the final load_sprite_sheets() function used throughout the project.

I also replaced the rectangle with a single idle sprite. At this stage there are no animations yet—the player simply displays one image.

Problems Encountered
Problem 1: Images not loading

When first attempting to load the sprite, Pygame returned a file path error.

Cause

The image folder was not in the same location as the Python file.

Fix

Used the os.path.join() function to create file paths more reliably.

0
0
2
Open comments for this post

1h 3m 19s logged

introducing platform objects.

Instead of relying only on the bottom of the screen as a floor, I created a simple Block system. Each block represents a solid object in the world that the player can stand on.

This required restructuring collision logic so that the player is no longer only interacting with the screen boundary, but with multiple objects.

I also started separating the world into a list of objects, which is an important step toward building full levels later.

Key Improvements Made …:

  1. Added Block System

A simple block class was introduced to represent platforms.

  1. Object List System

Instead of hardcoding collisions, all blocks are stored in a list so the level can be expanded easily.

  1. Basic Collision Detection

A simple collision check was added to stop the player falling through platforms.

Problems Encountered …
Problem : Player clipping through platforms

When first adding blocks, the player would sometimes fall through them or “stick” inside them.

Cause:
Collision was only being checked after movement, not corrected properly.

Fix:
Added positional correction after detecting collision:

0
0
1
Open comments for this post

1h 17m 45s logged

started turning the simple movement demo into a real platformer by adding physics.

The first majour feature added was gravity. Instead of the player staying in the air after a jump or falling instantly at a fixed speed, I introduced a vertical velocity system. This allows the player to accelerate downwards over time, making movement feel more natural.

After implementing gravity, i added a jump system. When the player presses the space bar or up arrow key, an upward velocity is applied. Gravity then gradually pulls the player back down.

However, after adding jumping and gravity, the player was able to fall infinitely off the screen. To fix this, I implemented a basic floor collision system using the bottom of the screen as a temporary ground.

This ensured the player always lands correctly and resets vertical velocity when touching the ground.

0
0
1
Open comments for this post

1h 31m 20s logged

focused on making the game interactive by allowing the player to move around the screen.

I first created a player velocity constant which controls the movement speed of the player. Using a constant means the speed can easily be adjusted later without modifying multiple parts of the code.

I then implemented keyboard input detection using pygame.key.get_pressed(). This allowed the left and right arrow keys to move the player across the screen.

To improve code organisation I added movement methods inside the Player class rather than directly modifying the player’s position inside the main game loop. This makes the program easier to maintain as more functionality is added later.

0
0
3
Open comments for this post

1h 56m 46s logged

Objectives :
Add FPS control
Create project constants
Improve game loop structure
Add a background colour
Prepare the codebase for future player development
Progress.

After successfully creating the game window, (after a long long time) I focused on improving the structure of the program. A frame rate limit was added using “ pygame.time.Clock() “to ensure the game runs consistently on different computers.

I created constants for the screen width, screen height and fps rather than hard coding values throughout the program. This will make future changes easier.

I also replaced the plain black screen with a temporary sky blue background. This makes the project feel more like a game environment and provides a better foundation for testing future features.

Although no player has been added yet, the game loop is now stable and organised enough to begin implementing movement systems.

Problems Encountered

Initially the game was running as fast as the computer would allow, causing unnecessary CPU usage. Adding FPS control fixed this issue and ensures consistent performance.

Testing Performed
Verified the game window opens correctly.
Verified the frame rate remains stable at 60 fps.
Confirmed the window closes without errors.
Next Steps
Create the player object.
Draw the player on screen.
Begin implementing horizontal movement using keyboard controls.

0
0
1
Open comments for this post

30m 10s logged

I started the project by setting up the basic Pygame environment. The first goal was simply to get a window appearing on screen. After importing Pygame and initialising it, I created a 1000×800 game window and added a title to the window.

I then created a basic game loop which keeps the program running until the player closes the window. At this stage there are no graphics, characters or levels. The project currently only displays a blank screen.

Problems Encountered

No major issues were encountered during this stage. The main focus was confirming that Pygame was installed correctly and that the game window could be opened and closed safely.

0
0
5

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…