Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6222331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:17:45+00:00 2026-05-24T08:17:45+00:00

I am developing a web game where players are moving around on a map

  • 0

I am developing a web game where players are moving around on a map that is 5000,3000 km wide. The coordinates of resources, bases, etc. are stored in the database as x,y pairs in a normal Cartesian coordinate system.

When a player views his vehicle screen, I want to display a map of the area in his/her vicinty. The size of this window for this example would be 50 km.

I think that svg is the best way for me to render this map on the fly. I am not using a tile map as the terrain is basically like a pool table (flat with no features). The map will be just the 50km by 50 km window with points of interest plotted in it.

I have read that you can plot points in svg based upon another coordinate system beside the default one ((0,0) in the top left). My problem is that in my testbed I cannot render a line in a regular Cartesian coordinate system.

This code plots nothing for me:

<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="200px" viewBox="0 0 200 200">
  <g transform="scale(1,-1) translate(0,200)">
    <line x1="20" y1="20" x2="40" y2="40" stroke="red" stroke-width="4" />
  </g>
</svg>

I was thinking that reversing y and translating it to max y would do the trick.

Your insights would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:17:46+00:00Added an answer on May 24, 2026 at 8:17 am

    When you scale before you translate, the translation coordinates are given in the coordinate system after scaling. So you’re translating everything to a point 200 pixels above the top of the image. You want to do either of

    transform="scale(1,-1) translate(0,-200)"
    

    or

    transform="translate(0,200) scale(1,-1)"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a game for the web. The map of this game will
I'm developing a game that I will distribute using Java Web Start / JNLP.
I am developing a live-action tag game (called DeTag) that uses a web interface
I'm developing a game in PHP+Mysql that is hosted in a shared web hosting.
We are developing a web game that uses WebGL for the two biggest parts
I'm developing a web game application with a, HTML5 canvas that has to react
I'm developing web app that user can save his/her work to server. The data
I'm developing a web game in pure Python, and want some simple scripting available
I am developing a web-based Pokemon Online game. Since it is online, I would
I'm designing (and developing) web software that will allow the general public to sign

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.