Tile Layers
by Sérgio Massa · in Torque 2D Beginner · 01/02/2014 (7:13 am) · 4 replies
Hello,
I was wondering, is there no equivalent of Tile layers in T2D MIT? Is the composite sprite the way to go for random generated tiles? And in this case, would have to code tile logic independently?
Thanks
I was wondering, is there no equivalent of Tile layers in T2D MIT? Is the composite sprite the way to go for random generated tiles? And in this case, would have to code tile logic independently?
Thanks
#2
I had started this on T2D 1.8, so I was hoping to be able to port, but guess i'll have to redo the logic, basically, i've been generating the tilemaps randomly. Multiple tile layers strung together and wrapping around themselves (Couldn't seem to generate in 1.8 tile layers with more then 200 tiles by script).
The coordinate system in 1.8 has been specially useful, as when I generate the tiles I set the custom data according to the frame and just switch them out when people interact with the tiles... Haven't downloaded the MIT version yet, just checking it out superficially to see if its worth porting, especially for the Box2D physics and considering i hardly never use the editor seemed like it wouldn't be much of a problem..
01/02/2014 (7:21 am)
Hey Mich! Long time man.. How's it going?I had started this on T2D 1.8, so I was hoping to be able to port, but guess i'll have to redo the logic, basically, i've been generating the tilemaps randomly. Multiple tile layers strung together and wrapping around themselves (Couldn't seem to generate in 1.8 tile layers with more then 200 tiles by script).
The coordinate system in 1.8 has been specially useful, as when I generate the tiles I set the custom data according to the frame and just switch them out when people interact with the tiles... Haven't downloaded the MIT version yet, just checking it out superficially to see if its worth porting, especially for the Box2D physics and considering i hardly never use the editor seemed like it wouldn't be much of a problem..
#3
1. Read this doc: CompositeSprite Guide
2. Use the CompositeSprite as a container and place using world coordinates. Add sprites using the LogicalPosition and Size properties.
3. If you need to save it to file, utilize the TAML system as shown in this doc.
4. Start by using CompositeSprite. If you find it's rendering capabilities do not meet your demand, try creating a custom object in C++. Follow the WaveCompositeSprite example.
That should point anyone who reads this thread in the right direction.
01/02/2014 (7:52 am)
Talked about this live in IRC. Here's the summary of the talk:1. Read this doc: CompositeSprite Guide
2. Use the CompositeSprite as a container and place using world coordinates. Add sprites using the LogicalPosition and Size properties.
3. If you need to save it to file, utilize the TAML system as shown in this doc.
4. Start by using CompositeSprite. If you find it's rendering capabilities do not meet your demand, try creating a custom object in C++. Follow the WaveCompositeSprite example.
That should point anyone who reads this thread in the right direction.
#4
01/02/2014 (9:43 am)
Oops, sorry, should have come summarize here, thanks for the help Mich, composite sprite is working great. Already got started... With rectilinear layout it works in a grid perfectly for what I need..
Employee Michael Perry
ZombieShortbus
No.
Yes.
What kind of logic?