001 Physics

Discussion pertaining to resources, stories/characters and gameplay ideas in this forum dedicated to games that are just a faint glow.
Forum rules
Do not create a topic offering to produce resources. Click here for the reason.

Please use above resources section of site so everyone can have access to the resources you create.
User avatar
RamchuK_Ntertainment
Ultimate 001 Member
 
Joined: Tue Sep 29, 2009 10:50 pm
Location: Seattle, Washington

Re: 001 Physics

Postby RamchuK_Ntertainment » Mon Jun 29, 2015 4:31 pm

For block corners, I suggest you make corner detection areas a little bigger and there shouldn't be any problems. I also see that when the ball bounces up, it's not following realistic gravity laws. An object that bounces or swings, will never return to the same location that it began from. That is because reverse velocity is limited or restricted by gravity, slowing the object and restricting distance.
Travesty: 3D Survival - WIP >>> Forum Topic
University of Washington (BABA)
-REGT- Ramchuk Entertainment Games Team
Strategy/Action/Adventure
Copyrighted©2008-2017

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: 001 Physics

Postby Mr.Numbers » Tue Jun 30, 2015 12:22 am

I know that, it was intentional :P Basically right now its bouncing without losing any energy and is not being affected by drag. Its setup to do so, just temporarily disabled for the sake of me being too lazy to re-enable it while I was testing some stuff.

I have to be very careful with the corners though, it requires a ton of tinkering. If they are too large they cause some glitchy behaviour, where as if they are too small they don't work at all :P Basically I'll have to come up with a formula to incorperate the velocity speed to allow it to be more accurate when moving at slow or faster speeds.

This looks interesting, although it runs at about 1-5 frames per second :P
Image

Looks 3D
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
RamchuK_Ntertainment
Ultimate 001 Member
 
Joined: Tue Sep 29, 2009 10:50 pm
Location: Seattle, Washington

Re: 001 Physics

Postby RamchuK_Ntertainment » Fri Jul 03, 2015 10:51 pm

Mr.Numbers wrote:I have to be very careful with the corners though, it requires a ton of tinkering. If they are too large they cause some glitchy behaviour, where as if they are too small they don't work at all Basically I'll have to come up with a formula to incorperate the velocity speed to allow it to be more accurate when moving at slow or faster speeds.


What I would do is consider making each corner consist of two parts/areas (something you have probably already done) and have each area extend beyond the corner. In other words, cross collision detection areas slightly. In theory, collision only occurs when a collider object collides with another collider; the collision detection areas are exempt. With this in mind, the cross would make sense as it would offer some security, a corner would no longer have that most central tip that can sometimes not register. At slow velocities it might still be possible for the collision to not register properly, but I think the error would be so small that it would barely be noticeable.

Mr.Numbers wrote:This looks interesting, although it runs at about 1-5 frames per second


Am I seeing the ball finally obeying laws of gravity? :D Looks like it to me.
Travesty: 3D Survival - WIP >>> Forum Topic
University of Washington (BABA)
-REGT- Ramchuk Entertainment Games Team
Strategy/Action/Adventure
Copyrighted©2008-2017

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: 001 Physics

Postby Mr.Numbers » Fri Aug 07, 2015 3:03 pm

Old Post:
Spoiler: show
I'm currently using a system where it checks everything based on raw co-ordinates. If the ball has an X co-ordinate higher than the box, but is within the top and the bottom of the box, it clearly is hitting the right side of the box. If it is above the box, but also to the right of the box it must be hitting the top right corner. The part that requires tinkering is the small offsets that are placed since the origin of both the box and the ball are the center of the object.

And I did say I setup proper law-abiding bouncing, it literally took two seconds to re-enable :P

