Coder Social home page Coder Social logo

gsphysics's Introduction

gsphysics

Native implementation of GoldsrcPhysics

Mod that use this lib: Half-Life Ragdoll

Usage

Prerequisites

  • VS 2019
  • cmake

Steps

Download these two repos bullet3gsphysics ,and place them in your HLSDK directory like this. If you have a different folder structure, then you have some extra work to do. If you don't know how to, submit issues.

Simply put, it is your client project, for HL it is hl_cdll, which needs to depend on some static link libraries. One is gsphysics, which provides you with ragdoll support, and the other is bullet3 related libraries, which provides physics calculation support for gsphysics.

Let's proceed to set up the solution.

Since bullet3 does not need to be changed frequently, we directly use the script to compile it into a static library. From Half-Life Ragdoll Download these two scripts build-bullet3-debug.bat and build-bullet3.bat in your HLSDK directory, Use VS 2019 dev prompt to run the script to build bullet3. One is to build the release version, and the other is to build the debug version. Wait for the script to finish running.

Then in the hl_cdll project, add the following items as additional dependencies for debugging configuration and release configuration respectively

  • debug:
Bullet3Collision_Debug.lib
Bullet3Common_Debug.lib
Bullet3Dynamics_Debug.lib
Bullet3Geometry_Debug.lib
BulletCollision_Debug.lib
BulletDynamics_Debug.lib
LinearMath_Debug.lib
  • release
Bullet3Collision.lib
Bullet3Common.lib
Bullet3Dynamics.lib
Bullet3Geometry.lib
BulletCollision.lib
BulletDynamics.lib
LinearMath.lib

Then provide a path to find these additional dependencies.

For gsphysics, because we may need to modify it during development, we add it to our solution. Right click on the solution and add the existing project gsphysics/proj/gsphysics.vcxproj

Then add the project reference gsphysics in the hl_cdll project. After doing this, gsphysics will be compiled when the hl_cdll project is generated, and then it will be used as a link input in the link phase.

In this way, our project can link these libraries during the linking phase.

Next, set and add the gsphysics header file include directory. We need to include gsphysics header files for development, so we need to tell vs where the header files are.

Now we can use gsphysics.

gsphysics's People

Contributors

anchurcn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gsphysics's Issues

Ragdolls for players?

I used the HL1RagdollMod goldsource project and i went into the phys file in vs2019 and changed the scientist from scientist to gordon (hl1 multiplayer player model) and added the ragdoll and compiled it and when i played and i died in multiplayer i did not ragdoll, any help?

How to add ragdoll data?

Getting the hang on it but does it utilize a text file (like the other version of gsphysics) to store the ragdoll data and how do we make the ragdoll data folder/ text

Compatibility

If this is native gsphysics, can we build this for other os? (windows, linux, mac)?

Documentation?

Will there be documentation on how to use this and will it be easy to add it to vanilla hl1 and other mods?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.