Gyro Physics - 1.0 Release

Discuss programming in the QuakeC language.
Post Reply
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Gyro Physics - 1.0 Release

Post by Quake Matt »

Hmm, coding board seems a tad slow as of late. Let's see if I can speed things up a bit by releasing something!

http://homepages.nildram.co.uk/~moonrise/matt/gyro.zip

So, what's this? It's Gyro, a little something I've been working on for the past few days. It's not actually a full mod, but rather a plugin for existing mods, that I hope should help the makers add some nice physics without having to mess around with piles of code.

It runs on a simple activation system so, let's say you want grenades to float - you'd add a line like "P_ActivateBouyancy (missile, 500)". Your grenades would then float, providing they're lighter than 500 weight units. Everything works like this, even forces (like explosions), so there's rarely any need to change existing code.

Although you only really need the "physics.qc" file, I've built a quick mod around it to show you what can be done. Mostly simple stuff like floating objects and explosion blasts, but you can try typing impulse 101 or 102 to see something a little more exciting! The 101-bound HoverBombs (or BlimpBombs, whatever floats your boat) are controlled almost entirely by Gyro, although I'm not sure how useful they'd be in a real game!

Next version should be coming sooner or later, so feedback is welcome!
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

I dunno how I missed this post, but Im definitely gonna dl this and give it a go... Im not really a coder, but this sounds awesome, and I love to see such things that are modular like this, being released to the community for development. Thanks!
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Post by r00k »

This would be cool for mods with alot of water...
Where bombs could float to the waterline.. ;)
pud
Posts: 5
Joined: Fri Jun 17, 2005 3:05 pm

Post by pud »

would this work in quakeworld?
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

I don't really know - I've never coded for QuakeWorld. I guess it can't be too dissimilar, though, and since it only takes a couple of minutes to get something up and running, you could always try it and find out!
pud
Posts: 5
Joined: Fri Jun 17, 2005 3:05 pm

Post by pud »

no compile errors or warnings when I add it to my qw mod source. THANKS!
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Does it run properly in-game, though? Don't know how QW works, so the physics code might go bonkers!
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

So long as you don't do self.nextthink = time; ...
That's a cardinal sin in QW, generally resulting in infinate loops in many engines. Setting nextthink too low will cause an entity to catch up any missing thinks. Which is always wierd. :) the newmis global entity names an entity to have a think after the current entity, so avoid using that too.
So long as you don't require a string entity thinking order (which is bad in nq too due to order of spawning), there's no difference.
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

Pretty neat little package, I can't wait to see the next version! :D
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Ah, that's good to hear - it should work nicely in QW then. Maybe a little bit of whackyness when it gets laggy, but that's better than nothing!
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

Okay, I've got a new version up:

http://www.quakedev.com/forums/index.php?topic=421.0

Sorry to just link to a different forum, but otherwise I'd just be repeating everything I said there! Anyway, it's only a beta version, so it's not massively important yet - I'd just like to find out from anyone using it whether or not the upgrade works.

Oh, and thanks for all the interest! I'd never had gotten past 1.0 without it!
Post Reply