Complete Box2D to Planck.js migration

- Replace Box2D.js with Planck.js physics engine
- Update all require paths from 'Lib/Vendor/Box2D' to 'Lib/Vendor/Planck'
- Convert Box2D contact listeners to Planck.js event system
- Fix all method name capitalization (Get* -> get*, Set* -> set*)
- Update collision detection system for Planck.js compatibility
- Server now starts successfully and basic physics working
- Character can land on platforms - core physics functional

Major milestone: Game now running on modern, maintained physics engine
This commit is contained in:
Karl Pannek 2025-07-16 15:01:59 +02:00
parent 875abd60d9
commit dc779def9c
43 changed files with 701 additions and 14524 deletions

View file

@ -65,8 +65,8 @@ function (Parent, Settings, nc, Assert, PlayerController) {
}
var difference = {
x: Math.abs(this.lastServerPositionState.p.x - this.doll.body.GetPosition().x),
y: Math.abs(this.lastServerPositionState.p.y - this.doll.body.GetPosition().y)
x: Math.abs(this.lastServerPositionState.p.x - this.doll.body.getPosition().x),
y: Math.abs(this.lastServerPositionState.p.y - this.doll.body.getPosition().y)
};
if(difference.x > Settings.ME_STATE_MAX_DIFFERENCE_METERS ||
@ -78,8 +78,8 @@ function (Parent, Settings, nc, Assert, PlayerController) {
Me.prototype.getPositionStateOverride = function() {
return {
p: this.doll.body.GetPosition().Copy(),
lv: this.doll.body.GetLinearVelocity().Copy()
p: this.doll.body.getPosition().clone(),
lv: this.doll.body.getLinearVelocity().clone()
};
};
@ -91,8 +91,8 @@ function (Parent, Settings, nc, Assert, PlayerController) {
Me.prototype.resetPositionState = function(options) {
Assert.number(options.p.x, options.p.y);
Assert.number(options.lv.x, options.lv.y);
this.doll.body.SetPosition(options.p);
this.doll.body.SetLinearVelocity(options.lv);
this.doll.body.setPosition(options.p);
this.doll.body.setLinearVelocity(options.lv);
};
Me.prototype.createAndAddArrow = function() {