This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LDDestroier's profile picture

GPS Minimap v1.3.9 - Graphical Minimap for your PDA! Advanced/Regular! See other clients on the screen!

Started by LDDestroier, 28 April 2015 - 01:56 AM
LDDestroier #1
Posted 28 April 2015 - 03:56 AM
Have you ever wanted to find your way around a place with a GPS program, but all the other programs are just too basic? Have you ever wanted to get a Zan's Minimap-esque map for a pocket computer? Are you cool, gosh darn it? Well look no further than

Map v1.3.9

A GPS minimap for yer pocket computers!


This runs on Pocket Computers, advanced or otherwise. It also runs on block computers, but why one would do that would elude me.
As with all GPS programs, you need a wireless modem and a working GPS server within rednet range. And the GUI is quite sexy if I do say so myself.

Version 1.3.9

pastebin get x9ajKSc0 map
If you have barely any space on your computer, do this one instead. It functions exactly as the normal version.

pastebin get AJfSisNg map
It will download it to a variable, then run it using loadstring().

Older version(s):
SpoilerVersion 1.3 (with options screen and rename function)

pastebin get 4RfTdBFk map

Version 1.2.4

pastebin get G7SmdMKD map

Syntax:

map   --Will start map normally.
map cc	--Will clear config settings, like scale factor or what kind of label is displayed. Won't start map.
map cw	--Will delete all waypoints. Won't start map.
map oc	 --Will open config file
map fast	 --Will enable term.redirect(term.native()). Will screw with the 'bg' command and monitors.
map update	 --Will update map to the latest version.

New screenshots!
Spoiler
One of the newer screenshots (1.3.9) that shows the separate background colors.



My minimap is capable of…waypoints! There's no limit to the amount you can have, as setting one would be stupid.


If you want to get the distances of each waypoint, pressing 'L' will toggle labels, from names to distances and back.


If a waypoint goes off-map, the label will blend into the border, and red arrows will appear.


Map has plenty of options, and two more if you enable 'turtleMode = true'.


And here's the config. It sets all the customizable varaiables with ease, and can be accessed by pressing 'O' at the options menu. If you look at the code, you can also set other, key variables to other things. You can turn on grayScale mode by setting grayAllowed to true!


Of course, you can't always be in GPS range, and this minimap tells you that you can't reach a GPS server with a nice, welcoming red screen of death and despair.



Since 1.3, you can put Map on turtles and control them with WASD and other buttons found by pressing 'T' in the options menu.





Turtles can be told to go to either a set of coordinates, or a waypoint by name!



If you tell your turtle to go to a certain point, and you don't have quite enough fuel, it will tell you and stop you from even trying.


As advertised, Map supports normal computers in all it's functions. No more gold mining!



To prepare for the 1.74 update, Map will automatically detect if you have it, and if you do, will go into grayscale mode, which looks leagues better than monochrome.




Map is now downloadable on Strafe, a steam-like game distributor program! (1.2.4 as of yet)


Unspoil for bat-paper madness!
SpoilerLook how big my program is! Each page about, like, a hundred bytes anyhow. This is for version 1.3.3.

Upcoming Features:
Spoiler+Turtle support, through config option. Will allow most turtle actions, and will display turtle output, like whether moves succeeded or what blocks are above/below/in front of the turtle when an inspect command is done. Also can send turtles to specific coordinates and activate redstone, and tell what is selected blocks. Done!
+Maybe the ability to wirelessly exchange waypoint files Not necessary
+Better math for finding the direction of offscreen waypoints (I need help for this, PM me)
+Mouse input for menus and stuff
+More animations Not necessary
+A better update function (although the one I have is fine)
+More, if I think of more

Changelog:
Spoiler

::Version 1.3.9 --Current version!
+Added config option 'colorLimit', which simulates being incapable of rendering certain colors. (2=colors,1=grayscale,0=monochrome)
+Added a means of pathmaking, but it doesn't do anything yet (press space, move, press space)
+Added a new mapColor for the background color of the inside of the minimap
*Added a main config path (.map) where everything is stored. FINALLY.
*Made the mapColors config option more readable
*Fixed the monochrome title screen displaying a gray background for the startup text
*Updated help screen text
*Cleaned up the update code a bit
*Made scaleFactor increase/decrease by 0.1, rather than multiply/divide by 1.1.

