Share your repls and programming experiences

← Back to all posts
Jysics: Physics Again on steroids
tehgingergod (31)

This is a version of @tussiez's Physics Again, but with lots of extra stuff ranging from summoning cubes to an ACTUAL FORCE PUSH
It's still being worked on, so expect more to come!

PLAY HERE

Comments
hotnewtop
27whuang (2)

The peril map doesn't load in the ground for me

27whuang (2)

@tehgingergod Is it supposed to do that

27whuang (2)

@tehgingergod so like r y supposed to build a very large platform?

tussiez (1647)

Nice! Very simple changes to it though..
How dare you unlock the full capabilities of my car by enabling the somewhat flawed speedometer?! Lol

tussiez (1647)

@tussiez I would definitely love to see more 3D-related stuff on Repl tho, this is pretty good!

tehgingergod (31)

@tussiez don't worry, there's lots more coming. This will eventually become sorta physicsagain and sortacraft combined, with more shapes and a better way to place them.

tussiez (1647)

@tehgingergod Interesting to see how you will do physics on SortaCraft.. Never been able to do it right

tehgingergod (31)

@tussiez I'm basically going to leave it with Physijs. The cubes stack fine now, so they should stack fine now matter how many there are

tehgingergod (31)

@tussiez I've made it so that you can now summon cubes where you click. That one change turned this from a weird physics sandbox to a building game

tussiez (1647)

@tehgingergod If you make too many >20 it will freeze

tehgingergod (31)

@tussiez Weird. Maybe that's just your browser. I've added some new stuff, like more shapes, so try it now.

Rebelthunder (1)

@tussiez uh.... the speedometer gives random speeds.

tussiez (1647)

@tehgingergod Wdym? The JavaScript library (Ammo) is a direct port, so it's unoptimized for JavaScript. This means only a few objects will slow it down, a lot

tussiez (1647)

@Rebelthunder Thats why I disabled it.. lol @tehgingergod enabled it again

tehgingergod (31)

@Rebelthunder I know. It's a bit flawed, sadly

tehgingergod (31)

@tussiez OK SO
I screwed up the terrain generator somehow??????
can you fix it please

tehgingergod (31)

@tussiez I have just spent 3 days on beautifying this game, what do you think

tehgingergod (31)

@tussiez "simple changes" EH?????

tussiez (1647)

@tehgingergod This is awesome! Nice job!

tehgingergod (31)

@tussiez hooray
I've still got a ton of stuff to do, like figure out why night mode's skybox is broken, but I'm glad you like it

tehgingergod (31)

@tussiez any feature ideas? I'd be happy to hear them

tussiez (1647)

@tehgingergod Idk, you made it better.. hmm
Multiple cars? I think I made that possible

tussiez (1647)

@tehgingergod Oh, and maybe models? Just load the wheels seperately

tehgingergod (31)

@tussiez p e r h a p s
multiplayer is yes

tehgingergod (31)

@tussiez yeaaaaaaa, it turns out that three.js does not like it when I try to get a geometry from a 3d model, and Physijs does not like it when I try to pass an object3d off as a mesh

tussiez (1647)

@tehgingergod Eh, loading the actual geometry will probably be too slow. Load it as an object3D and make an invisible box around it, or, if you're in a good mood, maybe a compound shape

tehgingergod (31)

@tussiez where's the racetrack model you were going to use?
I'm thinking of adding it back

tussiez (1647)

@tehgingergod (This is how most games add physics to models)

tussiez (1647)

@tehgingergod I lost it in my Downloads folder, will let you know if I find it.
You will also need to build a "hitbox" for it

tehgingergod (31)

@tussiez fun. The commented out code uses a heightfield mesh, I'm guessing that didn't work?

tussiez (1647)

@tehgingergod I also modified the physics code - still doesn't work correctly

tussiez (1647)

@tehgingergod If you have Blender or a 3d modeling program, you should be able to build the "hitbox" fairly easily. Just import and load the simple objects

LoveFromSkyy (137)

Nice job on this! Care to give me some information on how you were able to make this? ^-^

tehgingergod (31)

@LoveFromSkyy I forked the Physics Again repl and... made some edits

LoveFromSkyy (137)

Hmm, I never saw the Physics Again repl, would you mind linking it so I can compare? @tehgingergod

LoveFromSkyy (137)

I know the updates you made but I never got the chance to see the original- that's what I mean. @tehgingergod

tussiez (1647)

@LoveFromSkyy Trending, "3D Vehicle physics"