5380 Posts in 183 Topics- by 107 Members - Latest Member: Mik1

Pages: 1 ... 25 26 [27] 28 29 ... 48
  Print  
Author Topic: Whats in your RIG?  (Read 17123 times)
Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #390 on: March 08, 2010, 05:25:35 am »

With motor_weak on 1.0, the torque should decrease based on how fast the wheels are spinning: twice as fast means half as high motor torque. This is should be what an absolutely perfect dynamic gearbox could give (100% motor torque preservation, but gearing to higher speed means less torque). I guess it is a bit difficult to tweak the motor_torque and drag to get the wanted result, but combined with pacejka wheel tire simulation (which will make it possible to do burnouts at start and similar), it might be possible to leave motor_tweak at 1.0, and still get a fun driving experience. I don't know Undecided

Try compiling now... I also made it possible to destroy the molecule joints (took one line of code, plus some compilation error fixes). Grin
While writing this, I made a new commit... Grin (the problem was that the "GLfloat"s didn't have "const" before them).


about the "1337": Yes, kinda. I had to specify something to fool rcx thinking it got scripting implemented, and finally decided on a pointer to a... number Wink

update: second new commit: I forgot to add the joint even processing file... Tongue
Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #391 on: March 08, 2010, 05:38:40 am »

Quote
With motor_weak on 1.0, the torque should decrease based on how fast the wheels are spinning: twice as fast means half as high motor torque. This is should be what an absolutely perfect dynamic gearbox could give (100% motor torque preservation, but gearing to higher speed means less torque). I guess it is a bit difficult to tweak the motor_torque and drag to get the wanted result, but combined with pacejka wheel tire simulation (which will make it possible to do burnouts at start and similar), it might be possible to leave motor_tweak at 1.0, and still get a fun driving experience.
Well that should be the case, but the thing is that when the car accelerates, the front wheels lose traction due to the shift of balance/weight and this also happens whilst the car turns (inner wheels lose traction more than outer wheels) ... so they seem to rotate faster than they should and the car doesn't straighten up.

maybe with pacejka that will be solved. let's hope. then I can up motor_tweak a bit (not to 1.0 ... maybe a little lower, like 0.1 or something) and we can use motor_tweak for base acceleration and for tweaking turbo power Wink

Quote
Try compiling now...
Still doesn't compile.

edit no wait, it does. silly you. Tongue

Quote
(the problem was that the "GLfloat"s didn't have "const" before them).
...wut. I tried adding those in (I noticed them on the debug_draw_boxes and figured since the code changes require you to define variables when required (integer, constants, boolean, etc) that I needed to add them. :/

odd, since you didn't delete the debug_draw_sphere_part line and it works, yet I removed that bit of code in rescale and it worked.

LOL @ molecules being destroyable. you should have added that in ages ago. Tongue


I'm going to have to figure out now how to add my own objects back in with the code changes, since you changed object space and such. :/ probably won't be too hard once it's figured out Smiley


btw, even with motor_torque at 0, my car's drag means it.... gets to about 75/80 m/s before really struggling to get any faster. it also slows the hell down when cornering. xD (which is good imo). Tongue
Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #392 on: March 08, 2010, 05:56:24 am »

Does the front wheel lift with the "torque_compensator" enabled? Because that's one of the main things it was meant to solve.

Quote
odd, since you didn't delete the debug_draw_sphere_part line and it works
hmm... Me forget. (removes)

Quote
LOL @ molecules being destroyable. you should have added that in ages ago.
Yes, and I also should have made bodies destroyable (so things actually disappear). - that's next after making a conversion to "Body" class from struct. Wink

When adding new objects, you should be able to simple put everything in "loaders/objects.cpp" and "shared/objectt.hpp"... I think


wait...
Quote
btw, even with motor_torque at 0, my car's drag means it....
If you actually meant motor_torque... then I have seriously screwed up the car physics somewhere! Shocked
Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #393 on: March 08, 2010, 06:04:33 am »

typo. motor_tweak. -.-

hard to remember which is which sometimes Tongue

Quote
Yes, and I also should have made bodies destroyable (so things actually disappear). - that's next after making a conversion to "Body" class from struct. Wink
and you will add toggles so I can change if stuff is destroyed or when it's destroyed? Wink or am I just dreaming?

Quote
When adding new objects, you should be able to simple put everything in "loaders/objects.cpp" and "shared/objectt.hpp"... I think
I think I had to edit like four files last time I tried xD.
loaders/objects.cpp (to actually define the object itself)
events/events.cpp (for the "script_struct" stuff that seems to be needed for spawning via keys
shared/script.cpp and script.hpp to add the script values (boolean toggles) to make sure it works.

also for spawning via keys, where did you move the defining of directories for objects? This line used to be in main.c and was required for the game to spawn stuff through keys. is this still needed or did you remove it?

Code: (this stuff)
//load box for online spawning
box = load_object((char *)"data/objects/misc/box");
sphere = load_object((char *)"data/objects/misc/sphere");
oddbox = load_object((char *)"data/objects/misc/oddbox");
bumbleball = load_object((char *)"data/objects/misc/bumbleball");

Of course, this is just from what I did on the rescale ... I just looked for everything to do with the object spawn and cloned it for new objects. I found I had to not only define the object through loaders.c for loading, I had to define the script (boolean) and set a default value (false/null/whatever it was O_o), add the object to the list of script_structs (so the game could keep track of it like it could the other objects) and then if I wanted to have a key to spawn it, I had to add it to the list of file pointers so the game "knew" where the script was. O_o
I'm not sure if -all- the changes in these files are needed now but it's what I used to do... so... O_o

Quote
Does the front wheel lift with the "torque_compensator" enabled? Because that's one of the main things it was meant to solve.
No, they don't lift. Tongue


btw

Quote
> TODO: change ODE allocation flags...
 > TODO: create world space using dQuadTreeSpaceCreate() - much better performance!
hm? -curious- O_o
« Last Edit: March 08, 2010, 06:16:56 am by Mac » Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #394 on: March 08, 2010, 08:16:16 am »

*some ping-pong later* I'm back.

It will be possible to define a threshold and health buffer for the body. force exceeding the threshold will hurt the buffer. when the buffer reaches 0, an even twill be generated. when the event is generated, a custom (for that body) script is run. RCX currently lacks scripting and will just remove the specific body instead.

Quote
also for spawning via keys, where did you move the defining of directories for objects?
Ah, yes where was that... *starts searching through code*
Ok *finally finds it* It seems I just moved it around inside main.

To spawn it from keyboard (after actually hacked it into the code) you will need to specify the pointer inside "shared/threads.hpp", add it to "events/events.cpp", and load it from "main.cpp"... It's getting more and more complicated Wink But this is just some crap until scripting comes online...

Quote
> TODO: change ODE allocation flags...
Instead of specifying that ode should enable everything, one can customize it. This isn't needed right now (thus I haven't bothered looking at what flags are needed...), but could be nice to change.
*just noticed that It actually used specific flags*
ugh... Sad

Quote
> TODO: create world space using dQuadTreeSpaceCreate() - much better performance!
geoms can be stored in 4 different kind of spaces. "simple" is normal, but the three others provides optimization of collision detection. One is "hash table" space, which doesn't need any extra configuration (the one used now) but gives some optimisation, another is "quad tree" which requires some tweaking, but should give even better performance in this situation (landscape-like placement of things), the final one "Sweep And Prune algorithm" I didn't know it had until today, and I'm not sure what kind of performance it could give...

http://opende.sourceforge.net/wiki/index.php/How_Collision_Detection_Works
(Broad-Phase Collision Detection)


*some dinner later* back again...
Just a quick look at the "motor_tweak" variable: normally, it is 1.0. In this case the motor torque will decrease in a logical way as the speed of the car increases:
0km/h -> 100km/h -> 160km/h -> 180km/h -> 185km/h -> 186km/h
Setting it to 0 (disabling decrease of torque), will make the car accelerate in a rather constant way:
0km/h -> 100km/h -> 200km/h -> 300km/h -> 400km/h -> 500km/h
(Of course, this is in vacum)

Wait... Maybe I'm looking at this from a completely wrong way? Maybe the torque from the motor to the wheels should be constant? Maybe setting motor_torque to 0 would be more realistic.

I must think a bit about this...
update: No, motor_tweak of 1.0 is the realistic one.
« Last Edit: March 08, 2010, 09:12:35 am by Slinger » Logged

Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #395 on: March 09, 2010, 02:00:06 am »

(decided to write a new post to not explode the last one too much)

I've gotten some problems with implementing breakable bodies: I had assumed it would be possible to easily get the total forces added to bodies from ode. I was wrong. My first assumption was to use a function called "dBodyGetForce", but this idea got two major flaws:
1) it only returns a the total sum of all forces. This means a box squeezed between a wall and a car (which should be crushed) will have a force of (0,0,0), because the force from the car and the force from the wall will take each other out (since the box is standing still).
2) ode only provides this function for read forces one has manually applied. since ode itself adds force and clears them inside the "QuickStep" function, so dBodyGetForce doesn't get the collision-generated force anyway.

However I got some extraordinarily good news!
When searching for a way of solving this problem, I've found a solution that gives an extra bonus! Grin
Basically, what we want (to simulate breakable bodies) is to get all forces generated by contact points ("collisions"). These "contact point"s are actually transformed into "contact joints" before the simulation (they are extended with the friction and softness/hardness data from inside my custom Geom class (used to be: geom_data).

Here's the fun part: the way breakable joints are simulated in rcx is by requesting ode to provide force/torque feedback from joints. Since even collisions are joints, it is possible to request ode to provide feedback for the collisions! And guess what? Since this will not depend on the bodies giving their forces, but joints giving their force, it will be possible to get the forces generated for geoms too! This way, one can place a geom (without a body = less CPU usage!) as a building locked to the ground, and then read the forces applied between this geom and colliding geoms. So instead of having a body with a geom, hold to the ground by a joint (precision problems and cpu usage), a single geom can be placed instead, and when it gets enough forces, it can be paired with a body and allowed to "break" into a moving piece!

I have always dreamed of some way of reading force added by geoms, but I didn't know the answear would be this obvious (or easy)! This way it will be possible to simulate each window in a building as a unique breakable piece, and without and precision problems (and probably almost no cpu usage)!

This is freaking unbelievable! Now I just gotta work out a system for taking car of processing all needed feedbacks! Cheesy


(btw: I'll probably be gone tomorrow and few days from that, maybe I'll still be able to do some coding though...)
Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #396 on: March 09, 2010, 07:02:04 am »

Lol. So basically, standalone building = one big simple body. When hit with enough foce, it's replaced with smaller bodies.

But how would that work if the top of the building is hit compared to the bottom? Would the entire building still have to be replaced with smaller bodies as required? I'm sure you can work it out.

Probably something as simple as a building being hit is replaced with four smaller bodies in the shape of the same building, and each hit piece of that breaks into smaller pieces, and so on and so forth. I expect to see lots of funky screenshots of "Chunks" being successfully dislodged without the thing automatically toppling. xD

Quote
I must think a bit about this...
update: No, motor_tweak of 1.0 is the realistic one
Does an object not restricted by drag increase in velocity infinitely? Wink

Maybe having motor_tweak on 0.0 is unrealistic in that the car will accelerate in a linear fashion, but drag itself is what changes this linear drag into an exponentially decreasing force. Higher velocity + drag = more power required to accelerate.

Motor_tweak on 1.0 and drag on 0 may well act the same as motor_tweak on 0.0 and drag on 1. From what I've been doing, the act rather similarly - as I said, my car has a torque output of 150 and motor_tweak of 0. It accelerates pretty quickly but then at higher speed drag slows the rate of acceleration - the car gets to about 80 / 90m/s (about 200mph) and struggles to get any higher. Having worked out the torque limit itself, the car should be able (with infinite road and no drag) to get to about 400mph rather easily, but the car's drag means it doesn't.

Is that not realistic? Wink

Also higher motor_tweak means more torque required to give the car a high end speed. This in turn m eans the car has TOO MUCH torque at low speed, resulting in the infamous car-flipping, and not enough torque at higher speed.

Wink

Maybe motor_tweak CAN be used to assist with achieving "realistic" acceleration but having it set on 1.0 means it loses torque too quickly at high speed .... also that infinite drift thing I mentioned, which doesn't happen when motor_tweak is on 0.0 >_>;


And I'm at the library xD so I can't do anything. Take a break. I want to see your amazing building some time Tongue maybe you could ... y'know ... use it to model a "broken" Rollcage car that sits in the sandbox and will eventually lose its wheels when hit around enough? Wink


That reminds me. I should try to make an actual standalone wheel. The easy part is creating the cylinder ... >_> but adding quadstrips to make the rim is not. Could theoretically use two very long cuboids from one side of the wheel to the other side (inner to outer) but..... yeah.


-building explodes.- BOOM. btw multithreading can handle a lot of buildings you know. I got 8 yesterday before anything weird happened (which was the camera shaking. -_-) lol.
« Last Edit: March 09, 2010, 07:05:43 am by Mac » Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #397 on: March 09, 2010, 08:30:09 am »

(I paused and had dinner in the middle of writing this post...)

Quote
But how would that work if the top of the building is hit compared to the bottom? Would the entire building still have to be replaced with smaller bodies as required?
Good question. In fact it's the perfect thing to describe the whole system with! The following would be a simple (rollcage-like) building:
When the spawn function from the script is run, it does not create any body at all! It just places one geom for the main building. And sets up a damage threshold and buffer and script to run when the buffer reaches zero.
When the "event script" gets called, it removes this geom and replaces it with smaller loose parts (and spawns an explosion). These parts will be pairs of one geom (for collision detection) and one body (to allow it to fly around).

This way, the building will not have a body, nor any joints to keep it locked to the ground, and when it gets destroyed, it will still just be a few pairs of geom+body which will only take the same amount of performance as the good old "simple box".

I know what you're thinking, "not the most realistic and interesting building"...? Wink
Well, that was just an introduction! lets instead build a classic rollcage building!
spawn script) creates no bodies, but several geoms: boxes/capsules for pillars, and a few boxes to describe the strange building itself. the pillars gets force threshold and health buffers (while the other geoms are indestructible).
event script) called for each pillar geom, keeps track of how many pillars left, and one there are 0 pillars left, call some other script
some other script) takes car of lowering the building geoms into ground for each step, spawns an explosion, and creates a few pieces of the building (one geom+body for each).
pieces events) when the geom of a piece of the building gets a health buffer of 0, it is replaced by several smaller pieces (again a pair of one geom and one body, so it's fee to move).

finally, an attempt on a more complex creation: a more realistic building:
spawn script) creates no bodies. Using some kind of looping algorithm it divides the building into several geoms. and also puts geoms to simulate windows - all geoms got a force threshold and buffer.
window geom event script) remove the window (play sound of breaking window and spawn a "crushed glass" animation where it used to be)
other geom event script) make the piece of the building moveable by creating a body and attaching the geom to that body (and play some sound).
piece event script) well, the same as the last example.

It will be necessary to keep track of what geoms are above the one breaking, so that if just the bottom of the building is destroyed, the top falls as well (and doesn't remain floating).

(I know you already know this, but: geom=collision geometry, body=moveable mass (assign geoms that should move to it). - since it now will be possible to read forces put on geoms without bodies, one only needs to add bodies once geoms are free to move)

---

Quote
Does an object not restricted by drag increase in velocity infinitely?
It does, but it will not accelerate in a linear fashion. Looking at it from an energy point of view, the needed energy for getting the velocity V is: M*V²/2. That means getting twice that velocity requires: M*(V*2)²/2=M*V²*2²/2. - 4 times as much energy.
Basically, the faster a car goes, the less force is it able to accelerate with.

But right now, the tire simulation isn't the best... Hopefully it will be possible to have a low drag, motor_tweak of 1.0, and high motor_torque. And the only problem it will cause is a bit of wheelspin at start.

Quote
higher motor_tweak means more torque required to give the car a high end speed. This in turn m eans the car has TOO MUCH torque at low speed,
Yes, but thanks to some better tire friction simulation, the wheels will spin. At that point it might be necessary to add some kind of antispin... Wink

Quote
use it to model a "broken" Rollcage car that sits in the sandbox and will eventually lose its wheels when hit around enough?
nice idea, would be fun! And given the possibility of making each geom react individual to forces, the main body could be damaged progressively at different parts (front bumpers falling of, rear wing cracking into two pieces and falling of... *drools*)


btw:
Quote
I got 8 yesterday before anything weird happened (which was the camera shaking. -_-) lol.
O_O and given how little performance the new system (that would allow buildings without bodies and without fixed joints - just optimized collision geoms) will take, it might be possible to simulate a whole city! Shocked


edit: I forgot to mention: I'm planing to add a boolean toggle for geoms to indicate if the forces should damage the geom's healt buffer or the body it is attached to (assuming it is attached to a body). this would be usefull if one only got two 3d models for the complete object: complete or broken (instead of having different several models for each part that can be destroyed/damaged/knocked off). it will then be possible to use several geoms to create a collision shape for one body, and then have that single body taking damage from all geoms' collisions (instead of each geom taking damage).


edit2: this is probably the last post before I return. Well, back in a few days, Bye! Smiley
« Last Edit: March 09, 2010, 10:42:23 am by Slinger » Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #398 on: March 10, 2010, 12:15:02 pm »

Interesting O.o

Methinks what could probably be done for the windows is to create the building with gaps (or holes in the sides) and windows (as separate bodies to the building) are placed in those holes.

could work.

I was thinking of asking about how easy it would be to simulate a pane of glass Tongue a big pane of glass that the car could smash through. lol.


btw... x_X

The most recent build might need looking at... I noticed some weird things going on earlier today when I was just messing around with car settings:

1) the jumpy camera thing is STILL happening... on my laptop, anyway. I don't think it's automatically vsyncing even though sync_graphics is enabled. stdout.txt reports an average fps of 98. :/ you probably need to find a better way of syncing the camera to the car... didn't you say the camera was jumping because it didn't update its position the same time as the car does? I dunno. ><

2) At a bit of distance, the car's body (or specficially sides of the boxes) flash, like there's some sort of z-drawing conflict going on. I haven't actually noticed this on my desktop yet - and it doesn't happen on my old rescale build.

3) it seems events aren't completely synced to physics, or something else is going on. You tell me: sometimes the flippers don't reset to the correct positions, and end up either stopping halfway up the sensor geom, or somewhere under the ground. Setting them off again doesn't reset them to the correct position, but to the previous (incorrect) one. sometimes the same thing happens again and the flipper ends up back where it's supposed to be, and sometimes it ends up even higher -.-

And this is happening on my laptop AND desktop. I tried with stepsizes of 0.005 and 0.01, so it's not the stepsize doing it (since if it was, the flipper's position should therefore catch up to realtime when the stepsize time does -.-)

Seems that the script regarding the flipper event is desyncing its correct position due to any random amount of lag - since the game is supposed to automatically catch back up to realtime if a step takes too long to calculate, you'd think that the flipper wouldn't be affected but it is. I'm guessing since the event triggered counts how long the flipper has been moving and stops after that many, it might be that the event is lagging somehow (causing the flipper to incorrectly move further or not as far as it should).
:/

This is definitely due to multithreading. doesn't happen on my old rescale build -.- it worries me because of the possibility of this causing replays to desync due to an event or a script or even the game itself lagging for some reason (or indeed not lagging, if that happened in the race without being noticed).

edit regarding this You added code in internal.conf to sync events to physics, to stop them hanging one another (or something). But... whilst events have to wait for physics to update before sending stuff, that doesn't stop the events thread itself from lagging behind physics - wouldn't that mean that the currently polled events (such as executing a script) would lag? That might be why the flippers don't reset properly. =/


Just saying so you know. :T

edit

Quote
It does, but it will not accelerate in a linear fashion. Looking at it from an energy point of view, the needed energy for getting the velocity V is: M*V²/2. That means getting twice that velocity requires: M*(V*2)²/2=M*V²*2²/2. - 4 times as much energy.
Basically, the faster a car goes, the less force is it able to accelerate with.
I see. o.o;
You make a very valid point.

But, currently, my car's torque is set so low that setting motor_tweak to something as small as 0.05 gives a big impact on the acceleration. I'm not saying that it needs to be on 1.0 but at the least, a small value will work along with drag - like I said, I could probably use motor_tweak to change car acceleration, whilst torque itself can be used for outright top speed - the cars need a bit of drag on them for stability - have you tried to drive the cars with drag on 0? it goes mental, especially if you snake (quick left/right steering in a roughly straight line)

I'm tired. can't be bothered to say much else. xD. can't wait for the buildings though.
« Last Edit: March 10, 2010, 01:25:34 pm by Mac » Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Codie Morgan
RCX Development
Hero Member
*****

