Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Collision detection engine (http://www.alice.org/community/showthread.php?t=3994)

King Gamer(gorit) 02-27-2010 05:22 PM

Yeah
 
It is a really good system but I think if you used methods you could make sure it is working even faster. I wish however that I could use such a simple system for the skiing game I am making. My skiing game will need to figure out the side the collision ocured on then fall acording to the speed and direction. I like this though, but you should think about making this work wit iregular size objects
:D:D:DThis is my 111th post.:D:D:D

zonedabone 02-27-2010 07:16 PM

What do you mean by using methods? Calling methods takes time! Built in methods are what we call "inline" which means that the code is compiled in a way. Also, I've put the main event at the beginning, which gives it a higher priority! I do need to optomize the main code, however. I tried adding comments so people know what's going on, but that slows it down! So yes, there is work to be done, but I'm ready to do it!

jediaction 02-27-2010 07:39 PM

[QUOTE=Dameria;17634]Wow, this is very nice and very smooth (although the coding doesn't really make sense to me, but hey, if it works then thats all that really matters! :D)

However, this is an [I]almost[/I] flawless engine. There is only 1 glitch that I have found so far, but it is a major one (sorta). Ok so you know there is a spot in top right that you can escape from the cylinder prison, but then go to the top left, once you are outside, to that gap that you can almost get into. If you wiggle around a bit, you find that you can somehow wiggle [B]over[/B] the gap, making you hover slightly, allowing you to get past the cylinders and the collision detection does not work from then on. (Maybe I should be a video game tester...)[/QUOTE]

I dont get it either so it cant help me make cool games with collisoin. Sorry, but good job!!!!

zonedabone 02-27-2010 07:41 PM

It tests proximity, and then moves the main object accordingly. I'll try to make a version with comments, although it will run crazy slow with them there. :(

King Gamer(gorit) 02-28-2010 12:41 AM

All I Mean...
 
All I mean is that functions run faster no matter where the method is in the event area. Alice executes functions with a higher priority than any other methods. It is not always a necisary thing to do but if you do it it can create problems when hundreds of items are within the area it is in. It apears in your demo world that there is a bit of shaking.

zonedabone 02-28-2010 12:28 PM

There's a reason! There's less shaking with the cylinders clower together. Also, I use some things that aren't available in functions! I assure you that I've tackled every angle! Of course, there's a bit to work on with the order of the function.

jediaction 02-28-2010 12:41 PM

Can someone make an example of when an object is behing an object, it dissapears then appears again when its in front

Dameria 02-28-2010 12:49 PM

[QUOTE=jediaction;17750]Can someone make an example of when an object is behing an object, it dissapears then appears again when its in front[/QUOTE]

You could have just asked me jediaction, I will make one and then show you (it will require you to put every object in your world into an object list, so start doing that).

jediaction 02-28-2010 12:51 PM

WHAT KIND OF LIST! thats were im stuck

Dameria 02-28-2010 01:03 PM

An object list! Go to create new variable and select object then click list and just put them all into a list. Then make an infinite loop that repeats infinite times saying "For all objects in list" if item_from_allObjects is behind camera, item_from_allObjects isShowing == false, else item_from_allObjects isShowing == true.


All times are GMT -5. The time now is 09:59 PM.

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