# Thread: Path Creator with SPS support (reflec coming)

1. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)

## Path Creator with SPS support

Hello, I present to you a path creator.

The coding is poor and done in VB.NET, but its something.

People report that the points may not exactly correlate correctly. This a problem SPS_GetMyPos with if I am correct.

Originally Posted by coh3n
Also, SPS_GetMyPos isn't 100% accurate so it won't be exact. It also doesn't work well in certain areas which causes it to return a position that's no where near where the player actually is.
Features:
Dynamically re-sizable window.
Jump to towns (Varr, Fal, Lum, Ard, Seer)
Shows the extents of the minimap
Allows replacement of points

Instructions

To use this you must first locate your SPS map:
Originally Posted by frijole
C:\Simba\Includes\SPS\img\runescape_surface\runesc ape_surface.png

You can make a copy of that image and name it "runescape_surface_map.png" .
Then put it in the same folder as the Path Creator.

OR

You can click on the "New Image" button in the Path Creator and browse to the image.
Click some points and try to keep them inside the circle (that is the MM) then press the "Click to generate" text box. It will display the path and also save it to the clipboard.

To replace a point select it in the right list and press replace then choose a new point for it.

To Move around the map you can either:
- use the scroll bars
- or Click and drag on the map to pan

To jump to towns click on the towns name.
To re-size the windows grab it from the edges of the form.

To choose a new image, press "New Image".

It is possible that you will require a VB redistributable (from MS site) though I'm unsure. Also I have not tested the accuracy of the paths though they should be good.

---------------------------------------------------------------------------------------

v0.4 extra features:
-Replaced town buttons with a combobox (suggest towns that you would like to see added)
-Fixed the error when pressing "Redraw" with no points
-Added reflection support (may not be accurate) using the following conversion:
function SPS_PixelToPoint(pixel: tpoint): TPoint;
begin
Result.X := Round(2093.5 + (pixel.X / 4));
Result.Y := Round(3776.0 - (pixel.Y / 4));
end;
v0.5 extra features
SPS_Areas support!

v0.6 updated
Put in the new map for SPS. Also the new conversion for reflection is:
function SPS_PixelToPoint(pixel: tpoint): TPoint;
begin
Result.X := Round(2044.5 + (pixel.X / 4));
Result.Y := Round(4158.0 - (pixel.Y / 4));
end;
v0.7 panning
The ability to pan around the map has been added.

v0.8 updated
When in reflection mode the list view now displays the path tiles and not the SPS pixels.

v0.9 updated
The program now gets the map from an external file. Also the ability to use a different image has been added.

---------------------------------------------------------------------------------------

Thanks
Last edited by Wolygon; 04-11-2012 at 03:48 AM.

2. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Post Edit Log:

14/6/11 - Public release v0.3

14/6/11 - v0.4 released
Originally Posted by Removed
I have created this application because SPS does not have any path making support. I thought that I would add in reflection paths however I am unsure on the conversion from map co-ords to tiles so it will have to wait.
15/6/11 - v0.5 released
Originally Posted by Removed
Also with the naming discrepancy I am in the process of trying to change my name in this thread:
However it seems to be taking a while...
Originally Posted by Removed
It is currently unable to generate the "SPS_Areas" so this will have to be done manually. The reason for this is because the tiles are not just 500x500 tiled chop outs of the main map (they overlap, etc). This means I would have to find the co-ords of all the squares (~150) on the main map (a lot of time). Hopefully someone (Marpis) knows this information already.
20/10/11 - v0.6 released
Originally Posted by Removed
It is designed for SPS however it also supports reflection.

The coding is poor, repetitive and crude especially since I've never done half the things that were required. But it works, which is the main thing. I'll be able to improve it though I'm a bit strapped for time so I thought I'd release it even though it isn't perfect.

Also its only done in VB.NET as I'm not good enough for C++, yet.
20/10/11 - v0.7 released

22/10/11 - v0.8 released

23/10/11 - v0.9 released

11/04/12 - Updated page information
Originally Posted by Removed
The reflection paths 'may' not be fully accurate.
Originally Posted by Removed
The program does not include the map, you must get it from here (right-click, save link location as...):
https://github.com/Coh3n/SPS/blob/9d...urface_map.png
Now put this image in the same folder as the program.
Originally Posted by Removed
Redraw:
If you draw a path and then scroll until your path is off the screen, then scroll back you will not be able to see your path. Click redraw to show it again. Hopefully I'll find a solution for this, one that doesn't require 50% of my C2D .
Last edited by Wolygon; 04-11-2012 at 03:51 AM.

3. Wouldn't this work?

I think marpis's plugin has a TileToPoint or whatever and if not it seems a little simple to make.

4. Nice! I don't have time now, but I'll check it out later tonight.

@Dgby: SPS.simba has a PixelToPoint and PointToPixel (should really be called TileToPoint/PointToTile); although, they're not 100% accurate.

