[Ohrrpgce] Slice tutorial

James Paige Bob at HamsterRepublic.com
Tue Jan 20 11:53:37 PST 2009


On Mon, Jan 19, 2009 at 08:52:38PM -0800, S'orlok Reaves wrote:
> 
> I like this approach to slices a lot! In a few releases, I'll incorporate this approach into the OHRRPGCE FMF --it makes a lot more sense.
> 
> Here's an idea: make a slice "insurmountable". If you have:
> 
> parent_slice 
>     child_slice_1
>     child_slice_2
>     child_slice_3, (insurmountable = true)
>     child_slice_4
>     child_slice_5
> 
> ...then, adding a child slice to parent_slice will add it after child_slice_2. 
> 
> In this example, slices 3, 4, and 5 might be used to make some complex cursor (with a hat :D), and we want to enforce that new sprites are never added after it.
>
> By adding the "insurmountable" property, we enforce this. And, if we want to explicitly add child_slice_6 after child_slice_5, we can still iterate to slice_5 and call "add sibling". So everybody wins.
>
> That's my only suggestion; I feel it makes a lot of sense for cursors and other top-level objects (like hats). What do you think?

No, I think it would be easier to do

parent_slice 
    container_slice_1
        child_slice_1
        child_slice_2
    container_slice_2
        child_slice_3
        child_slice_4
        child_slice_5

> -->Seth
> PS: Another use for this flag is if you want to give a sprite custom graphics depending on his armor: always make the helmet "insurmountable", and you can simply add/remove the weapon/armor/helmet slices in any order.

I would just make the hero a parent, and all the armor would be children 
of that parent.

---
James Paige



More information about the Ohrrpgce mailing list