ashoulson / volatilephysics Goto Github PK
View Code? Open in Web Editor NEWA 2D Physics Library for Networked Games
License: Other
A 2D Physics Library for Networked Games
License: Other
Hi, I was about to test the library using Unity 4.7.0.
Unfortunately the scenes are empty.
Also Activating VOLATILE_UNITY creates numerous bugs and stops the project from compiling.
Is there a stable version I could use to do some testing?
Certainly not viable for 1.0, but possible later on
Would probably require switching from SAT to GJK for detecting polygon collisions
I noticed that the last commented issue dates back to 2016, so I was wondering if this repository is still maintained.
Bring over the blitting quad tree buffer from old code.
Dynamic objects may not be worth it with rollback, but static objects probably are. Eventually we could even precompute this.
Don't need it right away, long-term optimization idea.
Hi, I just had a quick look at your library, Maybe I missed something, but would it be possible to rollback the entire simulation, change a few things it and replay it again?
I'm not sure I got the idea, there are new changes in you history code, but why don't you create a snapshot of the entire physics state for each frame with a rollover system (reusing previous states when the max frames have been stored)? Would it be a bad system? It could allow a few optimisations (copied from frame to frame).
You could do this and save a lot of room by storing only the history of dynamic and kinematic objects (movable by hand, not tested against statics and other kinematics) and avoid storing the story of pure static objects.
Does this make sense?
Don't quite understand what dynamic-dynamic
means, would you please explain it in detail?
Is it possible that VolatilePhysics used on a mobile 1vs1 RTS game? Suppose we have 50 vs 50 game objects(soldiers) for each of the player.
Thanks.
Hey there,
I just started using Volatile to do some basic collision checking for a 2D MMO I'm working on. I may be doing things incorrectly because I'm not too sure about the ins and outs of this library. I will try to explain how I'm doing things the best that I can.
I'm using Unity for my game client and PhotonServer / PhotonWire for my server application. I have my 2D world built in a Unity scene and have the tile collider data (which are just points because all tiles in my world are 1x1 squares) being saved to a json file that is readable / copy-able by the server application. I have successfully been able to create the game's world colliders and put them into a VoltBody, and have the server check if a player is going where they should not be able to go before moving them to their requested position. The world's body position is set to 0,0 because the points in the json data are relative to the scene's 0,0.
Now comes my problem with QueryCircle. I am working on some simple combat (player clicks mouse, sends request to server to "attack", server uses QueryCircle to check if there are any attack-able monsters and continues with the game logic of doing damage, etc.). However, it isn't returning any bodies at all.
I have set up a filter to ignore bodies that it shouldn't be checking (anything that isn't "attack-able") that I have confirmed is working. The problem seems to come with the fact that when I set the position of the monster's VoltBody, the worldAxes widths get set to something like -640, which kinda makes sense because the monster's world position is around 640,640. I've debugged the VoltCode through the QueryCircle call and noticed that when it calls Collision.FindAxisMaxPenetration
, it fails because of the worldAxes widths.
I'm kinda clueless as to what could be the issue, and I wouldn't be surprised if it's because of the way I have things set up or I'm doing something incorrectly. If you could help me out with this, I'd greatly appreciate it.
Another note: When the monster is created on my server, it makes a shape using voltWorld.CreatePolygonBodySpace
with vertices making a square (0,0 - 0,1 - 1,1 - 1, 0). Then, I use voltBody.CreateDynamicBody
passing in the world position of the monster and the shape. The width is getting set to -640 somewhere when it translates the body's world position. I'm also using voltBody.Set to update the body's position, but at the moment the monster I am using is stationary. Thanks again.
EDIT: I've confirmed that a CircleCast works, just not QueryCircle. I need QueryCircle though because I want to allow the player to hit multiple monsters at once.
Not a very high priority since you'll probably want to collide with all the static objects. Would be useful for things like projectiles though maybe.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.