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

"algorithm" to convert the text data to a gui #205

Open
projectdelphai opened this issue Dec 30, 2014 · 3 comments
Open

"algorithm" to convert the text data to a gui #205

projectdelphai opened this issue Dec 30, 2014 · 3 comments

Comments

@projectdelphai
Copy link
Member

We do need a way to convert all the text data we have to a gui representation. This is to help with #204 and #130.

@projectdelphai
Copy link
Member Author

what I have so far:

  1. start out at the initial position and draw an x there.
  2. check if tile exists above
  3. move up one tile (increment y) and draw a line between to show tile divide.
  4. keep on moving up until the are no more north tiles.
  5. check if there is a tile to the east. if there is, move right (increment x) and draw a line. Keep on moving right until nothing is left.
  6. here it gets harder to explain but basically, keep moving forward and map out all the tiles until you reach a dead end. at that point move backward one tile and map out all the endless possible paths from there.
  7. Keep on mapping out the paths and move back as each tile's paths get filled out until you've laid out the whole thing

One problem that I see with this approach is that it can take a lot of processing power to do this every time the player makes a move. Some possible solutions:

  1. To keep the mapping small, impose a limit to only "walk" the possible paths 5 tiles out and then come back (for example).
  2. or, keep the mapping the whole time and place the "x" at a different tile if possible. Only redraw everything if there's a teleport or a z-level change.

@paddatrapper
Copy link
Contributor

Another option is for the GUI client to hold a map object or the locations.json file and query the server for the current coordinates. It then redraws the map based on the new location. To save processing power this can be done only for the coordinates that are visible in the map frame

@bearddan2000
Copy link

What about using a no sql database to store json files? Then use spring boot JPA to create a web service.

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

No branches or pull requests

3 participants