create-bloop 0.0.17 → 0.0.18

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.17",
3
+ "version": "0.0.18",
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.89",
16
+ "@bloopjs/bloop": "^0.0.90",
17
17
  "@bloopjs/toodle": "^0.1.3",
18
- "@bloopjs/web": "^0.0.89"
18
+ "@bloopjs/web": "^0.0.90"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@ export function draw(g: typeof game, toodle: Toodle) {
6
6
  toodle.startFrame();
7
7
  toodle.draw(
8
8
  toodle.shapes.Circle({
9
- idealSize: { width: 100, height: 100 },
9
+ radius: 50,
10
10
  scale: bag.scale,
11
11
  position: { x: bag.x, y: bag.y },
12
12
  color: Colors.web.hotPink,
@@ -14,7 +14,7 @@ export function draw(g: typeof game, toodle: Toodle) {
14
14
  );
15
15
  toodle.draw(
16
16
  toodle.shapes.Rect({
17
- idealSize: { width: 10, height: 10 },
17
+ size: { width: 10, height: 10 },
18
18
  position: toodle.convertSpace(
19
19
  { x: bag.mouse.x, y: bag.mouse.y },
20
20
  { from: "screen", to: "world" },
@@ -15,8 +15,8 @@
15
15
  "vite": "^7.2.2"
16
16
  },
17
17
  "dependencies": {
18
- "@bloopjs/bloop": "^0.0.89",
18
+ "@bloopjs/bloop": "^0.0.90",
19
19
  "@bloopjs/toodle": "^0.1.3",
20
- "@bloopjs/web": "^0.0.89"
20
+ "@bloopjs/web": "^0.0.90"
21
21
  }
22
22
  }
@@ -9,18 +9,18 @@ export const InputsSystem = PhaseSystem("playing", {
9
9
 
10
10
  // P1 Horizontal movement
11
11
  p1.vx = 0;
12
- if (players[0].keys.a.held) {
12
+ if (players.get(0).keys.a.held) {
13
13
  p1.x -= cfg.MOVE_SPEED;
14
14
  p1.vx = -cfg.MOVE_SPEED;
15
15
  p1.facingDir = -1;
16
16
  }
17
- if (players[0].keys.d.held) {
17
+ if (players.get(0).keys.d.held) {
18
18
  p1.x += cfg.MOVE_SPEED;
19
19
  p1.vx = cfg.MOVE_SPEED;
20
20
  p1.facingDir = 1;
21
21
  }
22
22
  // P1 Jump
23
- const wantsJump = players[0].keys.w.down || players[0].mouse.left.down;
23
+ const wantsJump = players.get(0).keys.w.down || players.get(0).mouse.left.down;
24
24
  if (wantsJump && p1.grounded) {
25
25
  p1.vy = cfg.JUMP_VELOCITY;
26
26
  p1.grounded = false;
@@ -28,36 +28,36 @@ export const InputsSystem = PhaseSystem("playing", {
28
28
 
29
29
  // P2 Horizontal movement
30
30
  p2.vx = 0;
31
- if (players[1].keys.a.held) {
31
+ if (players.get(1).keys.a.held) {
32
32
  p2.x -= cfg.MOVE_SPEED;
33
33
  p2.vx = -cfg.MOVE_SPEED;
34
34
  p2.facingDir = -1;
35
35
  }
36
- if (players[1].keys.d.held) {
36
+ if (players.get(1).keys.d.held) {
37
37
  p2.x += cfg.MOVE_SPEED;
38
38
  p2.vx = cfg.MOVE_SPEED;
39
39
  p2.facingDir = 1;
40
40
  }
41
41
  // P2 Jump
42
- if ((players[1].keys.w.down || players[1].mouse.left.down) && p2.grounded) {
42
+ if ((players.get(1).keys.w.down || players.get(1).mouse.left.down) && p2.grounded) {
43
43
  p2.vy = cfg.JUMP_VELOCITY;
44
44
  p2.grounded = false;
45
45
  }
46
46
 
47
47
  if (!net.isInSession) {
48
48
  // locally, control second player with ijkl
49
- if (players[0].keys.j.held) {
49
+ if (players.get(0).keys.j.held) {
50
50
  p2.x -= cfg.MOVE_SPEED;
51
51
  p2.vx = -cfg.MOVE_SPEED;
52
52
  p2.facingDir = -1;
53
53
  }
54
- if (players[0].keys.l.held) {
54
+ if (players.get(0).keys.l.held) {
55
55
  p2.x += cfg.MOVE_SPEED;
56
56
  p2.vx = cfg.MOVE_SPEED;
57
57
  p2.facingDir = 1;
58
58
  }
59
59
  // Jump
60
- if (players[0].keys.i.down && p2.grounded) {
60
+ if (players.get(0).keys.i.down && p2.grounded) {
61
61
  p2.vy = cfg.JUMP_VELOCITY;
62
62
  p2.grounded = false;
63
63
  }