Skip to content
Sign upLog in
← Back to Community

Gravity Simulator using Python and Tkinter

Profile icon
XanderEhlert

As said in the title, this is just a gravity simulator.
It essentially uses Tkinter text bindings, time.sleep, and .move() to move a certain amount (depending on where it is in the cycle).

Press the up arrow to jump (because that's all you can do).

Please Upvote

Enjoy :)

Voters
Profile icon
sashav24
Profile icon
ErrorNoInternet
Profile icon
GL1CH3D
Profile icon
XanderEhlert
Profile icon
moranstephen
Profile icon
PXY
Profile icon
ANDREWVOSS
Profile icon
NarwhalFanatic
Profile icon
Ganesha1
Comments
hotnewtop
Profile icon
Ganesha1

i do not have enough braincells to understand but good job

Profile icon
ErrorNoInternet

wow that was really cool

Profile icon
GL1CH3D

I made an edit to turn it into a native Mac application (not using py2app, but adding a shebang and renaming the python file to app.app.)

Profile icon
Rama2006

that a great job will done

Profile icon
[deleted]

i can't do this (or i can)
but cool!

Profile icon
moranstephen

hey i am new to python and tkinter especially. I dont see many things shared using tkinter and i have a question. When i am writing and i make a simple syntax error my repl just breaks and i have to copy and past the script into a new one to run it again. Does this happen to you? Am i doing something wrong? is there a work around?

Profile icon
XanderEhlert

@moranstephen
hm i haven't seen this before. you could report it at the bug site

but what specifically happens that forces you to copy paste it? like did the run button just freeze?

Profile icon
moranstephen

@XanderEhlert
after correcting an error the repl goes into an infinite load loop. Whats weird is if i just leave the repl alone for a few hrs it will run again. i actually created a button to close the program that recreates the error. If you uncomment the section and hit the button it should keep you from being able to run it again. If it dosen't break on your end then idk. https://repl.it/@moranstephen/frame

Profile icon
XanderEhlert

@moranstephen
it worked fine for me. idk what happened sorry

Profile icon
moranstephen

@XanderEhlert
interesting I actually submitted a bug report awhile back, but no response. Well ty for trying

Profile icon
PXY

The sleep function lasts a bit too long, and the floor should probably be accentuated so users can understand what they're looking at. This is a great beginning, though!