Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with Trees? #23

Open
Nostrademous opened this issue Dec 17, 2018 · 6 comments
Open

How to deal with Trees? #23

Nostrademous opened this issue Dec 17, 2018 · 6 comments

Comments

@Nostrademous
Copy link
Collaborator

In the game, there are 2,207 trees (according to the internet anyways). Each tree occupies 64 x 64 units, centered at an x,y,z location and identified by an integer.

The protobuf sent by Dota2 only updates tree events when they are destroyed.

As a result, we will have to pre-seed all the trees into the game at start I think.

Thoughts?

@TimZaman
Copy link
Owner

TimZaman commented Dec 17, 2018 via email

@Nostrademous
Copy link
Collaborator Author

I know there is a model-free versus modeled env discussion to be had here, but wouldn't it be just much faster to encode all the trees? What you suggests with moves isn't "tree" necessarily, could be a cliff, a tower, a wall, etc.

By the way - there are 2327 trees now apparently (in 7.20e). I just printed all the locations using a simple for loop.

@TimZaman
Copy link
Owner

Where'd you get those trees from?
It would be very helpful if we somehow make a 'occupancy' grid of NxN around the hero with a few layer channels e.g. (1) enemy heroes (2) allied heroes (3) enemy creeps (4) allied creeps (5) terrain passability(trees+cliff+etc) (6) fog of war (7) etc.

Second, maybe even a MxM game map..

@Nostrademous
Copy link
Collaborator Author

Nostrademous commented Dec 17, 2018

Threw this in a Think() function of a random bot:

function Think()
    for i=0,3000,1 do
        vloc = GetTreeLocation(i)
        print(i, vloc)
    end
end

Read the console file...
console.4276350658.log

@Nostrademous
Copy link
Collaborator Author

Created a new repo for dota world state handling with submodule of dotaservice (need to link things up still and document my proposed design), but on topic of Trees I created a branch in it to quickly see if I could track the trees and give an API so you can return all known trees and their location within a specified bounding box.

https://github.com/pydota2/pydota2/tree/tree_fun

@TimZaman
Copy link
Owner

TimZaman commented Dec 18, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants