ok, so, I need to think a bit without other people interrupting. whether I do this as a server or as a client to vadim's stuff will shape some things, but really it's only display and communication and topology that gets seriously affected- evreything else I'll have to do myself anyways. so... let's start with a simple, vague object model. no world yet, only things. forget how they're loaded for now. they need properties first... many of which are tied to senses or physics. okay, so what *about* loading? mainly you'll just want to create/destroy objects - there is no movement yet without space - but later there'll be lots of things possible, so a text client would end up needing a bit of a language. hmm, a text client would also want info on the properties of an object, and eventuallly you'd have to make data available on the state of norn brains an so on. but for now... objects can be created. they can have properties n'stuff. what can they do? no movement yet... can they communicate? change their properties? well... even if there's no space, they will have energy. maybe mass, too... or maybe not. but if they run out of energy, poof. they should be killed off. hmmm. I'm tempted to say objects should need senses if they want to see objects to interact with. maybe we should introduce the cob/agent split again: agents can do what they like with some sort of scripting language, but cobs are bound by the rules of the engine, only being able to see and act within those limits. most stuff would be cobs - plants and animals and scenery - but there'd be the agent thing available for gadgets n'stuff that would need to do the 'impossible'. injectors, magic vendors, crazy stuff like that. so... scenery objects are easy, they just sit there. what about a little plant? mm... it needs to get energy from somewhere. I don't want any chance of getting something-from-nothing, so... maybe I could define another special part? something that does photosynthesis... requires sunlight and something-else to create energy. then there has to be a model for sunlight in hte world... something vaguely like CA's maybe? but thayt seems too complicated. really you just need a sunlamp in the same room... err... see, something like that seems it'd be faster if you just let the agents script it. but then htey could cheat. the sunlamp would have to be an agent, though, since it creates energy (unless we end up with electrical wiring in the world, lol). so should it create some 'sunlight' thing that the engine handles, or should it be all scripty and loop through agents with solar cells, giving htem an energy boost? fuzzie thinks agent is better. now I'm thinking about these components... solar cells, senses, muscles... they're all basically interfaces between the objects and the world, designed for doing things or seeing things or getting things. might want one for excreting things too. but, well, the list keeps changing, so maybe they should be kinda module-ish so that people can write new ones n'stuff... mm, I seem to be turning it into a lego-world where people plug together a bunch of components and put some glue in hte middle to make new objects. so, I need to think more about them. some, they take input from the world, do some calculations, and plug into neurons at the other end. senses are generally cycling constantly. muscles, otoh, take input from neurons and do something - haven't decided how complex that'll be yet, and they might also report back on their status. then there are weird ones like solar stuff.. I imagine the easiest way to deal with energy is for it to produce some chemical that can combine with others to make usable energy... I wonder if it has to consume energy to continue working... anyways, where does it *get* its energy from? either something has to signal it, or it has to actively look for something... well, senses get their data from the engine, probably... generally they get a list of agents and cycle through. so do we have each solar cell cycle through visible-agents looking for one emitting light? or do we have lamp agents cycling through, looking for solar cells? hrm. I dunno. there would probably be more plants than lamps... for them to detect lamps there'd have to be some light-emitting property they could detect. all the code would be in the component and lamps would just have to say they're emitting light. you could even have other components that emit light if they have the energy to do so. it'd be neat... but take more effort. otoh, if they just sat around waiting for some lamp agent to update them... any agent could do it, could only shine light on certain things even, and light-emitting modules could make the effort to push it. actually that sound generaly better. anyways, I can still try both ways, if it's properly flexible. :) so now... I have objects that contain parts. these parts interact with parts in other agents, or with the engine (generally they'll need a list of visible objects to look at). lots and lots of stuff can go into predefined parts... whee! code re-use! :) I got so tired of copying & pasting and fiddling with stuff in ds. I wonder if everything'll end up as a part. it'll probably be easier that way, since a lot of cobs will want to do similar stuff. they'll just have different starting points, sprites and so on. if someone wants something totally new, they can either make a new part or do some agent scripting. oh, and parts will need to tell what parts other agents have... either that or do some signal-y stuff, so that light goes to the agents that have solar cells... whatver's the most efficient way. maybe have a listen-port sort of thing and send-port... but what would they send, just an int? or might some thigs want more? figure that out later - actually, the port #s would probably just be used to filter a list of objects, and then many things could be done. some would just send stuff, others would want more info about the objects... okay, so. objects have properties and parts. parts can interact within the object, either through chems or neurons? they'd also be responsible for conserving energy... oh, and we need to make sure they don't do *too* much, because we want lots of interesting variations n'stuff. but objects also need to reproduce... let's go through a plant life cycle. it has various chems, sits in hte sun making energy... I guess it has roots that pick up chems from hte 'soil' - I'll figure out soil later... anyways, it... let's say the solar part uses sunlight to turn various chems into more energy-useful ones. various things in the plant will consume energy, so it has to store enough during hte day to survive hte night, at least. now, eventually it'll want to reproduce, either by creating seeds or fruit or something. let's ignore pollination for now, and fruit, and just think seeds. how does it do this? first, there are limits. it has to give the seed some of its own mass and energy, and whatver chems are in it will probably come from it too, if that's feasible. oh, and the seed's location will probably have to overlap with it - hrrm, that's a part that'd be easier to just script. darn location-stuff. also have to define the starting sprite. y'know, genes are a form of scripting, really... anyways, when conditions are right and seed-creation is triggered, it'll do this... umm... but hte seed should be attached. I'd really like a better attachment method than in DS. and then it'll need to fall off or explode out or be blown away or something. also, if the plant sprite changes while it's attached, we don't want it hovering in midair... once the seed is on its own, well, again the right conditions should trigger growth. the seed does not create a plant, it *is* a plant. same way food turns into detritus instead of vanishing right after creating detritus. solves a lot of problems that way, although I'll have to be careful about size changes. oh, and since a seed probably doesn't have any leaves, it should have enough energy stored in it that it can soak up water and nutrients and grow its first few little leaves. hmm, something will need to sync the changes with sprite changes, too... so, it seems we'll probably need some dna-like language for creating these things. something that codes for parts to be created, sprites to be used... and there'll need to be a method for activating changes at appropriate times - the leaf part should be created about the same time the sprite changes to one with leaves on. also - with the current model, there's absolutely no incentive for plants to create edible fruit. in fact, they'd do worse than inedible plants. the only incentive for making edible fruit is to get the seeds spread more widely. so either there'd need to be some inedible core that was boring and hard-to-destroy so that norns just drop it somewhere, or there needs to be some ability for a seed to get through a digestive tract. hrmmm... sounds virus-like doesn'tit? ;) having another cob's dna inside.,. anyways, having a fruit with an inedible core... could be tricky. right now things are the same all hte way through. anyways.. what about animals? foo. they're much more likely to want scripting - they need an algorithm for walking around, eating stuff, etc... in RL they need a brain for that, but chances are we don't have that sort of power. should I force it all to be done by modules? would they become the new scripts? heh, they basically sound like they *are* scripts, except they might be written in c or something (dunno yet), and they can be used by any object. mm, actually that sounds like a nice way of doing things. let some basic dna choose what parts are needed, instead of a cos file full of scripts. then you'd have to make sure that the right parts are installed along with sprites and sounds n'stuff. oh, but these modules should be somewhat limited in what they can do, so that they don't screw things up either accidentally or on purpose. memory should be limited, something should catch infinite loops if possible, file access should be restricted (but should be more flexible than ds)... I wonder if the brain would be just another part? well, dna would have to code for it, so probably yes. and should all things use chems, or should that be in dna too? I suppose scenery won't want anything at all, so either it'll be dna-less or have empty dna so that nothing happens... umm... but it'll need a small amount of energy to exist. so. also, neat idea: what about electricity? should we make it possible for gadgets to run on electricity instad of magic? they even they would conserve energy, in some way at least, and the electricity could be monitored... could even cut them off to stop them or something. :) which reminds me, hmm- things have mass and energy. if they run out of energy they die, but they might still have mass - do they break down into detritus then? does something else happen? when are they fully gone? if they're eaten it takes away mass, but.. what does that do to energy? hmm. intersting questions.