Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I am using the alice programing enviornment to make a race car game

Posted on 2007-11-28
2
Medium Priority
?
1,707 Views
Last Modified: 2013-12-21
How do i get the while command to work.  I want the car to turn left when the left key is held down. and then similarly to back, forward and right.  I'm just trying, not sure anyone would have reason to know Alice.  This is for a class.

Thanks

Artie
0
Comment
Question by:rpreiss
2 Comments
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 20378386
I'm not familiar with Alice. But in the languages I've used to do similar things, you wouldn't use a while statement; instead, one technique would be to start turning left when the left key is pressed; and then stop when either that key is released, or a key to counteract it is pressed.
So it's really a set of state variables, and if-statements.

Hopefully that gives you an idea..?
0
 
LVL 1

Accepted Solution

by:
dukesnoopy earned 2000 total points
ID: 20396424
It looks like there are a lot of resources out there:

http://www.alice.org/community/ - Online Foums; good place to find your answer
http://www.dickbaldwin.com/tocalice.htm - Alice Tutorial - Go to http://www.dickbaldwin.com/alice/alice0930.zip for sample files
http://www.developer.com/java/other/article.php/3673761 - Introduction to Alice Programming - this is a really good one-page tutorial

For a car turning left, right, or accellerating/braking, I would check out this page, which has a download link for an Alice file:  "i made this in like 5mins before class, just something to make the time go by, all you do is use the arrow keys to move the car, (spacebar puts a boost in your speed) then once you hit the end of the road (or just when you feel like seeing it) hit N and watch the car turn into something cool."
http://www.alice.org/community/showthread.php?t=978

Hope that helps,
Steve
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As we all know Counter Strike is a very popular computer game. Usually it is played over a network for which people create a server and users join it but it is interesting to know that one can creates a dedicated server which not only hosts the game…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question