6

Batafuraiko 🦋 Winner of JS1024 2021!

 3 years ago
source link: https://codepen.io/KilledByAPixel/pen/mdmWaEK
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Batafuraiko 🦋 Winner of JS1024 2021!

Pen Settings

HTML Preprocessor

Add Class(es) to <html>

Stuff for <head>

0 unsaved changes
xxxxxxxxxx
<body style=margin:0;background:#111;color:#fff>
<center>
<canvas id=a width=1280 height=720 style=background:#fff></canvas>
<h1>バタフライコ (Batafuraiko)</h1>
<i>Invasive species, the butterflys at warp speed, 
dancing with bullets.</i><br>
<br><b>
<a href=https://js1024.fun/demos/2021#12>A JS1024 game by KilledByAPixel</a></b><br>
<h1>How to Play</h1>
Use mouse to fly.
You have 1 life to survive 9 waves.
Press R to reset.<br>
Chrome recommended, Firefox works but is slow.
</center>
xxxxxxxxxx
'use strict';
// shim creates 2d context
const c = a.getContext("2d");
// constants (will be auto replace in minified)
const WIDTH = 1280;
const HEIGHT = 720;
const TYPE_Explosion        = -1;
const TYPE_Bullet           = 0;
const TYPE_Player           = 1;
const TYPE_Enemy            = 3;
const TYPE_Enemy_Pawn       = 3;
const TYPE_Enemy_Scout      = 4;
const TYPE_Enemy_Fighter    = 5;
const TYPE_Enemy_Battleship = 6;
const TYPE_Enemy_Mothership = 7;
const TYPE_Enemy_Cthulhu    = 8;
// variables (remove from minified)
let i, frame, seed, globalSeed, player, spawnPool, spawnWait, wave, enemyCount, spawnCount, objects, Rand, MakeObject;
999px

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK