[fluxus] interactivity issues

Claude Heiland-Allen claudiusmaximus at goto10.org
Mon Jul 17 07:03:13 PDT 2006


Dave Griffiths wrote:
>> nik gaffney wrote:
>>>>> the example script works the other way round, checks if the mouse is
>>>>> over
>>>>> an object and only does something if it is.
>>>> Mmm, but this only works for trivial "somethings to do" - it's hard to
>>>> do anything complex if you can't find (by comparison operations) which
>>>> 'concept' in the scheme world the object you clicked on corresponds to.
>>> hmmm.. how about if the trivial something was to check an id (stored as
>>> a number
>>> in an alist, when the 'actor' is created for example) which if
>>> sucessful, calls
>>> a single function, using the id.
>> I'm not sure I follow - how can you look up in an alist when
>> eq/eqv/equal are not defined on the primitives?
> 
> I need to do some research if a primitive-eq is enough for assq, and if I
> need to implement eqv and equal (which will be slow as they'll have to do
> a deep compare against every vertex, and won't be much use afaict)
>
> To be honest I'm tempted to revert it to the old system, where primitives
> were just represented by exact id numbers, it would make all this a lot
> simpler again. I haven't tried this sort of thing since doing that :)

But it becomes easier to crash as well as easier to use?

> 
>> But!  Maybe I can use a pdata float as a temporary workaround?
> 
> Ugh! but yep, would work :)

Well, I got it sort-of working with pdata vector, pdata float didn't
seem to work (pdata-get seemed to return a vector, which was confusing,
but maybe I had my (grab)s mixed up, don't take my word for it...).

The sort-of is because clicking on the objects isn't enough - I have to
move the camera into the object while clicking to get it to register -
which is very weird as the 20-interactive.scm example works fine??  It's
very reminiscent of trying to collect jettisoned cargo in the Elite
games, fun, but not exactly what I want...

I have no idea why this is happening or how to fix it.

> as would comparing world space transforms
> (double ugh!)

I'll have to look up what that means, I am weak in the ways of OpenGL...

> What I would do is implement your actors as objects which contain
> primitives and encapsulate the part that does the id checking using
> pdata/transforms so you can swap it with something saner later on.

Sure :)

> 
> cheers,
> 
> dave
> 

Thanks,


Claude



More information about the Fluxus mailing list