Monday, May 4, 2009

Target Coninuity!

I worked on the next version of my EVE Agent last night until about 11:15. At that point I realized that I wouldn’t be able to finish it before bedtime so I just threw in the towel. Although I didn’t finish it, I did manage to make some serious headway.

I managed to address target continuity.


In the previous version of EVE Agent the targeting routine only activated once. This meant that if the target lock was lost the agent would not select a new one. This becomes a problem when there is a pirate in the system jamming your locks or (and more frequently) the asteroid you’re mining vanishes. I’ve created a loop where the agent constantly checks to see if all three asteroids are locked and if they are not it can detect it, find another asteroid, and lock onto it.

I can tell if a laser is firing or not.

This was a tough nut to crack and I spent a solid 30 minutes staring angrily at my computer about it. The problem is that there is no where on the EVE client that clearly indicates whether or not a laser is firing. There’s just a green glow that envelopes the laser. I used an array to gather pixel colors of the green glow over time and used that as an indicator of the laser’s status. It isn't perfect, or even close, but it's functional.

I can tell if the mining hold is full

At least in theory. This was the last bit that I didn’t get to test out last night because it was so late, and it will be the first thing I try when I get home. For this I’m simply looking for a “1” where there’s only blank space normally. Not too difficult and the tests I did try (just using point sniffing and time) seemed to indicate that I could tell when the hold was full

And that’s it! I believe that the agent is now fully functional and capable of endless mining. Well, sort of! There are new problems to solve with this design but it’s a huge improvement over the last one. And that’s kind of how programming works – baby steps until the end.

I’ve got an idea for my next EVE Agent. Instead of macro mining I will tackle pirate hunting. The code’s mostly written in the other Agent, I just need to port it over. But that's a job for another day.

No comments:

Post a Comment