• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Game Breaking News

Latest game breaking news from around the world

  • Submit
  • Disclaimers
  • About
  • DMCA
  • Privacy Policy
  • Contact
  • Show Search
Hide Search
You are here: Home / How to handle a scrollable map and player coordinates

How to handle a scrollable map and player coordinates

· May 21, 2019 ·

I have a large map that a player will navigate over. Currently, it is just a single background image, but I would like to make it tiled map. How do I properly keep track of player coordinates?

Currently what I have working is:

1) I have a 800px wide by 500px high playing area 2) The player is normally positioned in the center of the screen at approximately (400px x 250px) 3) When the arrow keys are pressed instead of the player moving the map moves. I am currently using background-position at the moment to set which area of a background is displayed.

What I am currently trying to wrap my head around:

4) When the map reaches the boundaries it will no longer scroll, but my player is stuck in the center. 5) How to get the player back to the center again when they start to travel away from the corners.

The main problem I am having is knowing what coordinates I should be keeping track of. For example, should I be keeping track on only one of the following, or all three of the following:

  • Player position in map
  • Map position on screen
  • Player position on screen

What is a standard way to handle player movement like this?


  • ‘Overwatch’ Rialto Map Hitting PTR
  • Fortnite Moisty Mire treasure map location – where to search and how to finish the Week 9 challenge
  • Is the VR Universe in Ready Player One Possible?
  • 3D Mapping and 3D Modelling Global Market 2018 Key Players,Share, Trend, Segmentation And Forecast To 2025
  • Map Selection is Coming Soon to PUBG
  • Google Maps brings Street View to the International Space Station
  • Evansville Police Scanner and Daily Crime Map
  • The Automated Material Handling Market is estimated to hit $32.36 billion by 2023
  • Why owners of Twitter’s rarest names turn down THOUSANDS to keep their handles
  • MSU's top 50 football players: No. 1 George Webster

Filed Under: Tags maps coordinates, maps with coordinates, map with coordinates, google map how to get coordinates, google maps coordinates, enter gps coordinates google maps, plot coordinates on map, coordinate google maps, google maps area 51 coordinates, coordinate format google maps, coordinate to map, mapping gps coordinates, map x y coordinates, entering coordinates in google maps, entering coordinates into google maps, mapping with coordinates, geographical coordinates map, creepy google maps coordinates 2016, enter coordinates in google maps, maps enter coordinates, adc map book coordinates, map find coordinates, find geographical coordinates with google maps, maps x y coordinates

Primary Sidebar

RSS Recent Stories

  • Final Fantasy 7 Remake listed as PlayStation 4 timed exclusive til March 2021
  • Fortnite is secretly great for Lighthouse Roulette
  • PlayStation-made baseball series will release on non-PlayStation consoles
  • Final Fantasy 14’s Naoki Yoshida on the next generation and the challenges of future-proofing MMOs
  • Crisis on Infinite Earths Showrunner Explains Why SPOILER Had to Die So Soon
Copyright © 2019 Game Breaking News. Power by Wordpress.