5. SRL Member
Join Date
May 2006
Location
Australia
Posts
370
Mentioned
0 Post(s)
Quoted
0 Post(s)

6. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Originally Posted by Dgby714
Wouldn't this work?

I think marpis's plugin has a TileToPoint or whatever and if not it seems a little simple to make.
Maybe its just be but I haven't been able to find PathMaker for quite a while, I have used it before. It says that it is now included in "Reflection/Tools/PathMaker.exe". I'm assuming this is supposed to be in the Simba folder but there isn't anything in there. If it was I would of figured out how coords are coverted to tiles.

I thought there might be one already but I did search for it. It was fun making it anyway and in my defense that application extracts to 100MB (why?) and consists of multiple files (mine is one .exe). I can't comment on the user interface as it would just flash a command box that I couldn't read and wouldn't open.

*Realising its your application*: Do you output the SPS_Areas? If so, I'm impressed.

I don't really care if no one finds this useful as it was a good experience.

Nice! I don't have time now, but I'll check it out later tonight.
Thanks for the positive comment, seems like they're pretty rare.

I have included a picture of the UI below, note that the window can be re-sized which re-sizes the map area.

7. Wanna add me on MSN? panic._@live.com.

8. I love the UI, nice and neat/organized, just the way I like it. I've wanted to make an application like this to further my programming experience, I just don't know what to make. I tested it out and it was working great until I got:
Progress Report:
[ERROR] GATHERMINIMAP:: Exception: Access violation
That's an issue in SPS and we still don't know why that happens sometimes. I suggest having the option to click and drag the map to move it as well as scrolling. Also, maybe instead of having buttons for the locations (Varrock, etc.) maybe have a combo box so you aren't limited by space as to the number of locations. Other then that I think it's great.

I also didn't test the reflection part (not sure if it's working yet?).

9. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Glad you like it .

I've wanted to make an application like this to further my programming experience
Yeah this project was great. I had never drew graphics and hadn't queried listviews before, so I learned a lot.

I suggest having the option to click and drag the map to move it as well as scrolling. Also, maybe instead of having buttons for the locations (Varrock, etc.)
Excellent suggestions, thanks. Combobox would be so much better then buttons .

If you would have clicked reflection it would of said "Sorry, no reflection support yet". So no its not working yet as I'm unsure how to convert co-ords to tiles. I could just find some tiles on the map (rsbot) and find their co-ords by inspection however this might not be accurate enough and I don't want to stuff it up.

 I've found this code, which will hopefully work well:
function SPS_PixelToPoint(pixel: tpoint): TPoint;
begin
Result.X := Round(2093.5 + (pixel.X / 4));
Result.Y := Round(3776.0 - (pixel.Y / 4));
end;
[/edit]

Also hopefully I will be able to add SPS_Areas support soon. Which I'm guessing would be pretty convenient (I haven't used SPS yet). I guess I should contact Marpis for info on the tiles.

Wanna add me on MSN?
Done.

Thanks again.
Last edited by Wolygon; 06-14-2011 at 10:47 AM.

10. SPS_PixelToPoint works, but isn't 100% accurate. Maybe you'll be able to tweak it so it is? And yes, SPS_Area support would be VERY convenient. To get the area manually, you have to look through every 500x500 image and find the one you want. Doesn't usually take long, but is just inconvenient.

11. SRL Member
Join Date
May 2006
Location
Australia
Posts
370
Mentioned
0 Post(s)
Quoted
0 Post(s)
Shouldn't be 100MB. 10MB at the most, and 99% of that is the bitmap. The actual 'program' is only ~20kb.

But yeah glad you had fun making it

12. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
v0.4 released

Originally Posted by Coh3n
SPS_PixelToPoint works, but isn't 100% accurate. Maybe you'll be able to tweak it so it is? And yes, SPS_Area support would be VERY convenient. To get the area manually, you have to look through every 500x500 image and find the one you want. Doesn't usually take long, but is just inconvenient.
Ok thanks, I didn't know it was inaccurate. I've included it in v0.4 but it warns you, hopefully I can improve accuracy soon. Also I'll work on the SPS_Area support.

Shouldn't be 100MB. 10MB at the most, and 99% of that is the bitmap. The actual 'program' is only ~20kb.
Is my PC just retarded then? *See pic

13. Originally Posted by Wolygon
Ok thanks, I didn't know it was inaccurate. I've included it in v0.4 but it warns you, hopefully I can improve accuracy soon. Also I'll work on the SPS_Area support.
Great.

And for your name change, I reported the post you made on the name change thread so and admin would see it faster. If you ever want the attention of a staff member, the fastest way is to report the post. Just a FYI.

14. SRL Member
Join Date
May 2006
Location
Australia
Posts
370
Mentioned
0 Post(s)
Quoted
0 Post(s)
Ah ok so somehow the bitmap is 100MB.
Interesting. Ah well, it compresses pretty well =)

15. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
v0.5 released

Added SPS_Areas support, it was much easier then I thought. It seems to work fine but there might be some bugs...

And for your name change, I reported the post you made on the name change thread so and admin would see it faster. If you ever want the attention of a staff member, the fastest way is to report the post. Just a FYI.
Haha, thanks for that.

16. Was just using to update the offsets for tile -> SPS conversions. For me, it got the wrong SPS Areas. Said they were 10_2 and 10_3 when they should be 9_2 and 9_3. Here's an image if you want.
Last edited by Coh3n; 06-29-2011 at 06:29 AM.

17. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Originally Posted by Coh3n
Was just using to update the offsets for tile -> SPS conversions. For me, it got the wrong SPS Areas. Said they were 10_2 and 10_3 when they should be 9_2 and 9_3. Here's an image if you want.
Hey, I've finally been able to check this out, as I've been busy.

From your picture if you check it, all those points are in both the "9_2, 9_3" and the "10_2, 10_3" (since they overlap). Therefore it did not actually fail.

Did "10_2, 10_3" not work for you though? This may be because the final bank point is right on the edge of 10_2. So if "10_2, 10_3" didn't work for you then I'll have to work that in to the program.

Thanks for your feedback.

18. 10_2 and 10_3 are in the wilderness for the latest SPS. Then again, so are 9_2 and 9_3. I think you'll just need to update the map. The latest images will always be available here.

19. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Its all done. I also had to change the numbers for the reflection conversion.

Thanks for the help.

[EDIT]
Just added panning support in v0.7 BTW, makes it nicer to use.
Last edited by Wolygon; 10-20-2011 at 11:46 AM.

20. New version works great. Reflection is pretty accurate as well. One thing I suggest is having the real tile values show in the list when using it for Reflection. Right now it still shows the pixels and doesn't show the actual tile until you click generate. In other words, these two points should display as the same:

21. Great utility, horrible language

Good job though

22. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
New version works great. Reflection is pretty accurate as well. One thing I suggest is having the real tile values show in the list when using it for Reflection. Right now it still shows the pixels and doesn't show the actual tile until you click generate. In other words, these two points should display as the same:
Thanks for testing it. And also thanks for the suggestion, I've done it and its in v0.8. The code is getting really messy, so I'll have to rewrite it some time.

Great utility, horrible language

Good job though
I know, it is quite lame but I'm too lame to know anything else . Thanks for the comment

23. Meh I don't think the language matters much. If the program works well and does what it's supposed to, it's a good program in my books.

E: Wolygon, would it be okay if I wanted to include this application with the SPS repository on my github account? I would include it when it's finished, of course, and give you proper credits. This would allow everyone who has SPS to easily access your application.

Also, we'll have to wait and see, but if Jagex really does break Reflection on Tuesday you may has well disable the Reflecation part of the app.

24. SRL Junior Member
Join Date
Jun 2008
Location
Australia
Posts
111
Mentioned
0 Post(s)
Quoted
0 Post(s)
Hey, yeah I'd love for it to be uploaded there. What do you mean by "when it's finished"? What do you think should be added? I don't see too many crucial improvements that I can make.

Also I was wondering, do the SPS maps change periodically, or was it a one off? If they change often then I could try make it so that you can change the image... My biggest worry is about the reflection conversions, as I'm unsure if I'd be able to regenerate them automatically when the map changes (but as you say Reflection 'may' not be a problem).

Ha I didn't even know about the reflection thing with Jagex, we'll see then.

25. Originally Posted by Wolygon
Hey, yeah I'd love for it to be uploaded there. What do you mean by "when it's finished"? What do you think should be added? I don't see too many crucial improvements that I can make.
I just meant when it's very stable and you've done pretty much all you can do with it.

Originally Posted by Wolygon
Also I was wondering, do the SPS maps change periodically, or was it a one off? If they change often then I could try make it so that you can change the image... My biggest worry is about the reflection conversions, as I'm unsure if I'd be able to regenerate them automatically when the map changes (but as you say Reflection 'may' not be a problem).
The maps don't change often, no, but it may not be a bad idea to have the option to load other maps. For example, SPS also has a rune essence map which people would want to use. I also plan on adding more maps such as runecrafting alters and dungeons in the future.

You should just be able to have a menu like File > Load Image or something. Could also just have it load the entire map by default. Or maybe just a "Change Map" button then have the user choose whatever image to load.

For the conversions, I suggest adding two edit boxes: one for the x offset and one for the y offset. After all, it's just an x/y value used to convert points. The offsets (as used in SPS methods) are specified by each "surface" in sps.simba. This way, the user can set the offsets depending on which map their using whether it be the default RS surface, or essence mine. That being said, I wouldn't worry about the Reflection side of it until after Tuesday's update.

Loading any image is what's needed. If you let the user choose the image that would mean the map being used in your application is always updated (i.e. you don't have to update the app every time a map is updated).

Hopefully all that crap made sense.