Could you use PNGs to create whole maps? Would that even be efficient? Would it crash byond or strain it too much?
What about to this extent:
Say I had a 500 x 500 map, and 10 for the Z levels, could I make a map of just water that is 500 x 500 tiles (32x32 pixels each) and make it have density, then use more PNGs to make up islands to go on top of that PNG of water and make them passable. I know doing this that your water would be motionless, but this is just a theory of a quicker way to produce large maps. So is this possible? Rather, is it practical?
ID:152234
Aug 18 2007, 1:13 pm
|
|
In response to Foomer
|
|
I just wish there was a way that I can stray away from the 32X32 limits and make a map that looks fluid, instead of spending days upon days recreating it in single cell icons and then coding them... it's an arduous process.
|
In response to Cloudiroth
|
|
There's nothing wrong with using a large png file as a base for your map. Just don't plan on plopping it down and calling it done without some performance issues. A more practical solution would be to design a large graphic that you can easily split yourself into managable chunks. You'll still have to lay down the turfs manually, but the overall effect should meld well since it was all originally one image to begin with. You basically want to avoid using the same-looking types of turfs that are only slightly different, when the same turf would suffice. Mainly open grass, water, paths, foliage and trees, buildings and common structures.
~X |
In response to Xooxer
|
|
Yeah, and thats how I did it in past times, but over the years I have found myself with less and less spare time as life gets a hold of me. I've been with byond for a longgg time now, but unfortunately everything I worked for over the last 4-5 years was erased due to my harddrive giving out. So, I'm back to square one. And I dont want to spend weeks trying to make something look pretty haha.
|
This can be good for some situations, but bad for others. For example, a single .png file or .bmp file can only define one layer of substance. You can't put items on a .png file map, unless you combined methods or add more .png files which would be horribly innefficient.
Then there is efficiency. This could be right for what you are doing but it is usually the wrong way to go, even for a simple height map. I believe a .png file is 4 bytes per pixel and uses a bit of compression. That might be waaaay more bytes than you'd need, especially for a 2D game. 2 bytes per tile + compression and proper definition design should be pleanty. Another bad thing about .png/.bmp maps is that they are easily editable. I know that sounds like a good thing, but unlike XML configurations, a user should NEVER be able to edit a map file directly. They should always use the map editor you provide them with. This prevents corruption and synchronization issues. Because of this, map files should always be obfuscated, compressed, or encrypted (depending on the algorithm involved), or at the very least, not a commonly known file type like .png :P |
Oh it works, but even on my modern computer it lags badly. I had the complete Legend of Zelda overworld map in a .PNG format, I resized it to be in proper porportions and then I put it into a BYOND world.
After I figured out what size game map I needed to place the entire overworld map on, I created a turf which used the map as the icon source. When I first went to go place the map, it took around 5 mins for it to even show up, my entire computer froze, and then once it was placed, it took another 5 mins to compile it. |
In response to Revenant Jesus
|
|
What about going in to an icon file and copy and pasting it into an icon file so its one file, one square and then putting it in the map, so its not a PNG, its an icon format, but its larger? What about making towns by importing the image then using the single cells to recreate it?
|
Not practical at all. You'll end up placing down dummy objects and such over the map to do what's needed. The map will also use entirely too much space, and the RSC file would be quite large.
and what if you want to edit the map? Well, you have to edit that picture and those dummy objects you are using to trigger events. |
Possible? Probably. Also a very very bad idea, and definitely not practical or efficient. Incidentally I believe I read once that Baldur's Gate did this, which is why it took up a couple gigs of hard drive space.