Creating world without bounds
krumza

Hi again! I planned make an multyplayer  strategy  game with huge world, which i hold on server and send piece of map only when player needed (he is scroll map)/

Visual logic of game as i think same that scrollerl-platformers - world without bound? but in my caswe player can scrolling map and get new fragments of global map from server (in scrollers in do procedurial in game script)

But if a do it in isometric mode - i must define width and heght tiles of view - how can i increase dinamicly?

I can do it whitout isometric plugin - just isometric sprites and good placement- give same visual effect - but i ask  - can i do this in WADE??

 

 

All 3 Comments
Gio

You can change the number of tiles of the isometric terrain at any time using wade.iso.setNumTiles(x, z)

Another function that you will need is wade.iso.setTile(x, z, tileData, tileHeight) - you would use it to set the data for any new terrain tiles.

krumza

What happen if the player open very large piece of global map? Probably it discrease performance? 

I.e.  player current screen contain 100*100 tiles, and if he scroll to any  side  - he get (whet it triggered) same size piece of map - 100*100 tiles.

It i see as wade.iso.setNUmTiles(100,100+100), But what happen when player being scroll in one side and get piece of map again and again.

Does we get 60 FPS whet tilemap size will be 100*10000? Or exist method for deleting invisible tiles from memory or updating?

I think iso plugin dont help me in this game and better do it whithout iso, as a simple plain game.

I mean big - is really big - with different servers, contain many thousands players ang global map contain millions objects in billions tiles))))

Now it look like:

When player scrolling for any side  - he get piece of global map whet triggered (global map divided by sectors)

But now it work as no iso game - onli combine simle sprites on plain game whithout borders/

Gio

Performance depends on what these objects do on the map.

WADE takes care of optimising the draw part of it, so it doesn't even try to draw things that are not on the screen. For drawing, it makes very little difference whether your world contains 100 tiles or 100,000. Only what's visible matters. But you must manage the behavior your objects, i.e. for example stop the motion and animations of objects that are far away, disable AI, etc.

In your case it'd be a good idea to set the map to a very big size (however big you need it) with wade.iso.setNumTiles. However leave most tiles empty, and only call wade.iso.setTile to load the tiles that you want the player to see. You can also use wade.iso.setTile(x, z, null) to effectively remove a tile (set it to empty), which improves the memory usage and overall performance by a tiny bit - but if you have millions of them, it all adds up.

Also note that wade.iso.setTile is used for terrain tiles - what you do with your SceneObjects on top of the terrain is a different matter.

Like you say, you could also do this without the iso plugin. Performance-wise, I don't think it's going to make a massive difference either way.

Post a reply
Add Attachment
Submit Reply
Login to Reply