::Version 1.3.8
+Added a very basic chat function to main screen by pressing T. Messages cannot be too long, as of yet.
+Added config option 'doFlash', which enables the screen flash effect. Default is false.
*Changed config option 'mapProtocol' to number instead of string.
*Fixed the poorly handled usage of seeking other Map clients (changed from changing rednet channel to using modem API)
*Removed most red herrings

::Version 1.3.7
+Allows 'Map' clients to see other clients around them on the screen! Can be disabled.
+Added config option "broadcastData" to toggle whether you want your coordinates and whatnot broadcasted.
+Added config option "networkName" to identify yourself to other 'Map' clients
+Added config option "mapProtocol" which is the rednet protocol used to broadcast/receive coordinates and stuff.
+Added settings options "Inspect waypoint", which lists X, Y, Z, and other data about a waypoint/player blip.
*Fixed bug where if a turtle turns for the first time, it errors.

::Version 1.3.6
+Made a prompt to enter coordinates in spoofMode, so that turtles can go to waypoints w/o GPS. Does not work on PDAs.
*Fixed the loadstring version so it works with arguments.

::Version 1.3.5
+Replaced a single waypoint file with a waypoint folder, where multiple waypoint files can be placed and used.
+Added the ability to click on commands while on the main minimap screen and the options menu.
+Added the ability to change the scaleFactor by putting your mouse cursor on the "Scale: " and scrolling.
+Added animation on main minimap screen that spins. Each time it spins, a gps request returns. If red (or white), then a GPS connection failed. If a gps request succeeds, then it turns green (or lightGray/black)
*You can only delete or rename waypoints that are located in the file called '/.waypoints/waypoints'.
*Fixed bug where turtles, when being sent to a point and lose GPS connection, stop moving and error.
*Made Map default to turtleMode = true when first ran on a turtle.
*Created and fixed bug where the third waypoint you create isn't put in the waypoint file.

::Version 1.3.4
-Removed youChar config option, because I should've earlier
+Added the ability to have colored waypoints, with colored offscreen arrows!
+Added error handling system (via pcall())
+Added title screen for gray/adv/norm computers, and added a config option to disable it (is disabled by default)
*Fixed bug where, when a point goes over the border, it doesn't have a white background.
+Added mapColors config option, to set the color palate of the program.
+Added directionSensitivity config option, to determine how much you need to move for the direction indicator to change.
+Added monitorTextScale config option, to determine monitor text size when using on a monitor (but why would you?)
*Replaced 'mon' argument with 'fast' argument. term.redirect(term.native()) is now disabled until 'fast' argument is given.
*Fixed very minor flickering thing when pressing 'L' on main screen.

::Version 1.3.3
*Flipped X for the map to make sense. I wonder why I never did this before. Turtles defaultly turn the right way now. (yaaay!)
*Config option 'keyAgoesRight' is no longer needed, but it hasn't been removed just in case someone wants to use it.
*Fixed bug where, in the options menu, if you press PRINTSCREEN, then it errors.

::Version 1.3.2:: (cannot be downloaded, replaced with 1.3.3)
+Improved non-advanced computer greatly, preparing for the latest CC release with gray in normal computers. Keeps support for 1.6 normal computers.

::Version 1.3.1:: (cannot be downloaded, replaced with 1.3.3)
+Added turtle support, allowing turtles to be controlled through WASD
+Allows turtles to be sent to either a set of coordinates or a waypoint, by name
+Added turtleMode config option to go with turtle support
+Added keyAgoesRight config option to reverse left/right controls for turtle support, as turning left on the map turns the turtle right
*Fixed some bugs
*1.3.1 can be updated to 1.3.2 with 'map update'

::Version 1.3::
+Added a more compact options screen to help with accidental keypresses
+Added a Rename function to rename existing waypoints
*Fixed bugs
*Helped with small flickering issues

::Version 1.2.4::
+Added better support for non-advanced computers
+Optimizations
+Added other misc features I forgot about but ARE important
+Added autoUpdate config option to automatically update to current version of your number. Doesn't update the version number
+Added 'mon' argument to disable term.redirect(term.native())
*Fixed lots of bugs
*Optimized the code for much greater speed and less flickering

::Version 1.2.1::
+Added scale factor indicator to screen
+Added ability to change scale factor with numpad +/-
*Fixed tons of flickering issues
*Increased speed with term.redirect(term.native())
*Changed config format to make much more sense

::Version 1.1::
+Now works as planned!
+Added advanced computer support
+Added all shown features

::Version 1.0:: --Cannot be downloaded (for good reason)
+First release as a test
-Doesn't allow saving waypoints automatically
-Most features don't work actually

Get to this post quicker with this link! http://bit.ly/1zPQip3

If you get an error when running a newer version of Map after having used a previous version of Map, then do 'map cc'. It will clear your config, and when you next run it, will get it to the latest format.

I had posted this in the hopes that someone like oeed or awsumben13 would remake this into a fancy product, but I've got that done pretty well. For the Phoenix/Silica tablets, huzzah.

You can contract this with STD! Inject it here!
Edited on 05 April 2016 - 03:23 PM
DannySMc #2
Posted 28 April 2015 - 12:41 PM
I actually might make this into a proper standalone program, making it so you can monitor other players that are using the program on my server… Hmm nice job!
Exerro #3
Posted 28 April 2015 - 05:31 PM
I am posting this in the hopes that someone like oeed or awsumben13 remakes this into a fancy product. Please do, by the way. For the Nova/OneOS tablets, huzzah.

Heh, I did think of something like this before, but never got round to it. Nice little program though, although it could do with a little touch of colour (even if it is just a plain green background for the screen).
LDDestroier #4
Posted 08 May 2015 - 11:48 PM
Ahahaha! Now it works awesomely! Here is a small list of changes:

Spoiler

*There is now a 0.4 second delay between getting coordinates (originally 0 sec.), to reduce rednet spam.
+Color support, and nonadvanced support!
+The ability to set and delete waypoints without going in the program (default list at "/.waypoints")
+Config file for some key variables (default list at "/.map_conf")
+Labels of waypoints on the map show up with their names
+The ability to set the scale factor of the map, allowing you to see a much greater area, to help with small maps
+Improved the direction sensor greatly
+No longer errors when disconnected from GPS server. After an 8 sec. timeout, screen turns red/inverts colors.
+Added visible exit option; the keybinding did exist before, but now it is labeled.

How do you like that? And it all could've happened sooner had I learned that I had to serialize and unserialize tables when writing to files.
Enjoy! Please list any bugs or suggestions and I'll be happy to dismiss them!

Update! Just fixed a problem that crashes Map when first ran at startup.

Update! Found out that 'm' did nothing, made it work as intended. Now it is 'L', and it toggles whether waypoints' labels are their names or their distances to you.

New update! Small changelist:


*Changed exit text to include pastebin code, if it needs updating
+Added help option to include quick facts about Map.
+Made Map more accurate, changing a math.floor() to math.ceil()

Why does nobody respond??
Edited on 09 May 2015 - 07:47 PM
LDDestroier #5
Posted 09 May 2015 - 10:21 PM
Funny, my update list broke? Well here's a slightly newer update post:

+Added help option (keybind: 'H')
+Improved rerendering of screen, now just rerenders inside of map and one character left, right, and up of screen.
*Fixed graphical bug where waypoints flicker a LOT. Now they flicker when moving only.
+Added ability to change scale factor with numpad + and -
+Increased speed by doing term.redirect(term.native())
*Changed exit text to display pastebin code in case it is forgotten.
+Added indicator on bottom left of map to show current scale factor.
*Fixed broken delete function, which errored when inputted an unknown waypoint name.
*Waypoint labels can now be seen when waypoint point is off the map
*Fixed some graphical bugs with the screen being red when disconnected from GPS. Now works fine.
*Fixed graphical bug where, if label goes past right side of screen, it appears one line down and all the way to the left.

It's an improvement. I did fix some graphical bugs. Also, this list has changed many times as I fixed some things and added other things.
Also, why does no one respond? My program is awesome!
Edited on 10 May 2015 - 11:44 AM
LDDestroier #6
Posted 10 May 2015 - 02:09 PM
Newish update. Everything from 1.2.1 except the format of the config file has been changed to be more readable and therefore less likely to fail.
Changelist:

