Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: thepenguin on August 10, 2013, 11:32:06 AM

Title: CRPL-Cores sending packets/energy?
Post by: thepenguin on August 10, 2013, 11:32:06 AM
Since they can consume packets now, can they also send them out?

ex. core takes in AC, and then spits out energy, or vice versa.

This way, we can do things like generators, amongst other things
Title: Re: CRPL-Cores sending packets/energy?
Post by: knucracker on August 10, 2013, 12:58:31 PM
Sending packets (using the game's engine) isn't possible currently.  That would tie into how the engine determines what structure to request a packet from (currently limited to tracking CN's and guppies).  You can of course send a fake packet between your own structures in the way I do on Farbor, though.

Energy production isn't possible either, though that one might be easier to add support for (maybe,  maybe not).  That ties into how units know what subnet they are on and how overproduction gets handled, etc.  That is limited to CN's and resource packs right now.

In both cases, I have to extend what units are tracked and implement the appropriate interfaces on the CRPLTower unit.  Their are data structures that keep track of energy sources, packets sources, etc.  Allowing a CRPLTower to do either means dynamically adding or removing a unit from those data structures.

All possible, but I have to maintain discipline and get the game finished off at this point.  Then I can swing back around and maybe make these things possible.
Title: Re: CRPL-Cores sending packets/energy?
Post by: thepenguin on August 10, 2013, 03:15:04 PM
couldn't it emulate a collector or a reactor?

I don't know if it will work, but it's an idea.
Title: Re: CRPL-Cores sending packets/energy?
Post by: knucracker on August 10, 2013, 03:17:37 PM
That how it will work for energy.  But to do that a CRPLTower has to know what network it is on.  Right now that is kept up with for Reactors and Collectors.  I'll have to add CRPLTowers to that list... but only if they are something that can make energy (I don't want to do it for every little CRPLTower that might be a 'bullet').  Do-able, just a few hours of careful work and testing.
Title: Re: CRPL-Cores sending packets/energy?
Post by: thepenguin on August 10, 2013, 03:26:51 PM
okay.  If that won't work for you, will you just allow CONST_AMMO and CONST_AMMOAC to work with SetUnitAttribute on CNs too?

After that, I can code the rest myself.
Title: Re: CRPL-Cores sending packets/energy?
Post by: knucracker on August 10, 2013, 03:45:33 PM
So you are needing this for a current map you are working on?  Do you need just energy production like a reactor might make?
Title: Re: CRPL-Cores sending packets/energy?
Post by: thepenguin on August 10, 2013, 04:08:26 PM
Quote from: virgilw on August 10, 2013, 03:45:33 PM
So you are needing this for a current map you are working on?  Do you need just energy production like a reactor might make?
I don't really need this for a map yet.  I just saw how they can request packets, and thought there might be a symmetric equivalent of dispatching packets/energy.  It's not time-urgent, but I can see myself using it in the future if it is implemented.
Title: Re: CRPL-Cores sending packets/energy?
Post by: Annonymus on November 20, 2013, 03:21:17 AM
You can try to do this by creating ressource crystals (and a siphon on top of it) under the CRPL tower and hiding it with the image of the CRPL tower, so it will look as if the CRPL tower is producing energy/dispatching ore/generating aether.
Title: Re: CRPL-Cores sending packets/energy?
Post by: Creepman on September 01, 2014, 02:48:24 PM
why not make it like a siphon but need AC to run and undeplete able energy
Title: Re: CRPL-Cores sending packets/energy?
Post by: Asbestos on September 01, 2014, 05:51:49 PM
You could also make the CRPL core generate a bunch of reactors underneath it once you fill it up, then have it delete those reactors if you deplete it.