Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-28
2
Medium Priority
?
1,677 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Author Cited: Konstantinos Dimopoulos URL Cited From: Article from Indie Games: http://indiegames.com/2012/07/browser_game_pick_the_grid.html The Grid (http://codeelf.com/games/grid/) is the sort of game I haven't played in over 10 years. It is …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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