Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   bounding box (http://www.alice.org/community/showthread.php?t=2888)

Niteshifter 07-18-2009 12:22 AM

bounding box
 
Does anyone know a way to use some math to get the bounding box of an object? If I can get something to have the object be isolated in just it's bounding box then a collision detection can be easier once I manipulate the "affect object and descendants".

The best way I could think of is trying to use vector markers on this, but unfortunately Alice has a bit of a lag problem when trying to use markers with an object and trying to use some sort of "virtual" marker doesn't seem to be possible at the moment and also vectors don't seem to be on Alice's good side either :p.

Veryuhbull 07-18-2009 08:29 AM

That is a really good idea. But I am not sure if the box counts as a desendent. (but don't quote me on that)
By virtual markers, are you talking about dummies? I have used them before and things didn't go so well. But some shapes on the other hand seem to work decently well.

[url]http://alice.org/community/showthread.php?t=2865[/url]
This is the format I am leaning toward.

Niteshifter 07-18-2009 11:51 PM

With the bounding box idea, I was more thinking I could make my own function to get it and then use the "affect all descendants" to get the bounding boxes of all the descendants.

Also, with "physical" markers, it doesn't really seem to work for me because of the loading times since what I'm trying to do with mine is to make it as simple as possible, and then export it here as a file that people can download to make their games on.

I have tested the "physical" markers using small spheres on a terrain generator I tried to make using the diamond-square algorithm, however it took way too long just to get the markers set up to change the elevation of the ground. This could be fixed if I can have multidimensional arrays, and/or a function to create/copy an object in real-time.

I've also pretty much stopped going into Alice too much because of it's limitations and how unstable it can be towards certain aspects of it. I'm starting to switch more to lua, which is an easy language to understand, is based off of C and looks like a pretty good choice to get a step up from Alice (although it does have it's limitations as well).

Here's a site I've found that might help with learning about bounding boxes, and collisions:

[url]http://www.toymaker.info/Games/html/collisions.html[/url]

The site does have the information based on a different language, but it does explain it quite well and it also tells how collisions work in other situations as well.

DrJim 07-19-2009 08:40 AM

Re the bounding box idea, you might make a quick try using the "above", "below", "in front of", etc. functions. These do work off the bounding box rather than the object's origin - though things get a bit funny inside an object.

Overall, however, I tend to agree with your conclusion that you are really getting beyond Alice 2.x's capabilities. The very little I've done with Alice 3.0 and it's version (Jogl) of Open GL seems to indicate that there is real promise there - but it's going to take a lot of study to really understand that.

I've never worked with Lua, but there may be some promise there. It is the scripting language used with Animie Studio and Animie Studio Pro, which are very nice 2D animation packages. The Pro Version is a bit pricey but will handle 3D objects at a very basic level (about like the latest version of Phototshop). There is also a moderately extensive library of third party scripts available - but again I've never really tried them.

Niteshifter 07-27-2009 01:05 AM

When working with those functions, Alice doesn't seem to like using too many of those at once, so a different approach is probably better. I may have to do a bit more research into the subject and possibly make my own variations of the functions so that they work together properly and more stably.


All times are GMT -5. The time now is 06:23 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.