Alice Community  

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

Reply
 
Thread Tools Display Modes
That...
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default That... - 02-28-2010, 11:04 PM

That would require unecisary objects, while the time to add in iregular objects would not take alot of coding, I will upgrade my engine tonight for it.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-01-2010, 09:20 AM

Quote:
Originally Posted by Dameria View Post
Yeah, he was talking about the frame rate, not the speed of the world. The only way to decrease the frame rate is to use less objects and avoid using infinite loops (or while events because those are the same thing).

Oh Darn i have over 1000 loops

Quote:
Originally Posted by Niteshifter View Post
You need to create a list, whether it be in an object or the world and when you drop the "For all in order/together", you would choose the list that you created.

As for the frame rate, I don't think that you can adjust this at the moment, but if you just want to speed the world up, you would set the world's speed multiplier (under seldom used properties inside world) to a higher number.

Ive been using Alice for 3 years. I know that

Quote:
Originally Posted by Niteshifter View Post
You need to create a list, whether it be in an object or the world and when you drop the "For all in order/together", you would choose the list that you created.

As for the frame rate, I don't think that you can adjust this at the moment, but if you just want to speed the world up, you would set the world's speed multiplier (under seldom used properties inside world) to a higher number.

There is not "if behind camera" option. Ive took so much time looking


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by x2495iiii; 03-01-2010 at 01:02 PM. Reason: Triple-Posts
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Lightbulb 03-01-2010, 01:39 PM

Quote:
Originally Posted by jediaction View Post
There is not "if behind camera" option. Ive took so much time looking
U can do this, but it only seems to work for me with a dummy.
  1. drop a dummy at the camera
  2. Set its vehicle to the camera
  3. Drop an 'if/else' tile into the method
  4. Then you go into the functions tab for the object you want to check for behind the camera
  5. Scroll down to the spatial relation subheading
  6. grab the 'object is behind' into the if/else bit
  7. then set it to if 'object is behind dummy'
  8. Make it do whatever you want (eg. disappear) when it is behind the dummy
  9. Set it to loop
  10. Then it will do whatever you set (eg. disappear) when it is behind the camera
Obviously you can do this for any object or multiple objects, or an object list

Here is an example, the sky goes red if the joey is behind and green if it is in front.
Move the camera with the mouse:
Attached Files
File Type: a2w If is behind camera example.a2w (239.6 KB, 5 views)


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

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 03-01-2010, 03:00 PM

Jediaction, I have already created a world for you showing how you check if an object is behind the camera, it is with the fish? Or did I not publish that world?


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-01-2010, 03:13 PM

Quote:
Originally Posted by arty-fishL View Post
Here is an example, the sky goes red if the joey is behind and green if it is in front.
Move the camera with the mouse:
Thanks but unfortunatly...every time i try adding one of these things the game crashes and i cant save so i cant do this. Ill try and figure out buy not now sorry and thanks for your time


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 03-01-2010, 04:38 PM

Again about the irregular objects! Programing a square to collide is on the list of todos! But anything more complex just can't be done.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 03-01-2010, 04:56 PM

Yes but you can make bigger objects act as a square by using spacial distance. I have tried to do this with my own collision detection, but it did not work as I wanted it to because of some weird way Alice sets up objects spacial properties.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 03-01-2010, 05:16 PM

Exactly. Round objects are the easiest to collide with each other. Easier code is faster code, and faster code is smoother code. That's why I chose this method.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
nsprangers
Guest
 
Status:
Posts: n/a
Default 03-05-2010, 06:02 PM

Congrats and nice job making this.

It may be faster, easier, and smoother, but it doesn't actually solve the problem of detecting if any two objects have collided. Sure, you could make a wall of invisible cylinders along your flat wall, but whatever object you're moving would bounce along the wall. I've only had Alice downloaded for a couple days, but it seems you can only interact with distances between objects, not surfaces. So who knows if it can actually be done.

In the main collision detection block, you have an expression that says

Code:
if ((cylinder distance to item_from_close objects) <= 
  ((item_from_close objects's width / 2) + 
    (item_from_close objects's width / 2)
  )
)
Why are you dividing the width twice then adding it together?

In your maintenance area, you add objects that are within 5 meters to the wold.Close objects list, and then below you remove anything that is more than 2 meters away. The second check, for more than 2 meters away, is only done every 1/4 second, but isn't the 5 meter check done only once since it's not part of any loop? If the 5 meter check is meant to initialize the world.Close objects list, it should probably be up at the top, outside the "do together" block.

Last edited by nsprangers; 03-05-2010 at 06:15 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 03-05-2010, 08:30 PM

Zonabone, how is the online thigy coming. DO you have moving objects working. If not, im gonna try.

I mean like an object movign and showing up on two different running alices


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Reply

Thread Tools
Display Modes

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