开发者

Should I use Google Maps API for creating Gaming maps?

开发者 https://www.devze.com 2023-01-04 21:45 出处:网络
Hi I just want to ask about those custom Google maps that you can put on your web page, I was thinking of using them for a couple a \"maps\" in a game to show where certain items are on one \"layer\",

Hi I just want to ask about those custom Google maps that you can put on your web page, I was thinking of using them for a couple a "maps" in a game to show where certain items are on one "layer", location of destructable objects in another layer, spawn points and all that. I was wondering if the Google API can cover all these o开发者_C百科r should I make one myself?


The layers would be conceptual (ie, the GMaps API doesn't know about layers) but yes. You can store the markers you add in your own layers array. Each member of that array would be an array of markers corresponding to each type. You can create your own custom markers, spawn them at any point in the map and so on.

The API may be too slow for a game where markers move real time, for a turn based one it's certainly possible.

What you can't do is to copy the image and redistribute it, so your game would have to run on top of Google Maps.


You can use Custom Overlays or Ground Overlays (for map-like objects and "layers"), and markers (for item-like objects).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号