[SOLVED] FTEQW and ode - physics objects are slow
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
[SOLVED] FTEQW and ode - physics objects are slow
I encountered a very strange issue with ode physics in FTEQW engine.
1) I created a simple 256x256x4096 (widthxdepthxheight) map and I added at the very top a physics_ball entity in radiant
2) In ssqc I add this:
3) Run and... object falls slow, like a feather!
With Darkplaces engine (same map, same code) physics entity falls normal, like a normal physics object. If I query fte with physcs_ode_enable, console says 1, so physics is enabled. I tried every dll possible, but for win32 fte wants ode_double.dll, libstdc++-6.dll and libgcc_s_sjlj-1.dll. With DP I had to rename libode-3.dll(that comes with the darkplaces autobuild package) to libode1.dll to make it work. With dp no other libs was needed for physics.
I also tried to toggle mass, friction and bouncefactor on|off but nothing changed.
Thanks guys
1) I created a simple 256x256x4096 (widthxdepthxheight) map and I added at the very top a physics_ball entity in radiant
2) In ssqc I add this:
- Code: Select all
void physics_ball()
{
self.classname = "ball";
self.movetype = MOVETYPE_PHYSICS;
self.solid = SOLID_PHYSICS_SPHERE;
physics_enable(self,TRUE);
self.mass = 15.4;
self.friction = 0.4;
self.bouncefactor = 0.1;
precache_model("models/ball.iqm");
setmodel(self, "models/ball.iqm");
setorigin (self, self.origin);
}
3) Run and... object falls slow, like a feather!
With Darkplaces engine (same map, same code) physics entity falls normal, like a normal physics object. If I query fte with physcs_ode_enable, console says 1, so physics is enabled. I tried every dll possible, but for win32 fte wants ode_double.dll, libstdc++-6.dll and libgcc_s_sjlj-1.dll. With DP I had to rename libode-3.dll(that comes with the darkplaces autobuild package) to libode1.dll to make it work. With dp no other libs was needed for physics.
I also tried to toggle mass, friction and bouncefactor on|off but nothing changed.
Thanks guys
Last edited by toneddu2000 on Wed Nov 19, 2014 4:03 pm, edited 1 time in total.
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
Re: FTEQW and ode - physics objects are slow
Sorry guys, I just now discovered I put this thread in the wrong section. I'm so obsessed with CSQC that I can't think of anything else!
Could please an administrator relocate it in the Engine section?
Thanks and sorry again
Could please an administrator relocate it in the Engine section?
Thanks and sorry again
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
Re: FTEQW and ode - physics objects are slow
Maybe problem in mintic and maxtic?
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: FTEQW and ode - physics objects are slow
Hi Max_Salivan, I've already read you and Spike talking here about sv_mintic and sv_maxtic but I couldn't figure out if those are cvar or some qc vars to edit.
Could you please tell me more?
Thanks
Could you please tell me more?
Thanks
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
Re: FTEQW and ode - physics objects are slow
ok this is a little wierd. I set via console
Don't ask me how I found out these values... I just set and tried... many times!
And ball now falls "ALMOST" good (not perfect as DP, however, still a little "cartoonish") but, if I add at the ball entity in quakec
The ball doesn't show anymore or it goes through the floor!
If I comment setsize, compile qc and reload map, physics works again
Moreover, if I edit the setsize() function, fte.cfg reloads itself.
What's the purpose of fte.cfg? I mean, if I set on config.cfg or autoexec.cfg sv_mintic and sv_maxtic, engine ignores them.
I had to write them via console or (to make the change permanent) to set them in fte.cfg but this file, if .dat files changes, reloads itself! Where should I put those values? Should I hardcode them? Are those values set right for ode physics? What about sv_limittics?
Too many questions for today! If anyone has ever tried that please reply, thanks
- Code: Select all
sv_mintic 0.07
sv_maxtic 0.1
Don't ask me how I found out these values... I just set and tried... many times!
And ball now falls "ALMOST" good (not perfect as DP, however, still a little "cartoonish") but, if I add at the ball entity in quakec
- Code: Select all
setsize(self,'-30 -30 30','30 30 30');
The ball doesn't show anymore or it goes through the floor!
If I comment setsize, compile qc and reload map, physics works again
Moreover, if I edit the setsize() function, fte.cfg reloads itself.
What's the purpose of fte.cfg? I mean, if I set on config.cfg or autoexec.cfg sv_mintic and sv_maxtic, engine ignores them.
I had to write them via console or (to make the change permanent) to set them in fte.cfg but this file, if .dat files changes, reloads itself! Where should I put those values? Should I hardcode them? Are those values set right for ode physics? What about sv_limittics?
Too many questions for today! If anyone has ever tried that please reply, thanks
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
Re: FTEQW and ode - physics objects are slow
those two cvars MUST have exactly the same value if you are using ODE.
failure to do so can result in instability, like the ball suddenly flying off across the room. Additionally, use smaller values to help prevent stuff from passing through walls (10 fps is far too high, try values like 0.01).
configs are reloaded if the default.cfg appears to be installed in a different location. this is intended to prevent switching gamedirs between total-conversions from messing things up, or something. I'm not going to pretend to know what you're doing to trigger it. It has nothing to do with .dat files changing.
failure to do so can result in instability, like the ball suddenly flying off across the room. Additionally, use smaller values to help prevent stuff from passing through walls (10 fps is far too high, try values like 0.01).
configs are reloaded if the default.cfg appears to be installed in a different location. this is intended to prevent switching gamedirs between total-conversions from messing things up, or something. I'm not going to pretend to know what you're doing to trigger it. It has nothing to do with .dat files changing.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: FTEQW and ode - physics objects are slow
Thanks a lot Spike, that worked!
I set
If you want to place emphasis on physics object (for properies like .bouncefactor and .friction) I suggest to use something between 0.03 and 0.049. From 0.05 and above, objects seem don't care about physics properties too much (engine ignores pretty much every physics .field).
The problems appear when player press the ball against the wall: the ball reacts for a second to the push force and then disappears.
I think it's something that deals with dynamic collision at low level
fte, default, config or default? Woa that's A LOT of cfg!
Thanks again for your vital help as alway Spike and thanks to Max_Salivan for the input!
I set
- Code: Select all
sv_maxtic "0.039"
sv_mintic "0.039"
If you want to place emphasis on physics object (for properies like .bouncefactor and .friction) I suggest to use something between 0.03 and 0.049. From 0.05 and above, objects seem don't care about physics properties too much (engine ignores pretty much every physics .field).
The problems appear when player press the ball against the wall: the ball reacts for a second to the push force and then disappears.
I think it's something that deals with dynamic collision at low level
I'm not triggering anything, I was just trying to understand which cgf using!I'm not going to pretend to know what you're doing to trigger it.
fte, default, config or default? Woa that's A LOT of cfg!
Thanks again for your vital help as alway Spike and thanks to Max_Salivan for the input!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest