Bouncy, bouncy.

Bouncy, bouncy.

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Bouncy, bouncy.

Post by Argh »

Well, I finally got it working mostly correctly.

So, now all I've gotta do is make examples with more wheels. I'll grab Zpock's thingamabob, and see what transpires. It'll actually be a bit easier, imo, since it's really designed for this type of animation.

Does anybody wanna see a monster-truck version, or super-loose anti-grav suspensions, or whatever, or is it clear it's working now? I had to up script time used, to make it check a bit more often, so that it can do two bumps in a row, and the proportionality hasn't been added in yet (there were terrific problems getting all of the conditions to pass, and variable issues galore- Spring's doing some very funny things with certain kinds of logic, but I'll get into that some other time). But, as my example shows, it's still a lot faster than a frame-based sim, and it looks fairly good at this point, with a LOT of customization available for different vehicle types- everything from big walkers to hovercraft- heck, I could do a tricycle... hmm... tricycle of DOOOoooom... might be fun... in an insano-NanoBlobs kind've way.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

As a tip on making the videos:

40% of the time your moving the camera. This means 40% fo the time you cant see the suspension. You move the camera quickly and often and I need to see the thigns move for a half decent length of time.

Debug mdoe also obscures this havily as does geothermal vents.

Also raise the camera angle a little.

You'd be better off on core prime industrial using a patch of land after deforming it with a barrage.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Tracking a unit in FreeCam mode (CTRL+F5) is probably the
best way to make a demo video if you are using SVN bulds.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Itd certainly be a lot smoother.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

if you're trying to sell us on the superiority of your method vs the other one, put a unit scripted with your method and a unit scripted with the other method side by side.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

They look really really good running straight along open ground, but the upper carriage of the body is so high, with suspension like that they should really be leaning a fair bit on fast turns.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

That is a lot better than before.

Hmm, whenever there is a new bump, do you kill the other animation and restart it or does it play to the end? I'd suggest to kill/restart it.

Also, could you make it wiggle a bit when it turns, starts and stops moving? I'm pretty sure turn dir detection can be implemented within the ground slope detection.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

the pop-up is better but they still look like car hydraulics from all those pimped rides you see thugs driving in movies. I think it is the landing anim.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Well, everybody kept complaining they couldn't see anything, before, so it's a wee bit exaggerated. That said, I am not entirely happy with it- I think leaning into curves might be fun, and I really need to figure out how to make the jumps and angular rotations completely proportional- it's basically not unique enough per event yet. Running into some trouble there, due to the way that Spring is returning certain types of calculations, I'll have to think this over and see if there's any good way around the problem. And I'll certainly looking into interrupting the damping stages, that's a good idea there, Rattle- it'll suck up some more CPU, though.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Hmm, I was watching closely and there didn't seem to be a clear pattern behind the bumps. That was quite odd, because where one unit would quite clearly jump over one bump, another guy wouldn't jump at all.

Also, I think the landing 'bump' seems a little unnatural, compared to zpock's version and perhaps needs a little attention.

Still, it's definitely improving.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Post by Pendrokar »

GJ!!! You could add this to hovercrafts then it would look as if they were really hovering not just flying static in mid-air! (Imagine this) :wink:
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm, I was watching closely and there didn't seem to be a clear pattern behind the bumps. That was quite odd, because where one unit would quite clearly jump over one bump, another guy wouldn't jump at all.
Some of that will happen, even if it works perfectly- a truely "correct" simulation has to take velocity into account, and mine does, albeit crudely at the moment. IOW, it shouldn't behave the same way for two vehicles moving at different speeds.

I think I have the math problems solved now. I'll test for perfect matching and see if Spring will finally return fractional values correctly- that will allow me to make the damping speeds fractional also, remove the time-delays, and generally improve things.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Pendrokar wrote:GJ!!! You could add this to hovercrafts then it would look as if they were really hovering not just flying static in mid-air! (Imagine this) :wink:
Hovering hovercrafts? What kind of demonic blasphemy is this?!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Image

I think this might be the final edit.

I've learned a lot of interesting things from this project:

1. There seem to be problems with the way the Spring evaluates logical-OR. I dunno if this is Scriptor's fault, or Spring's, but I'm suspecting Spring.

2. I'm not quite sure yet, but I think that map heights aren't getting translated into Spring units 100% correctly. It seems that different height multipliers might be doing some funny things with the returned angles.

3. The order in which things are evaluated is a very vital part of how fast things can run. I don't think I have this thing fully-optimized yet, frankly.

Lastly, I've gotten this to run about 1000% faster than Zpock's script. As you can see, it's not as perfect of a technical representation of the physical phenomena involved. However... meh... when I looked at the overhead views of 100 of them and compared them to Zpock's, you just can't tell, frankly, nor from any distance. Which is more than good enough, I feel. The only real issue that I'm seeing at this point, frankly, is that if I make it subtle enough to look fairly realistic up close, it's pretty imperceptible at a distance. I guess it's a good thing that I have put a lot variables into it to make it really easy to manipulate and simulate different strengths of spring, gravity, etc., because I think I'm going to have to exaggerate things a bit (especially slowing down the gravity / spring during linear motion) so that the events are clearly perceivable.