Karma: 4
Offline Offline

Posts: 632


XEWEASEL


View Profile WWW
« Reply #399 on: March 11, 2010, 06:48:03 am »


 * is trying to find the current owner of the planetrollcage.com domain.........   (wants it)
Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #400 on: March 11, 2010, 08:38:16 am »

.... o: planet rollcage no longer exists.

-cry.-

shouldn't be too hard to find the domain owner and buy the domain off them. >_>


And I've (sort of) succeeded in downscaling the car from 3m to 1.5m. (as to not have to fiddle with gravity). I say "sort of" because the suspension and tyre friction sucks ass, and the car tends to "tripod" when cornering sharply (inside front wheel comes off the ground, car loses grip, wobbles back straight, wheel comes down, car steers in again, repeat).
:/
Maximum ground speed I've currently managed with the new car is 58m/s - considering that the car is actually half the size of its counterpart, that isn't bad (as technically the car appears to be doing about 380km/h when in fact it's only doing 220km/h. xD)


Also Slinger, is it possible to give objects their own drag values? The default values in internal.conf makes the spheres basically float because they don't weigh anything. xD
Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Codie Morgan
RCX Development
Hero Member
*****

Karma: 4
Offline Offline

Posts: 632


XEWEASEL


View Profile WWW
« Reply #401 on: March 11, 2010, 10:43:23 pm »

planetrollcage.com was renewed by the owner this year, and expires in 2011 =/

I found a email address and emailed him.....
Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #402 on: March 12, 2010, 10:12:06 am »

* Mac waits for response Shocked

In the meantime, I got bored:



Took me FOUR HOURS to make that work, simply because I could not figure out how to change the diameter of the cylinder xD but it does work now (and it collides with the car's wheels too Smiley)

I think I deserve my pizza. :T
Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Slinger
<The Crazy Swede>
RCX Development
Hero Member
*****

Karma: 1
Offline Offline

Posts: 1606


The owls are not what they seem...


View Profile
« Reply #403 on: March 13, 2010, 02:50:57 am »

It collides with car wheels?! Shocked
Did you use a cylinder or capsule?


hmm... oh well, maybe ode got collision detection for cylinders now?



anyway...

1) if the graphics step is performed parallel with the physics step, then the camera will most likely not be updated to the new car position, causing it to "shake". This reminds me, I should really draw some basic explanation of the whole "sync" concept...
2) interesting... I have no idea why this happens (but you're probably right: depth testing problems for some reason).
3) the whole flipper not resetting is a notorious bug... I guess. The problem is that it counts how many steps it has been moved up, and then moves that many steps down. But since event processing no longer is performed a specific amount of times per second, one step up and one step down might not be the same... But since all these objects will be removed when scripting is in, maybe there's no point fixing it anyway... Wink


