🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

Hello, thank you very much for this video! But it doesn't work so good.. I have no pictures, There just green squares.. AND I did a Handy Version and don't know how to fix it in the middle of the screen.. Please help me, I want the mini games in my game so badly! T_T

In the JavaScript file (Phaser game) you must define the path of each sprite in your game.

Example:

  • //Tyrano Builder folder
  • var myassetspath = 'data/others/minigame/';
  • function preload() {
    • //Image
    • game.load.image('bullet', myassetspath+'assets/imgs/game/bullet.png');
    • game.load.image('enemyBullet', myassetspath+'assets/imgs/game/enemy-bullet.png');
    • game.load.spritesheet('invader', myassetspath+'assets/imgs/game/invader32x32x4.png', 32, 32);
    • game.load.image('ship', myassetspath+'assets/imgs/game/player.png');
    • game.load.spritesheet('kaboom', myassetspath+'assets/imgs/game/explode.png', 128, 128);
    • game.load.image('starfield', myassetspath+'assets/imgs/game/starfield.png');
    • game.load.image('background', myassetspath+'assets/imgs/game/background2.png');
  • }

Complete file

Thank you very much!^-^/