*Changed config format to be more modular, and readable.
*Fixed bug where, on first time running Map on normal computer, map area is solid white even when connected.
+Added option to easily edit config (default: 'o')
*Fixed bug where it fails if ran at startup. Apparently 'startup' doesn't like local functions.
*Fixed graphical bug where, if disconnected from GPS and then reconnected, bottom of the screen stays red.
+Added new option, 'map mon', which allows Map to be ran on monitors, for whatever reason.
*Changed default options in creating/deleting waypoints, as well as cancelling when entered nothing when setting scale.

Everybody who already downloaded map, redownload it and do 'map cc' to fix the config.
Edited on 10 May 2015 - 03:15 PM
Robotonic #7
Posted 10 May 2015 - 02:56 PM
I think it's a pretty cool program, seems to be quite useful but there's some odd things that happen, like how the scale gets to ridiculously long decimals and how the zoom + and - buttons require the number row - key for zooming out and the numpad + key for zooming in. Otherwise however, it seems pretty good and I think you should continue with it.

I haven't used it much but it seems like it could be useful in a decent amount of situations.
LDDestroier #8
Posted 10 May 2015 - 04:28 PM
I think it's a pretty cool program, seems to be quite useful but there's some odd things that happen, like how the scale gets to ridiculously long decimals and how the zoom + and - buttons require the number row - key for zooming out and the numpad + key for zooming in. Otherwise however, it seems pretty good and I think you should continue with it.

I haven't used it much but it seems like it could be useful in a decent amount of situations.

I fixed the problem of the numpad minus key not working, and as for the long decimals in the scale, that's intentional because it multiplies the scale factor by 1.1 or divides by 1.1 to change it, so you don't get a negative scale. If I rounded the scale factor, then it would either never change (because 1 * 1.1 rounds to 1), or would never multiply back to 1. Right now, if you make it too small with the minus key, then it doesn't QUITE go back to one, but that's not a major issue. I also increased the speed of rendering of the program, so now it works much faster. The + and - keys no longer make the waypoints flicker!

If you think it would make it look better, I can have the scale indicator display the scale rounded to the hundredths place.
Edited on 10 May 2015 - 02:48 PM
LDDestroier #9
Posted 14 May 2015 - 06:04 PM
I'm really surprised, why aren't people even commenting on my program since I updated it to a usable form?? I made a minimap! It even works!
MindenCucc #10
Posted 14 May 2015 - 06:40 PM
Hmm… It looks neat! This definitely won't slow my game like every minimap does. Also, if MC would start a bit faster, I would comment on all the things that are more useful ingame than in an emulator.

//off-topic: mentioning startup times: MC vs emulator: 237secs vs ~4-7secs (yes, I've monitored these values in Process Explorer)
After ~10mins of randomly freezing, I've FINALLY got a chance to try out your program.

Holy cow! This is amazing! :lol:/> I wish Dan would add the option to render tablets (or PDAs) like maps. The thing I like the most is that little barely-noticable detail, that the arrow points in the direction of your last momentum.
The only thing that is a bit confusing, is the config. You should add some comments to the config. Like I was wondering that what does the spoofMode do?

I think I'll write a mod just to be able to render tablets on the side of the screen, or something. :P/>

Edit: I found a bug, lol :D/>
Spoiler

Edit: found another bug after ~16secs :P/>
Set spoofMode to true in the config, save, exit, and the program will crash with this:
I'm unable to reproduce it again. And I forgot the line number :wacko:/>
The spoofMode seems to be unimplemented/buggy. The rest works great :D/>
Edited on 14 May 2015 - 04:55 PM
LDDestroier #11
Posted 14 May 2015 - 08:19 PM
Wait, where's the bug you found? Because the 'hoem' label is supposed to overlap the border. And as for config, yes I should add comments! BTW, spoofMode makes it so you can test the program inside an emulator, faking movement with the arrow keys. Thanks for the feedback!

Oh right, there IS a bug when going from not spoofMode to spoofMode. and it's because fakeX…fakeZ wasn't defined…I'll fix that.

