Share your repls and programming experiences

← Back to all posts
3D Physics Simulator using the Godot Engine!
AtriDey (170)

I've had a lot of fun with Godot. First, I got familiar with GDScript and made a moving character. Then, I improved that initial character and also interacted with physics objects.

Now, I've made my first useful program. The same character can now plow into 3D shapes with accurate physics simulations.

Want more? For those of you with more... powerful computers, I've made another physics simulator, this one designed especially to be mean to @DynamicSquid, which can be downloaded here. I can make Mac and Linux versions if you need, but I doubt I'll have to.

As a challenge, try pushing the objects into the void. The best method is to glitch them through the unproportionately thick and overlapping walls that do nothing, apparently. You can try pushing over them, but this is no easy task; I was too lazy to add a roof but the walls are pretty high.

Commentshotnewtop
SixBeeps (3020)

Gah, I need to learn Godot at some point.

AtriDey (170)

@SixBeeps I'm sticking to Godot because I started it, but I'd recommend you go with Unity, because it's more popular and easier to troubleshoot. Godot is naturally easier to learn, from what I hear, but Unity has more tutorials. BornCG is great, but I hear nobody can even compare to Brackeys.

georgina3 (8)

I love it!!! its soo fun!!!! PS : check out my class for html & css 9 students left for the waiting list

NathanPp (4)

i see you have 420 lines of code in Godot Physics Playground.js

WernerPfennig (3)

cool! i don't know what it means, but cool!

viraatvv (145)

Wow! what language did you use

AtriDey (170)

@viraatvv I created this in the Godot engine using a Python-like language called GDScript, and the engine automatically exported it to HTML.

Mchoe2 (1)

Yes! I cleared the whole thing within one minute. This is a very nice game.

jrjamir (15)

Dude this is dope

MarblesAndMore (54)

Are you supposed to move the objects?

AtriDey (170)

@MarblesAndMore Yes, essentially. There isn't exactly much to do, it's more of a demo.

AtriDey (170)

@MarblesAndMore Nothing to apologize for, it was a good question.

nt998302 (193)

I use Ue4 and Unity but not Godot LOL

AtriDey (170)

@nt998302 Unity is the best apparently, but it needs C#. I can write C++ for UE4, but idk why I just decided to use Godot.

quasiparticle (5)

@nt998302 Same! I use Unity too, and I am learning Unreal Engine 4.

nt998302 (193)

@AtriDey In my opinion, UE4 is so much better than unity, so much that I believe that UE4 is the way to go for any game dev since it saves so much time...

nt998302 (193)

@nt998302 But knowing Unity, there are some nice parts about it, however the inefficiency makes it not worth it (note this is my opinion and some people make really good games w/ UE4 but also note it takes longer LOL)

nt998302 (193)

@quasiparticle Cool! That was me a little while ago. You can ask me if you need help :D Ue4 is pretty weird sometimes :P

AtriDey (170)

@nt998302 But Unity's particle system....

(never used it, just a Dani reference)

However, one of the most outrageous aspects of Unity is that YOU PAY EXTRA FOR DARK MODE.

Meanwhile, Godot is only dark mode. Don't like it? You're a fake programmer.

nt998302 (193)

@AtriDey UE4 is all free and powerful... (it comes with dark mode free too)

nt998302 (193)

@AtriDey And I have to say I like UE4's niagra particle system more than unity's...

nt998302 (193)

@AtriDey I've used both, but I'm a little biased since my goal can only be reached w/ ue4 :P

SixBeeps (3020)

@AtriDey

However, one of the most outrageous aspects of Unity is that YOU PAY EXTRA FOR DARK MODE.

Not if you're a student lol #freedarkmode

quasiparticle (5)

@AtriDey Yeah, It's pretty annoying. However, there are some YouTube tutorials on how to edit Unity's binary files to switch to dark mode. Currently, on their free plan, you only get access to this grayish mode.

nahu (26)

How do you make stuff like this

AtriDey (170)

@nahu At the moment I'm in the midst of this tutorial series.

nahu (26)

there is no video it says

@AtriDey

AtriDey (170)

@nahu It works for me, but just try the first video and use the recommendations to watch the next.

nahu (26)

@AtriDey what did you search on youtube to get the videos

AtriDey (170)

@nahu "borncg godot 3d tutorial"

namesarehard22 (2)

can we just admit that watching something getting destroyed/knocked down is satisfying

AustinZhang1 (54)

is it just me or is Godot Physics Playground.js's line 7 mind blowing to anyone else

AtriDey (170)

@AustinZhang1 I can barely do a console.log, I have no idea what that is.

syc1 (23)

@AtriDey It's minified Javascript.

JustinWu (4)

@AustinZhang1

Reminds me of the code for this:
https://www.youtube.com/watch?v=DEqXNfs_HhY

I bet the interpreter interpreted that line as a kidney stone instead of code

NathanPp (4)

@AustinZhang1 the reason he did that was so he could have 420 lines of code instead of 4,200

ZDev1 (638)

You are a good javascript physics dev
I am 11 and I don't know anything about physics

AtriDey (170)

@ZDev1 I am 13 and I don't know anything about the HTML suite and just copied and pasted what Godot exported

ZDev1 (638)

@AtriDey looooooooooooooooooooooooooool

legendrygamer (4)

@AtriDey hey i too am 13 yet i am not that good when did you start programming

AtriDey (170)

@legendrygamer I learned very basic C++ at age 10 just to flex. I learned a bit more at 11, but didn't actually take it seriously until a year ago (almost exactly lol) and learned Python, as well as failing to try and pick up a few other languages. With school picking up and me getting my first taste of actual, proper, exams, I took a break, but I started again in March when everything shut down.

ZDev1 (638)

@legendrygamer I started programming when the covid-19 comes in the world
in 30th of december

legendrygamer (4)

@AtriDey i started when i was about to enter 13 but thanks to covid i counldn't go and i started with c

quasiparticle (5)

@AtriDey Nice! I first started coding at the age of 6. Mainly using turtle to draw spirals and making basic terminal games.

FAtManJOTARO (2)

Wow, I'm 14 and I barely know how to code. You're a prodigy @AtriDey

ZDev1 (638)

@legendrygamer don't thank covid-19
if you thank him, it will make it longer :'(

JK

mgher (22)

Hey @AtriDey This physics engine is awesome! We would love to include it on our website https://physimx.tech . If you want you can join our discord to learn more about what we do https://discord.gg/4RAknfK But yeah, great project!

AtriDey (170)

@mgher Actually, the engine is the open-source Godot engine. However, if you want to implement this specific project, don't hesitate to just copy and paste!

uhmansoori (46)

Very cool. Only thing is that the shapes do not stay the same shape. For example the cylinder when closer becomes elongated but overall good project.

EpicGamer007 (560)

Is it just me or is rolling the ball extremely satisfying?

AtriDey (170)

@AbhayBhat Welp, turns out spending 20 minutes tuning the ball acceleration was worth it.

Name12 (132)

I haven't seen anything like this before

Name12 (132)

it's so cool!! definitly an upvote for u.

Barry123 (79)

Wow! I can't stop playing now!

AtriDey (170)

By the way, I made a version where the character moves uncontrollably fast (on a dare, Discord works in strange ways; I literally joined a cult of seal impersonators right after).

Hacked version

Lethdev2019 (179)

@AtriDey yep, the "hacked" version, i was able to control it fine.