Tag Info

New answers tagged

0

An other approach would be to use an UIButton for each country and detect if the player touch the non transparent part of the png. For that you need an UIBUTTON that respond to touches only in areas where the image that is assigned to the button for UIControlStateNormal is non-transparent. There is a custom UIBUTTON class : OBShapedButton ...


2

Interesting idea. It's a bit "square peg, round hole," but it could work. The biggest problem I foresee is in dealing with the animation of any sort of sprite that needs to transition from one cell to another smoothly. You'll probably have to do some hoop-jumping to make that work well, especially in the context of a scroll operation (which you'll also need ...


2

Data structure Vector of vectors (a.k.a. array of arrays) Using this data structure allows you to consider vertices and edges (specially useful when dealing with one-way streets or roads) and it also let's you consider more efficient maps, leaving out obstacles. In this case you would use at least two vector of vectors; one for storing the vertices and ...


1

I'll refer to map nodes as tiles for the purpose of explanation, but the principles are the same. If you have more than one node in an area, then your "tile" would contain an array or list of nodes. For all of these, graph theoretic applications can be applied, though the method of application becomes more or less complex depending on what specific algorithm ...


4

Actually, after thinking about it for a bit, here's what my solution would be for both disk and memory storage; a mock-up in JSON: { "map_segments": [ ["upper_left", "top", "top", "upper_right"], ["left", "empty", "town_center", "right"], ["left", "shopping_area", "player_house", "right"], ["left", ...



Top 50 recent answers are included