Alright so say I have a scene that a user can edit while in the scene. Like a Level builder. How would you save the edited scene? Suggestions?
Comments
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
hi; relatively complex; presumably you've got something like the following (only a guess on my part, based on "like a level builder") :
A grid for the user to drag tiles onto; images of the different tiles in a row, say at the bottom; When touch is pressed, spawn to touch co-ordinates; in each of the Prototype actors to be spawned (i.e the row of tiles previously mentioned), Rules for dragging. The grid above the row, based on Joe's (FireMapleGames) excellent snap to grid template. So when the spawned tile is released, it'll snap into position.
Saving would involve a whole bunch of attributes (as many as the amount of squares on the grid) and so the positions of each tile on the grid can update an attribute that can be Saved then Loaded.
If the building elements are more than one square of the grid in size, then you'll need a different system, probably, saving attributes based on x and y positions. With different size elements (actors) though, you could run into trouble with Joe's grid, although I could be wrong.
That's it in a nutshell; good luck and of course, if you need any of the above "sketch" with more detail, just post away.
Comments
A grid for the user to drag tiles onto; images of the different tiles in a row, say at the bottom; When touch is pressed, spawn to touch co-ordinates; in each of the Prototype actors to be spawned (i.e the row of tiles previously mentioned), Rules for dragging. The grid above the row, based on Joe's (FireMapleGames) excellent snap to grid template. So when the spawned tile is released, it'll snap into position.
Saving would involve a whole bunch of attributes (as many as the amount of squares on the grid) and so the positions of each tile on the grid can update an attribute that can be Saved then Loaded.
If the building elements are more than one square of the grid in size, then you'll need a different system, probably, saving attributes based on x and y positions. With different size elements (actors) though, you could run into trouble with Joe's grid, although I could be wrong.
That's it in a nutshell; good luck and of course, if you need any of the above "sketch" with more detail, just post away.
----------------------------------------------
http://www.davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps