ShareShortcuts

Cube Dash

V1 the picture attached to this is the app icon download it and use it as the app icon

vie_gamdev
Создать форк «Cube Dash»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы vie_gamdev получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
3K
Сохранено
1
Действия
8
Категория
API
Версия
1.0
Язык
EN

Просмотр

V1 the picture attached to this is the app icon download it and use it as the app icon

Что нового

Версия 1.0

First release

История версий
1.0 20 июл 2026 г.

First release

Что делает

Действий: 8
  1. Comment
    Built with ShortcutStudio. Download: https://apps.apple.com/us/app/shortcutstudio-ai-shortcuts/id6760745118 Website: https://shortcutstudio.app © ShortcutStudio. All rights reserved.
  2. Comment
    This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=AFD5E4F2-7249-407B-BA6F-FD254B7C74C1
  3. Comment
    Build an HTML/JS autoscroller game: square player jumps over triangle obstacles
  4. Text
  5. Base64 Encode
  6. Get Name
  7. Text
  8. Open URLs

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/web'
#include 'actions/crypto'
#define glyph clock

/*
Built with ShortcutStudio.
Download: https://apps.apple.com/us/app/shortcutstudio-ai-shortcuts/id6760745118
Website: https://shortcutstudio.app
© ShortcutStudio. All rights reserved.
*/
// This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=AFD5E4F2-7249-407B-BA6F-FD254B7C74C1

// Build an HTML/JS autoscroller game: square player jumps over triangle obstacles

const GameHTML = "<html><head><style>body{margin:0;overflow:hidden;background:#222;display:flex;justify-content:center;align-items:center;height:100vh}canvas{display:block;background:#1a1a2e}</style></head><body><canvas id='game' width='400' height='600'></canvas><script>const canvas=document.getElementById('game');const ctx=canvas.getContext('2d');const player={x:80,y:500,width:28,height:28,vy:0,gravity:0.5,onGround:true};const obstacles=[];let speed=3;let score=0;let gameOver=false;let frame=0;const groundY=550;function jump(){if(player.onGround&&!gameOver){player.vy=-10;player.onGround=false;}}function spawnObstacle(){const h=Math.random()*30+20;obstacles.push({x:canvas.width,width:20,height:h,y:groundY-h});}function update(){if(gameOver)return;frame++;if(frame%30===0)spawnObstacle();player.vy+=player.gravity;player.y+=player.vy;if(player.y+player.height>=groundY){player.y=groundY-player.height;player.vy=0;player.onGround=true;}else{player.onGround=false;}for(let i=obstacles.length-1;i>=0;i--){const o=obstacles[i];o.x-=speed;if(o.x+o.width<0){obstacles.splice(i,1);score++;}if(player.x+player.width>o.x&&player.x<o.x+o.width&&player.y+player.height>o.y&&player.y<o.y+o.height){gameOver=true;}}}function draw(){ctx.clearRect(0,0,canvas.width,canvas.height);ctx.fillStyle='#0f0';ctx.fillRect(player.x,player.y,player.width,player.height);ctx.fillStyle='#f44336';for(const o of obstacles){ctx.beginPath();ctx.moveTo(o.x,o.y+o.height);ctx.lineTo(o.x+o.width/2,o.y);ctx.lineTo(o.x+o.width,o.y+o.height);ctx.closePath();ctx.fill();}ctx.fillStyle='white';ctx.font='18px monospace';ctx.fillText('Score: '+score,10,30);if(gameOver){ctx.fillStyle='white';ctx.font='32px monospace';ctx.fillText('GAME OVER',80,300);ctx.fillText('Tap to restart',90,350);}}canvas.addEventListener('click',()=>{if(gameOver){gameOver=false;obstacles.length=0;player.y=500;player.vy=0;player.onGround=true;score=0;speed=3;frame=0;}else{jump();}});canvas.addEventListener('touchstart',(e)=>{e.preventDefault();if(gameOver){gameOver=false;obstacles.length=0;player.y=500;player.vy=0;player.onGround=true;score=0;speed=3;frame=0;}else{jump();}});function gameLoop(){update();draw();requestAnimationFrame(gameLoop);}gameLoop();</script></body></html>"
const Base64Game = base64Encode(GameHTML)
const DataURL = getName(Base64Game)
const DataURLText = "data:text/html;base64,{Base64Game}"
openURL(DataURLText)
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от vie_gamdev

См. все

Вам также может понравиться

См. все
Реклама