Alice Community  

Go Back   Alice Community > Educators > Teaching with Alice

Thread Tools Display Modes
First year at Alice - Questions
Posts: n/a
Default First year at Alice - Questions - 06-20-2007, 09:49 PM

A couple of extremely dedicated students refuse to hand in their project with bugs and wanted me to ask the group for assistance. One of the problems has to do with sounds, but I haven't sufficiently checked the community threads, so I'll hold off. The other is related to collision checking and lists.

Any help would be appreciated by the students. I'm happy with the game as is.

The game:
A game with 200 gems. Dragon walks around, when it touches a gem it disappears and adds to the total score.
The problem:
1) The loop to check for collisions takes too long. The dragon would have to wait by a gem for a couple seconds before it registered.
2) Is there a way to dynamically delete items from a list? an array? So that at least it will speed up over time.

Things tried:
1) Using lists and arrays (no visible difference, however to create a list and add 200 gems required 3 restarts as each item added caused a bad memory leak (was up to 1Gig of memory at one point)
2) Using distanceTo or isCloseTo didn't seem to make too much difference. isCloseTo seemed a little faster. I haven't got them to try a combination of distanceInFront/distanceBehind. Would that help?
3) All together, or one at a time: All together much faster

Last edited by mikerd; 06-20-2007 at 10:12 PM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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