Alice Community Compass Example

 Compass Example
Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Compass Example - 05-19-2010, 01:45 PM

This is an example of a compass that I created using a rather complex concept of math called Trigonometry. There is also a mouse looking method to let you look around, use arrow keys if you want also. I left the boxes showing so that you can see a little bit how I did this. The box that you first see is North, if you look to the right you will see East, South, and then West, and then North again when you make a 360 turn.

I will release the text compass soon, I am going to start working on it now.
Attached Files
 Compass.a2w (424.6 KB, 20 views) Compass(text).a2w (335.6 KB, 10 views)

Check out my best projects so far and please comment:

Last edited by Dameria; 05-24-2010 at 04:41 PM.

Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
05-19-2010, 05:10 PM

I just created the other compass that another person wanted me to make, it is merely a checker to see which direction you are facing and changes a 3d text to display whether you are facing N, NE, E, SE, S, SW, W, NW depending on which direction you are looking in. This was much easier because I didn't have to use the Law of Cosines (the trigonometry part) that I had to on the other compass and I did not have to worry about the rotation of the needles spinning the right way. They are both very useful however, so here is the "digital" compass
Attached Files
 Compass(text).a2w (335.6 KB, 10 views)

Check out my best projects so far and please comment:

shaydon
Senior Member

Status: Offline
Posts: 445
Join Date: Dec 2009
Location: Caspian Border
05-19-2010, 05:52 PM

Quote:
 Originally Posted by Dameria I just created the other compass that another person wanted me to make, it is merely a checker to see which direction you are facing and changes a 3d text to display whether you are facing N, NE, E, SE, S, SW, W, NW depending on which direction you are looking in. This was much easier because I didn't have to use the Law of Cosines (the trigonometry part) that I had to on the other compass and I did not have to worry about the rotation of the needles spinning the right way. They are both very useful however, so here is the "digital" compass
this is awesome!!!!
can i use this???

Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
05-19-2010, 07:30 PM

Quote:
 Originally Posted by shaydon this is awesome!!!! can i use this???
I allow everyone to use the programs that I create. Most of my programs are just examples of how to do little things in a program to make their own programs better. Good luck finding out how I did every small part of this compass (there is a lot of stuff that only I as the creator know, like that I moved each direction exactly 10 meters away from the base, so in the Law of Cosines function it divides by 200. If you use any other number but the 10 away from base and 200, it will not work correctly, however there is an easy way to fix it so it can be any number), stuff like that.

Check out my best projects so far and please comment:

 boppy Guest   Status: Posts: n/a 05-19-2010, 08:51 PM This is awesome, but am I correct in assuming that this would work with a flight sim? I ask because the plane will be gaining altitude, rolling, spinning, etc.. Will the compass still be accurate?
Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
05-20-2010, 07:15 AM

Quote:
 Originally Posted by boppy This is awesome, but am I correct in assuming that this would work with a flight sim? I ask because the plane will be gaining altitude, rolling, spinning, etc.. Will the compass still be accurate?
If you want I can see your program and determine how to do it, but I should still be able to find a way to get it to work the same as this compas works, just do the same thing with the base and all the directions and move to airplane, just like what it says in the method for changing the compass.

Check out my best projects so far and please comment:

Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
05-24-2010, 04:44 PM

Oh my god, I feel so foolish It seems that I had the compass working backwards the whole time. It took until now (seeing Artyfishl's compass) to notice this, so here it is, I fixed it and now you can redownload it to get the fixed version (all I needed to do was change the turn "right" into turn "left").

For some reason it never occurred to me while making it that a compass's needle is supposed to point north the entire time I feel stupid... Thanks Artyfishl for uploading your version, and I will get that Objectives example working soon (maybe this weekend or earlier).

The new compass is up on top or you can download it on this post (they are both the same world)
Attached Files
 Compass.a2w (424.6 KB, 7 views)

Check out my best projects so far and please comment:

Last edited by Dameria; 05-24-2010 at 07:19 PM.

 arty-fishL Senior Member     Status: Offline Posts: 1,878 Join Date: Mar 2008 Location: In the corner of your eye 05-25-2010, 10:23 AM thanks, is my one similar to your one or are they completely different? █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ █░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█ █░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█ █░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█ █░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█ █░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█ █░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█ █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█ I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
Dameria
Senior Member

Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
05-25-2010, 02:24 PM

Quote:
 Originally Posted by arty-fishL thanks, is my one similar to your one or are they completely different?
They are pretty different, but I noticed that on yours, the compass can get stuck on the north part for a split second, and if you fool around with it and turn it long enough you can make the needle face a little bit off of what it is supposed to.

Check out my best projects so far and please comment:

arty-fishL
Senior Member

Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
05-25-2010, 04:09 PM

Quote:
 Originally Posted by Dameria They are pretty different, but I noticed that on yours, the compass can get stuck on the north part for a split second, and if you fool around with it and turn it long enough you can make the needle face a little bit off of what it is supposed to.
fixed in the new version, it was getting stuck cos the distances were too small and it was returning NaN when trying to invert, so I've moved the points five hundred and something more metres away from the camera, so any problem like that is barely noticeable and it now reloads the position from the reset point every 200 calculations, so it shouldn't go off slightly.

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

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

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops     Alice Player and VR General Discussion     Questions and Comments     The Lounge