The entire system is also fairly flexable, with many options to tinker with to have things work as precisely as you want :)
Image
V_X/V_Y: The actual X/Y velocity the object is moving at
F_X/F_Y: The X/Y force being applied
Gravity_X/Gravity_Y: This increases/decreases the F_X/F_Y variable by this amount every time the script runs
Interpolate_Speed: This is how fast the values from F_X/F_Y is transferred to V_X/V_Y via linear interpolation
Drag_Interpolate: This is how fast F_X/F_Y are pushed to "0" via linear interpolation
Bounce_Multiplyer: This determines how much force is lost upon bouncing, 1=Zero loss. (This was the setting that was disabled in the video)
SaveY: This is a safe-check that stores the last Y position of the object, to prevent the F_Y from ever-increasing when the ball is resting on an object
Check_Multiplyer: This is used when checking collisions, this will multiply the velocity and add it to the offset when determining where the ball is hitting
Check_Offset: This is used when checking collisions, this is a flat addition value to the co-ordinates when checking where the ball is hitting
Friction_Interpolate: When a ball is rolling on the ground, this will slow the F_X/F_Y values towards "0" via linear interpolation

As well, if you're still interested here is the current bouncing script, it uses some funky directional math that is quite a bit more compact than my previous attempt (Used in ball bouncer). Basically after it knows which side the ball hit, it will set a variable to a direction that is perpendicular to the face it hits (And on corners, that direction is simply a 45 degree angle, or an X, where as flat sides are on the 90 degree angles, like a +)
It then calculates the difference between the moving direction and the "Reflection Angle" then adds/subtracts the difference multiplied by two, then inverts it 180 degree's which in turn will give you pretty much a good enough bounce.




Whew that was a long post.


EDIT:
As well, so far I havn't had a single issue with the balls not running the collision script, regardless of where they hit (Corners, sides, etc) thankfully


UPDATE:
While being bored i decided to add some new stuff :D
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
kararty
Ultimate 001 Member
 
Joined: Tue Dec 04, 2012 1:16 pm
Location: Sweden

Re: 001 Physics

Postby kararty » Fri Aug 07, 2015 4:41 pm

Yay! A physics-based game! :D
Mike wrote:...

Image<~~~|Get over here!

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: 001 Physics

Postby Mr.Numbers » Fri Aug 07, 2015 4:46 pm

More of a concept of a game, knowing me I'll likely not make it into a game :P But alas, who knows!
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: 001 Physics

Postby Danny » Sat Aug 08, 2015 4:05 am

You have an obsession about games with balls in them! First game i saw you make was Jump, followed by some 2D topdown ball game, then this and the old one you showed me on youtube. You have some great skills when it comes to 001 physics Numbers :D Keep it up and please finish one of these games to show of the physics!

User avatar
Lee
001 Support
 
Joined: Thu Sep 21, 2006 1:59 pm
Location: United Kingdom

Re: 001 Physics

Postby Lee » Sat Aug 08, 2015 7:14 am

Another great game concept - you never seize to amaze me Mr.Numbers. These are the kinds of games that SHOULD be made to show off what the engine can do (especially for GG Maker newcomers) or at the very least be turned into Example/Demo projects that are bundled with the software!
Lee - 001 Community Manager

User avatar
Danny
001 Forum Master
 
Joined: Tue Jul 12, 2011 7:14 am

Re: 001 Physics

Postby Danny » Sat Aug 08, 2015 7:33 am

Lee wrote:Another great game concept - you never seize to amaze me Mr.Numbers. These are the kinds of games that SHOULD be made to show off what the engine can do (especially for GG Maker newcomers) or at the very least be turned into Example/Demo projects that are bundled with the software!


Finally someone else that agrees! :D

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: 001 Physics

Postby Mr.Numbers » Sun Jan 15, 2017 7:11 am

Physics simulation... is pretty dang advanced :P I'm mostly concerned with the length of some use-values.. Also, due to the nature of the project its not exactly "User Friendly" and will explode if you touch some things XD

Perhaps I'll be able to make it into a full game, who knows? XD

EDIT:
Forgot to post this, did this forever ago. I love the aspect of controlling physics with a mobile device, feels way more natural than testing on PC :P
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

PreviousNext

Return to Resource, Story and Level Design

Who is online

Users browsing this forum: No registered users

cron