Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Sep 2013
Offline Last Active Private

Topics I've Started

Nowhere-01, a surreal third-person survival horror inspired by Silent Hill

18 March 2014 - 12:21 AM

Hello, gamedev community! I'd like to present you with the project i've been working for quite a while.

It's called Nowhere 01 and it is a third person survival horror game, set in a surreal world which gradually shifts into darkness and nightmare.




The game is majorly inspired by early Silent Hill titles(and a lot of other things, you don't wanna me to get started on). However, it doesn't suffer from many classical survival horror problems. It has free third-person camera, no auto-aim or clumsy controls. But it compensates it with the fact that there's no cross-hair and you need to compensate for recoil. Enemies are not easy to defeat, you'll need to search through darkest corners of Nowhere to find ammo and supplies, to find hints about what happened lately and what is awaiting you, to find your way out.


The game currently is in development by a single person. I am responsible for both programming and art. Nowhere 01 uses custom engine, written in C++ with use of OpenGL and PhysX. The game will be available for Windows and very likely to be ported for Linux.


N1 first presentation
Album: Nowhere 01
10 images




For more information and screenshots, you can visit indiedb page or game's official web-site. You can also follow me on twitter, facebook or google+ to get updates about the project and like or share it to show your support!


Any  feedback and questions are welcome!

[PhysX] filterData for character controller.

14 September 2013 - 09:14 AM

Hey, another problem with PhysX. What i'm trying to do is prevent Character Controller interacting with certain type of objects. So i thought, i can use filter data, it works for normal shapes. In order to provide filterData for PxController, i pass it while calling to PxController::move(...) with PxControllerFilters. So for a quick test i do it like this:

PxFilterData characterFilterData;
characterFilterData.word0 = 1;

PxControllerFilters characterControllerFilters;
characterControllerFilters.mFilterData = &characterFilterData;

mPlayerController->move(PxVec3(Player.moveOffset.x, Player.moveOffset.y, Player.moveOffset.z), 0.1f, deltaTime, characterControllerFilters, NULL);

and that's enough to cause mPlayerController to stop interacting with the world(it just falls through stuff).

the weird thing is the line that causes such behavior is "characterFilterData.word0 = 1;".

so i found out that it happens if i set any of characterFilterData member variables to value other than zero. can someone explain why?

and BTW, it happens even if i use simulation shader like this one:

PxFilterFlags PhysicsMainFilterShader(PxFilterObjectAttributes attributes0, PxFilterData filterData0,
                                      PxFilterObjectAttributes attributes1, PxFilterData filterData1,
                                      PxPairFlags& pairFlags, const void* constantBlock, PxU32 constantBlockSize)
    pairFlags = PxPairFlag::eCONTACT_DEFAULT;
    return PxFilterFlag::eDEFAULT;

PhysX - Scene scaling, object size, timestep and gravity inconsistency.

03 September 2013 - 10:12 AM

Hey, i've started integrating PhysX into my graphical engine recently(purpose is basic collision with level, which is represented by static primitives and some debris, like cans, barrels and bottles reacting at bullets and impact with a player). Currently done is representing the scene with static primitives and using convex hulls for dynamic actors. And at this stage i've noticed PhysX acting not exactly like one would expect. I'll try to describe it as verbose as possible, and i would like to hear some logical explanation and advice.

My initial setup was:

  • Timestep 1/30.0f, called in a separate from rendering thread, which runs at 30 FPS.
  • simulate() and fetchResults() Are called exactly, as in example from official documentation.
  • Gravity: Y = -9.8
  • Material for static actors: 1.0f, 1.0f, 0.5f (static friction, dynamic friction, restitution)
  • Material for dynamic actors: 0.5f, 0.5f, 0.3f
  • Static actors don't have any other parameters. All actors are positioned and scaled correctly, checked it through PVD.

As for dynamic actors:

setMass(PxReal(Objects[f].weight)); //currently 1-30 for different objects

i also set setCMassLocalPose to model's relative center(because some models may be not centered correctly).

First of all, i would expect to just set object's mass in kilograms, or at least relative to other objects, with default gravity of -9.8 and timestep of 30. Neither worked. Objects with mass of hundreds or thousands kilograms end up falling through the floor or bouncing crazily. And smaller objects with lower mass were too floaty.

At first, all big\medium-sized objects were freaking out. And by looking at PVD's grid in comparison with my scene, i figured i need to rescale my scene. My level is up to 3000 by 3000 units size. Medium-sized object is 20-30 units, and small object is around 2-4 units of size. So in process passing physical objects to PhysX, i now rescale them and their positions by some factor(now it's 0.05f). And it made things better.

But there are significant problems remaining. First thing i don't get is why scene get's slo-mo, if i decrease time step size. PhysX Tips page says "Few substeps: moon gravity effects", so it's vice-versa.
Actors with bigger mass still act inadequately.
Different scaling factor affects simulation speed. So setting scale to a smaler value, makes everything move more rapidly and with less inertia\bounce. With smaller scene scale, smaller objects act like they have enormous friction or low bounce\angular velocity.

And that leads to the main problem i can't solve yet is that with scene, rescaled by 0.05f smaller objects(like soda can or a pack of cigarettes) act really floaty. They don't react well on collision, they rotate too slowly and don't bounce. I have a scene with a character model, some barrels, a big box and soda can, represented with convex hulls. And environment, represented with boxes, spheres and capsules. I fly around and shoot spheres at them, and look how they react. Medium-sized objects have a mass of 20-30, and small objects have a mass of 5(yeah, i did mention relative mass inconsistency. if i put more appropriate relative weight to smaller objects, they act even floatier and don't react much on a sphere with 100000 density and while falling, they act more like poo).

I just don't want to fiddle with magic numbers. I would like to find some explanation and make it more predictable and consistent.

P.S. PhysX version is 3.2.4 and platform is Windows.
P.S.S. I hope this is an appropriate forum for such questions.