Robo-crafting.

Questions posed to our users about new features or possible UI updates.

Robo-crafting.

Postby worfc » Fri Jun 26, 2015 6:49 pm

Below, we describe a planned feature as if it were already complete. It is not. Your feedback is welcomed. More so while we're still in the planning/design phase than after we've already implemented it. ;)


This is a fairly involved area that involves several "moving parts." The advanced circuitry is mid-game so, hopefully, by that time, the player will be experienced enough to comfortably to deal with it.

We want to robot to be able to craft an item. This is separate from the player opening the crafting view and crafting an item; this is the robot doing programmed crafting.

The main connector (which I am going to call "pin" from here on out) is the "craft the current item" pin on the Crafting button. (All of what follows is new -- you don't see any of this yet in the current build. I'm hoping to get some of it in for this week and the rest for the following week.)

So, when the "craftOne" input on the crafting button goes hot, it's as if the user had selected that item and pressed the craft button. It either crafts one or you get the "missing items/tools/tech" sound.

"But how does the robot select which item to craft?", I hear you ask. Such a smart question; you must be very clever!

The 2nd pin on the crafting button will be the "select next" input. Every circuit-cycle, if this pin is hot, the crafting button will select the next craft-able item (one for which you have the materials, tools & tech). At the end of the cycle, it will select "nothing", then begin again. (If you have no materials, the select-next pin will never get off the "nothing" selection.) Selection will be indicated by a "selected item" view near the crafting button, inside the robot.

(I apologize for not having pictures. I was going to spend some time mocking this up, but wanted to get the discussion in front of you sooner. When I have some pix, I may copy/paste the final description over to the "how it works" forum.)


"Ok", you ask, "but how will the robot know when the desired selected item comes up? If I want to make a rubber mallet, how does the robot know to stop changing the selection once the rubber mallet is showing?" Oh, what wonderful questions!

Two things:

Thing 1: The selected-item icon will have an output pin that carries a signal indicating the currently selected item.
Thing 2: The item-sensor (already in game) listens to the signal on its input and, if it matches the thing which that items senses, the output goes hot. It shouldn't be too difficult to see that attaching a NOT-gate to produce wiring that says "while the selected item is NOT a rubber mallet, select the next item" will give the desired result, here.

(Note: one may have to account for gate delay in the circuit. This is left as an exercise for the reader.)

Item-sensors begin life blank. To make one sense a particular item, one connects the input-pin to a line that has an item signal on it. If, for example, one connects to a bumper and bumps an ironwood tree, the blank becomes an ironwood-tree sensor. Blank sensors also have a "generic" input pin. If that is hot when the tree is bumped, the blank becomes an any-tree sensor. Item-sensors can only be set once, so be careful with them!


I can already hear you wondering: "But how, pray tell, am I to set my item-sensor to sense a particular item if I don't already have one, or can't find one on the ground?" Such a glorious question!

Here, we can use the signal from the selected-item output, itself. This phase is a bit manual but, once one has a collection of item-sensors of different types, one need not create them again.


So, in summary:

To have the robot craft an item or -- likely more usefully -- a set of items, one must:
* Create an item-comparator/sensor for the desired item(s).
* Connect logic such that "while the selected item is not the desired item, select next" on the crafting button.
* When the selected item does match, power the craft-one-item input.

Crafted items are automatically added to inventory, as always.


So there are our plans, laid bare. What are your thoughts?
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: Robo-crafting.

Postby worfc » Fri Jun 26, 2015 6:55 pm

Ooo, I just realized that I do have some pictures. These are from the in-game help for sensors, to give an idea of how they work.

(NOTE: the help describes them as "bumped"-item sensors, but that functionality will soon be made generic, to accept a signal from any item-source (bumpers, inventory, the crafting-selected view, etc.)

sensor-help-1.png
Sensor-help 1
sensor-help-1.png (113.14 KiB) Viewed 2796 times

The attachment sensor-help-2.png is no longer available
Attachments
sensor-help-2.png
Sensor-help 2
sensor-help-2.png (71.84 KiB) Viewed 2796 times
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm

Re: Robo-crafting.

Postby rkda » Fri Jun 26, 2015 8:18 pm

It sounds like this is a plug inside the robot interface that connects to the existing manual crafting interface. It would be nice if the two things worked together. Have the hot pins of the interface plug respond to the selections in the existing crafting interface. That way we can both use it to create the sensors we need, and to test complex crafting logic during development.

While making sensors, wire the blank sensor up to the crafting itemID pin, and then open the crafting interface and select the thing you want the sensor to detect. Then later, when building the robot-does-the-work logic, you can again, use the manual crafting interface to see your circuit come to life as specific items are selected in the crafting interface. It will also be important to be able to step through the items, in the same sequence as the automatic version, while doing manual testing. Although this can be accomplished by simply not connecting up the craft-1-of-these pins in the logic under development.

Each robot (when you get to the point where you have multiple robots) will need a separate crafting interface, so that they don't conflict with each other. The outside manual crafting table interface should not conflict with the robot internal interface. When inside the robot interface, the crafting table should be specific to that robot.

- When outside, in the main farm, manual mode crafting, does it interact with a (or more than one) robot that is crafting at the time?
- Which robot do the mats get pulled from?
- What if 1 robot has some mats, and a different robot has the rest?
- - Does this block or succeed?
- Which robot gets the crafting table results?
- What if multiple robots have the mats, who do the mats get pulled from?

Some early thoughts...looking forward to see what others have to say about the idea.
User avatar
rkda
 
Posts: 66
Joined: Sun May 10, 2015 3:20 pm

Re: Robo-crafting.

Postby worfc » Sat Jun 27, 2015 7:15 am

Yes, the plug inside the robot connects to the existing interface. Yes, if the player selects an item in the crafting view, that would alter the selected item for that robot. Yes, this will simplify the "manual" method of creating desired sensors.

While I have some debug switches I can flip to help me with development, I'm not too keen on creating features that are not intended for final-game use. While I fully support the idea of "code to assist QA in doing its job", I'm just a one-man shop, and I really need to focus on getting the game to playable/shippable! I don't mean to seem overly bureaucratic about it but, for now, it works best for me if beta-testers report bugs (as you have been) and I use my tools to track them down (as I have been.) Thanks!

That said, I think most of what you asked for as QA-features is planned as actual features, so we're good, there! :)

Each robot =does= have a separate crafting (and market) interface, to go with their individual inventories. Currently, the "out in the farm" buttons default to your first robot. When we get later in beta, I may remove those buttons as ambiguous, since they really belong to the individual robots.

If one robot has 1/2 the mats needed to craft something, and another robot has the other 1/2, neither of them can craft until they work out how to transfer mats between them. "Chop-chop!" ;)

Similarly, individual robots buy/sell things at market. Robot#1 can't sell robot#2's goods and robot#3 can't buy items on behalf of robot#4.

I understand that there was some confusion early on, as "inventory" was presented as "player" inventory. It is really "robot" inventory.

A key concept of the game is: The player doesn't do things. The player programs robots to do things. :)
Posted by WORFC, board admin, moderator, game author.

Please LIKE us on Facebook
You can also follow us on twitter: @roboFarmCraft
Check out the development blog (short updates 1-3x/week.)
User avatar
worfc
Site Admin
 
Posts: 226
Joined: Wed Apr 15, 2015 5:08 pm


Return to How should it work?

Who is online

Users browsing this forum: No registered users and 1 guest

cron