Pages: 1
Topic closed
Basically, I am making a 4th city game. As many may know, my Generation:3000 project did not go too well, as it required 96 sprites for each tile just to get the city moving.
What I need is the same effect, except you can only see say 9 sprites on the screen (one in the middle and the others showing half a side). So, instead of having to make 96 tiles, I should hopefully only have to make 9, because whilst one is roughly in the middle of the screen, the others are on the edges of the screen. The idea is, when it reaches the edge, is darts off to the other side of the screen, to make a loop affect. However, when it does this it must change costume.
The problem with costumes is, if this were a linear game than I could easily make it change to any costume I WANT it to be. However, because this is a building game, it would have to read off a list what building it must show. Because it cannot look like a park if a player placed a house in that spot.
PLEASE HELP!
IT WOULD HELP THE FOLLOWING GAME:
+Build in 5 different locations: China, France, Spain, Egypt and Ireland!
+Build around (undecided) 30 buildings!
+On a grid of 324 tiles! (Over triple the amount in the last game, which had a mere 96 tiles).
+Has a fun campaign mode!
Offline
If I understand you correctly, you want, what is basically, a 2D list.
(y-position * width) + x-position + 1 would work for a list like this:
0 1 2 3 4 5 6 7 8 9 10 ... x positions
0| x x x x x x x x x x x
1| x x x x x x x x x x x
2| x x x x x x x x x x x
4| x x x x x x x x x x x
Asking for the item at (4,3) in a list that is 10 by 4, would get you 44. Asking for (0,0) would get you item 1. Asking for (0,1) would get you item 11.
Last edited by MoreGamesNow (2012-02-06 16:41:53)
Offline
MoreGamesNow wrote:
If I understand you correctly, you want, what is basically, a 2D list.
(y-position * width) + x-position + 1 would work for a list like this:
0 1 2 3 4 5 6 7 8 9 10 ... x positions
0| x x x x x x x x x x x
1| x x x x x x x x x x x
2| x x x x x x x x x x x
4| x x x x x x x x x x x
Asking for the item at (4,3) in a list that is 10 by 4, would get you 44. Asking for (0,0) would get you item 1. Asking for (0,1) would get you item 11.
thanks! i'll give it a try!
HOW DOES THE COSTUME CHANGE?
Last edited by Borrego6165 (2012-02-06 16:53:48)
Offline
Oh... right, sorry for leaving that out.
Switch to costume[(formula above)]X and Y position are the x and y positions of the squares on the grid.
Last edited by MoreGamesNow (2012-02-06 17:11:34)
Offline
Topic closed
Pages: 1