Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Video Game Concepts Vol. 3: Multi-Terrain Gravity (http://www.alice.org/community/showthread.php?t=3042)

x2495iiii 09-14-2009 11:34 PM

Video Game Concepts Vol. 3: Multi-Terrain Gravity
 
1 Attachment(s)
I was asked to make one about having separate gravity methods for both land and water, so here you go. (Also, some people asked for screenshots, so I'll do my best)

Background: In games where the only objects you can fall on are solid, you only need one type of collision method which has the objects stop when one falls on the other. For water, however, you need to add another method which allows the object to sink, either partially or completely, under the water's surface.

Explanation: When an object falls into water in reality, it sinks at least a little bit no matter it's weight or density. This is another part of the game's physics, as there needs to be a special provision to prevent the object from walking on water or from sinking forever.

Example: In this world, the penguin immediately falls to the island. Both he and the island can be moved and when he is no longer above any part of the island (even the outer edges), he sinks into the water partially and bobs semi-realistically. I even solved the problem which made his feet partially sink into the island in Vol. 2. Key Ideas: First, a method determines if the penguin is above the island or not. Then, another method determines how far down he falls. To solve the problem which let to his feet getting buried, I changed the original method to stop moving him down when he was less than a certain increment (0.04 meters) above the island (or water), then pass it off to another method which moved him down to the island (or water) in zero seconds, making him ultimately move the exact distance to the island (or water) seamlessly. To make the penguin stop midway in the water, another object (I call it a marker) must be added. I used a bump shape, then moved it to the positionI wanted in the penguin,
then it made it's vehicle the penguin and set it's "is Showing" to false. This way, the penguin can easily sink down to any level I choose by setting the marker to whatever level I choose.

Application: Same as normal gravity, new objects must be added to a list to be affect by gravity. The only provision you'd need to make (which I didn't make in this world) is a way for the object to get back on land somehow, as moving the island back over the penguin won't cause him to rise to rise back to the top of it.

EDIT: I figured out how to delete the giant, problematic screenshot, so I'll try to re-post a smaller version next.

EDIT2: I spent a lot o' time on it, and I really can't find a good way to get small but readable screenshots. If anyone knows how, please tell me.

dubastot 09-24-2009 04:30 PM

Sorry, I haven't tried your program out yet even though you basically made it for me.I've just been really busy for the past few weeks.

x2495iiii 09-26-2009 12:34 AM

Don't worry about it, you can get around to it when you get around to it. In the meantime, is there another concept you'd like explored? I was considering making a pseudo-character-customization screen, but something like double-jumping or something sounds fun too.

dubastot 09-26-2009 06:06 PM

I think double jumping would be pretty cool too.


All times are GMT -5. The time now is 05:02 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.