create-bloop 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-bloop",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "Create a new Bloop game",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.js",
@@ -13,8 +13,8 @@
13
13
  "vite": "^7.2.2"
14
14
  },
15
15
  "dependencies": {
16
- "@bloopjs/bloop": "^0.0.100",
16
+ "@bloopjs/bloop": "^0.0.101",
17
17
  "@bloopjs/toodle": "^0.1.3",
18
- "@bloopjs/web": "^0.0.100"
18
+ "@bloopjs/web": "^0.0.101"
19
19
  }
20
20
  }
@@ -1 +1,2 @@
1
1
  export const moveSpeed = 10;
2
+ export const scale = 2;
@@ -1,5 +1,5 @@
1
1
  import { Bloop } from "@bloopjs/bloop";
2
- import { moveSpeed } from "./config";
2
+ import { moveSpeed, scale } from "./config";
3
3
 
4
4
  export const game = Bloop.create({
5
5
  bag: {
@@ -23,6 +23,6 @@ game.system("move", {
23
23
  bag.mouse.x = inputs.mouse.x;
24
24
  bag.mouse.y = inputs.mouse.y;
25
25
 
26
- bag.scale = 2;
26
+ bag.scale = scale;
27
27
  },
28
28
  });
@@ -15,8 +15,8 @@
15
15
  "vite": "^7.2.2"
16
16
  },
17
17
  "dependencies": {
18
- "@bloopjs/bloop": "^0.0.100",
18
+ "@bloopjs/bloop": "^0.0.101",
19
19
  "@bloopjs/toodle": "^0.1.3",
20
- "@bloopjs/web": "^0.0.100"
20
+ "@bloopjs/web": "^0.0.101"
21
21
  }
22
22
  }
@@ -63,7 +63,9 @@ game.system("recording-watcher", {
63
63
  "session started, recording at frame",
64
64
  time.frame,
65
65
  );
66
- app.sim.record(100_000);
66
+ if (!app.sim.isRecording && !app.sim.isReplaying) {
67
+ app.sim.record(100_000);
68
+ }
67
69
  }
68
70
  },
69
71
  });
@@ -20,7 +20,8 @@ export const InputsSystem = PhaseSystem("playing", {
20
20
  p1.facingDir = 1;
21
21
  }
22
22
  // P1 Jump
23
- const wantsJump = players.get(0).keys.w.down || players.get(0).mouse.left.down;
23
+ const wantsJump =
24
+ players.get(0).keys.w.down || players.get(0).mouse.left.down;
24
25
  if (wantsJump && p1.grounded) {
25
26
  p1.vy = cfg.JUMP_VELOCITY;
26
27
  p1.grounded = false;
@@ -39,7 +40,10 @@ export const InputsSystem = PhaseSystem("playing", {
39
40
  p2.facingDir = 1;
40
41
  }
41
42
  // P2 Jump
42
- if ((players.get(1).keys.w.down || players.get(1).mouse.left.down) && p2.grounded) {
43
+ if (
44
+ (players.get(1).keys.w.down || players.get(1).mouse.left.down) &&
45
+ p2.grounded
46
+ ) {
43
47
  p2.vy = cfg.JUMP_VELOCITY;
44
48
  p2.grounded = false;
45
49
  }