diff --git a/README.md b/README.md index 10b1ede..9c5d289 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ # ๐Ÿš€ p5.js-templates p5.js templates for ID311 Software Prototyping. + +This is pangame of nintendo chracters. + +all sprites came from https://www.spriters-resource.com/nintendo_switch/K.html + +and I cut the sprite in https://www.piskelapp.com/p/create/sprite + diff --git a/assets/Mario-Background.png b/assets/Mario-Background.png new file mode 100644 index 0000000..795684a Binary files /dev/null and b/assets/Mario-Background.png differ diff --git a/assets/Mario-Character+Item.png b/assets/Mario-Character+Item.png new file mode 100644 index 0000000..d2addc5 Binary files /dev/null and b/assets/Mario-Character+Item.png differ diff --git a/assets/Mario-Enemy.png b/assets/Mario-Enemy.png new file mode 100644 index 0000000..1328f9c Binary files /dev/null and b/assets/Mario-Enemy.png differ diff --git a/assets/Mario-Tileset.png b/assets/Mario-Tileset.png new file mode 100644 index 0000000..58ebddb Binary files /dev/null and b/assets/Mario-Tileset.png differ diff --git a/sketch.js b/sketch.js index 479397c..db90eac 100644 --- a/sketch.js +++ b/sketch.js @@ -1,13 +1,30 @@ -// Single-sketch example +let player; +let gravity = 0.8; +let projectiles = []; +let bombs = []; +let groundY = 500; +let keys = {}; +let powerUps = []; +let deathZoneY = 600; -function setup (){ - createCanvas (800, 600); +let spriteSheets = {}; + +function preload() { + // ์—ฌ๊ธฐ์— sprite๋“ค์„ preload (ex: mario = loadImage("...")) + spriteSheets.backgorunds= loadImage("assets/Mario-Background.png"); + spriteSheets.characters = loadImage("assets/Mario-Character+Item.png"); + spriteSheets.specialweapon = loadImage("assets/Mario-Enemy.png"); + spriteSheets.tileset = loadImage("assets/Mario-Tileset.png"); } -function draw(){ - background(100); - fill(255); - noStroke(); - rectMode(CENTER); - rect(mouseX, mouseY, 50, 50); +function setup() { + createCanvas(800, 600); +} + +function draw() { + background(135, 206, 235); // sky blue + + // ์ž„์‹œ ๋ฐ”๋‹ฅ + fill(100); + rect(0, groundY, width, 100); }