Jump to content

Macro Cooker - Intelligent Areas


Alek

Recommended Posts

For those of you that are familiar with my Macro Cooker script, the biggest challenge is allowing the user to select any cooking location in the game. The main obstacle was dynamically creating areas around the heat source which are desirable. This means detecting Ranges or Stoves that are inside and ensuring that your player doesn't accidentally walk outside.

Doing some shameless self-promotion, I finally came up with a nice result for my latest update. Hopefully I will be using some of the same techniques in the webwalker.

 

None of these areas are static, they are all dynamically generated:

 
Al-Kharid:
e3b9a375e21ab4aab130ada2ed082026.png

 

Varrock (showing both sides of a wall):
5ef2f17fb53928711bc59b23786fa127.png

 

Edgeville:
c5b70209aac8630edae4587989ef6bc4.png

 

Hopefully my valued gray names enjoy the hour or so I spent into this. 

  • Like 4
Link to comment
Share on other sites

1 minute ago, TheWind said:

what sort of checks did you do to test if a tile would be a valid addition to the area?

I start off with a simple Area a = entity.getArea(1), grabbing all with a distance of 1 of the entity. After that I filter all reachable positions, then filtered by real distance from the position to the entity using local path finder. Once that's finished I have all the positions which are valid; these are then sorted by x/y values, first index and last index are used to create the rectangle area. 

Link to comment
Share on other sites

1 minute ago, Lemons said:

Yes, its an attempt to make up for the atrocity the other one was lol.

I hate your wrappers like this:
https://github.com/Lem0ns/QuantumAPI/blob/master/src/rip/quantum/api/QuantumStore.java

But whats not to like about some of your solutions like the map stuff. Overall looks good!

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Alek said:

I hate your wrappers like this:
https://github.com/Lem0ns/QuantumAPI/blob/master/src/rip/quantum/api/QuantumStore.java

But whats not to like about some of your solutions like the map stuff. Overall looks good!

Yeah I kinda just wrapped them all, I been removing the ones that are obviously useless slowly. I'll probably remove this class as well. I haven't released it yet for a reason hehe.

Edited by Lemons
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...