Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Right turn at 2X game speed doesn't work [SOLVED]
Old
chip
Member
 
chip's Avatar
 
Status: Offline
Posts: 24
Join Date: May 2011
Location: New Hampshire
Default Right turn at 2X game speed doesn't work [SOLVED] - 05-15-2011, 12:27 PM

Thanks to all the helpful posts on this forum, I've found lots of useful tips on getting Alice in gear. But I'm not sure one procedure I'm using is considered kosher, since it causes a glitch. I'm using Alice 2.0 (2.2 won't launch for me) on Win Vista 32-bit.

I have a walk cycle for the faerie model done, and the navigation controls set so she can get about my so-far small world fairly well. But for faster motion, rather than building new methods with different durations and movement speeds, or dealing with assigning values to parameters, I decided to try just using a keypress to accelerate the game speed by two. It has a Keystone Cops look that's not altogether unpleasant, if a little goofy-looking.

Forward, left, right and back navigation works fine when accelerated, and I can turn left while moving forward & back with key combos (the arrow keys, for now). But for some reason the right turn does not work if I'm also trying to move forward (it's fine with moving back). No turn is made & if I hold the right arrow key I'll soon get a beep that usually signifies a full keybuffer. Alice occasionally throws an exception fit as well.

So is using game speed to move fast just not a good idea, or is there some other issue involved in trying to make a right-hand curve in the fast lane?

EDIT: Here's the traceback on the error:
Code:
Error during simulation.


Alice version: 2.0 04/05/2005
os.name: Windows NT (unknown)
os.version: 6.0
os.arch: x86
java.vm.name: Java HotSpot(TM) Client VM
java.vm.version: 1.3.1_10-b03
user.dir: C:\Users\OWNER\Downloads\3D, models & etc\Alice 2.0\Required

Throwable that caused the error:
java.ang.ArrayIndexOutOfBoundsException: -1 not in range [0,3)
	at edu.cmu.cs.stage3.alice.core.Behavior$Fork.getNext(Behavior.java:113)
	at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.top(Behavior.java:55)
	at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack.pop(Behavior.java:48)
	at edu.cmu.cs.stage3.alice.core.Behavior.closeFork(Behavior.java:176)
	at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:85)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.LoopNInOrder$RuntimeLoopNInOrder.epilogue(LoopNInOrder.java:99)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.epilogue(CallToUserDefinedResponse.java:94)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.DoTogether$RuntimeDoTogether.epilogue(DoTogether.java:81)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.childrenEpiloguesIfNecessary(CompositeResponse.java:67)
	at edu.cmu.cs.stage3.alice.core.response.CompositeResponse$RuntimeCompositeResponse.epilogue(CompositeResponse.java:73)
	at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.epilogue(CallToUserDefinedResponse.java:94)
	at edu.cmu.cs.stage3.alice.core.behavior.AbstractConditionalBehavior.internalSchedule(AbstractConditionalBehavior.java:112)
	at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Behavior.java:225)
	at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehaviors(Sandbox.java:70)
	at edu.cmu.cs.stage3.alice.core.World.scheduleBehaviors(World.java:444)
	at edu.cmu.cs.stage3.alice.core.World.schedule(World.java:486)
	at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.schedule(DefaultClock.java:94)
	at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$11.run(AuthoringTool.java:681)
	at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:115)
	at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:76)
	at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at edu.cmu.cs.stage3.swing.DialogManager.showModalDialog(DialogManager.java:58)
	at edu.cmu.cs.stage3.swing.DialogManager.showDialog(DialogManager.java:123)
	at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.play(AuthoringTool.java:5073)
	at edu.cmu.cs.stage3.alice.authoringtool.Actions$15.actionPerformed(Actions.java:167)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Looks like some internal array index is being called with an out-of-range parameter.

EDIT2: Having put all my navigation & camera controls in place, I've been dashing about in the World and the same OutOfBoundsException keeps being tossed out while moving, regardless of direction or turning or game speed. Seems it's a more general problem than having to do only with high-speed turning. I'll try to narrow it down to a particular keypress if possible.

Last edited by chip; 05-16-2011 at 06:48 AM.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 05-15-2011, 07:08 PM

I'm confused, simplify.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 05-15-2011, 10:02 PM

haha wow, I didn't even know you could control the speed multiplyer using a key press


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
chip
Member
 
chip's Avatar
 
Status: Offline
Posts: 24
Join Date: May 2011
Location: New Hampshire
Default 05-15-2011, 10:19 PM

