image upload

This commit is contained in:
Joowon Kim 2025-04-24 03:14:03 +09:00
parent 2fc0d2eba4
commit ebfa850e7c
6 changed files with 33 additions and 9 deletions

View File

@ -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

BIN
assets/Mario-Background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

BIN
assets/Mario-Enemy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/Mario-Tileset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@ -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);
}