Edit: Added comments to the config, and made it not error when going into spoofMode from 'o' button.
Edited on 15 May 2015 - 10:37 AM
MindenCucc #12
Posted 14 May 2015 - 10:16 PM
Wait, where's the bug you found? Because the 'hoem' label is supposed to overlap the border.

Oh really? Nevermind then :P/>
LDDestroier #13
Posted 15 May 2015 - 05:45 PM
I added comments in the default config and fixed a bug where if you start Map not in spoofMode, then switch spoofMode = true in the config, it'll crash.
This was brought to attention by MindenCucc. Danke!
LDDestroier #14
Posted 25 May 2015 - 07:24 PM
New update! Now the config file will be located in the directory where 'map' is being ran in. This is to make 'map' Strafe-complient.

Now added screenshots, because a single, very outdated screenshot doesn't sell very well.
LDDestroier #15
Posted 27 May 2015 - 11:52 PM
New update, sorta. Looked over a bit of the code, now it should not flicker when not moving. Also added deadzone for the direction indicator.
Edited on 27 May 2015 - 10:00 PM
Pyuu #16
Posted 29 May 2015 - 09:41 PM
This really deserves more attention.
Nice work!
LDDestroier #17
Posted 31 May 2015 - 12:48 AM
This really deserves more attention.
Nice work!
Thanks! I really was expecting more people to comment than I would.
MindenCucc #18
Posted 31 May 2015 - 08:08 AM
This really deserves more attention.
Nice work!
Thanks! I really was expecting more people to comment than I would.
I don't know, but it may be because most of the people use minimap mods, and that's good for them, but some people (like me) have bad computers, and running a client with/without a minimap is a huge difference (9/26 fps pls). And since you don't need anything cheaty things to set this up (okay, except setting the range of modems to ~2.1mrd blocks), this is a better alternative. And it does not affect the performance. I wish Dan would add a maprenderer to the pocket computers :P/>
Edited on 31 May 2015 - 06:10 AM
LDDestroier #19
Posted 01 June 2015 - 02:41 AM
Wow, I didn't know minimaps used that much cpu. And what do you mean adding a 'maprenderer' to the pocket computers? Do you mean a default program like mine? Because my program being added as at least a treasure disk would be an honor.
LDDestroier #20
Posted 01 June 2015 - 02:10 PM
New update! Added argument to update the program to the latest version, so you (and I) don't have to redownload it from pastebin every time.
LDDestroier #21
Posted 01 June 2015 - 05:54 PM
New problem. When I added the update argument, it might've broke something in the pastebin, because it no longer works. I'll have to get my fresh copy of the program from QuantumCraft if I want to fix what I broke. But until then, please someone help me with it.
MindenCucc #22
Posted 01 June 2015 - 09:12 PM
Wow, I didn't know minimaps used that much cpu. And what do you mean adding a 'maprenderer' to the pocket computers? Do you mean a default program like mine? Because my program being added as at least a treasure disk would be an honor.

Nah, it's not the CPU usage, it's about rendering the world almost twice. My integrated GPU is not as good as a real graphics card. And since my hardware is so old that AMD (Basic Macro Devices) does not have proper driver for Windows 8, I moved permanently to my good ol' Slackware13.37, and now it runs with <8fps because as I said, my hardware is old, that there's no "real" driver for my integrated thingy. Anyways, AMD's drivers were always bad, especially for Linuxes (Linuces? :P/>).
By maprenderer I meant rendering pocketcomps as a map thus showing its screen on a map-like interface-thingy.
LDDestroier #23
Posted 02 June 2015 - 08:17 PM
Damn that was close, anyway I got the bugs fixed, and improved upon a little graphical bug that happens after getting out of a prompt.

New update to the config file. Added 'autoUpdate' (defaults to false). If true, then it will automatically update Map every time it is ran. Turning this on can help with updating to the latest version through Strafe.
LDDestroier #24
Posted 04 June 2015 - 02:37 PM
New update! Found a bug in the command rendering, and fixed it. Then added a screen to select options without accidentally pressing a button as easily. Keybind = 'M'. Also fixed a rendering bug where after doing something like changing the scale with 'S', the bottom of the screen is light gray.
LDDestroier #25
Posted 04 June 2015 - 04:03 PM
Fixed some flickering things and noncolored computer support. Turns out the menu went to a black screen because the default noncolored text color was black on a black background.
LDDestroier #26
Posted 04 June 2015 - 06:13 PM
New update! Now, when labels go over the border, they blend in much more good-lookingly.

