Computer Science Canada map tiles-drawing several small grass tiles etc |
Author: | Kingnoz [ Sun Aug 03, 2003 7:55 pm ] | ||
Post subject: | map tiles-drawing several small grass tiles etc | ||
k what i am doing is making a rts style game with several different tiles to form the map kinda like how it is in warcraft and starcraft etc.
i was wondering if there is a simpler way to write this instead of writing all that code, which i posted above, |
Author: | Kingnoz [ Sun Aug 03, 2003 8:15 pm ] |
Post subject: | |
darkness maybe u could help cuz ur way of building a tile map worked great |
Author: | SilverSprite [ Sun Aug 03, 2003 9:35 pm ] | ||
Post subject: | |||
do something like this
you get the picture |
Author: | Kingnoz [ Sun Aug 03, 2003 10:23 pm ] |
Post subject: | |
could u plz do a small example of 5 tiles by 5 tiles...i don't quite fully understand the dimensions of the tiles will be 10pixels by 10 pixels |
Author: | PaddyLong [ Sun Aug 03, 2003 11:14 pm ] | ||
Post subject: | |||
ok so some explanation .... the grid array keeps track of what is in each tile ... so if it's set to 0 then we'll say that is empty. if it is set to like 5 then let's say that means there's a guy in that square ... you can make up the key however you want then the second set of for loops just go through and check each square and if it is set to 0 (meaning there is nothing in that square) then it draws the grassTile image ... you will need to add more to that if statement to check for each of the keys that you have (as explained above)
|
Author: | SilverSprite [ Sun Aug 03, 2003 11:36 pm ] | ||
Post subject: | |||
|
Author: | SilverSprite [ Sun Aug 03, 2003 11:37 pm ] |
Post subject: | |
MINES NICE ![]() ![]() |
Author: | Kingnoz [ Sun Aug 03, 2003 11:39 pm ] |
Post subject: | |
thanks for ur help silversprite and paddylong silversprite ur example would work really neat for a map editor ![]() |
Author: | SilverSprite [ Mon Aug 04, 2003 12:16 am ] | ||
Post subject: | |||
better with view.update |
Author: | SilverSprite [ Mon Aug 04, 2003 12:17 am ] |
Post subject: | |
+18 bits to bugz |
Author: | Kingnoz [ Mon Aug 04, 2003 12:33 am ] |
Post subject: | |
+10 bits for ur map editor example |