SRL Archive - Test corner

DMW - Dynamic Map Walking - Need a partner!


marpis

2009-09-15 23:54:29

Hi.

I have a great idea to make map walking reflection-style possible, like
WalkToTile(X, Y, RX, RY, FlagDistance)
with 100% color, AND without having to open the worldmap.

I started remaking the world map by taking screenshots and then attaching the minimap parts together. This way it will be as close to the real dynamic minimap view as possible.

The idea
The basic idea is that we pick a point x, y in the big map (checked with ms paint, the tile is just the co-ords of the pixel we want to walk to), take a photo of a 20x20 area around that point (just copy a part of the big map) and try to find it in-game in minimap.

Example:
I want to walk to the lumbridge bridge, I am currently standing next to the bridge. I open the map with ms paint and mouse-over the lumby bridge. In the bottom right corner I see the position of my mouse, that is the tile I want to walk to. I copy these co-ords to SCAR, and tell the script to walk there. Let's say the co-ords were 225, 365. Then to walk to lumby bridge, we simply call

DMW(225, 365, 2 {randomness here}, 5 {flag distance here});

Simplified:
User: I want you to walk to (225, 365)
Scar: Okay, let me see where that place is located on my map… Oh, I see that is the lumby bridge! There's some water around it, and there are also dark brown spots around it. I try to find 20x20 place in MM that contains water and dark brown spots!

Techniques
I will copy a 20x20 picture from the map, then turn it into a DTM with a function I have already made. If that DTM is not found, let's try taking every 2nd subpoint away from the DTM. If that's not found either, let's take every 3rd subpoint away, etc etc until there are just a few subpoints left.
Very simple actually :)

The code so far
http://pastebin.com/m1176337a
There are some things that I made to debugging purposes, and that will be taken away.

Contact
PM me on forums or just post here.
I am rarely on MSN, and even less on IRC.

Naum

2009-09-16 00:01:25

Good Job!

I'll be releasing mine soon as well, after I iron out a few bugs :p.

Tickyy

2009-09-19 15:04:19

damn, nice, can't wait to test it out, btw, can i test it already?

marpis

2009-09-19 17:26:40

From: Tickyy
damn, nice, can't wait to test it out, btw, can i test it already?


You'd need to make yourself the map, cause I haven't uploaded mine anywhere.
And it doesn't work yet, I don't know why. It has succesfully walked a few times to the right place, though.

I will finish this when I have time. Atm I'm snowed under school crap…

JPHamlett

2009-09-26 23:29:55

if u need a tester just pm me

weequ

2009-10-04 12:36:39

Wow this sounds good,
Gj and Gl ;)

marpis

2009-10-04 15:09:33

Btw I gave up with this project, I'm stuck. :(

n3ss3s

2009-10-05 20:20:50

What kind of a problem do you have?

marpis

2009-10-06 17:27:51

I didn't know what kind of DTMs I should make to find the place in MM. Colors change so much that it's really hard to find anything, unless you use a >30x30 bitmaps which is not very good because you'd have to be very close to the target area already…
I tried first just to convert a 20x20 bmp into a dtm, which worked just fine but the dtm was practically never found on MM. Then I tried to take every second pixel away, so it'd be like a net, but this wasn't found very well either, and if I used big areasize and tolerance it found the spot in wrong places.

n3ss3s

2009-10-06 23:10:53

Obviously you have to make some sort of a function to determine what kind of things to pic, for example, instead of mechanically choosing 20x20 bits, you can take a 20x20 bit, then look for tree, road, floor and water and possibly other terrain colours within it.

This is a relatively slow process, but obviously it should be ran once, so that it saves the DTMs to a file. Also, if you want this to really work, I suggest whoring an uhm… DTM finding function from Wizzup or shit, that looks for the DDTM's points invidually using TPAs and shit, so it's easier to see how much you leave shit out etc, because with a regular DDTM or shit you either find 'all or nothing', e.g you don't wanna decide between landmarks about which one you give a 255 tolerance…