Alice 2.5

Posted on  by 

The Alice 2.2 programming environment includes the heBuilder and sheBuilder objects that allow programmers to custom build characters. The other advantage of these objects is that they include a number of predefined animations, including a walking animation, together with several other animations. Now I’m a programmer, not an animator, so I welcome any pre-existing animations, and in my opinion the animations that come with these builder objects are pretty good.

The heBuilder and sheBuilder classes can be found in the gallery: look under Home > Local Gallery > People. The builder classes then enable you to build custom characters, by selecting various features. The interface is fairly straightforward, and is like the character builder for the Wii (not as many options though).

Making’aBoatRacing’Game’in’Alice’ This’tutorial’will’teach’ you’to’make’aboat racing’game’in’Alice,’in’ which’you’steer’aboat.

Once you have created a custom character, you can then make use of the pre-defined methods. Methods include a walking animation, together with several “emotion” animations, such as angry, confused, happy etc.

The following video tutorial demonstrates how these methods can be used. To do this we use several “when key is pressed” events to control the character. To get the character to walk forward we combine the walking animation with the move forward method.

  1. Nov 3, 2015 @ 6:19am. I'm also using windows 10 and Alice runs perfectly fine. View Profile View Posts. Nov 3, 2015 @ 1:59pm. I'm having this same issue. It plays the opening scene, but as soon as I'm supposed to be given control of Alice, it crashes.
  2. Sep 03, 2002 Alice 9.03. Alice is developed by TIM and is used by 21 users of Software Informer. The most popular versions of this product among our users are: 1.3, 2.0, 2.2, 2.5 and 9.0. The names of program executable files are Alice 3.exe, AliceViewer.exe, Alicedllprotected.exe, Aliceprotected.exe and Artematica.exe.
  3. Sep 03, 2002 Download the latest version from the developer's website. Scanned by 71 antivirus programs on Sep 4, 2020. The file is clean, see the report. Download now Visit the home page alice-dsl.de. Version: 9.03.02 (x86) Date update: Oct 24, 2020. File name: a2.zip.

Walking while key is pressed

Programming the character to walk when the key is pressed is fairly straightforward and is described in the video shown above. However programming the character to walk while the key is pressed is not so easy. If we try to call the same walk forward method that we use for the “when key is pressed event” the program generates an exception. This is because the while key is pressed event stops executing the code that it executes while the key is pressed as soon as the key is released. This is problematic for the walk method – terminating the method mid-way through leads to this execution. What we need is some way to finish executing the code in the walk method.

To do this we introduce a simple two-state finite state machine. The states for this FSM are walking and idle. Whenever the FSM is in the walking state, we run the walking animation. Whenever the FSM is in the idle state the walking animation is not run. To represent the state we use a boolean valued variable, called walking. The variable is true when the FSM is in the walking state and false otherwise. If there were more than two states we would need to represent the state in another way – perhaps using a string.

Putting this all together, we use the “While key is pressed event”. At the beginning of event we change the walking state to true. This triggers the walking animation action. During the key press event the character moves forward. At the end of the key press event the walking state is changed to false. At this point the walking animation action is stopped, but not until the code for the current call is completed, thus avoiding the termination of code mid-way through.

Ok, that is probably all a bit convoluted, so lets go to the video.

A class-level method defines the behavior for a single character (object).

Step 1:How to create a class-level method:

Alice 2.5 Bee Scout

  • In our example world, click on the turtle in the object tree (upper left panel).
  • In turtle's details (lower left panel) click the method tab and then the button 'create new method'. Name it 'walk'

Step 2:How to write a method:

  • We want to move the turtle's legs back and forth as the turtle moves forward. First, drag the control statement 'do in order' from the bottom of the window, into the editor.
  • Next, in the object tree, click on the + beside 'turtle' to see the different body parts. Drag the frontLeftLeg into the method. Select turn - backward. Choose other and type in 0.1.
  • Finally, click 'more' at the end of the turn command and choose duration = .25 seconds. The default time for an action to be performed is 1 second. We are changing it to 0.25 so that it will happen faster.
  • Next, we want the turtle to move forward at the same time that the back leg goes forward So drag in the control statement 'do together.'

Alice 2.5 Games

  • Finish dragging and dropping the instructions until your method looks like this:
  • Finally, add a comment to your method to tell someone reading your code what it does. Your comment can say: “Move the turtles legs back and forth”
  • Remember: This comment is not Alice code. It is simply an explanation for someone trying to understand your code. Alice ignores the comments when it plays your world.
2.5

Step 3:To call your method:

Alice 2.5 simulator
  • Click on world.myfirstmethod to get back to it and then drag turtle.walk into it. Push the 'play' button to watch the turtle walk.

Step 4:Writing a method for kangaroo:

  • In the object tree, click on kangaroo. In kangaroo's details, click the button 'create new method' and name it 'hop'
  • To write the method, drag and drop the following instructions into your method. Your first step is to drag a 'do together' into the method.
  • To find the 'lowerleg' of the kangaroo, you click the + beside the leg tab. When you finish, your method should look like this:

Part One of the Code:

Part Two of the Code:

  • Remember, to call your method to test it, click on world.myfirst method to get back to it and then delete what you have there. Drag kangaroo.hop into it. Push the 'play' button to watch the kangaroo hop.

Coments are closed