Page 1 of 1

Compiler error with Bullet 2.82 [split]

PostPosted: 31 Oct 2013, 20:27
by qubodup
I can't compile any more using
{l Code}: {l Select All Code}
./waf clean && LDFLAGS=-lboost_system ./waf configure build install

since yesterday on arch linux
{l Code}: {l Select All Code}
 -> task in 'lipsofsuna' failed (exit status 1):
   {task 140417432390544: cxx physics-terrain-collision-algorithm.cpp -> physics-terrain-collision-algorithm.cpp.1.o}
['/usr/bin/g++', '-g', '-Wall', '-DHAVE_CONFIG_H', '-pthread', '-pthread', '-I/home/qubodup/src/git/lipsofsuna/.build', '-I/home/qubodup/src/git/lipsofsuna', '-I/home/qubodup/src/git/lipsofsuna/.build/src', '-I/home/qubodup/src/git/lipsofsuna/src', '-I/usr/include/luajit-2.0', '-I/usr/include/bullet', '-I/usr/include/OIS', '-I/usr/include/OGRE', '-I/usr/include/OGRE/Terrain', '-I/usr/include/OGRE/Paging', '-I/usr/include/AL', '../src/lipsofsuna/extension/physics-terrain/physics-terrain-collision-algorithm.cpp', '-c', '-o', 'src/lipsofsuna/extension/physics-terrain/physics-terrain-collision-algorithm.cpp.1.o']

Re: LoS dependency list for Arch Linux users

PostPosted: 31 Oct 2013, 20:58
by amuzen
Could you perhaps pastebin the rest of the build messages? These are not the ones that tell what's going wrong.

Re: LoS dependency list for Arch Linux users

PostPosted: 31 Oct 2013, 21:52
by qubodup
Sure, my bad!
{l Code}: {l Select All Code}
$ ./waf clean && LDFLAGS=-lboost_system ./waf configure build install &> this.txt
$ curlpaste this.txt


http://codepad.org/Y4j4UhiL

Re: LoS dependency list for Arch Linux users

PostPosted: 31 Oct 2013, 23:10
by amuzen
This is probably going to take some time to fix since Bullet has broken the API again, and this time pretty badly. I might have to rewrite the terrain physics system since there doesn't appear to be an easy fix that would work correctly.

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 03 Nov 2013, 10:12
by amuzen
It should compile and run now, though the physics simulation behaves noticeably differently with Bullet 2.82. Gravity feels somewhat different and jumping forces were so different that I had to add a quick and dirty workaround for them.

There was also a serious bug in Bullet 2.82 that caused a crash every time two objects collided in LoS. Fortunately, I managed to find the issue in their code and worked around it in mine. I submitted a bug report about it, even though it doesn't really matter anymore whether they'll fix it.

There were also various other issues that were the fault of LoS making assumptions about collision response behavior that don't seem to hold anymore. There might still be some more such issues left, so if physics are behaving strangely, let me know.

Edit: I split the topic.

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 03 Nov 2013, 15:22
by qubodup
Works now, thanks.

I noticed two issues:
1. Player speed feels very slow compared to previous versions.
2. On new game, the player dies (probably from falling, because the ground below their feet does not exist yet).
This video shows both: http://youtu.be/AWckO2ZoVMo

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 03 Nov 2013, 20:33
by amuzen
The slowness actually seems to be random. Sometimes the simulation is close to normal, but occasionally you get a run in which the player and other actors are several times slower than normally. Interestingly, items seem to behave normally regardless of how broken the actors happen to be. I still need to investigate a bit further, but I think that I'll figure it out soon.

Dying after spawning seems to happen because the velocity of the player isn't cleared correctly while it's waiting for the terrain to load. Because of that, the player may "fall" to the ground at varying speeds when the spawning code places it on the loaded terrain. I got a fix for this already, but I'll take care of the slowness issue before pushing it.

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 04 Nov 2013, 00:21
by amuzen
OK, I think that I got it fixed now. I did 10 test runs to verify the behavior and it seemed to work consistently. Jumping forces and such also seem to now work about the same as with older versions of Bullet.

I also pushed the fix for the player character taking damage when spawning.

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 04 Nov 2013, 04:48
by qubodup
No more death after ground loads.

I believe the forward movement speed is slower than before. It forward movement distance seem to not match the step animation.

Shooting while walking is funny. The character is targeting somewhere else. :) (probably known)

Two test videos (in case there's a performance difference, I don't think there is any noticeable).
http://youtu.be/pKbvCqSjpEc (recorded while chromium was running)
http://youtu.be/eF7arZINaLU (recorded when nothing else was running)

Re: Compiler error with Bullet 2.82 [split]

PostPosted: 04 Nov 2013, 17:36
by amuzen
qubodup {l Wrote}:I believe the forward movement speed is slower than before. It forward movement distance seem to not match the step animation.


No idea if it's slower or if it has always been slow, but you're certainly right that it's slow. I tried to increase the speed a bit.

qubodup {l Wrote}:Shooting while walking is funny. The character is targeting somewhere else. :) (probably known)


Yeah, this a known issue. Fixing it would require some advanced animation features, such as IK or dynamically switching between animations depending on whether you're running or standing, so it's like this for now.

qubodup {l Wrote}:Two test videos (in case there's a performance difference, I don't think there is any noticeable).
http://youtu.be/pKbvCqSjpEc (recorded while chromium was running)
http://youtu.be/eF7arZINaLU (recorded when nothing else was running)


Mostly seems to work as intended to me. There might be some extra lag caused by the terrain physics changes, but it's not worth it to optimize at this point.