Mythruna
March 29, 2024, 01:35:39 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Two steps forward, two steps sideways...  (Read 14246 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: April 08, 2013, 08:38:53 PM »

By some measures this was a productive weekend.  It's still frustrating how slow this piece is going.

Last week or so, I finally integrated (physics pun intended) the physics core into the new engine with world collisions and all.  Or maybe it was this weekend.  It's hard to tell now.  The hardest part has been implementing player movement as physical forces.

The old code modified the player position directly using pseudo-physics.  This meant that I had direct control over acceleration, jump impulses, how collisions were interpreted, and so on.  Trying to recreate the "3D platformer" feeling using physics forces has been an interesting exercise.  It's still not perfect but I'm starting to feel like some of the new glitches might actually be better... or at least partially so. 

Jumping has been the hardest.  The old code applied additional down force at the end of a jump to make the player fall faster.  Back then, even with double gravity, it felt like you were floating at the tops of jumps.  I spent 3-4 hours today trying to replicate this sort of additional drag in way that wouldn't mess up other parts of the physics calculations.  I finally have it sort of right.

Autoclimb was Saturday's fun.  When the two are put together now, we even still have the same weird super jumps if you climb a block while jumping.  There may be some slight feel differences but it's very very similar.

One of the glitches that I'm starting to like but will probably tone down or get rid of is that on 45 degree slopes you automatically slide down.  It's fun to slide down a long ramp, though.  Right now the player applies no direct "movement friction" to the ground when they are standing.   Any friction is based on their feet touching the surface and not taking into consideration that a person would use their muscles to hold position.  Still, I think jumping down and hitting a 45 degree slope and sliding a bit are ultimately right and I will try to keep that while making normal walking better.  45 degree slopes are pretty steep in real life but we could all probably stand still on them.  The high slopes we absolutely slide down and I'm fine with that.

Regular climbing...

I had a pretty major "setback" with this one.

The old ability to climb was really due to exploiting a glitch in how collisions were done for the regular camera.  Because of the way block penetration was resolved, it was possible for our feet to hook on the tops of blocks even if we physically shouldn't have been able to penetrate that far.

Here is a roughly drawn example of what I mean:


If the green is the player and the blue blocks are a beam ladder, we'd be able to penetrate just slightly and our feet could catch on the block.  Jumping simply took us up, then... and the contact resolution kept our head from hitting the blocks above.

Well, in the real physics engine this isn't possible.  Contacts are all resolved together and even if I do catch the foot-hitting-lip, I also catch the head-hitting-lip and you can't go up.

As disappointed as I was with this earlier tonight, it's for the best.  After thinking about it for a while, I was about to start hitting some other problems with this approach that were even less solvable.

In order for your character to have physical presence in the world, the avatar is positioned with the player.  If you look down, you can see yourself.  When you can move your hands then you will see them too, along with your arms and so on.  This is kind of necessary for manipulating objects in the world without a disembodied feeling.

To make this work, when you look down, the avatar bends at the head and waist.  Right now, the head is not a separate collision object so if you are toe into a wall, you actually put your head inside the wall.  Presuming I fix that problem (and it's on the list), imagine what happens if you are climbing a ladder and want to look down.  Your feet would move out and you'd fall down, head hitting each rung of the ladder on the way down.  Sounds unpleasant.

Furthermore, looking left or right would still turn your whole body as it does now.

I think the real solution is to go ahead and start introducing the other body parts as physical objects.  The arms+hands, legs+feet, and head were sort of going to be needed eventually anyway but I was hoping to get to put it off.  There is also an implication that I need to figure out at least a partial animation solution.

Then when you climb a wall or a ladder, it's because your hands and feet are colliding with the appropriate things to make you climb.  The game knows you are "climbing" and other actions like looking around will now mean something different.  Perhaps looking left and right simply turns your head instead of your whole body.  Looking down will do different things depending on which way you are looking but looking directly down in front of you is likely to be not that productive.

...it's better but it's a lot of work that I was hoping to put off until a later release.
Logged
ayoriceball
Donators
Jr. Member
***
Posts: 99


Control Magic


View Profile
« Reply #1 on: April 08, 2013, 08:56:53 PM »

You should include a key to turn your head seperately from your body, just like in Arma.
Logged

From Bay12Forums
Don't dwarven ladies know they're beautiful the way they are? They don't need to starve themselves to look like those elven bitches.
I have a skin, a potato has a skin, therefore, I'm God
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #2 on: April 08, 2013, 09:12:20 PM »

My head hurts after reading... about the ladder. Oww. Speaking about hurting, I'm sick. yuck. When you said that you needed to add a body with physical limbs, I imagined the arms/legs trying to detect edges when going up a ladder.
Logged

Mythruna: Don't you dare read any posts I made before 2014.
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #3 on: April 09, 2013, 04:19:06 AM »

Last week or so, I finally integrated (physics pun intended)
That may be the nerdiest joke i ever heard.
If you look down, you can see yourself.  When you can move your hands then you will see them too, along with your arms and so on.  This is kind of necessary for manipulating objects in the world without a disembodied feeling.
YES! i feel like no game does this... if i look down i want to see my feet. if i look to the lower side, i want to see my hands. it just makes sense.

Edit: Also, these kind of updates make my morning. Keep it up Paul  Smiley
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #4 on: April 09, 2013, 08:39:44 PM »

This is a very large update if you think about it!
Logged

Mythruna: Don't you dare read any posts I made before 2014.
Sean
Donators
Hero Member
***
Posts: 598



View Profile
« Reply #5 on: April 09, 2013, 09:43:16 PM »

I too like being able to see myself when I look down. I can't think of any other game where I can see my own hands, but it sounds cool none the less. I appreciate you keeping us posted.

Edit: I think I will start signing my posts for now on.  :p

Sean
« Last Edit: April 09, 2013, 09:44:59 PM by Sean » Logged

"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: April 10, 2013, 04:44:45 AM »

This is a very large update if you think about it!

Ya, bigger all the time, it seems. Wink
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #7 on: April 10, 2013, 01:09:30 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #8 on: April 10, 2013, 02:59:27 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update

I keep half-feeling that way.  There are some noteable alpha-things that I'm definitely not including, though.  AI being one and real crafting being another.  Still, more stuff seems to slip into the list every day.

I think I'm going to be taking a small side-step from the physics issues and start porting some of the other features that will be needed for this release like inventory, world editing, etc..
Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #9 on: April 10, 2013, 03:26:13 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update

I keep half-feeling that way.  There are some noteable alpha-things that I'm definitely not including, though.  AI being one and real crafting being another.  Still, more stuff seems to slip into the list every day.

I think I'm going to be taking a small side-step from the physics issues and start porting some of the other features that will be needed for this release like inventory, world editing, etc..
Paul, you can do it Cheesy ( even though you already knew that you could. ).
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #10 on: April 10, 2013, 04:22:46 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update
i really really hope your right ben (i cant wait to do more than build in this game)  Smiley
Logged

ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #11 on: April 10, 2013, 06:11:20 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update

I keep half-feeling that way.  There are some noteable alpha-things that I'm definitely not including, though.  AI being one and real crafting being another.  Still, more stuff seems to slip into the list every day.

I think I'm going to be taking a small side-step from the physics issues and start porting some of the other features that will be needed for this release like inventory, world editing, etc..
then will their be fake crafting i the mean time?   
Logged

pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #12 on: April 10, 2013, 06:21:42 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update

I keep half-feeling that way.  There are some noteable alpha-things that I'm definitely not including, though.  AI being one and real crafting being another.  Still, more stuff seems to slip into the list every day.

I think I'm going to be taking a small side-step from the physics issues and start porting some of the other features that will be needed for this release like inventory, world editing, etc..
then will their be fake crafting i the mean time?   

I'm not sure what you mean.  You kind of already have fake crafting.  Minimal crafting is not far behind the next release anyway.  I will need to have some items to use for killing mobs.  In as much as that crafting might be short-term "dumbed down" a bit then yes there may be "fake crafting" at that point.  I kind of hope it's not too fake, though.
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #13 on: April 10, 2013, 06:35:00 PM »

At this rate, the next release will be alpha! Tongue
Thanks for the update

I keep half-feeling that way.  There are some noteable alpha-things that I'm definitely not including, though.  AI being one and real crafting being another.  Still, more stuff seems to slip into the list every day.

I think I'm going to be taking a small side-step from the physics issues and start porting some of the other features that will be needed for this release like inventory, world editing, etc..
then will their be fake crafting i the mean time?   

I'm not sure what you mean.  You kind of already have fake crafting.  Minimal crafting is not far behind the next release anyway.  I will need to have some items to use for killing mobs.  In as much as that crafting might be short-term "dumbed down" a bit then yes there may be "fake crafting" at that point.  I kind of hope it's not too fake, though.
awesome can't wait for that update to be released  Smiley
Logged

Teknonick
Sr. Member
****
Posts: 438


View Profile
« Reply #14 on: April 10, 2013, 07:35:08 PM »

I love you Paul. 'Nuff said.

ANYWHO, you know me, I can't stop talking... except when I'm in person.... Will you enable a feature where you can hold down a key , that when you push WASD you move the upper part of your body? AKA, I hold down F and then S, then I'll be leaning back awkwardly. If I let go, I'll still have this weird stance, but be able to move around like that... maybe slower due to my weird posture. So that way I could lean forward and over the window to look down! I always hated that in games where you had to climb into the window in order to look down... even 20 meters you couldn't see if the window was small...

Also, maybe another key you have to hold (Or toggle) to enable that muscle thing you were talking about, so that you could 'allow' yourself to slide down, or 'disallow' and climb up slowly.

Also, +1 for bumping head on your way down the ladder xD... I hope it's as slow IRL. I've found climbing ladders in games to be realistic, until I actually climbed one. You go A LOT slower IRL than I expected. Probably due to the fear, but it's hard to match your foot up with each and every step you see. Not a big request, but just one of those little things that add more elements to your game... (Plus, it also adds in the ability to have a spell that allows you to climb faster xD YAY! for dwarves, ladders and climbing spells!)
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!