EDIT: Also fixed bug where label goes to left side of screen when it goes off the right side of the map. All good here!
Edited on 04 June 2015 - 04:36 PM
LDDestroier #27
Posted 05 June 2015 - 09:27 PM
New awesome update!! Version 1.3.1 is out! Changelist!


+added 'turtleMode' config option, which toggles turtle controls
+added option to send turtle to waypoint or specified coordinates
*Fixed some random bugs

The turtle support is a huge update, and makes this program infinitely more useful. Now it can send turtles to coordinates AND waypoints!
LDDestroier #28
Posted 16 June 2015 - 12:43 AM
New update! Version 1.3.2. To prepare for the latest version of ComputerCraft (which will allow shades of gray in normal computers), Map will now detect whether gray can be added if colors can not, and if it can, then it will render a beautiful grayscale minimap rather than a purely monochrome screen.

This works in LurCraft, which I believe has the beta.
LDDestroier #29
Posted 16 June 2015 - 02:35 AM
Oh woops, fixed a major bug for non-advanced computers in the stable 1.73/1.64 computercrafts. Turns out I didn't have a good way of detecting if gray is allowed on regular computers, but now I do. If _CC_VERSION is defined, then you can use colors.gray

EDIT: Fixed more bugs and updated the nonadvanced color scheme.
EDIT 2: Fixed another glaring bug where you press the numpad after starting in an area with no gps, and it renders the map.

Do 'map update' to get the latest version if you have 1.3.1, because they use the same pastebin.
Edited on 16 June 2015 - 01:08 AM
oeed #30
Posted 16 June 2015 - 06:46 AM
I am posting this in the hopes that someone like oeed or awsumben13 remakes this into a fancy product. Please do, by the way. For the Nova/OneOS tablets, huzzah.

Can't believe I haven't seen this yet. I'd thought about something like this a while ago and using turtles to scan the blocks, but I never got around to it. With Silica in the works it's certainly something we'll (as it's both Ben and I ;)/> ) look in to!
LDDestroier #31
Posted 18 June 2015 - 04:43 PM
I am posting this in the hopes that someone like oeed or awsumben13 remakes this into a fancy product. Please do, by the way. For the Nova/OneOS tablets, huzzah.

Can't believe I haven't seen this yet. I'd thought about something like this a while ago and using turtles to scan the blocks, but I never got around to it. With Silica in the works it's certainly something we'll (as it's both Ben and I ;)/> ) look in to!

Marvelous! Can't wait until you're done creative Silica. It may even be the first external API I would learn.
Oh, and in Silica, try to have it check whether it can do gray or lightGray on normal computers. You can tell if it can if the variable _VERSION or _CC_VERSION exists, as they were added in the beta, which allows that.

And if you don't call your Silica-based OS OneOS, give it a goddamn awesome name.
LDDestroier #32
Posted 18 June 2015 - 08:28 PM
New update! Kinda minor, but it DOES fix a glaring problem I had with my map, and that was that X+ on the map faced right, which screwed with turning left/right on turtles and walking based on the direction of the indicator. It replaces 1.3.2, so you can do 'map update' to get it. In fact, just to have 'map update' do something, all future releases will be under that pastebin code, so 'map update' will now be useful. Yay!
LDDestroier #33
Posted 18 June 2015 - 10:04 PM
Fixed a bug with pressing PRINTSCREEN when in the options menu erroring, and added a ton of screenshots to look at! They're new! They're pretty!

New screenshot! I decided to print my program on special BAT-PAPER just for kicks. See in the screenshots section.
Edited on 18 June 2015 - 10:34 PM
oeed #34
Posted 19 June 2015 - 09:32 AM
And if you don't call your Silica-based OS OneOS, give it a goddamn awesome name.

