Also not completely relevant to the video. It might be easier to code if
using isidraw instead of isigraph because isidraw doesn't need any paint
event. ymmv.

On Sat, Dec 28, 2019, 10:03 PM Raul Miller <[email protected]> wrote:

> First off, thanks for putting together this video.
>
> That said, I can't help reminisce about deciding when to render (or
> "paint"):
>
> Like you said in your video,ender can happen on timer, like you had
> it. This covers a lot of "forgot to include render after update"
> issues, but can get you into strange error handling issues (as
> mentioned in some previous threads). And there's the obvious
> alternative "render after update" that you mentioned.
>
> But, also, there's a third way: render on keyboard and mouse events
> (which, basically, are the things driving your update events -- but
> not necessarily the same callbacks).  Render on mouse move gives you
> something approximating animation level smoothness, but it's only when
> the user is interacting with your window in that fashion (that said,
> you still want to render after doing changes, especially for those
> keyboard events).
>
> See also:
>
> https://code.jsoftware.com/wiki/Guides/Window_Driver/Event_Handling
> and
> https://code.jsoftware.com/wiki/Guides/Window_Driver/Window_Driver_Overview
> (which I believe are still valid, though I've not tested recently).
>
> Sadly, though, the simplest way of implementing this would be to
> modify wdhandler_z_  (I think inside the big if statement -- replacing
> the empty line immediately before the last 'end.' statement) to give
> you a callback for this render mechanism (and the efficient ways of
> doing that sort of thing require you disable the callback in your
> window close handler). So... not portable, and not something that you
> could mix with someone else's code if they did almost but not quite
> the same thing.
>
> Anyways... I am not saying anything completely relevant to your video,
> but perhaps food for thought...
>
> Thanks,
>
> --
> Raul
>
> On Fri, Dec 27, 2019 at 7:03 PM Michal Wallace <[email protected]>
> wrote:
> >
> > Okay, so still jumping around all over the screen due to editing out all
> > the ums and errs, but... This one should hopefully be a lot easier to
> read,
> > and I tried youtube's suggested sound encoding, so maybe some of you will
> > even be able to hear it. :)
> >
> > It's a sequel to the basic animation video, this time on making a little
> > sprite editor:
> >
> > https://youtu.be/CzK2SazvCxM
> >
> > -Michal
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to