Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Autonauts

Make and teach robots to automate the world! 路 By Denki

Find Nearest Bug 21.2

A topic by BLACKBERREST3 created Jul 23, 2018 Views: 913 Replies: 13
Viewing posts 1 to 10
(1 edit)

Found a Bug. I still don't like how the "find nearest" command works. It should be location based and remembered by the bot (like a global variable) until it is overridden with another "find nearest" command. Instead, it seems to go by each individual item's location. When the "problem" bot is in the right location, it will repeat "find nearest" and "pick up" until it's hands are full, however, it will not pick anything up. Another bot with the SAME EXACT CODE will work though. I have a theory of why this happens. When the problem bot finds nearest  item:X, it remembers the location of that same item. This happens even if it repeats with another "finds nearest" command and even when the bot is stopped and started again. What the bot could be finding is another stack of the same item in a different location that I intentionally did not want him to move to. The "find nearest" command is meant for a bot to move to that item, but what if the items are all in one stack? I propose a new line of code to be added. It should be "Pick up Item" and be given a master list of all items (or however it's programmed). This would solve the issue of having to repeat a find nearest command and waste time repeating unnecessary code. I am open to other suggestions/solutions so please msg me back if you find something.

EDIT: Read below for a better guesstimate on Find Nearest Mechanics

Maybe it's searching closest to the beacon, so I shouldn't use beacons? Just a thought.

WELP! that was it. Problem solved

As I replied to your posting of this issue in the "Feedback, Bugs 'n' Stuff" thread,

I see that your commands include in the "Repeat until hands full" loop to "Find nearest Charcoal" and to "Pick up Charcoal" but they are missing the command "Move to Charcoal" between them.  Thus, the "Pick up Charcoal" will fail and the "Repeat until hands full" will never be completed.  The loop will continue forever.

Deleted 5 years ago

BlackBerrest3 - You may believe anything that you wish.  For everyone else, if your commands include "Find nearest Charcoal" and "Pick up Charcoal" but you do not have "Move to Charcoal" between them, your commands will fail just as they did for BlackBerrest3.   That's just the way the game works.

(3 edits)

I had to do a bit of testing. The find nearest command is very......weird. I may be wrong about how it functions (shocking), but this is my experience.

Move To (item): Same exact function as "Move To" command. The value is stored as an xy coordinate I presume.

Pick Up (item): This picks up an individual "item". The "item" is programmed by the find nearest command.

Here is where it goes down the rabbit hole.

Find Nearest (item): This command programs other commands below it in sequence. If you say to find nearest berry, move to mushroom, and pick up stick, it will move to berry and pick up berry. The sequence is very specific as well. If you have "find nearest" -  "Repeat (closed so it will skip to next line)" -  "Move To" - "Pick up" , it will move towards the ends of the earth and I do not know why. Flip the "Pick up" and "Move To" commands and now it will Pick up the specified item (not items plural unless repeatedly reprogrammed to find another item) and "Move To" where ever you specified the coordinate (i.e. not reliant on find nearest). To calrify, the "Move To" will retain its value unless programmed by "Find Nearest" while the "Pick Up" must be programmed to pick up anything. The location of "Pick up" to be programmed must at least be after "Find Nearest" in sequence while "Move to" must be directly after "Find Nearest" to be programmed. As to why the bot moves towards the edge of the map when a repeat (closed) is before a "Move To" is a mystery to me.

Denki, why did you make this so complicated :p

Edit: Also forgot to mention that "Find Nearest (item)" programs the "Move To (item)" based on the closest location of the "item" from the point of origin or where you told it to "Find Nearest". You can visibly see the point of origin as a red circle when you hover over the "Find Nearest" command. If you specified a beacon, it will find the closest item from the beacon and not the point of origin.

(2 edits)

This is the last time I respond to you if you still do not understand gmrose9.  I'm giving you the benefit of the doubt that you did not understand me to begin with and that you are not trying to egg me on purposefully. Do a simple test for yourself. 

1. put a stack of any of the same items (that you are able to stack in hands) on the ground

2.put your bot in the same spot as those items

3.program bot to find-move-pickup item (in that same spot) until hands are full, then remove the "move to" command.

4. lo and behold, your bot can pick up items without the "move to" command.

Developer

That's some deep detective work there! Yeah "Find Nearest" is a bit... wobbly :) The good news is that it should be fixed in the next version. "Find Nearest" will always find the nearest thing to the bot (rather than the teach location or the beacon). The bad news is the next version won't be out for a while :( We're not exactly sure on a release date. 

That's cool, thanks Denki. Actually, the reason I started playing again recently was because the updates were slowing down. I kept having to restart because of compatibility issues. I named my file ThisTime4Real and I finally hope to beat it this time. I am close to fully automating everything with an arsenal of only steam bots and metal tools so I'm going to be sticking with version Tito for a while. I think I might create a video on my channel of 10 subs :) to share my codes and experiences with people. I'll let you know when I do that. This game is turning out pretty well, even back on version Hedy, you could've convinced me that it was a full game already. I can't wait for the full release. I'll try to promote you as best I can for an average person like me 馃憤

Developer

Awesome! thanks :)

Please do not eliminate the beacon.  It is a very useful part of the game.  If you eliminate it, the game will be much more limited.  Thank you.

I don't think the beacon will change anytime soon, but I could be wrong. I do wish there was a hotkey to view the range of beacons though. I used to use an exploit back before version 12 (i think) where bots would hold the beacons and you could see the ring it created with a little offset from the direction it was held. That made covering the map in beacons a little easier so I could set up recharging stations everywhere. Either that or be able to change the range to cover the entire map. Better yet, make it a research-able upgrade with a requirement of beacons :p. This game has so much potential that it could go a million directions which is exactly why the Denki team created a tech tree outline.

Hi BlackBerrest3,  You were correct in that I did not completely understand your earlier statement.  After reading it again, I now realize that my statements about the missing "Move to Charcoal" were only correct in reference to the original screenshot that showed the "Find nearest Charcoal" with the blue and red button that indicates "nearest to the beacon" as shown in the image on the left below.  Once I realized that you must have changed the "Find nearest Charcoal" to use the question mark that indicates "nearest to a location" (the stack) as shown in the image on the right below, I must admit that you were then correct.  I'm sorry for my misunderstanding.

Thank you, I'm glad you got the concept. I must admit I was in the wrong as well. I am sorry I came off as peeved. I realized after a little bit that I had fallen victim to the "curse of knowledge" phenomenon. That may have been the first time in my life that I realized that had happened. Sometimes (in general) people don't understand things for different combination of reasons; i.e. poorly explained, unfamiliar content, etc. and I had forgotten that. I've never really been that great of a teacher either. Again, sorry I was impatient. On a better note, feel free to ask me any questions if you have them.