|
-
bibuti.
[F8] Large map problems with tonypa's tutes?
I'm currently working with a large(ish) map for a game, using tonypa's tutorials as a foundation.
When I make a map that's larger than a certain amount, it stops displaying all the tiles on the screen and it looks like the screenshot:

Is there any reason why it does this? The only thing I have changed from the default code is the size of the tiles, the tile width/height, and then the size of the map array.
I need something like a 71x40 map with 12x12 tiles and I don't see how that would be unreasonable.
i'm obsessed with video games.
-
could be a depth problem,try changing the depth of the attached tiles to wherevertheyareplacedin.getNextHighestDepth()
C.M.
-
Script kiddie
 Originally Posted by nolen
I need something like a 71x40 map with 12x12 tiles and I don't see how that would be unreasonable.
Two thousand, eight hundred and forty movie clips with vectors in them is gonna slow down the player a lot, especially if you're on a Mac.
-
Pumpkin Carving 2008
Not as much as you'd think, V. I mean I could be wrong, but the platformer I'm working on uses 5000 objects per level just for tiles (50x100) (tile 32x32) and I only lose about 3-5 fps. Honestly, it sounds to me like a loop issue when loading. Check your map to make absolutely sure that it's rectangular (even lengths for every line), and make sure that your for loops is reaching the end of the map by placing a trace inside the buildMap(map) function that will trace the newly made tile. Then scan your output yourself and look for any inconsistencies.
Code:
if (y>=0 and x>=0 and y<=map.length-1 and x<=map[0].length-1) {
game[name] = new game["Tile"+map[y][x]]();
} else {
game[name] = new game.Tile25();
}
game.clip.attachMovie("tile", name, 1+y*100+x*2);
game.clip[name]._x = (x*game.tileW);
game.clip[name]._xscale = game.clip[name]._yscale=200;
game.clip[name]._y = (y*game.tileH);
game.clip[name].gotoAndStop(game[name].frame);
trace(["Tile"+y+""+x]); // <---- outputs my last tile: Tile9949
Aye, V. I just realized that all his tiles will be on screen at one time. So yes, that will slow it down.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Truimagz.com
using tony's tut back months ago I created a tile map....
214,550 tiles and it ran like a dream, didnt notice a difference between that and a 100 tile map.
now I was only showing 50x50 on screen
but I think an array could handle 10 times that before having problems.
My map array was so big I had to use an external as IDE becuase flashs was lagging but outsie of that It worked fine.
-
Script kiddie
Well, the number of tiles doesn't worry me, it's the number of visible tiles. Flash can cope with big arrays, but the rendering engine can't cope with lots of vectors.
-
Pumpkin Carving 2008
Yeah, that's why I edited that post at the bottom. I realized that he hadn't got to the scrolling/visible area part yet, but that still wouldn't be the reason for his problem.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Truimagz.com
HMM.........
I wonder if 2,800,000 tiles would be to much.......
I mean essentially I could take every zone map, consisting of 200,000+ tiles and just make one huge map out of the 14 maps I have now...
Only problem I see is massive pre-loading time, maybie I could make an install program, but I think it would kill a game.
I still think load as you go is the best way.
-
M.D.
why would you even consider 2,800,000 tiles being scrolled, you really only ever need the amount visible of screen, however it can be speedier by using areas, 3 if you're clever.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|