zomgistania

Main page | About | Articles | Previous Posts | Archives

Sunday, May 07, 2006

Tiling trouble

Last time I posted about the tile map editor thing for my engine.

Now I'm in the middle of reworking the whole tile map code. There was a certain bit of problem: all the data a tile had was the texture and the name of the texture.

..and the texture name part was kind of glued on top of the Plane object :p


So now I've made a struct for tile data. It contains a name for the tile, a tile type (something like.. can go here, can't go here and such) and a TextureData struct, which contains the name of the texture and a reference to the actual Texture object.

I need to do some refactoring on the tilemap classes to make it use the new data structures and so on.



Being an old C/C++ user (and PHP), I sometimes just can't get it into my head that C# passes classes as references. I always feel like I'd need to use a pointer or something like that. Honestly said it's a very useful feature to not have to do that.

0 Comments:

Post a Comment

<< Home