-
Anyone know how to make up a picturebox of a map with different graphics.
I'm making a map with different terrains, and I was wondering if I could just use one picturebox and use like a code that can turn numbers into graphics for the picturebox
Ex:
1 = Tree
2 = Water
3 = Grass
13333332213333333
11333322233333333
13332222233333133
22222222223333331
-
Just make an byte array to store it and make an xloop inside an yloop to draw the map reading the array and using graphical methods like bitblt or imagelistviews draw.
-
Yes you can use numbers to represent things. I used about 50 differnt numbers one time so it gets kind of confusing when you have a lot. A good way to do it is to create a Const for the App i.e the Variable for the 348 Const could be TREES, which is much easier to remember than 348.