Yeah it won't be called OneOS. Haven't decided what yet though. :P/>
LDDestroier #35
Posted 20 July 2015 - 02:52 AM
New update 1.3.4, with some fixes and stuff! See the first post for the changelog.
Since I want to have the update option do something, I am now cementing the idea of using only one pastebin file for the latest release, and one pastebin file for the beta, where I test it to make sure I don't screw something up.

Also, I want to request some help for something in my program, open the spoiler for more info:
SpoilerI've been thinking and thinking for a way to accurately place a marker on the border of the map that accurately represents the direction an offscreen waypoint is in, but I've had very little success. I've been so disappointed that I am resorting to asking someone else to just do it for me. I usually don't like having someone else do whole segments of code for me, but I'm really confused as to how to do it.

Here is the relevant code and variable definitions:

itemX - The X position of any particular waypoint on the map ON THE SCREEN.
itemZ - The Y position of any particular waypoint on the map ON THE SCREEN, so higher points have a lower Y.
corner1 - A table, the first item is the X of the topleft corner of the border, the second the Y.
corner2 - A table, same as corner1 except for the bottomright corner of the border.
--Bad code start
if itemX <= corner1[1] and itemZ <= corner2[2] and itemZ >= corner1[2] then
  term.setCursorPos(corner1[1],itemZ)
  write("<")
elseif itemX <= corner1[1] and itemZ <= corner1[2] then
  term.setCursorPos(corner1[1],corner1[2])
  if (itemX+corner1[1]) * -1 >= (itemZ+corner1[2]) * -1 then
    write("<")
  else
    write("^")
  end
elseif itemX <= corner1[1] and itemZ >= corner2[2] then
  term.setCursorPos(corner1[1],corner2[2])
  if (itemX+corner1[1]) * -1 >= (itemZ-corner2[2]) then
    write("<")
  else
    write("v")
  end
elseif itemX >= corner2[1] and itemZ <= corner2[2] and itemZ >= corner1[2] then
  term.setCursorPos(corner2[1],itemZ)
  write(">")
elseif itemX >= corner2[1] and itemZ <= corner1[2] then
  term.setCursorPos(corner2[1],corner1[2])
  if (itemX-corner1[1]) >= (itemZ+corner1[2]) * -1 then
    write(">")
  else
    write("^")
  end
elseif itemX >= corner2[1] and itemZ >= corner2[2] then
  term.setCursorPos(corner2[1],corner2[2])
  if (itemX-corner2[1]) >= (itemZ-corner2[2]) then
    write(">")
  else
    write("v")
  end
elseif itemX >= corner1[1] and itemX <= corner2[1] and itemZ <= corner1[2] then
  term.setCursorPos(itemX,corner1[2])
  write("^")
elseif itemX >= corner1[1] and itemX <= corner2[1] and itemZ >= corner2[2] then
  term.setCursorPos(itemX,corner2[2])
  write("v")
end
--Bad code end

I had an idea that divided waypoints into quadrants, but I couldn't get it to work right.
Someone please help me with this, as it's pretty much the only thing I can't do because of skill.
Edited on 20 July 2015 - 12:53 AM
LDDestroier #36
Posted 20 July 2015 - 05:21 PM
Newish update. Just improved the visuals of the error screen and reduced some very minor flickering with the Z and X labels and the center indicator.

EDIT: Also added some other things I forgot to mention. A new config option that sets the text scale in case you use a monitor with Map, and a special function to redraw the screen if said monitor is resized.
Edited on 20 July 2015 - 03:40 PM
LDDestroier #37
Posted 25 July 2015 - 09:36 PM
Minor update. Options menu no longer exits when you press T or P when turtleMode is false. Also improved help screen by removing outdated items and shortening items to fit in screen better.
Oh, and I made the title screen use colormode instead of term.isColor(), and added 'Made by EldidiStroyrr' and 'Version (current map version)' to it.
EDIT: Also replaced an instance of colors.red with mapColors[8], which is the color of the background when not connected to GPS.
EDIT: Also changed an argument. Removed 'map mon', replaced with 'map fast'. term.redirect(term.native()) will only be ran if using 'map fast', as opposed to it being ran unless using 'map mon'.

