Share your repls and programming experiences

← Back to all posts
pygame: basic platformer!
SeamusDonahue (442)

Pygame platformer

In this game you use a/d to move and space to jump.
the white are walls and ground, and the red is lava
get to the green goal!
there are 11 levels (not counting level12 because it's just a thx)

This was made primarily for the goal of seeing if I could make a platformer using pygame.

level maker

now obviously I did not program the levels by hand.
I used a level maker I made for my game.

if you would like, you can share your levels with me.
this is how to use it:

  • in console type "python"
  • click the screen two times to make a wall (first sets the x,y of the wall, second sets the width,height relative to the x,y), hit l to make lava where the mouse is, and hit g to make a goal (one per level)
  • hit the x button when done and it will ask you in console for what level number to save as, this may be anything above how many levels I have made, if it is not a number, it cannot be loaded by, if it is > 1, same thing, and if you choose below the amount of levels I made, the file will already exist and you level won't save.
  • to test level type "python (level number)"

  • if you like share the json with me and It might be added to the game

if you wish to delete a wall, click on it as your first point, this will not set the first point but delete the clicked wall
to delete lava, same thing but hit l instead of clicking

have fun!

OldWizard209 (1132)


SeamusDonahue (442)

thanks! I'm glad you enjoyed my game! @OldWizard209

CodingRedpanda (180)

Lvl 1: Ok
Lvl 2: ...
Lvl 3: Oh no
Lvl 4: iMpOsSiBlE
Lvl 5: Hmmm
Lvl 6: ..
Lvl 7: Ugh.
Lvl 8: Wah
Lvl 9: Yes (almost there)
Lvl 10: YEAAA
Lvl 11:


Anyway, cool game!

DominicHuieWhit (52)

level 3 is my favorite

SeamusDonahue (442)

cool, thats when i added lava to the game! @DominicHuieWhit

JBloves27 (1729)

Nice job! Ive never seen a pygame platformer!

SeamusDonahue (442)

Thanks! I applied knowledge I had from a different game engine to pygame. (the other game engine was gamemaker studio 2) @JBYT27

JBloves27 (1729)

Np! hmmm, ive never heard of that game engine... sounds fun! :) @SeamusDonahue

SeamusDonahue (442)

Its pretty cool but its expensive and can't do 3d very well, however it uses an easy to learn language (not python its called gml and its just made to be easy syntax similar to c# or java but without type casting or ;'s) @JBYT27

JBloves27 (1729)

ah, ok! Thanks for telling me about it! :) @SeamusDonahue

SeamusDonahue (442)

however it, like pygame uses positive y to go downwards. so that's one the of the reasons I got used to pygame.

SeamusDonahue (442)

yea np! im pretty sure it has a free trial version but personally I think if you want an engine use unity because its free and does more. @JBYT27

DSAEvan (21)

I get through the hardest parts, but I mess up on the easy ones

DSAEvan (21)

me love parkour fun! I never really understood pygame

RhinoRunner (840)

@SeamusDonahue This is better than any game I've ever made (only if it gets >95 upvotes) I like it!

tussiez (1532)

Awesome! I played to the end :)

NimaSherpa3 (23)

Dude this is sooo awesome, can u teach me pls? I am having difficulty learning pygame in repl

SeamusDonahue (442)

thanks, I learned a lot of what I know from stack overflow, and the pygame docs. @NimaSherpa3

AidanWaner (4)

{"(0, 192)": "(32, 16)", "(48, 192)": "(64, 16)", "(32, 192)": "(256, 16)", "(272, 192)": "(16, 16)", "(256, 192)": "(0, 16)", "(112, 192)": "(144, 16)", "l(288, 192)": "(288, 192)", "l(304, 192)": "(304, 192)", "l(320, 192)": "(320, 192)", "l(336, 192)": "(336, 192)", "l(352, 192)": "(352, 192)", "(96, 192)": "(48, 0)", "(128, 128)": "(16, 16)", "(128, 176)": "(16, 16)", "(128, 160)": "(16, 16)", "(128, 144)": "(16, 16)", "(144, 144)": "(16, 16)", "(144, 160)": "(16, 16)", "(144, 176)": "(16, 16)", "(160, 176)": "(16, 16)", "(160, 160)": "(16, 16)", "(96, 176)": "(16, 16)", "(96, 160)": "(16, 16)", "(96, 144)": "(16, 16)", "(96, 128)": "(16, 16)", "(80, 144)": "(16, 16)", "(80, 160)": "(16, 16)", "(64, 176)": "(16, 16)", "(64, 160)": "(16, 16)", "(80, 176)": "(16, 16)", "goal": "(368, 176)", "(368, 192)": "(16, 16)", "l(112, 176)": "(112, 176)", "(0, 176)": "(16, 16)", "(0, 160)": "(16, 16)", "(0, 144)": "(16, 16)", "(0, 128)": "(16, 16)"}

SeamusDonahue (442)

thanks for submitting a level, ill test that right away

Whippingdot (573)

this too hard don't stand to close ...THIS IS IMPOSSIBLEE

SeamusDonahue (442)

ive done it and im not even good at mario, its definitely possible, especially because this doesnt slide like mario @Whippingdot

Whippingdot (573)

The thing is a little laggy so I can't do the third stage @SeamusDonahue

SeamusDonahue (442)

the fps seems to stay at 60, i think its the connection to that does that @Whippingdot

Whippingdot (573)


PilotDevKarwa (12)

uhhhhhhhhhhhh how do u play it

SeamusDonahue (442)

click on the pygame window to make sure it has keyboard focus then use w and d to move and space to jump @PilotDevKarwa

Dunce (50)

awesome game! but I tried to access the level editor multiple times, and nothing happened, I had fork the repl, and edit the code so I could get to it, other than that great game!

SeamusDonahue (442)

oof im not sure what the problem you were having was, great to hear you liked my game though! @Dunce

ColePete (30)

it doeasn't load, it just shows this the whole time

SeamusDonahue (442)

glitch with try reloading @ColePete

ColePete (30)

@SeamusDonahue ok, that worked, Nice game

SeamusDonahue (442)

Thanks! feel free to make a level if you would like! @ColePete

Squrril (3)

Hello Seamus. Some suggestions:

  • Add the ability to jump with the "W" key, because A+D and space is a lot harder than standard WASD
  • add a death counter
  • add a timer (speedrunning competitions, anyone?)
  • and finally, add a level identifier so you know which one you are on
IntellectualGuy (721)

This is an awesome game dude, but can you add more lvls?

SeamusDonahue (442)

maybe but its not easy making levels with only three elements, soon I will make this with more elements to work with and more level editor centered (like mario maker) @IntellectualGuy

IntellectualGuy (721)

@SeamusDonahue That would be rlly good ,but even without it this game is sick.

SeamusDonahue (442)

the game does have a level editor btw, it says on the post how to make a level, the new repl would just have more elements and be more suited to making levels @IntellectualGuy