i'd like to load a map from a map service like google, ask for number of players, then add that number of boats to the water edge, then ask the players to decide where they want to fish that day i.e. controls to move the boat.
how do you recommend getting started - is it easy to add layers to google maps so i know where the coast line is i.e. so boats can't sail through a cliff.
(question is about using maps in games rather than multiplayer...which we've had some success with bluetooth)
alternatively, if you know of such a game please send the link!
Highly improbable Howard..at least with Google Maps and AI2.
Do you need a real Google Map? What you can do is use an AI2 Canvas, put an image of a map in the background..with a shoreline if you want. Then use the coordinates to plot the positions of the 'boats'...sprites? and use the types of things developers use when working with AI2 Canvas to provide 'barriers' and possible objects. Reading this may give you some ideas: http://www.appinventor.org/ Chapter17
Gotta' use a Google Map? You can not put and use layers as boundaries on a Google map in this app. What you MIGHT do is use the
See the section titled Programming Complex Situations here: http://www.appinventor.org/ Chapter18 This routine lets you know if a geographic location is within certain boundries set up using latitude and longitude. It uses the LocationSensor, but it does not need to. The routine could be used to check whether a point is inside or outside certain geological boundaries. This code could be modified to tell you to set up some boundaries, or perhaps a lot of exclusion boundaries along a coastline perhaps.
Great news, the boundary routine does not have to have latitude or longitude ... you can use the routine with a Canvas' x, y locations too and create a boundary that way on a nonGoogle map. Oh, and the map you use as a background can be a Google static map stored as an image. You can have lots of images of maps stored in resources and select which places you want to fish.
So, Howard, go fish! Try some blocks. You come up with an interesting project, consider sharing it either here or here http://gallery. appinventor.mit.edu/#
Thanks Steve,
It doesn't have to be google, I was also thinking of open street map, or some other mapping service.
I just want the ability to easily markup a map with some features e.g. coastline, marine protection area, fish abundancy hot spots, and then load the map as a link. What I really want to do is allow people to enter a map coordinate and the game is then played in that location. I want the minimum mapping effort on my part, so I can focus on the fishing game.
Thanks for the links, I will take a look and we'll definitely share it if we get going. (Actually, we're even planning to show it at the nexthttp://oxford.geeknights.net/)
It doesn't have to be google, I was also thinking of open street map, or some other mapping service.
I just want the ability to easily markup a map with some features e.g. coastline, marine protection area, fish abundancy hot spots, and then load the map as a link. What I really want to do is allow people to enter a map coordinate and the game is then played in that location. I want the minimum mapping effort on my part, so I can focus on the fishing game.
Thanks for the links, I will take a look and we'll definitely share it if we get going. (Actually, we're even planning to show it at the nexthttp://oxford.geeknights.net/)
댓글 없음:
댓글 쓰기