blakjak wrote:
Let's say I want to build a wall on an iso grid, and I want that wall to behave as Scenery.
Does it mean that for each tile it's going to cover I've got to add a wall section sprite and specify it's position with Add.Scenery ? It seems logical, I think, but I just want to confirm this because it means that all Scenery elements that occupy multiple tiles would have to be designed bearing in mind that there would have to be one sprite per tile, and that they would combine to draw the final element ?
Right now a Scenery item can only block one tile, so yes, in Alpha1 you'll have to add one piece of scenery per tile you want to block. I'm still thinking about multiple-tile/position entities, and if I include those, then it'll be possible to add a scenery item which occupies more than one tile.
The hesitation I have in this regard is that I also plan to add the [optional] ability to destroy Scenery, so a Fighter with a bazooka might be able to blow a hole in that wall... and of course, if the wall is a single bit of scenery that stretches for 20 tiles, then shooting just one end with the bazooka would remove the whole 20 tiles. In this case, it would be advantageous to have each tile's worth of scenery be a separate entity, so the bazooka destroys just the three tiles within its blast radius and makes a three-square hole. Of course, I guess the ideal would be to support both...
blakjak wrote:
Also,what if I don't want a diamond shaped grid ? Are these the right steps ?
- Build the iso grid in the engine.
- Use Add.Scenery with a totally transparent sprite instanced over the tiles that I don't want the fighters to be able to walk over.
Again, yes, right now. Although I think offhand you should be able to pass a 'None' into the sprite parameter, if you can't I'll try and remember to fix it so you can for the next release.
This is something I have a fairly firm plan for, on the other hand! I'd like to be able to modify the grid chunk-by-arbitrary-chunk CSG-style (and I have a good idea of how to code this already), so it would be possible to do something like:
Code:
# presuming a 10x10 grid has been set up already...
# Add a two-square entry corridor along the bottom side:
battleField.AddRect((0, 2), (-2, 4))
# Remove tiles for a permanent L-shaped wall from (3, 7) to (3, 3) to (7, 3):
battleField.RemoveRect((3, 7), (7, 3))
battleField.AddRect((4, 7), (7, 4))
Obviously it would be tedious to block out all of the non-grid spaces in that example with individual one-square invulnerable scenery elements, but like this it's relatively easy.
blakjak wrote:
If there are animations, would it be more efficient for Renpy to load a single filmstrip sprite, and use anim.Filmstrip to animate ? This way a lot of animations could reside on just one image.
Yeah, it might well be - the BattleSprite will take any existing Ren'Py Displayable or image reference and display it normally, so you can define animations however you like elsewhere in your script. I just used separate files for separate frames 'cause I'm used to doing it like that, and 'cause it's a bit of a hassle to make a filmstrip in Photoshop with a transparent background, 'cause it has a habit of cropping your copy-pasted area to a tight rectangle around the non-transparent pixels. :/