Anyway, I've made some updates to the cleanup branch: now stuff can be destroyed! I also (last night) added a new object: "pillar". It's a static pillar at first (just a simple geom), but when damaged, it goes dynamic (gets a assigned a body - so it can move around). And when damaged even more, it is destroyed. This is just to demo the most basic possibilities of the new "Collision_Feedback" system.

Awkwardly, some bug appears to have gotten into the collision_feedback system, as arbitrary geoms seems to be toggled to be destroyed (buffer depleted). This causes pieces of the building, and random boxes to suddenly disappear... O_o And I even get warnings from the kernel about "rcx:3476 freeing invalid memtype d0102000-d0112000" - this most be the first time I've manage to make the OS kernel complain about rcx. Grin
(oh, and I probably need to clean up the code for setting geom and body thresholds and buffers)

update: Hah! found the problem!
« Last Edit: March 13, 2010, 04:36:16 am by Slinger » Logged

Mac
RCX Development
Hero Member
*****

Karma: 3
Offline Offline

Posts: 1480


щ(°Д°щ)


View Profile WWW
« Reply #404 on: March 13, 2010, 04:35:59 am »

Quote
It collides with car wheels?! Shocked
Did you use a cylinder or capsule?
I used a sphere the width of the tire (1.7m in diameter) so that the car's wheels can collide with it (since cylinders/capsules don't collide with each other).
That's inside the cylinder itself, so it doesn't actually affect the tire's movement - it's just there as a means of collision. The "rim" boxes also help for some collision. Tongue