Why do I get so few replies…?
Edited on 25 July 2015 - 08:17 PM
LDDestroier #38
Posted 23 August 2015 - 09:24 PM
New update! 1.3.5! Now allows for multiple waypoint files to be shown onscreen! But you can only add, delete, and rename to a single file (/.waypoints/waypoints). Also fixed bug with sending turtles to waypoints or coordinates.
Edited on 23 August 2015 - 08:56 PM
LDDestroier #39
Posted 31 August 2015 - 06:13 PM
Shite, just realized a crippling bug…if you have two waypoints, then making a third one will replace the second one.
And I have no idea how to fix this…can someone help me?
DannySMc #40
Posted 31 August 2015 - 10:08 PM
Shite, just realized a crippling bug…if you have two waypoints, then making a third one will replace the second one.
And I have no idea how to fix this…can someone help me?

I think I may have a solution, just gonna try it though!
LDDestroier #41
Posted 01 September 2015 - 06:50 AM
Shite, just realized a crippling bug…if you have two waypoints, then making a third one will replace the second one.
And I have no idea how to fix this…can someone help me?

I think I may have a solution, just gonna try it though!

Thanks! Please do look at what I done goof'd up. I'm stuck myself…

Yeah, I finally fixed it! So here's what the problem was:
When you create a waypoint, it goes into a file called whatever the variable 'defaultWaypointFile' is called.
If a waypoint exists at all, then it goes into the table 'waypoints'. If it exists in the default waypoint file, then it's also in the table 'fileWaypoints'.
So when you create a waypoint, it should go into both, always! But that wasn't happening.
I went to the only instance of table.insert(waypoints, whatever), and found that there was a for loop inside a for loop, both using the variable 'a' as a counter.

Sort of example:
for a = 1, whavever do
stuff
for a = 1, whatever do
if a waypoint is in defaultWaypointFile then put it in fileWaypoints
end
end

But now it's fixed! I tested it in normal minecraft. Thanks for offering help, DannySMc, but I got it figured out now.
Edited on 02 September 2015 - 06:34 PM
LDDestroier #42
Posted 02 September 2015 - 10:04 PM
New update! Same version number, though.

+You can now click on the commands on the main minimap screen and the options menu.
+You can now change the scaleFactor (zoom) by putting your mouse on "Scale: " and using the scroll wheel.
+Added animation to the main minimap screen that changes after every GPS request, and its color depends on whether or not it was a successful one.
Edited on 02 September 2015 - 08:28 PM
LDDestroier #43
Posted 12 November 2015 - 12:04 PM
New update! Added fakeX, fakeY, fakeZ, and fakeDir to config. Turtles, if they don't have GPS access, will ask for their coordinates, and they will update when they move.
LDDestroier #44
Posted 30 November 2015 - 03:53 AM
New update 1.3.7!
Added the ability to see other people that are using 'Map'! Your coordinates are broadcasted for this, but it can be disabled through a config option.
I've been trying to do this for a while, but now it's done!
LDDestroier #45
Posted 22 January 2016 - 02:03 PM
New update 1.3.8! Added a basic chat function by pressing 'T' on the main screen, and polished up the client detection functions. Also added a config option to disable/enable the screen flash effect, and changed mapProtocol to a number value.
You will have to do 'map cc' to use the new version, if you have the previous version
LDDestroier #46
Posted 22 February 2016 - 01:51 AM
New update 1.3.9!

New config option 'colorLimit' that limits the color palate of the program (2=allows all colors,1=allows only shades of gray,0=allows only black+white)
Also added a new mapColor (palate) option to set the color of the inside of the map. I think it looks better. I also cleaned up the update code and fixed some other problems. Oh, and I made a single, contained config folder to store all other things. So that's nice.



…oh right, and I made changing the scaleFactor be by 0.01, and not by a factor/divisor of 1.1. I should've done that a while ago.
Edited on 15 March 2016 - 03:22 PM
LDDestroier #47
Posted 18 March 2016 - 02:00 AM
Now on SimSoft!

Another thing, is that the scaleFactor now changes by increments of 0.01 instead of 0.1, because that's just not precise enough. I also fixed a bug where it would crash if Map was placed into a read-only folder (like with a server resourcepack.)