I have tried many of ways at going at this and the only thing that I can make realistic is gravity.
I have tried to implement linear momentum and angular momentum ect. but there just too many equations for me to cooperate with.
If you have a physics engine or procedure you would like to share with everyone please post it here...
ID:151550
May 8 2010, 11:39 am
|
|
I don't know if BYOND would be able to handle something like Box2D or Chipmunk. Personally, I think the only way to go about this would be through a few DLL files that run a Box2D (etc.) simulation, then pass the info to BYOND. The only issue, then, though, is why you're still using BYOND after all that work.
|
In response to Jeff8500
|
|
Jeff8500 wrote:
The only issue, then, though, is why you're still using BYOND after all that work. I know my reason: Multiplayer code practically requires you to be an IT major. |
In response to I-Aryn-I
|
|
Well I got sockets to work reasonably well on Java. Didn't quite finish my mock-AIM client though.
|
In response to I-Aryn-I
|
|
Nah, that's a bit of an exaggeration. I can kind of manage sockets with the SFML library, but it's still pretty difficult.
|
Part of implementing a good physics engine in BYOND is taking advantage of the work people have done on the subject in other languages. While it's not directly applicable, you can often find extremely detailed information just about anywhere.
Some of my favourites: * http://chrishecker.com/Rigid_Body_Dynamics (for some introductory articles) * http://www.euclideanspace.com/ (for directly-applicable algorithms and learning) * http://www.cs.cmu.edu/~baraff/sigcourse/index.html (for an advanced look) * http://www.ode.org/ (for the list of things you'll need for a "true" physics engine) Sadly, physics is the math behind the science. If you and math don't get along, you and physics won't either. As much as people like to claim BYOND can't handle physics, that's just incorrect. What BYOND can't handle is three-dimensional rendering. The two-dimensional math -- or even the three-dimensional math -- is not only possible in BYOND but easier in BYOND than in several other languages. Since BYOND is not a mathematically-oriented language there is no built-in functionality for matrix manipulation, but otherwise it's got most of what you need. A certain mindset is needed, though. I think the best way to apply physics in a BYOND game is to divest yourself completely of the tile model and use that as something that is "pencilled in" after the fact. In other words, track object coordinates using your own special variable and interact with objects using that variable only. Each frame of the game, run applicable functions to convert the object's real, physical location into a BYOND coordinate and update the position of the object on the map. The map is treated as the "renderer" while your physics engine handles the actual positioning, verb availability, etc. One limitation you'll need to watch out for in a hardcore physics simulation is that BYOND has no pre-defined bounding boxes and intersection functions for collision detection. Other than the 32x32 grid, collision detection in BYOND requires you either to treat all objects as spherical models or actually to define polygonal collision models and run collision tests. |
wait gravity is only useful in a 3d game but byond cant do 3d so how mwould physics help in a 2d game unless your doing something epsilon(google it or look it up on armorgames.com)
|
In response to Devilkingx
|
|
It's useful for isometric games, platformers and other type of games which are 2D as well (like pool).
|
Although I do not have any at the moment that I wish to share, you can relatively create a decent "BYOND Physics" engine that will work good enough.
There's not much to actually go on about this, but it all depends on what your project is and what it involves.
Things like Fire need to spread, burn, extinguish, serve as a light source, etc.
Things like Water need depth, flow/current, etc.
If you really want to, you can do what I do and just step away from the computer while developing.
I then go ahead and grab a paper and pen, and get myself familiar with what I'm attempting to do on my projects.
You study the thing you want to implement and jot notes down on the paper-pen. The more "realistic" and creative you get, serves more fuel to the fire in your project.
If you do a resource search, there are some good Dynamic Lighting, Line-Drawing and etc. libraries/demos to gander at.