#I think I might have my answer to all my

1 messages · Page 1 of 1 (latest)

slender salmon
#

you can try exploring the 2d entities physics package from unity if you want to have full control of 2d physics

#

the author of the KCC package is working only in ECS now. my understanding is that between* unity 1 (C# facade to PhysX and Box2D) and unity 2 (ECS-style C++ code disguised as C# code), everything sucks

sick flame
#

I don’t understand

#

I will look into it, as I do want total control

slender salmon
#

based on your chat so far, you are very opinionated about how you want 2d physics to work

#

Unity has a fully open source 2d physics solution that is essentially authored by the same guy who made KCC

#

he works for unity

#

it's called 2d physics for entities

#

you can download the package and make the appropriate modifications

#

it is highly performant

sick flame
#

i see. is it experimental?

slender salmon
#

it isn't as feature complete as the one in unity, which is a fork of box2d

#

that said, you can add onto it exactly what you need / want, including by reading the box2d source and adapting it to ECS / DOTS

sick flame
#

could you give more specifics on where it is?

sick flame
slender salmon
#

the 3d physics package is much more featureful, and the author of KCC maintains the character controller for it

#

you could try to model your world using 3d physics and use his character control. that would give you the best of both worlds

#

you could modify the 3d physics package to be more 2d-ful

sick flame
#

yeah. I get that. Right now I’m planning on modifying the system for KCC to make it work for 2D

slender salmon
#

hmm

sick flame
#

i have most of the collision logic etc already figured out for my game using normal box2D. What I need to mess with is the simulation itself

slender salmon
#

you probably want to modify his ECS character controller, which is like a good version of KCC

#

you could also "just" author box2d in unity. that's the purpose of ECS

#

it is flexible enough to let you do that

sick flame
#

the only thing I see under that author is KCC

slender salmon
#

okay well, i think you are at the start of a long journey

sick flame
#

i think so too

slender salmon
#

so you will figure this all out

#

unfortunately you can't just skip the "try to do the thing that makes no sense" part of this journey lol

#

i mean i don't even know what your game is

sick flame
#

but I’ve been spending weeks of my life wrestling with this piece of shit, and it’s time to bite the bullet, and rethink the physics from the ground up

slender salmon
#

so it's hard for me to give sound advice or pinions

sick flame
#

needs extremely precise movement

#

and obejcts need to have very controlled interactions with each other

slender salmon
#

is the idea a game that's built around Just Press Right levels?

sick flame
#

no

slender salmon
#

oh

sick flame
#

it’s like a maker style game

slender salmon
#

well that would be a fun idea lol

#

because that's the most interesting part of mario maker

#

the one that is basically a joke

#

and is over in a few minutes

sick flame
#

the idea of the game is to let you make whatever you want

#

but it needs super tight controls

slender salmon
#

you can jump directly to ECS

#

i think the sooner you learn how to use it the better

#

ECS is like Unity 2

sick flame
#

is ECS complete?

#

or experimental/halfbaked?9

slender salmon
#

in what sense? there are shipping games using it

#

i guess i think that's the wrong question to ask

#

from an engineering point of view it achieves its goals

#

without serious limitations

sick flame
#

unity has a tendency to put out experimental packages that are buggy and not actually ready to ship

slender salmon
#

i think these are the wrong questions to ask, to some extent, considering their mature packages also do not suit you

#

it comes down to the gameplay

sick flame
#

does it do what it is supposed to do without random “oops! that isn’t supposed to happen”

slender salmon
#

mario maker - i.e., building 2d platformer levels - doesn't sound out of scope to me, for either ordinary Unity 1 monobehaviours style development nor ECS

#

i understand the energy of what you are asking

sick flame
#

i can almost do what I want. But there’s a few things that I just cant.

slender salmon
#

i wouldn't know, i don't use it. as a matter of my personal design direction, i don't make games where players are expected to learn very idiosyncratic input-to-physics mappings. only extremely conventional ones.

sick flame
#

that’s why the physics needs to be very simple and well defined

#

ie if you are on a moving block, you are in its reference frame, and don’t affect it at all. Simple

slender salmon
#

the people making the pinball engine that looks goo din unity used ECS to port a C++ physics pinball engine into unity

#

it suited them well

#

pinball physics is very idiosyncratic

#

personally, i don't find it worthy to recreate, but ECS helped make it happen

#

that said, the single author of it is migrating away from ECS, essentially just using the physics engine separately, but with monobehaviours, because he developed on an older version of ECS that is essentially deprecated and the costs of migrating are the same.

#

do you see what i mean?

#

so on the one hand i can tell you about all these stories, you can look up ECS case studies

#

but on the other hand, i don't use ECS because i don't make the kind of games that need it

#

i do make games where inputs and physics have to behave very predictability, but i am not especially opinionated about a particular way physics has to behave, because i don't think it really matters

#

in my opinion, there isn't any innovation to be had in the precision of player controls. you might as well using corgi engine 2.5d, and move on with life. for example, Ultimate Chicken Horse, which is multiplayer mario maker and a successful game, doesn't do anything especially innovative with platformer controls

#

i understand there's an audience for Super Meat Boy meets Ultimate Chicken Horse, but i would never play that game, and i would explicitly never recommend it over ultimate chicken horse, because in every way I can imagine, ultimate chicken horse is better than super meat boy meets ultimate chicken horse

#

am i making sense?

sick flame
#

in my case, I am extremely picky about the physics I want

#

it is either what I want, or it is totally wrong

slender salmon
#

you should use ECS, end of story

sick flame
#

i’m looking into it, but I don’t see how it gives me more control over physics

#

it just looks like we’re storing and modifying information with the goal of making it more performant. Not with the goal of modifying the physics

#

my performance isn’t the biggest issue, because all my objects have extremely simple 2D colliders, so I can afford to cast even the most complex ones out twice a frame for everything. But I need the result to be correct.

slender salmon
#

i think you are looking at the wrong thing

#

the ECS physics packages, such as the 2d entities, 3d unity physics and 3d havok physics

#

they are completely open source, authored in ECS (aka C# and "HPC#" aka burstable C# aka C++ disguised as C#)

#

so if you need to change something, you can

#

they don't rely on any invisible engine internals at all

#

does that make sense?

#

if you don't like how something something broadphase something something raycast works or whatever, you can change it

#

with unity's physx/box2d monobehaviors implementation, you cannot

sick flame
#

doesn’t ECS require me to refactor all my monobehaviours to split data from systems that modify them?

slender salmon
#

one way to look at this is on your journey to implement what you want with the monobehaviour and box2d-in-c++-inside-unity workflow is that you will have to do that kind of decoupling anyway

#

you can do that decoupling in a way where you get an immediate emotional payoff of being cozy and familiar, such as by writing Update loops, and then spend 10x the time fixing all the bugs in that approach

#

or you can just spend seemingly longer writing ECS code, which forces you to author these things in a way that's decoupled and bug-free in the first place

#

ECS is basically, someone took a long hard look at game engineering traditions and tried to make a framework that would work for a lot of different kinds of gameplay. it is very opinionated and it is written in proverbial blood