├── .gitignore ├── animations.js ├── assets ├── blocks │ ├── .DS_Store │ ├── overworld │ │ ├── block.png │ │ ├── brick-debris.png │ │ ├── customBlock.png │ │ ├── emptyBlock.png │ │ ├── immovableBlock.png │ │ └── misteryBlock.png │ └── underground │ │ ├── block.png │ │ ├── block2.png │ │ ├── brick-debris.png │ │ ├── emptyBlock.png │ │ ├── immovableBlock.png │ │ └── misteryBlock.png ├── collectibles │ ├── .DS_Store │ ├── coin.png │ ├── live-mushroom.png │ ├── overworld │ │ └── fire-flower.png │ ├── super-mushroom.png │ └── underground │ │ ├── fire-flower.png │ │ └── ground-coin.png ├── controls │ └── arrows.png ├── css │ └── style.css ├── entities │ ├── .DS_Store │ ├── fireball-explosion.png │ ├── fireball.png │ ├── koopa.png │ ├── mario-fire.png │ ├── mario-grown.png │ ├── mario.png │ ├── overworld │ │ └── goomba.png │ ├── shell.png │ └── underground │ │ └── goomba.png ├── favicon.png ├── fonts │ ├── SuperMario.ttf │ ├── SuperPlumberBrothers.ttf │ ├── carrier_command.png │ └── carrier_command.xml ├── scenery │ ├── .DS_Store │ ├── castle.png │ ├── final-flag.png │ ├── flag-mast.png │ ├── horizontal-final-tube.png │ ├── horizontal-tube.png │ ├── overworld │ │ ├── bush1.png │ │ ├── bush2.png │ │ ├── cloud1.png │ │ ├── cloud2.png │ │ ├── fence.png │ │ ├── floorbricks.png │ │ ├── mountain1.png │ │ └── mountain2.png │ ├── pipe1.png │ ├── pipe2.png │ ├── sign.png │ ├── underground │ │ └── floorbricks.png │ ├── vertical-large-tube.png │ ├── vertical-large-tube.png.png │ ├── vertical-medium-tube.png │ └── vertical-small-tube.png └── sound │ ├── .DS_Store │ ├── effects │ ├── block-bump.wav │ ├── break-block.wav │ ├── coin.mp3 │ ├── consume-powerup.mp3 │ ├── cursed-here-we-go.mp3 │ ├── fireball.mp3 │ ├── flagpole.mp3 │ ├── goomba-stomp.wav │ ├── here-we-go.mp3 │ ├── jump.mp3 │ ├── kick.mp3 │ ├── pause.wav │ ├── powerdown.mp3 │ ├── powerup-appears.mp3 │ └── time-warning.mp3 │ └── music │ ├── .DS_Store │ ├── gameover.mp3 │ ├── overworld │ ├── hurry-up-theme.mp3 │ └── theme.mp3 │ ├── underground │ ├── hurry-up-theme.mp3 │ └── theme.mp3 │ └── win.wav ├── game.js ├── index.html └── phaser.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /animations.js: -------------------------------------------------------------------------------- 1 | export const createAnimations = (game) => { 2 | game.anims.create({ 3 | key: 'mario-walk', 4 | frames: game.anims.generateFrameNumbers( 5 | 'mario', 6 | { start: 1, end: 3 } 7 | ), 8 | frameRate: 12, 9 | repeat: -1 10 | }) 11 | 12 | game.anims.create({ 13 | key: 'mario-idle', 14 | frames: [{ key: 'mario', frame: 0 }] 15 | }) 16 | 17 | game.anims.create({ 18 | key: 'mario-jump', 19 | frames: [{ key: 'mario', frame: 5 }] 20 | }) 21 | 22 | game.anims.create({ 23 | key: 'mario-dead', 24 | frames: [{ key: 'mario', frame: 4 }] 25 | }) 26 | } -------------------------------------------------------------------------------- /assets/blocks/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/.DS_Store -------------------------------------------------------------------------------- /assets/blocks/overworld/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/block.png -------------------------------------------------------------------------------- /assets/blocks/overworld/brick-debris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/brick-debris.png -------------------------------------------------------------------------------- /assets/blocks/overworld/customBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/customBlock.png -------------------------------------------------------------------------------- /assets/blocks/overworld/emptyBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/emptyBlock.png -------------------------------------------------------------------------------- /assets/blocks/overworld/immovableBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/immovableBlock.png -------------------------------------------------------------------------------- /assets/blocks/overworld/misteryBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/overworld/misteryBlock.png -------------------------------------------------------------------------------- /assets/blocks/underground/block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/block.png -------------------------------------------------------------------------------- /assets/blocks/underground/block2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/block2.png -------------------------------------------------------------------------------- /assets/blocks/underground/brick-debris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/brick-debris.png -------------------------------------------------------------------------------- /assets/blocks/underground/emptyBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/emptyBlock.png -------------------------------------------------------------------------------- /assets/blocks/underground/immovableBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/immovableBlock.png -------------------------------------------------------------------------------- /assets/blocks/underground/misteryBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/blocks/underground/misteryBlock.png -------------------------------------------------------------------------------- /assets/collectibles/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/.DS_Store -------------------------------------------------------------------------------- /assets/collectibles/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/coin.png -------------------------------------------------------------------------------- /assets/collectibles/live-mushroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/live-mushroom.png -------------------------------------------------------------------------------- /assets/collectibles/overworld/fire-flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/overworld/fire-flower.png -------------------------------------------------------------------------------- /assets/collectibles/super-mushroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/super-mushroom.png -------------------------------------------------------------------------------- /assets/collectibles/underground/fire-flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/underground/fire-flower.png -------------------------------------------------------------------------------- /assets/collectibles/underground/ground-coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/collectibles/underground/ground-coin.png -------------------------------------------------------------------------------- /assets/controls/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/controls/arrows.png -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap'); 2 | 3 | @font-face { 4 | font-family: pixel_nums; 5 | src: url('../fonts/SuperMario.ttf'); 6 | } 7 | html, 8 | body { 9 | zoom: 100%; 10 | max-zoom: 100%; 11 | min-zoom: 100%; 12 | background: rgb(132, 132, 255); 13 | margin: 0px; 14 | padding: 0px; 15 | overflow: hidden; 16 | height: 100%; 17 | width: 100%; 18 | color: #f0f0f0; 19 | font-family: pixel_nums; 20 | } 21 | #game { 22 | margin: 0px; 23 | padding: 0px; 24 | height: 100%; 25 | width: 100%; 26 | font-family: pixel_nums; 27 | display: flex; 28 | align-items: center; 29 | justify-content: center; 30 | } 31 | #gif { 32 | height: 30%; 33 | position: absolute; 34 | z-index: 100; 35 | top: 30%; 36 | left: 50%; 37 | transform: translate(-50%, -50%); 38 | } 39 | #gif-shadow { 40 | height: 30%; 41 | position: absolute; 42 | z-index: 99; 43 | top: 31%; 44 | left: 51%; 45 | transform: translate(-50%, -50%); 46 | opacity: 0.2; 47 | filter: brightness(5%) blur(5px); 48 | } 49 | 50 | /* Noscript alert */ 51 | .alertpopup { 52 | position: fixed; 53 | z-index: 1039; 54 | width: 35vw; 55 | max-width: 1440px; 56 | background: rgba(50, 50, 50, 0.25); 57 | box-shadow: 0 0.75rem 2rem 0 rgba(0, 0, 0, 0.15); 58 | border-radius: 1.5rem; 59 | border: 1px solid rgba(0, 0, 0, 0.2); 60 | padding-top: 3rem; 61 | padding-bottom: 3rem; 62 | padding-right: 4rem; 63 | padding-left: 4rem; 64 | margin-left: 50%; 65 | margin-right: 50%; 66 | font-family: 'Quicksand', sans-serif; 67 | } 68 | .blurbg{ 69 | position: fixed; 70 | top: 0; 71 | left: 0; 72 | z-index: 1040; 73 | width: 100%; 74 | height: 100%; 75 | -webkit-backdrop-filter: blur(5px); 76 | backdrop-filter: blur(10px); 77 | background: rgba(50, 50, 50, 0.15); 78 | display: grid; 79 | box-sizing: content-box; 80 | place-items: center; 81 | } -------------------------------------------------------------------------------- /assets/entities/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/.DS_Store -------------------------------------------------------------------------------- /assets/entities/fireball-explosion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/fireball-explosion.png -------------------------------------------------------------------------------- /assets/entities/fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/fireball.png -------------------------------------------------------------------------------- /assets/entities/koopa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/koopa.png -------------------------------------------------------------------------------- /assets/entities/mario-fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/mario-fire.png -------------------------------------------------------------------------------- /assets/entities/mario-grown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/mario-grown.png -------------------------------------------------------------------------------- /assets/entities/mario.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/mario.png -------------------------------------------------------------------------------- /assets/entities/overworld/goomba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/overworld/goomba.png -------------------------------------------------------------------------------- /assets/entities/shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/shell.png -------------------------------------------------------------------------------- /assets/entities/underground/goomba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/entities/underground/goomba.png -------------------------------------------------------------------------------- /assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/favicon.png -------------------------------------------------------------------------------- /assets/fonts/SuperMario.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/fonts/SuperMario.ttf -------------------------------------------------------------------------------- /assets/fonts/SuperPlumberBrothers.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/fonts/SuperPlumberBrothers.ttf -------------------------------------------------------------------------------- /assets/fonts/carrier_command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/fonts/carrier_command.png -------------------------------------------------------------------------------- /assets/fonts/carrier_command.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /assets/scenery/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/.DS_Store -------------------------------------------------------------------------------- /assets/scenery/castle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/castle.png -------------------------------------------------------------------------------- /assets/scenery/final-flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/final-flag.png -------------------------------------------------------------------------------- /assets/scenery/flag-mast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/flag-mast.png -------------------------------------------------------------------------------- /assets/scenery/horizontal-final-tube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/horizontal-final-tube.png -------------------------------------------------------------------------------- /assets/scenery/horizontal-tube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/horizontal-tube.png -------------------------------------------------------------------------------- /assets/scenery/overworld/bush1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/bush1.png -------------------------------------------------------------------------------- /assets/scenery/overworld/bush2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/bush2.png -------------------------------------------------------------------------------- /assets/scenery/overworld/cloud1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/cloud1.png -------------------------------------------------------------------------------- /assets/scenery/overworld/cloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/cloud2.png -------------------------------------------------------------------------------- /assets/scenery/overworld/fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/fence.png -------------------------------------------------------------------------------- /assets/scenery/overworld/floorbricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/floorbricks.png -------------------------------------------------------------------------------- /assets/scenery/overworld/mountain1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/mountain1.png -------------------------------------------------------------------------------- /assets/scenery/overworld/mountain2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/overworld/mountain2.png -------------------------------------------------------------------------------- /assets/scenery/pipe1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/pipe1.png -------------------------------------------------------------------------------- /assets/scenery/pipe2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/pipe2.png -------------------------------------------------------------------------------- /assets/scenery/sign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/sign.png -------------------------------------------------------------------------------- /assets/scenery/underground/floorbricks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/underground/floorbricks.png -------------------------------------------------------------------------------- /assets/scenery/vertical-large-tube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/vertical-large-tube.png -------------------------------------------------------------------------------- /assets/scenery/vertical-large-tube.png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/vertical-large-tube.png.png -------------------------------------------------------------------------------- /assets/scenery/vertical-medium-tube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/vertical-medium-tube.png -------------------------------------------------------------------------------- /assets/scenery/vertical-small-tube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/scenery/vertical-small-tube.png -------------------------------------------------------------------------------- /assets/sound/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/.DS_Store -------------------------------------------------------------------------------- /assets/sound/effects/block-bump.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/block-bump.wav -------------------------------------------------------------------------------- /assets/sound/effects/break-block.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/break-block.wav -------------------------------------------------------------------------------- /assets/sound/effects/coin.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/coin.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/consume-powerup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/consume-powerup.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/cursed-here-we-go.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/cursed-here-we-go.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/fireball.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/fireball.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/flagpole.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/flagpole.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/goomba-stomp.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/goomba-stomp.wav -------------------------------------------------------------------------------- /assets/sound/effects/here-we-go.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/here-we-go.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/jump.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/jump.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/kick.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/kick.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/pause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/pause.wav -------------------------------------------------------------------------------- /assets/sound/effects/powerdown.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/powerdown.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/powerup-appears.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/powerup-appears.mp3 -------------------------------------------------------------------------------- /assets/sound/effects/time-warning.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/effects/time-warning.mp3 -------------------------------------------------------------------------------- /assets/sound/music/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/.DS_Store -------------------------------------------------------------------------------- /assets/sound/music/gameover.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/gameover.mp3 -------------------------------------------------------------------------------- /assets/sound/music/overworld/hurry-up-theme.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/overworld/hurry-up-theme.mp3 -------------------------------------------------------------------------------- /assets/sound/music/overworld/theme.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/overworld/theme.mp3 -------------------------------------------------------------------------------- /assets/sound/music/underground/hurry-up-theme.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/underground/hurry-up-theme.mp3 -------------------------------------------------------------------------------- /assets/sound/music/underground/theme.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/underground/theme.mp3 -------------------------------------------------------------------------------- /assets/sound/music/win.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/midudev/super-midu-bros/ae2d23405d50f51c21aacbd25699262efd127927/assets/sound/music/win.wav -------------------------------------------------------------------------------- /game.js: -------------------------------------------------------------------------------- 1 | /* global Phaser */ 2 | 3 | import { createAnimations } from "./animations.js" 4 | 5 | const config = { 6 | type: Phaser.AUTO, // webgl, canvas 7 | width: 256, 8 | height: 244, 9 | backgroundColor: '#049cd8', 10 | parent: 'game', 11 | physics: { 12 | default: 'arcade', 13 | arcade: { 14 | gravity: { y: 300 }, 15 | debug: false 16 | } 17 | }, 18 | scene: { 19 | preload, // se ejecuta para precargar recursos 20 | create, // se ejecuta cuando el juego comienza 21 | update // se ejecuta en cada frame 22 | } 23 | } 24 | 25 | new Phaser.Game(config) 26 | // this -> game -> el juego que estamos construyendo 27 | 28 | function preload () { 29 | this.load.image( 30 | 'cloud1', 31 | 'assets/scenery/overworld/cloud1.png' 32 | ) 33 | 34 | this.load.image( 35 | 'floorbricks', 36 | 'assets/scenery/overworld/floorbricks.png' 37 | ) 38 | 39 | this.load.spritesheet( 40 | 'mario', // <--- id 41 | 'assets/entities/mario.png', 42 | { frameWidth: 18, frameHeight: 16 } 43 | ) 44 | 45 | this.load.audio('gameover', 'assets/sound/music/gameover.mp3') 46 | } // 1. 47 | 48 | function create () { 49 | // image(x, y, id-del-asset) 50 | this.add.image(100, 50, 'cloud1') 51 | .setOrigin(0, 0) 52 | .setScale(0.15) 53 | 54 | this.floor = this.physics.add.staticGroup() 55 | 56 | this.floor 57 | .create(0, config.height - 16, 'floorbricks') 58 | .setOrigin(0, 0.5) 59 | .refreshBody() 60 | 61 | this.floor 62 | .create(150, config.height - 16, 'floorbricks') 63 | .setOrigin(0, 0.5) 64 | .refreshBody() 65 | 66 | this.mario = this.physics.add.sprite(50, 100, 'mario') 67 | .setOrigin(0, 1) 68 | .setCollideWorldBounds(true) 69 | .setGravityY(300) 70 | 71 | this.physics.world.setBounds(0, 0, 2000, config.height) 72 | this.physics.add.collider(this.mario, this.floor) 73 | 74 | this.cameras.main.setBounds(0, 0, 2000, config.height) 75 | this.cameras.main.startFollow(this.mario) 76 | 77 | createAnimations(this) 78 | 79 | this.keys = this.input.keyboard.createCursorKeys() 80 | } 81 | 82 | function update () { // 3. continuamente 83 | if (this.mario.isDead) return 84 | 85 | if (this.keys.left.isDown) { 86 | this.mario.anims.play('mario-walk', true) 87 | this.mario.x -= 2 88 | this.mario.flipX = true 89 | } else if (this.keys.right.isDown) { 90 | this.mario.anims.play('mario-walk', true) 91 | this.mario.x += 2 92 | this.mario.flipX = false 93 | } else { 94 | this.mario.anims.play('mario-idle', true) 95 | } 96 | 97 | if (this.keys.up.isDown && this.mario.body.touching.down) { 98 | this.mario.setVelocityY(-300) 99 | this.mario.anims.play('mario-jump', true) 100 | } 101 | 102 | if (this.mario.y >= config.height) { 103 | this.mario.isDead = true 104 | this.mario.anims.play('mario-dead') 105 | this.mario.setCollideWorldBounds(false) 106 | this.sound.add('gameover', { volume: 0.2 }).play() 107 | 108 | setTimeout(() => { 109 | this.mario.setVelocityY(-350) 110 | }, 100) 111 | 112 | setTimeout(() => { 113 | this.scene.restart() 114 | }, 2000) 115 | } 116 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Super Midu Bros 7 | 8 | 9 | 17 | 18 | 19 |
20 | 21 | --------------------------------------------------------------------------------