Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
Mouse Cursor Aiming!
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Talking Mouse Cursor Aiming! - 06-30-2011, 10:58 PM

I was inspired by the game, Sin and Punishment, recently and I wanted to try and make a cursor that moved in real time when the mouse moved. This experiment is working pretty well so far. (Had to do some difficult math and guesswork, though)

The cursor aiming code is bit "laggy", but I'll figure out to do fix it! (possibly...maybe)

BTW the spinning icosahedron is simply there for me to visually check for lag. It does nothing else. Also, after clicking the dot, do not resize the window, and if there any black bars around the window, please close the world and reopen it until they are gone.

Here it is!

Please download this and, if you want, see if you can find any way to improve this code!

Edit: I've streamlined the code a little. It runs much smoother! Please download Test 2!
Attached Files
File Type: a2w mousecursor_test.a2w (213.1 KB, 33 views)
File Type: a2w mousecursor_test2.a2w (198.2 KB, 47 views)


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389

Last edited by zero00; 06-30-2011 at 11:08 PM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 07-01-2011, 12:46 AM

Nice. Now we just need a way to detect whether a mouse click happens at the same time an object is under the cursor object (not the mouse cursor) without the use of physical bullets.
   
Reply With Quote
Update! Even Better!
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Talking Update! Even Better! - 07-01-2011, 09:11 PM

Thanks to this post, I was able to further optimize the mouse cursor...thing...

Anyway, here it is! Enjoy!
Attached Files
File Type: a2w mousecursor_test3_optimal.a2w (204.7 KB, 53 views)


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389
   
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 07-01-2011, 09:18 PM

Quote:
Originally Posted by x2495iiii View Post
Nice. Now we just need a way to detect whether a mouse click happens at the same time an object is under the cursor object (not the mouse cursor) without the use of physical bullets.
you could always use my laser technique to do that (the elongated cylinder)


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
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 08-02-2011, 07:18 AM

I checked it out, and I thought it was pretty good!
   
Reply With Quote
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 08-02-2011, 07:21 AM

Thanks!
I've been thinking of some interesting uses for this world.


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389
   
Reply With Quote
Old
Nighthawk0973
Senior Member
 
Nighthawk0973's Avatar
 
Status: Offline
Posts: 240
Join Date: May 2011
Location: In front of my computer.
Default 08-02-2011, 10:10 AM

Try and make it more responsive. It would be nice if the crosshair would go wherever your mouse went.
   
Reply With Quote
Reply

Tags
aim, cursor, hotd, mouse


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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.