Quote:
Originally Posted by sfunk View Post
haha wow, I didn't even know you could control the speed multiplayer using a key press
That's why I posted this in "How to..." It seemed a good idea for speeding up my character's navigation of the world without a lot of additional methods.

Use a "While key is pressed" event to set the World.speedMultiplier property to 2.0 or however fast you may need it -- 2 seems plenty, though. The very short method to set it to 2 goes in the Begin: slot, and the End: slot gets the method to set it back to 1.0. Takes about 5 minutes to set up.

The hitch is that everything in the world runs faster, so it may not be useful in all situations.
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 05-15-2011, 10:34 PM

I never noticed the speed muliplier method, that could be pretty useful, im guessing from your thread though it's glitchy.


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
chip
Member
 
chip's Avatar
 
Status: Offline
Posts: 24
Join Date: May 2011
Location: New Hampshire
Default 05-15-2011, 10:45 PM

Quote:
Originally Posted by sfunk View Post
... im guessing from your thread though it's glitchy.
Hard to say for sure. It could be limited to my machine, my OS, lots of other possible variables. It really only affects a small part of the navigation controls -- trying to turn right while also moving forward. Everything else works OK, other than that persistent crash I noted above -- that happens a lot no matter which navigation keys I'm using.

I'm also noticing that the more I move through the world, the more hitches in the motion occur, until finally, it gets unusable. But that isn't associated with speeding up the world, it happens even at speed = 1.0.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 05-15-2011, 11:09 PM

Oh, I get it now. If its glitchy then a kind-of solution could be to actually create your own speed multiplier variable and multiply all speeds by it, it might make a difference, might not.

With 2.2 you should try multiple things to get it to launch:
- ensure the “required” folder is in the same directory as the Alice exe
- ensure the 2.2 exe and required folder are not in with the 2.0 ones
- try running the file inside the required folder that is labelled something like “if alice fails try this”
- try running Alice in XP compatibility modes
- try running it as an administrator
- try deleting the “.alice2” folder from your home directory
- try redownloading Alice


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]

Last edited by arty-fishL; 05-15-2011 at 11:19 PM.
   
Reply With Quote
Old
chip
Member
 
chip's Avatar
 
Status: Offline
Posts: 24
Join Date: May 2011
Location: New Hampshire
Default 05-16-2011, 12:02 AM

I use the speed multiplier trick to avoid just the kind of complex method-building you suggest, but which I may do down the road after things are squared away in other arenas, such as what the heck my little first-ever-Alice-game is all about

I tried everything but your last two suggestions to get 2.2 to launch, with no better luck with any of them, but thanks for the feedback. Alice 2.0 is fine for now, stable (usually) and I'm getting used to its little foibles. Not at all what I'm used to (animation in Blender & level-building & modding in Unreal 2.5/UnrealEd 3.0), but it has its own charms as well.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 05-16-2011, 05:38 AM

Chip, could you post your world for us to see? (Unless I missed it somewhere.) Also, try setting it to other speeds and see what happens. For example, for trivial purposes, try setting the multiplier to x1 when the key is pressed and released (even though the multiplier is already x1.) Also, Alice doesn't like complicated methods in the "while a key is pressed" so that might be something if you moving methods are complicated.


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
Old
chip
Member
 
chip's Avatar
 
Status: Offline
Posts: 24
Join Date: May 2011
Location: New Hampshire
Default 05-16-2011, 06:44 AM

Hi, reuben2011.

Your request sent me back to the earliest version I have of the world, before I had done any character animation or put in the speed control method(s). Turns out that even with Alice's on-board navigation Event ("Let <Arrow Keys> move <object>") the problem occurs, so it's not connected with the navigation methods, except for one aspect -- the key chosen to activate the "acceleration" method.

Turns out that on my system, at least, there's something about using the Spacebar in conjunction with the arrow keys that causes the glitch. When I switched the "accelerator" key to "C," the problem vanishes, as do all the glitches in motion over a length of time.

So, maybe it's best to just avoid using the Spacebar in situations where it needs to be held down for a length of time, as that seems to be the source of the issue. I have no idea why the Spacebar should be treated differently than any other key, but that does seen to be the case in my situation.

Thanks for all the feedback, folks, it's good to know there's a helpful community for Alice-tyros like myself! I'll post the world in the appropriate forum a bit down the road after I get some actual game action going, right now it's just my "test-bed" for world-development procedures.
   
Reply With Quote
Reply

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.