[Ohrrpgce] better palette options

David Gowers (kampu) 00ai99 at gmail.com
Sun Oct 31 17:38:10 PDT 2010


On Thu, Oct 28, 2010 at 1:45 AM, James Paige <Bob at hamsterrepublic.com> wrote:
> On Wed, Oct 27, 2010 at 04:34:35PM +1030, David Gowers (kampu) wrote:
>> On Wed, Oct 27, 2010 at 1:47 AM, James Paige <Bob at hamsterrepublic.com> wrote:
>> >> > Hypotheticlly suppose I have a side-scroller where the hero has a
>> >> > 4-frame walk animation. When I press and hold the attack button while
>> >> > walking, I want her to switch to to the sprite set where she charges an
>> >> > energy canon, and when it is fully charged, I want to change her sprite
>> >> > set to the one with the fully-charged canon.
>> >> > I want to keep my place in
>> >> > the 4-frame walk animation when these changes occur.
>> >>
>> >> It sounds like
>> >>
>> >> stored := push animation(current)
>> >> set animation gfxset (current, charging)
>> >> set animation timeout (current, chargeticks)
>> >>
>> >> # per tick, detect current anim timeout and..
>> >> set animation gfxset (current, charged)
>> >> set animation timeout (-1)
>> >> # or detect button release and...
>> >> replace animation (current, pop animation(stored))
>> >
>> > Interesting. With an interface like that I would probably not use the
>> > feature at all. I would probably just use "replace animation" and
>> > nothing else, since the push/pop commands and the timeout commands since
>> > those both kinda volate Mode-View-Controller by putting "model" data
>> > into the "view" which is going to have to be duplicated in the "model"
>> > anyway for other reasons.
>>
>> I don't 100% get MVC, however I had the impression that the design I
>> describe in the lumpdefs.yaml didn't have any view stuff, only model
>> and (with the above api description) controller.  I suppose an active
>> animation could be considered a view.. in some sense.
>> What do you mean? That Timeout should be an op in the animation? (in
>> this case a way to prime an animation with a 'local default' timeout
>> seems moderately important)
>
> Well, I don't strictly have to stick to MVC when I am making a
> sidescroller, it is just a general guideline.
>
> What I mean about the timeout, is that in a sidescroller, every
> animation should represent something that is happening in the game's
> model. So say I know that charging takes chargeticks ticks
>
>  set animation gfxset (current, charging)
>  set animation timeout (current, chargeticks)
>
> ...but am I actually going to read the animation state to see whether or
> not I have finished charging? No, I am going to have some other timer
> in my player model that keeps track of how I am charging. So I am
> storing the timer in two places.
>
> That is not a terrible problem, not at all. I am just bringing this up
> to draw attention to the fact that I am uncertain about how I would
> actually use this proposed animation interface in a script.
>
> The fact that I don't know that yet doesn't mean I think it is a bad
> proposal.
>
> In the same way, storing the previous animation state with a push/pop
> interface doesn't make sense to me because when an animation ends you
> want to switch to whatever is appropriate for the sprite *now* not what
> was appropriate for the sprite back before the animation started.

Yeah, that was poorly thought out.
I'll scrap the push/pop idea and just go with the idea of being able
to invoke child animations.

The timeout is supposed to be complimentary to the other kind of
looping, but it seems dubious now.

>
>> > But for non-sidescrollers... maybe just making a hero or an NPC do an
>> > "emote" in a regular RPG, I can see that interface being convenient.
>> I am now unsure.
>
> I guess another thing to think of is how might animations be used in a
> non-scripted way.
>
> Continuing on the idea of hero and NPC emotes, what if we want to be
> able to create a text box, and say that the box should trigger the
> "talking" animation of the NPC that triggered the box. Or what if we
> want to make a text box that runs one loop of the portrait "scorn"
> animation before settling on the "frown" state of the portrait,
> regardless of who's portrait is actually being displayed?

a) TMC and I were talking about this earlier, and concluded that in
some places, animations need to be selectable by name rather than
number. Textboxes seem to be one.
Would attacks be another?
(Working out how these animations interact with the existing 'attacker
motion' will be interesting o)

b) that sounds like a meta-animation (which would have to be started
with a specific gfxset). Trouble is, images in a gfxset are not
currently(in the spec) identifyable by name, so that would require all
portrait gfxsets to have matching numbers and ordering of images.
Actually! That sounds like a rather helpful convention. Empty images
could just be stored as 1x1 sprites filled with #0.



More information about the Ohrrpgce mailing list