[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 179ea99635 021/472: Add our own sprites. Close #13
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 179ea99635 021/472: Add our own sprites. Close #13 |
Date: |
Thu, 6 Jan 2022 21:59:01 -0500 (EST) |
branch: elpa/pacmacs
commit 179ea99635d21c2f5c254b61f765ad4148ecb2c7
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Add our own sprites. Close #13
---
README.md | 15 ++++---------
pacman.el | 11 ++++++----
sprites/Pacman-Chomping-Down.json | 43 +++++++++++++++++++++++++++++++++++++
sprites/Pacman-Chomping-Down.png | Bin 0 -> 554 bytes
sprites/Pacman-Chomping-Left.json | 43 +++++++++++++++++++++++++++++++++++++
sprites/Pacman-Chomping-Left.png | Bin 0 -> 588 bytes
sprites/Pacman-Chomping-Right.json | 43 +++++++++++++++++++++++++++++++++++++
sprites/Pacman-Chomping-Right.png | Bin 0 -> 564 bytes
sprites/Pacman-Chomping-Up.json | 43 +++++++++++++++++++++++++++++++++++++
sprites/Pacman-Chomping-Up.png | Bin 0 -> 540 bytes
sprites/Pill.json | 27 +++++++++++++++++++++++
sprites/Pill.png | Bin 0 -> 215 bytes
sprites/Red-Ghost-Down.json | 27 +++++++++++++++++++++++
sprites/Red-Ghost-Down.png | Bin 0 -> 482 bytes
sprites/Red-Ghost-Left.json | 27 +++++++++++++++++++++++
sprites/Red-Ghost-Left.png | Bin 0 -> 488 bytes
sprites/Red-Ghost-Right.json | 27 +++++++++++++++++++++++
sprites/Red-Ghost-Right.png | Bin 0 -> 480 bytes
sprites/Red-Ghost-Up.json | 27 +++++++++++++++++++++++
sprites/Red-Ghost-Up.png | Bin 0 -> 461 bytes
20 files changed, 318 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 6b97b431ae..09134b7d71 100644
--- a/README.md
+++ b/README.md
@@ -5,14 +5,7 @@
## Usage ##
1. Clone the repo somewhere and cd to it: `$ git clone
git://github.com/rexim/pacman.el.git && cd pacman.el`
-2. The game requires a sprite sheet file, but we currently do not provide it.
You have to find it (or even make it) yourself. Current sprite sheet
requirements:
- 1. The sprite sheet file should be localted at the games folder
- 2. The sprite sheet file should be named `pacman10-hp-sprite.png`
- 3. The sprite sheet should have at least three frames at the following
coordinates (in the format `X Y WIDTH HEIGHT`)
- - `20 0 20 20`
- - `0 0 20 20`
- - `40 0 20 20`
-3. Add game folder to the `load-path`
-4. Open `pacman.el` file in Emacs
-5. Eval entire file: `M-x eval-buffer`
-6. Start the game: `M-x pacman-start`
+2. Add game folder to the `load-path`
+3. Open `pacman.el` file in Emacs
+4. Eval entire file: `M-x eval-buffer`
+5. Start the game: `M-x pacman-start`
diff --git a/pacman.el b/pacman.el
index fa0c890593..738a64fcc8 100644
--- a/pacman.el
+++ b/pacman.el
@@ -42,12 +42,15 @@
(list :row 0
:column 0
:direction 'right
- :animation (list :frames (list '(20 0 20 20)
- '(0 0 20 20)
- '(40 0 20 20))
+ :animation (list :frames (list '(0 0 40 40)
+ '(40 0 40 40)
+ '(80 0 40 40)
+ '(120 0 40 40))
:current-frame 0)))
-(defvar pacman-resource (pacman-load-resource "pacman10-hp-sprite.png"))
+(defvar pacman-resource nil)
+(setq pacman-resource
+ (pacman-load-resource "sprites/Pacman-Chomping-Right.png"))
(define-derived-mode pacman-mode special-mode "pacman-mode"
(define-key pacman-mode-map (kbd "<up>") 'pacman-up)
diff --git a/sprites/Pacman-Chomping-Down.json
b/sprites/Pacman-Chomping-Down.json
new file mode 100644
index 0000000000..d3b57b3357
--- /dev/null
+++ b/sprites/Pacman-Chomping-Down.json
@@ -0,0 +1,43 @@
+{ "frames": {
+ "Pacman-Chomping 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 2.ase": {
+ "frame": { "x": 80, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 3.ase": {
+ "frame": { "x": 120, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Pacman-Chomping-Down.png",
+ "format": "RGBA8888",
+ "size": { "w": 160, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Pacman-Chomping-Down.png b/sprites/Pacman-Chomping-Down.png
new file mode 100644
index 0000000000..f1217f97cd
Binary files /dev/null and b/sprites/Pacman-Chomping-Down.png differ
diff --git a/sprites/Pacman-Chomping-Left.json
b/sprites/Pacman-Chomping-Left.json
new file mode 100644
index 0000000000..8961638b45
--- /dev/null
+++ b/sprites/Pacman-Chomping-Left.json
@@ -0,0 +1,43 @@
+{ "frames": {
+ "Pacman-Chomping 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 2.ase": {
+ "frame": { "x": 80, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 3.ase": {
+ "frame": { "x": 120, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Pacman-Chomping-Left.png",
+ "format": "RGBA8888",
+ "size": { "w": 160, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Pacman-Chomping-Left.png b/sprites/Pacman-Chomping-Left.png
new file mode 100644
index 0000000000..c4e0f04894
Binary files /dev/null and b/sprites/Pacman-Chomping-Left.png differ
diff --git a/sprites/Pacman-Chomping-Right.json
b/sprites/Pacman-Chomping-Right.json
new file mode 100644
index 0000000000..6dc4a4f97e
--- /dev/null
+++ b/sprites/Pacman-Chomping-Right.json
@@ -0,0 +1,43 @@
+{ "frames": {
+ "Pacman-Chomping 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 2.ase": {
+ "frame": { "x": 80, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 3.ase": {
+ "frame": { "x": 120, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Pacman-Chomping-Right.png",
+ "format": "RGBA8888",
+ "size": { "w": 160, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Pacman-Chomping-Right.png
b/sprites/Pacman-Chomping-Right.png
new file mode 100644
index 0000000000..0efb7cff70
Binary files /dev/null and b/sprites/Pacman-Chomping-Right.png differ
diff --git a/sprites/Pacman-Chomping-Up.json b/sprites/Pacman-Chomping-Up.json
new file mode 100644
index 0000000000..a3f3a0d532
--- /dev/null
+++ b/sprites/Pacman-Chomping-Up.json
@@ -0,0 +1,43 @@
+{ "frames": {
+ "Pacman-Chomping 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 2.ase": {
+ "frame": { "x": 80, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pacman-Chomping 3.ase": {
+ "frame": { "x": 120, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Pacman-Chomping-Up.png",
+ "format": "RGBA8888",
+ "size": { "w": 160, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Pacman-Chomping-Up.png b/sprites/Pacman-Chomping-Up.png
new file mode 100644
index 0000000000..65015a2f72
Binary files /dev/null and b/sprites/Pacman-Chomping-Up.png differ
diff --git a/sprites/Pill.json b/sprites/Pill.json
new file mode 100644
index 0000000000..f7f1532697
--- /dev/null
+++ b/sprites/Pill.json
@@ -0,0 +1,27 @@
+{ "frames": {
+ "Pill 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ },
+ "Pill 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 100
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Pill.png",
+ "format": "RGBA8888",
+ "size": { "w": 80, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Pill.png b/sprites/Pill.png
new file mode 100644
index 0000000000..353fbf6563
Binary files /dev/null and b/sprites/Pill.png differ
diff --git a/sprites/Red-Ghost-Down.json b/sprites/Red-Ghost-Down.json
new file mode 100644
index 0000000000..48b3456397
--- /dev/null
+++ b/sprites/Red-Ghost-Down.json
@@ -0,0 +1,27 @@
+{ "frames": {
+ "Ghost 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ },
+ "Ghost 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Red-Ghost-Down.png",
+ "format": "RGBA8888",
+ "size": { "w": 80, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Red-Ghost-Down.png b/sprites/Red-Ghost-Down.png
new file mode 100644
index 0000000000..b37c7f5a82
Binary files /dev/null and b/sprites/Red-Ghost-Down.png differ
diff --git a/sprites/Red-Ghost-Left.json b/sprites/Red-Ghost-Left.json
new file mode 100644
index 0000000000..b5cb45e68d
--- /dev/null
+++ b/sprites/Red-Ghost-Left.json
@@ -0,0 +1,27 @@
+{ "frames": {
+ "Ghost 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ },
+ "Ghost 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Red-Ghost-Left.png",
+ "format": "RGBA8888",
+ "size": { "w": 80, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Red-Ghost-Left.png b/sprites/Red-Ghost-Left.png
new file mode 100644
index 0000000000..888edf578d
Binary files /dev/null and b/sprites/Red-Ghost-Left.png differ
diff --git a/sprites/Red-Ghost-Right.json b/sprites/Red-Ghost-Right.json
new file mode 100644
index 0000000000..2b7cd19dde
--- /dev/null
+++ b/sprites/Red-Ghost-Right.json
@@ -0,0 +1,27 @@
+{ "frames": {
+ "Ghost 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ },
+ "Ghost 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Red-Ghost-Right.png",
+ "format": "RGBA8888",
+ "size": { "w": 80, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Red-Ghost-Right.png b/sprites/Red-Ghost-Right.png
new file mode 100644
index 0000000000..b62b197cab
Binary files /dev/null and b/sprites/Red-Ghost-Right.png differ
diff --git a/sprites/Red-Ghost-Up.json b/sprites/Red-Ghost-Up.json
new file mode 100644
index 0000000000..a0b4f7a450
--- /dev/null
+++ b/sprites/Red-Ghost-Up.json
@@ -0,0 +1,27 @@
+{ "frames": {
+ "Ghost 0.ase": {
+ "frame": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ },
+ "Ghost 1.ase": {
+ "frame": { "x": 40, "y": 0, "w": 40, "h": 40 },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": { "x": 0, "y": 0, "w": 40, "h": 40 },
+ "sourceSize": { "w": 40, "h": 40 },
+ "duration": 200
+ }
+ },
+ "meta": {
+ "app": "http://www.aseprite.org/",
+ "version": "1.1.0-dev",
+ "image": "Red-Ghost-Up.png",
+ "format": "RGBA8888",
+ "size": { "w": 80, "h": 40 },
+ "scale": "1"
+ }
+}
diff --git a/sprites/Red-Ghost-Up.png b/sprites/Red-Ghost-Up.png
new file mode 100644
index 0000000000..8e995ea9ed
Binary files /dev/null and b/sprites/Red-Ghost-Up.png differ
- [nongnu] branch elpa/pacmacs created (now 25a8c30210), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bd5970816f 002/472: Check if the killing buffer is ours. Close #1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 6124aa2061 009/472: Fix Copyright year, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2d818f9a49 006/472: Implement rendering of game state. Close #8, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3ff080432f 015/472: Extract pacman-resources module (#19), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b8fce3e847 028/472: Add UT for pacman-convert-aseprite-frame function (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 179ea99635 021/472: Add our own sprites. Close #13,
ELPA Syncer <=
- [nongnu] elpa/pacmacs d0dc2eff12 027/472: Ad UT for pacman-anim-object-next-frame function (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs abb1f366fb 031/472: Merge branch 'uts-for-aseprite-animation-support-22'. Close #22, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fe05829cd3 004/472: Fix kill buffer problem. Close #7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0a532ddc58 011/472: Add gitignore, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 96ad2016a1 001/472: Add initial code for pacman game, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8eddfbd0df 005/472: Implement resource application layer. Close #3, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e75db415af 013/472: Enable travis. Close #14, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 646db1b62a 022/472: Kill game window on quit. Close #17, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b8d1136c3a 014/472: Extract pacman-anim module (#19), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 929fda2cb4 016/472: Define package in Cask file directly (#19), ELPA Syncer, 2022/01/06