Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

View Poll Results: What do you think of Video Game Concepts?
Looks good. Keep going. 11 84.62%
Needs screenshots. 2 15.38%
Be more specific. 0 0%
Be less specific. 0 0%
This isn't really helpful. 0 0%
Voters: 13. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Video Game Concepts Vol. 2 - Gravity
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default Video Game Concepts Vol. 2 - Gravity - 08-04-2009, 01:49 AM

Though the first video game concept I wrote only got three votes, they were all requests to see more, so here's another one: gravity.

Background: I've seen plenty of platformer-type games which have tried to deal with the issue of gravity and falling characters. The big issue seems to be animating the fall back to the ground to be both realistic and functional.

Explanation: Gravity is a part of the game's physics which forces all objects in the game to move toward the ground (or a platform) at all times. If the object is in contact with the ground, movement stops, but the force remains present should the object move away from the ground (i. e. jumping).

Example: Three objects in the world immediately fall to the ground upon clicking the play button. Pressing the space bar will cause the penguin to jump, and holding the shift key while clicknig and dragging any of the objects will allow you to move any of the objects above the ground. After the mouse is released, the object will fall to the ground once again.

Key Ideas: In my opinion, this is a very solid way to render gravity with Alice. It may not be foolproof and would require extra coding (lots of if/else if statements) if platforms were included, but it does keep an omnipresent force acting on each of the objects which stops once the objects come into contact with the ground (although for some reason, the penguin's feet will sometimes get a little buried).

Application: This method isn't especially large, using only one infinite loop (while the world is running) and a corresponding object list. It could easily be used in many games, though the addition of many objects to the list may cause problems (not likely, however, as I've worked with lists over 1,000 items long.)
Attached Files
File Type: a2w gravity.a2w (869.9 KB, 144 views)


(')>
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 08-04-2009, 10:34 AM

Very well done. It's not real physics, but that's not the point here. This is all one really needs to simulate gravity.

PS
I messed it up by moving the ground down then back over their heads.
   
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 08-04-2009, 10:46 AM

Ah yes. That can be fixed by making the ground a "notFirstClass" object. To do that, click on the ground, then click the properties tab on the left, then go to the seldom used properties near the bottom, then change the "isFirstClass" boolean property to false. This makes the ground impossible to click on and should make it so that it can't be moved by the mouse.


(')>
   
Reply With Quote
Old
onij
Guest
 
Status:
Posts: n/a
Default 08-17-2009, 04:21 PM

I've got to be missing something. The duration on the fall is 0 seconds, yet it takes about a second for each object to fall.
When I set the duration to something like 1 second, it take almost a minute for the object to fall.... I've looked through your 2 methods and 2 variables... what am I missing....

Why does it take so long for them to fall with a 0 second duration?
   
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 08-20-2009, 12:25 AM

It's the miniscule distance traveled. When Alice is told to move an object almost zero meters in exactly zero seconds repeatedly, it creates a slow, smooth line of motion which can be easily interrupted.


(')>
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 08-24-2009, 09:40 PM

There's one problem. what if you have more than one section of ground. In my game I have water and land, each separate.
   
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 08-24-2009, 10:20 PM

you'd either need a different gravity method with markers to indicate which ground they were over, or special If/Else If conditions in just one gravity method.

Would you like a demonstration?


(')>
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 08-25-2009, 08:57 PM

An example would be most appreciated. My game is where when you go over water, you sink, but on land you stay above the ground(like any game).
   
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 09-17-2009, 01:19 AM

I wrote Vol. 3 and made the topic multi-terrain gravity. It deals with land and water and hopefully addresses your needs (apologies for the delay).


(')>
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 09-17-2009, 04:59 PM

Oh yeah, that's completely fine. I haven't gotten around to looking at it yet, but I downloaded it.
   
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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.