<div dir="ltr"><div dir="ltr">So after thinking a bit, I decided to take a different route to accomplish this, though the ending demo is a lot different (I plan on going further with this, so expect this demo to get bigger until it's something that's less demo and more 'it's just a fun game' or something to that extent).<div><br></div><div>At any rate, I was thinking about how Etoys graphics and 'overlaps any' works and thought about what I'm really after; I don't want to find out AFTER something happens that two objects are overlapping.  Plus when detecting whether things overlap, I believe Squeak goes into some maths to determine areas that overlap etc, which again aren't what I'm interested in; I'm interested in obstructing movement of objects and knowing which objects are being 'touched' when obstructing other moving things.</div><div><br></div><div>So I went back to the drawing board and didn't use 'overlaps any' at all.  Instead, I decided to think about 'what are the likely ways to eliminate checking anything at all if I can help it?' So for instance if something is moving to the right, then I don't need to check things behind it at all and whether it might touch them.  So from there I began writing some scripts to that do their best to check only things that absolutely will lead to a collision; at any point if any of these checks fail, the rest of the checks aren't performed so that the process can quickly move on to the next object for inspection of whether the moving object has to be worried about it or not.</div><div><br></div><div>Included is a demo.  It explains maybe in a bit more detail what this can do. By using this method of checking for touching objects, I can also detect which side another object was approached from as well. In the demo, the blocks change color depending on whether they were touched vertically or horizontally by the 'Hero' object with a simple script (all of the 'walls' are siblings of the object Thing and so editing Thing will send all of the other walls that functionality too).  </div><div><br></div><div>Again, I think it performs rather speedy, even my my old 2008 ultra portable 1.4 Ghz with virtually no video accelleration at all, I'm getting high frame rates even with checking 18 objects vs. the other try I uploaded which has many fewer objects and ends up checking a lot more about what is happening in the playfield and interactions.  </div><div><br></div><div>Hopefully this is useful to someone and/or ends up becoming something possibly embedded into the Etoys scripting tiles at some point, though I cannot realy think of a universal way to put this sort of thing in there where it's of any use :p</div><div><br></div><div><a href="https://drive.google.com/file/d/1w-ty8C6yLsLmx6M1pYGbx6bMUPmUtbAg/view?usp=sharing">https://drive.google.com/file/d/1w-ty8C6yLsLmx6M1pYGbx6bMUPmUtbAg/view?usp=sharing</a><br></div><div><br></div><div>Next I will add clones of the 'Hero' with scripted automated movements to recreate the tests I already posted and I suspect they will operate much smoother and more accurately to boot.  </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 4, 2018 at 10:55 AM, Jeremy Landry <span dir="ltr"><<a href="mailto:hakyoku@gmail.com" target="_blank">hakyoku@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I figured out why special events weren't working the way I had them set up. In order for the events to be scheduled properly, so to speak, they have to occur individually and be taken care of individually.  So instead of 'Tell All Contents (SCRIPT)', I used a Do (Number of Objects) Times/PlayerAtCursor Do (then event is triggered and handled for a single pair of objects)/Cursor IncreaseBy1. This all happens each tick so it appears as if it's simultaneous. It's, so far, fastest for dealing with collisions, I will post another project soon with demos/examples.  <div><br></div><div>Also, my copy of Etoys5 starts with 'Custom User Events' checked inthe preferences.  I don't ever make changes to etoys friendly options...I'm not sure what is going on there...</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 4, 2018 at 12:12 AM, Jeremy Landry <span dir="ltr"><<a href="mailto:hakyoku@gmail.com" target="_blank">hakyoku@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Here's a book of experiments with various ways of implementing 'OVERLAPS ANY (OBJECT)' along with commentary for each experiment. Maybe someone will find it useful. Overall, at least on my slow machine, page 2 seems to perform the fastest. I explain how each of the 7 versions is set up as the idea evolves across the pages.<div><br></div><div><a href="https://drive.google.com/file/d/1JopwojV1KcQar27BkZbrKSjufnkVX9j1/view?usp=sharing" target="_blank">https://drive.google.com/file/<wbr>d/1JopwojV1KcQar27BkZbrKSjufnk<wbr>VX9j1/view?usp=sharing</a><br></div><div><br></div><div>I think in the end, having something very specific in mind with regards to motion is probably far more useful than creating 'general behaviors', at least where realtime behavior and many moving objects is concerned. As well, the things I was moving about are a little large compared to what I intend to move since there's a 'pixel limit' per frame which is hardware dependent as well as dependent on whether the screen is being scaled or not. I ran my experiments with no screen scaling at all.</div><div><br></div><div>If anyone has any further ideas on ways to cut screen update time or further narrow the amount of 'observations' that happen during a single update of all objects on screen, etc. let me know and I will try them out and maybe add them to this book/project for others to learn from and use for their own stuff.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_8921375890662607197h5">On Mon, Sep 3, 2018 at 10:54 PM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_8921375890662607197h5"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)">On Mon, 3 Sep 2018 at 19:38, Jeremy Landry <<a href="mailto:hakyoku@gmail.com" target="_blank">hakyoku@gmail.com</a>> wrote:</span><br></div></span><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">What is the intended use for 'triggering object' tile?</div></blockquote><div><br></div></span><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">I don't know. Never used that tile (it's hidden unless eToyFriendly is disabled).</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">Reading the code it indeed is intended to find the object that triggered that event / script (meaning the object mentioned in the tellAllSiblings tile).</div><span class="m_8921375890662607197m_-8502498315897288602HOEnZb"><font color="#888888"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">- Bert -</div></font></span></div></div></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundati<wbr>on.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>