Image tiles using tables

LiquidGameworksLiquidGameworks Anchorage, AKMember, Sous Chef Posts: 956
edited February 2012 in Working with GS (Mac)
Yo!
Has anyone set up their game using image tiles that are placed using tables? I want to make levels that are larger than the screen size, so there is some camera tracking. I've figured out a lot of table issues, but I'm still stuck on this one. Any help is appreciated.

Comments

  • SAZ_1SAZ_1 Member Posts: 397
    i've done some minor tiling its annoying in my opinion and having large scenes with tiled backgrounds eats crap loads of memory depending on the background image size... how large is your scene?..and is it for a background?... if it aint too big id say just place the images in there yourself and just make them not movable and so on if its for a background... if the images move etc. then im not sure as i haven't tried the tiling with tables bit.
  • LiquidGameworksLiquidGameworks Anchorage, AKMember, Sous Chef Posts: 956
    The idea is that continually placing tiles for every level is a pain... With tables, I can just flip some switches and should load my tiles... I'm just not sure how to get the communication straight between the table and the scene.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    edited February 2012
    My recent game uses table to create tiles. So movement is on the table itself, actor stays in one place. Grab a copy of the game here to see if its what you want.
    lost in maze
  • SAZ_1SAZ_1 Member Posts: 397
    @liquidGameworks, sorry man my net was going all funny last night... i think you might be able to tile your backgrounds with tables by having 2 rows X, Y (these are the x and y positions for each tile) then the column would represent the specific image,now add a integer rule inside your image actor called self.number, (this is the column number) ... so then in your actor create 2 change attribute rules one for reading the cell value of X and one for reading cell value of Y, so you change self.posX & self.posY to tablecellvalue(table, 1(this is X), self.number) ... tablecellvalue(table, 2(this is Y), self.number) .... i think that will work, only long thing is each image needs to have its own number, i think in theory you could do this all with one prototype actor as well... if i've stated anything wrong then feel free to point it out if u have a go.
Sign In or Register to comment.