Jump to content

  • Log In with Google      Sign In   
  • Create Account

Finalspace

Member Since 29 Mar 2012
Offline Last Active May 13 2016 12:53 PM

Posts I've Made

In Topic: Is making game with c possible?

04 May 2016 - 12:06 PM

There is no need to use c++ for making games. You can make games in plain C as well - just using structs and unions.

But there are a few features from the c++ compiler which makes life much easier - operator overloading and zero struct initialization. Thats it.


In Topic: How to climb slope with speculative contacts

29 February 2016 - 08:47 AM

Okay i added basic friction support using material mixing, but now its getting much more complicated:

 

- I need to add multiple shapes/collider support to fix wall glue bug (friction on the side is not a good idea - except i want honeylike behavior)

- Need to add circle shape/collider support for player feet shape to get more friction when walking along a slope

- Tuning material frictions is very hard (Are there a good guide for this - especially what friction coefficient should have the player feet - one?)

 

Maybe that will solve my problems by walking along slopes - without being pushed back by edge contacts or pushed down by gravity - who knows...

 

The only thing which i dont know: Will i need static friction as well??


In Topic: How to climb slope with speculative contacts

26 February 2016 - 01:38 AM

If you know your contact normal, you could use the perpendicular as the friction direction and turn your computation from 1D to 2D.
Further you need to add static friction, which is able to stop your character if slope and relative velocity are small enough.

Edit: the above might be more physical than you want / necessary, but i assume the sliding is maybe not caused by missing friction.
E.g. character penetrates ground due to vertical gravity, but collision is resolved along the sloped contact normal, so it slides a bit down and to the side.
Is this the case, and you can't prevent it from happening even by setting state.player.vel.x to zero?

Maybe you should post collision resolving code too.

 

Hmm, maybe adding friction as a tangent impulse may solve that problem - but the friction must be computed on the fly to account for steep angles.

I will try using mixed friction method and report back - when i got time ...


In Topic: Handmade Hero tutorial

25 February 2016 - 04:33 AM

I watched all current episodes and its by far the best video resource out there. Casey muratori really knows his stuff and explains everything in great detail.

You can learn a ton from this, especially when you normally just use library X to solve a particular problem which is the total opposite of this project.

My perspective of how to write games has totally changed since this - for the better of course ;-)

 

He starts from the very beginning. As in how to create a project in Visual Studio.

 

This statement is partially wrong, he indeed starts from the beginning but he never setups any visual studio project at all.

He is writing everything with emacs and uses a simple batch file to compile it much more faster than visual studio can ever do by using the VC++ compiler directly.

VStudio is only used for debugging only - just to make that clear.


In Topic: How do i solve this specific scene graph problem

15 February 2016 - 10:09 AM

So i solved it using some sort of offset function to offset it by the radius multiplied by some direction. But has the downside that it wont work when the origin of the object is not zero.


PARTNERS