Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Starting a project, asking some questions first...
Old
MoarDesu
Guest
 
Status:
Posts: n/a
Default Starting a project, asking some questions first... - 03-30-2007, 07:57 PM

I'm in the works of making a Mortal-Kombat-type game (currently planning character moves, etc.) with pop-culture characters, but I need some questions answered first...

1. Is it possible to create a system where the second player can be an NPC? If so, how? I'd really hate to make it a 2-player only game.
Edit: I just found [choose true: probability of true] in Seldom Used Properties. I might be able to mess around with this enough to make this happen, but if anyone has any tips, it would be greatly appreciated.

2. Is it possible to make objects disappear from the game (without using transparency) and reappear later? I'd rather not use transparency since I'd think it would bog down a computer having all of what I'm planning up at once.
Edit: ^ Answered.

3. How can I edit skins of characters already in the Alice Gallery?
Edit: ^ Answered.

4. Is there a way to have multiple keys activate a method? (Such as for a cheat code)

Thanks for such a wonderful program.

Last edited by MoarDesu; 03-31-2007 at 08:52 PM.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 03-30-2007, 09:37 PM

You can make an object disappear by setting its isShowing property to false. Set the property value to true later to make it reappear.
Dick Baldwin
   
Reply With Quote
Old
MoarDesu
Guest
 
Status:
Posts: n/a
Default 03-30-2007, 10:54 PM

Quote:
Originally Posted by DickBaldwin View Post
You can make an object disappear by setting its isShowing property to false. Set the property value to true later to make it reappear.
Dick Baldwin
Grazie.

Will this help the player's computer any or just make it disappear?

I know what it's like to have bad hardware, so I don't want to make this bad for the player.

Granted, I probably won't be releasing this on the internet that much, but if there's any friends of mine who want to play, I don't want it to slow down the gameplay too much.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 03-30-2007, 11:43 PM

Well, I really don't know the answer to your question, but I can give my best guess.

Actually, this paragraph is not a guess, this is a fact. Unlike Java and other OOP languages, it is not possible to create or to destroy objects at runtime in Alice. Therefore, any object that you create and add to the world when you originally create the world will be there for the duration of the game, even if some or all of those objects are not needed at some point in the game and are not visible. That means that as a minimum, they will be consuming memory.

Now, this is a guess. Beyond memory consumption, the next question is will the existence of the invisible objects consume processor cycles to any significant degree? If it were me writing the program, as soon as I make an object invisible, I would move it off into a known location somewhere in space far away from the visible scene. That would prevent it from having any physical interaction with any of the objects that are moving around in the scene. My guess is that if you park it far away from the visible scene, it won't have any reason to consume much, if any processor resources while it is parked there. But again, that is just a guess. In any event, even if it doesn't help to move it out into space, it shouldn't hurt.

On the other hand, since Alice does not allow objects to be created or destroyed at runtime, you don't have too many choices. You have to deal with all of the objects somehow whether you currently need them or not. So I believe I would make un-needed objects invisible and park them out in space somewhere. Then when I need them later, I could retrieve them from space and make them visible again.

As a side note, after making the objects invisible, I would probably call the setPointOfView method on each object to align it with the world and then move it out into a known location in space. That way, I would have the ability to bring it back from space later and cause it to land in a specific position relative to the center of the world.

Dick Baldwin
   
Reply With Quote
Old
MoarDesu
Guest
 
Status:
Posts: n/a
Default 03-31-2007, 02:39 PM

Quote:
Originally Posted by DickBaldwin View Post
Well, I really don't know the answer to your question, but I can give my best guess.

Actually, this paragraph is not a guess, this is a fact. Unlike Java and other OOP languages, it is not possible to create or to destroy objects at runtime in Alice. Therefore, any object that you create and add to the world when you originally create the world will be there for the duration of the game, even if some or all of those objects are not needed at some point in the game and are not visible. That means that as a minimum, they will be consuming memory.

Now, this is a guess. Beyond memory consumption, the next question is will the existence of the invisible objects consume processor cycles to any significant degree? If it were me writing the program, as soon as I make an object invisible, I would move it off into a known location somewhere in space far away from the visible scene. That would prevent it from having any physical interaction with any of the objects that are moving around in the scene. My guess is that if you park it far away from the visible scene, it won't have any reason to consume much, if any processor resources while it is parked there. But again, that is just a guess. In any event, even if it doesn't help to move it out into space, it shouldn't hurt.

On the other hand, since Alice does not allow objects to be created or destroyed at runtime, you don't have too many choices. You have to deal with all of the objects somehow whether you currently need them or not. So I believe I would make un-needed objects invisible and park them out in space somewhere. Then when I need them later, I could retrieve them from space and make them visible again.

As a side note, after making the objects invisible, I would probably call the setPointOfView method on each object to align it with the world and then move it out into a known location in space. That way, I would have the ability to bring it back from space later and cause it to land in a specific position relative to the center of the world.

Dick Baldwin
Alright, again, thank you.
   
Reply With Quote
Changing an object's skin.
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Changing an object's skin. - 03-31-2007, 07:28 PM

For an answer to your question on changing skins, see the thread http://www.alice.org/community/showthread.php?t=638 .

This is a very useful way to "customize" the Alice objects.
   
Reply With Quote
Old
MoarDesu
Guest
 
Status:
Posts: n/a
Default 03-31-2007, 08:52 PM

Quote:
Originally Posted by DrJim View Post
For an answer to your question on changing skins, see the thread http://www.alice.org/community/showthread.php?t=638 .

This is a very useful way to "customize" the Alice objects.
Thank you.
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.