Game Development Community

Expand tile layer in every direction

by Jemand den es nicht gibt · in Torque Game Builder · 02/13/2007 (7:14 am) · 2 replies

Sometimes, when editing a tile map you find you need space to the top or the left. Right now, when you resize the tile layers, they get expanded to the right and the bottom. It would be nifty if you could decide yourself how the layer will look after resizing.

#1
02/13/2007 (7:51 am)
@Oliver, you can write a fairly simple 'resource' that allows you to do something similar to photoshops Canvas resize where it gives you options like 'Top Left', 'Bottom Right', 'Center Left', etc ... and then move all the tiles in your layer around --

I have some C++ code that allows you to retrieve the ImageMap and Image Frame of a tile, I could provide that to you if you wanted it (don't remember if I posted it somewhere already ...) ... and then you could look at my Easy Edit Floater resource I posted a while back to get a quick idea on how to create a windowed resource ...

All that would need to be done at that point is, extend the Easy Edit GUI to allow for sizing a Tile Layer, convert the existing buttons to Toggles ... only allow one to be toggled at a given time, then implement an 'OK' or 'Resize' button to perform the work ...

Using something similar to the 'Match 3' logic I just recently posted in response to one of Isaac's posts ... you could work up a nice little tool for yourself ...

And since I think this is such a nifty thing, I put it on my todo list, but have no idea when I'll get to it ... ;)
#2
02/13/2007 (9:51 am)
Hmm, yeah, I guess I have the same problem there... time. :)

I'll have a look at your resource... I wanted to learn how to write level builder add ins for a while now but I will have to wait till next month. I don't have a desktop comp right now and ThinkPads aren't really the best thing for developing games. =)