Has a tendancy to kick the car up when hit though. I need to find a way to be able to draw boxes that don't actually have any collision -_-'

btw if I ever send you the code, you'll probably notice something odd about how I actually made up the wheel object. For some reason, having a cylinder or capsule as the first object in a body causes it to not spawn correctly (doesn't spawn at co-ordinates in objects.lst and thus defaults to spawning at location 0, 0, 0 ... >_>) so I had to improvise.

The wheel could do with some optimising anyway XD.

Quote
1) if the graphics step is performed parallel with the physics step, then the camera will most likely not be updated to the new car position, causing it to "shake". This reminds me, I should really draw some basic explanation of the whole "sync" concept...
2) interesting... I have no idea why this happens (but you're probably right: depth testing problems for some reason).

OK, I've sussed that both of these are related to not syncing graphics. My desktop automatically vsyncs the game (due to settings in nvidia control panel) but my laptop doesn't, what with ATI being ATI and their catalyst control centre refusing to install on my laptop so I can enable it >_>

so even though graphics_sync is enabled, my laptop doesn't sync the graphics. I've had nether problem occur on my desktop even though when I run the game fullscreen (1600x900) it runs at about 30fps (and would jump about otherwise Wink)

I think the depth testing may be a similar thing - maybe because graphics isn't synced, it's updating the drawn locations of some of the carboxes but not some others (the flashing only occurs at distance and I believe it's because of the way I modelled the car body - I have gray bits on the car that pass through it - that's probably what is being drawn at points). so, it may not happen once VBO is used since the car will be drawn with one body, rather than a combination of several carboxes.

LOL @ complaint about RCX in your OS. Now you know how I felt on XP Wink

and YOU'RE MAKING ME UPDATE AGAIN D: I spent all last night hard-coding a little easter-egg something-something into my RCX ... I'm sure a little copy/pasting won't hurt but I want to get it done and show you it, as it's a nice and random concept Wink

btw when the boxes and stuff get destroyed, they just disappear? xD
Logged

<RollCageX - My Development Documentation. Last updated 12th August 2009>
New updates: RCX 0.05 build 3, Vostok Scud, Desert Sandbox.

- Quote Of The Moment:
Pages: 1 ... 25 26 [27] 28 29 ... 48
  Print  
 
Jump to: