Okay, I'm trying to figure out how to find the area of a map (Width * Height) so I can create an image to act as a pseudo lighting thing (Id est, the room is dark, but light comes in through the windows and other light fixtures).
I know that the Width and Height of a single tile is 32x32, but I don't know the equation that allows me to find the area of a map. (Say, 32x32 tiles, or 20x50 tiles for example)
Are there any people here who are good with math that can help me out with this?
If you check your map properties, it'll say the map size in Width and Height, multiply both those numbers by 32 and you can find you area. (or the dimensions i guess)
17W and 13H...
32*17=544
31*13=416
???
Answer?
It doesn't work quite like that. If the dimensions were in, say inches or centimeters, then you would just multiply the 2 numbers together
e.g. 10 inches/cms wide and 20 inches/cms high would equal 10 x 20 = 200 square inches/cms.
But you are doing this in pixels. 544 x 416 = 226304 ~ but what? square pixels makes no sense.
If you are creating your image in Photoshop/GIMP or similar, simply make your blank image the same number of pixels high and wide as your map. There is no need to calculate the square footage.
Oww... My brain. Okay, so if I have Width and Height, what do I do with it to get the total area? Is it added, multiplied?
The total area in pixels or tiles?
In both cases you just multiply.
But why would you want to multiply it? If you open up a new image in PhotoShop/Gimp/whatever, specifying 544 width and 416 height, then you will get the exact size you need. Multiplying those figures will only give you something huge, and it will not fit your map.
Oh, that makes sense. So I don't have to know the area of the map to create a shadow-type thing, regardless of size?
Oh! Now I understand. Thank you, that was exactly what I needed to hear.
Though, question: Would I have to adjust the width and height accordingly, for instance, 17x13 would be a normal map and would have to have the values 544p*416p (Height*Width) inserted, but 33x45 would have to have 1056p*1440p (Height*Width) inserted?
Why do you think you need to adjust it?
Because I'm still learning, and things that are obvious to other people go completely over my head. I mean, I look at a map and I think, 'This map is bigger than the other, so I have to change to compensate'. How else am I supposed to create a 'light' effect around a window?
Yes - every time you want to use an image on your map to add lights, you need to make a new image specifically for that map, and you need to make it as large as the map. Think about it - if your maps are different sizes or filled in differently, then you HAVE to have different images for the lights, because they won't be in the same places.
So the width of your image will be the number of tiles across x 32 pixels, and the height will be the number of tiles down x 32 pixels.
Depending on how complicated you're getting, you can also do lighting just using tiles and events.
Okay. I've got that down.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.