Learn to customize any HTML5 game generated by Cerewro: swap sprites with your own images or AI-generated ones (DALL-E), add sound effects with the Web Audio API, apply your corporate color palette and add your brand logo.
const playerImg = new Image();
playerImg.src = 'assets/my-character.png';
function drawPlayer(ctx, player, frame) {
const FW = 64, FH = 64;
ctx.drawImage(playerImg, frame*FW, 0, FW, FH, player.x, player.y, player.w, player.h);
}
Generate a pixel art character sprite 64x64 for a platformer game.
The character should be a cyberpunk robot with neon blue and purple colors,
transparent background, retro 16-bit style.
Create 4 variants: idle, run, jump, attack.
const audioCtx = new AudioContext();
function playSound(freq=440, type='square', duration=0.1, vol=0.3) {
const osc = audioCtx.createOscillator();
const gain = audioCtx.createGain();
osc.connect(gain); gain.connect(audioCtx.destination);
osc.type = type; osc.frequency.value = freq;
gain.gain.setValueAtTime(vol, audioCtx.currentTime);
gain.gain.exponentialRampToValueAtTime(0.001, audioCtx.currentTime + duration);
osc.start(); osc.stop(audioCtx.currentTime + duration);
}
const sounds = {
jump: () => playSound(300, 'square', 0.15),
collect: () => playSound(800, 'sine', 0.1),
hit: () => playSound(150, 'sawtooth', 0.2)
};