Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Breeding like rabbits
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 Breeding like rabbits - 06-26-2011, 08:22 AM

I've uncovered a neat function in Alice. The ability to copy objects while playing.
Play this world and observe the bunny cloning himself. I'm at 315 clones right now, still going.
There will be an error when you stop the world, but it doesn't seem to do anything bad. You can't click restart, you need to stop then play again.
Attached Files
File Type: a2w copyObjects.a2w (570.9 KB, 130 views)


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

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 06-26-2011, 08:45 AM

Arty-fishL, I can not begin to tell you how useful this will be. Why would they ever take this out?


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Animal testing
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
Talking Animal testing - 06-26-2011, 10:00 AM

Quote:
Originally Posted by legolizard View Post
Arty-fishL, I can not begin to tell you how useful this will be. Why would they ever take this out?
Great!

To test the capabilities of Alice I slightly modified the code, I took out the rabbits bouncing about and made them spawn every 0.01 seconds instead of 1.5 seconds. I managed to reach 6116 rabbits before I gave up, it wasn't going to stop. By this time it had really slowed down though, they were spawning every 1 or 1.5 seconds.
6116 RABBITS.jpg

I will get you the code to add the tile in a minute.


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

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote
Good enough for my 1100th post?
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
Talking Good enough for my 1100th post? - 06-26-2011, 10:33 AM

OK, to get this function:

Ensure Alice is closed

1 - Go to this folder: Alice 2.2\Required\resources
2 - Open the file called Alice Style.py in a text editor (such as notepad)
3 - Navigate to the bit that looks like this image:
tmp_bitInFIle.jpg
4 - Anywhere on a new line underneath formatMap = { copy and paste in this code:
Code:
    edu.cmu.cs.stage3.alice.core.question.CreateCopyOf : "<<<subject>>> create copy of", #new
5 - save it
6 - Go to this folder: Alice 2.2\Required\resources\common
7 - Open the file called StandardResources.py in a text editor (such as notepad)
8 - search (use the find function) for "other" (quotation marks included).
9 - On each find, except the one that looks like this:
tmp_exceptThisBit.png
insert this code:
Code:
        "edu.cmu.cs.stage3.alice.core.question.CreateCopyOf",
on a new line within the brackets; so it looks like (or similar to) this line:
tmp_bitLooksLikeThis.png
10 - repeat steps 9 and 10 until you reach the final find in the file
11 - save it
12 - run Alice
13 - On each objects functions there should be a tile under "other" that reads object create copy of
14 - This can be dragged into object fields (such as object move forward).


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

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
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 06-26-2011, 10:49 AM

Ooooooh, shiny.

This could be quite useful indeed.

Will the worlds utilizing the commands work on all copies of Alice, including unmodified ones?
   
Reply With Quote
Old
legolizard
Senior Member
 
legolizard's Avatar
 
Status: Offline
Posts: 242
Join Date: Jan 2011
Location: Aboard the Hyperion escaping the zerg.
Default 06-26-2011, 10:57 AM

Yah HOOOOOOOOOOOOOOOO! Thanks Arty-FishL, I had no idea any of that even existed. So is Alice not compiled and it just reads those python files like what a web browser does to HTML code?


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."-Albert Einstein
   
Reply With Quote
Old
room14
Senior Member
 
room14's Avatar
 
Status: Offline
Posts: 549
Join Date: Nov 2009
Location: Auckland New Zealand
Default 06-26-2011, 01:23 PM

Quote:
Originally Posted by x2495iiii View Post
Ooooooh, shiny.

This could be quite useful indeed.

Will the worlds utilizing the commands work on all copies of Alice, including unmodified ones?
well, considering that i got an error while loading it, no.


:D
   
Reply With Quote
Old
beachbum111111
Senior Member
 
beachbum111111's Avatar
 
Status: Offline
Posts: 852
Join Date: Feb 2010
Location: e
Default 06-26-2011, 02:09 PM

AWESOME. I can make a starcraft game now (because I didn't know how to make guys clone so I couldn't make an army).


"Don't lead me into temptation I can find it myself"
   
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 06-26-2011, 03:29 PM

good job arty, always figuring out new useful things for alice.


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
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 06-26-2011, 04:36 PM

Amazing. Now I can create high detail effects without a problem.
-Now if only you could find a way to delete a copy during play.
-This is going to be one huge ass list of objects.
-Any way to control these copies? I haven't actually done this mod yet.

Last edited by Mr Kidnapper; 06-26-2011 at 05:01 PM.
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.