[Ohrrpgce] better palette options

James Paige Bob at HamsterRepublic.com
Wed Oct 27 08:43:21 PDT 2010


On Wed, Oct 27, 2010 at 09:03:54PM +1030, David Gowers (kampu) wrote:
> On Wed, Oct 27, 2010 at 4:34 PM, David Gowers (kampu) <00ai99 at gmail.com> 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)
> >
> >>
> >> 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.
> >
> After doing some more research, it seems that 'view' would simply
> pertain to the sprite displayed during an animation. Is this correct?
> What configuration of components are you imagining?

Yeah, you could say the view is just the current sprites.

I guess I tend to think of the view as being the current state of the 
entire visible game world-- sprites and their positions and their 
frames, which is the minimum needed to paint a frame... but since the 
OHR handles all of that for me, it could be said that everything I 
script is controller, and none of it is view at all.

It was probably a mistake for me to bring up MVC at all. It isn't 
super-relevant to the OHR. :)

---
James



More information about the Ohrrpgce mailing list