The best part of this approach is that if you have a game where things are fairly small in scale, then you can slow the simulation down and take fewer samples per second, without really degrading the simulation much. So, if I put this vehicle back to the default speed of the MegaSheep (which is exactly twice this slow) then I could double the sampling time and arrive at similar results, for a halving of script-time. Best yet, I've tested frame-by-frame updates, and it's still quite a bit faster than Zpock's script- about 300% or so. Still wouldn't want to bother doing it that way, though- this movie's using a sample-rate of 0.1 seconds, which I personally think is overkill.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Ah, this is much easier to see with more then two wheels. I don't know where you found time to texture that, though, what with all your other projects :P

My thoughts:
- It is much better
- The jumps are very good, and looking quite realistic
- When driving over bumps that do not cause a jump, though, there appears to be little perceptible movement of the wheels; this needs to be greatly exaggerated, I think.
- It seems to not be jumping off larger bumps, but jumping off much smaller bumps o_O
- I'd like to see it on some more tough terrain
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

<laughs>

That took maybe 20 minutes to skin. Really.
- When driving over bumps that do not cause a jump, though, there appears to be little perceptible movement of the wheels; this needs to be greatly exaggerated, I think.
Look... tell ya what... it's 100% possible to make the code do this. I can remove the limiter I have put in, so that the true stepping-stone qualities of the average Spring heightmap are completely obvious... oh, wait, we already saw that, in the ones where everybody complained that it "looks random" :roll:

However... maybe I could code it, so that under the jumping threshold, it does some smaller wheel motions and body roll, but that's all. It'd actually speed the code up quite a bit, if I could accept all possible results that didn't violate basic logic (are we actually moving? etc.).

However, it'd introduce some problems, too. I'll think about it.

- It seems to not be jumping off larger bumps, but jumping off much smaller bumps o_O

Well, that's exactly how a suspension works, IRL- it either takes the force and damps it over time, with little overall change in the vehicle's vector, or the force exceeds the counter-force of the spring, and the vehicle's vector changes fairly dramatically, then returns to normal as a whole host of forces (drag, momentum, even precession) interact.
- I'd like to see it on some more tough terrain
It just keeps doing what it's doing there, only more of it. And besides which, the average Spring wheeled unit chokes on terrain like the previous shots on Mars... it's kind've pointless to show something that nobody actually does in their game designs anyhow, imo.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Looks pretty good..

And I whole-heartedly agree, that texture looks like it took 20 minutes, maybe 40 at most for someone of my skill level..

Yo, WZ, need me to make a tutorial on how to do a texture like that in 30 minutes? xD


Hope you guys continue to get things worked out, this may be the first script I'll ever steal... :wink:
User avatar
Eaglebird
Posts: 263
Joined: 02 Aug 2005, 23:49

Post by Eaglebird »

Well I just looked at zpock's video for comparison.

Both seem pretty neat in my opinion, and, besides the technicalities of each, the difference I see is that zpock's seems to be more.. I don't know a good word for it, lax? Soft?

The vehicle looked like it maybe too much give in the 'springs'

Argh's looks somewhat less so, and in his last video, the time the suspension is most apparent is that one last, big jump where the vehicle rocks side to side and forward and back a little.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

1. There seem to be problems with the way the Spring evaluates logical-OR. I dunno if this is Scriptor's fault, or Spring's, but I'm suspecting Spring.
You're actually right about this, logical OR and AND is actually a binary OR/AND. Maybe TA does the same though so fnordia kept it in, because I doubt both are bugged accidentally.

Logical NOT is ok, so you could use that to implement logical AND/OR.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I would vote that logical-OR is bugged, but I'll defer to somebody who knows OTA's reaction to that command. From my perspective, it appears to be bugged, and I'd strongly prefer that it was fixed, and behaved as a logical-OR as it does in C. There aren't a lot of OTA scripts that use OR, though, so I simply do not know if the current behavior is vital or not.

I fixed it by using If --> Else to weed out conditions- that's actually another area where I can increase the total efficiency when I go back and really optimize this thing- I think I can shave another 10-15% off the total speed by removing checks in the right order.
zpock's seems to be more.. I don't know a good word for it, lax? Soft?

The vehicle looked like it maybe too much give in the 'springs'
Zpock's script is also configurable to change the strength of the 'springs'- my 'spring' simulation is very, very crude. Not that it *must* be that way, actually- that part of the code can run really slowly, I have just concentrated a lot harder on terrain analysis- everything that this script does is controlled by two sensors, and is designed to run as quickly as possible- and I think I can squeeze even more speed out of it in the future.

At any rate, I will put together some more examples at some point- basically, with further manipulation, I think that I could make it feel much more sim-like, without actually increasing the amount of real simulation- that's been the primary goal here. But I can already tell you that I can do low-grav interactions, sloppier "suspension", etc.- it's all a non-problem at this point, due to some of the other work I've been doing with animation in Spring.
Post Reply

Return to “Game Development”