Replicating Mechanics With The Source Engine

Discussion in 'Mapping Questions & Discussion' started by Blue552, Sep 16, 2009.

  1. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    Is it possible to replicate mechanical systems within the SDK?

    I don't mean using func doors and dynamic props to simulate what a mechanical system might look like, but actually have a single power source which powers an entire system.

    Some examples of what I want to do:

    - Create a simple gearing system
    - Converting rotational movment into directional movment (like the piston in a car engine but the other way round)

    I've been having trouble finding the correct tools to enable this to work as there doesn't seem to be any axis constraints. Also assigning the moving brushes to suitable entities has been trial & error as func_physbox can misbehave when force is applied.

    Have basic newtonian physics been implemented into the soucre engine? Even things as simple as applying a force?
     
  2. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    Source has a pretty nice physics engine and this sort of thing is quite possible. Have you ever played garry's mod?
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    It's kinda funny you are asking these things, because they were a cornerstone of the whole advertising of HL2/Source back when it came out. :p

    That said, it's not really the greatest idea to try doing it. It takes a tremendous amount of processing power and network traffic to do physics in multiplayer.
     
  4. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    If your goal is a physics simulator, I'd suggest looking into things like Blender which uses the "Bullet" physics package. (Mainly because you can easily see the results.)

    You can also mess with the physics package alone (there's even a Java port, Jbullet) but AFAIK the stuff in TF2 is more geared towards things exploding and falling down in a theatrical way rather than an accurate one.

    Disclaimer: I considered making a small set of rigid-body physics classes for a project, but only got as far as finishing the implementation of a Runge-Kutta integrator before I got bored. I should go back to it sometime.
     
    Last edited: Sep 16, 2009