Page 1 of 1

Clutter, angled thrusters and debugging

PostPosted: Fri Aug 14, 2015 8:08 pm
by Denis
I am starting to make circuits to make my robot "do stuff" and I'm not very fancy yet, but already the robot's interior is very cluttered. Half of the clutter is due to the fact that thrusters aren't angled, so the option to have them angled (aligned with the isometric grid) would be a good thing (it's on the list, I know. I hope bumpers will align with the thrusters as well?).

I'm wondering if we can manage to get really fancy in the limted space. I know there will be circuits eventually to help with this, but I'm not sure how far off they are. From the BOM for circuit A I think they're still far off for me. I haven't all the gate seeds yet and I think circuits are for the phase where you are planting gate trees.

Also regarding getting fancy: it's really hard to debug fancy circuit. There is the clutter, and then things are happening too fast (when the logic gets into play at least) to really see what's happening. I can't see why my circuit does not always do the same thing.

Re: Clutter, angled thrusters and debugging

PostPosted: Fri Aug 14, 2015 11:20 pm
by rkda
The key to cleaning up the clutter, is not Curcuits (A and B), it is Chips. That is where you get to wrap up your circuitry and make it all disappear from the robot interior.

As for things happening to fast. Yep. The gate propagation clock is about a third of a second (maybe less) while you are watching, and faster when you close the robot.

One of the tricks is using a 1-shot to make things happen 1 step at a time. Here is one way to make it.


Every time you apply power to the NODE...the output of the AND gate, goes high for 1 clock cycle, then it goes low again.
You have to remove power and apply it again to get it to cycle again.

This makes it easy to move 1 step at a time. Apply the output of the AND gate to the thrusters that move in the direction you want to go, and then you can easily walk 1 step at a time, without having to play the power button game.

Re: Clutter, angled thrusters and debugging

PostPosted: Fri Aug 14, 2015 11:50 pm
by rkda
Here is one of my *Magic Circuits* that I use in my robots.


The 4 pins on the left side are connected to the thrusters. The two lower pin on the right determine the direction to move.
There are 4 combinations of input, and they correspond to the 4 directions of the game grid.

X Y Direction
0 0 SW
1 0 SE
0 1 NW
1 1 NE

There are other ways to arrange the logic, but this one is easy for me to remember.

I use external logic to determine when to move, and how far. (see the 1-Shot circuit for an example)

Re: Clutter, angled thrusters and debugging

PostPosted: Sat Aug 15, 2015 8:14 am
by worfc
Angled thrusters: On the list! Also, yes, bumpers & thrusters will angle together. It will be a player option. Probably on a per-robot basis, so they can be different, if you like. Maybe "soon!" (but probably not before v1.0), depending on if it all goes smoothly, or if I have to postpone it because there's some weird unintended consequence that I hadn't anticipated.

Obviously, angled circuitry will be a lot different from cardinal.

Also, nothing says you can't farm E/W. I just suggested clearing a NW/SE swath near the SW wall because it makes robot visibility better. However, if you just clear out the bottom-half of your farm, you could do E/W rows, if you wanted. (Or N/S ones, for that matter.) Of course, the rows would be shorter, and not all the same length. Heh.

Clutter: What RKDA said about ICs. Their purpose in life is to let you bury the clutter. You'll still have a ton of wires, but the gates will be gone. RKDA, if you have a chance, post a pic of the interior of one of your many-chip bots -- impressive stuff!

Also on the list: chips within chips, for seriously crazy-powerful robots. This was in, briefly, but I had to pull it due to severe bugs. Getting it back-in is high on the list.

Clock speed: The circuit-clock speed is 0.2s (1/5s). It doesn't change inside or outside the robot, that's the "master clock", app-wide, that you turn on/off with the master power switch (upper-right). A full clock-cycle is 2 ticks of the clock ("leading edge" and "falling edge", if you're into the geek-parts), so one full cycle is 0.4s -- faster than 1/2s, but not as fast as 1/3s.

(There's more to it than that -- a clock-cycle actually happens in a bunch of phases on each half, but that's mostly got to do with the timing of the sub-events to get the gate logic to work correctly and update the screen. Bottom line: 0.4s for each full cycle.)

Debugging clock: RKDA's one-shot is a good final solution. Also On The List! is a circuit lab. The currently planned features are:

    A space where you can lay-out whatever circuit you want.
    Unlimited gates (or at least "very many") for experimenting in the lab.
    Save/reload partial experiments for continued experimenting
    Separate clock (not the system-wide one) with...
      Single-step (fire one cycle then stop)

Also on the list -- probably sooner, if I can just figure out a decent UI -- is the signal-probe, which you put on a line and it displays all the signals (items, counts, text, whatnot) on that line. You're maybe not using comparators/sensors yet but, when you do, you'll appreciate how helpful this probe will be. :)

RKDA/Images: I'm not certain, but I think your images problem is that the links you provide don't link to an image file. That is, they aren't a file-URL ending in .png or .jpg -- rather, they are a command ("open") to google-drive, which results in some fancy behind-the-scenes work that eventually displays an image in the browser. phpBB (our forum software" doesn't direct-link to images. Instead, it copies the linked-images into the forumDB and displays via a mangled-name from there. (This is probably to prevent "moderator approved my post, then I changed my circuit image to porn/spam", or problems with things on the internet disappearing, ex:, if you were to take those images off of Google Drive.)

At any rate, I copied your images to and edited your links, so now they display.

Re: Clutter, angled thrusters and debugging

PostPosted: Sat Aug 15, 2015 11:21 am
by Denis
Not circuit but chips: ok. Of course this means that it's much further in the future than I thought since chips require circuit A and circuit B and probe and electronic tools, etc. The road to get there seems long...

Thanks for all the tips rkda! I'll come back and check all of this when I get my first chip.

Re: Clutter, angled thrusters and debugging

PostPosted: Sat Aug 15, 2015 11:32 am
by worfc
2 other quick things:

Thing 1: Take a quick look at the one-shot circuit. It works because of gate-delay. Without gate delay, you wouldn't be able to make that circuit. :)

Thing 2: If you tap a gate in your robot, it will rotate 90°. When you solder, the wire starts horizontally, then angles vertically to meet the 2nd connection. You can use these two things to organize your circuit a bit.

Also note: Some have argued that the space "in the middle" is too big, and thrusters/bumpers should all be closer together for easier soldering. I'm pretty sure that would only exasperate the clutter problem. That said, also "On The List!" is: you can move the robot parts around to anywhere you want. That's much-later, but I recognize that different people have different ideas, and so I don't see why not to do that. Eventually. ;)

Re: Clutter, angled thrusters and debugging

PostPosted: Sat Aug 15, 2015 11:41 am
by Denis
Thing 1: yes. Of course, if there was no gate-delay, we wouldn't need to slow down the circuit to debug it. ;) (it's ok, I embrace gate-delay, but your argument is circular and I just wanted to point that out)

Thing 2: yes, I got all that. It does help.

Space in the middle: Actually when things started to clutter, my reaction was to ask you to move stuff further apart. My reaction was actually "hey why is everything cramped in the middle instead of spread around the edges?!" ;)

Re: Clutter, angled thrusters and debugging

PostPosted: Thu Aug 20, 2015 8:39 am
by worfc
See, THIS is exactly why the end-result solution will be to allow individual players to drag around their robot-interiors however they like.

Heck, maybe I'll get fancy and let people save "interior designs", so they can switch. (Once there's a layout that's saved/restored with the farm, there's no reason not to allow multiple layouts be saved/restored, right? :) )