View Single Post
  #24  
Old 04-07-2006, 05:07 AM
Shaun Shaun is offline
Registered User
Shaun's Avatar
Join Date: Jul 2003
Location: Canada
Posts: 1,070
Shaun is a jewel in the roughShaun is a jewel in the rough
Yeah, I was working on something similar just before (or was it just after?) I became staff the first time on Sanstrata.

Each part, I suppose, would have certain variables (well, constants really) assigned, and when that part becomes a part of the collaboration that is your machine, it's own variables are altered by the sum of variables from the parts. Like, one machine may have the following parts and variables:

Body (mass: 10, strength: 10)
Wheel (mass: 2, wheelspeed: 1, wheels: 1) x 4
Roof (mass: 2, strength: -2)

with algorithms, say, like this:

if (strength<0) {machinefallsapart();} // Body isn't strong enough to hold up sum of pieces
if (wheels>=3) {candrive==true;} // Can drive if you have at least 3 wheels

So you'd have a machine with these variables:

mass: 20
strength: 8
wheel speed: 4
wheels: 4
candrive: true

Of course, this is simplified. You may need an engine and other parts to have candrive enabled. As well, there'd be different kinds of wheels (better ones, worse ones, different ones, etc) and other parts, etc. Also, being able to add parts but have them switchable (turn on or off) would be interesting, in making transformers (robots that can turn into vehicles).

All just concept stuff.

Man, it'd be so fun trying to make in GS2. Too bad I quit just as I started really getting into it. Maybe I'll go back into C++ programming.
Reply With Quote