Hi
by QuantumBolt1043 lines1.8 KB
function preload() {
// Skip image files — draw everything inside the game
}
function create() {
// White paper background
this.add.rectangle(640, 360, 1280, 720, 0xffffff);
// Draw your robot: square head + circle visor + LED face + backpack + 4 legs + 8 wheels
const robotHead = this.add.rectangle(200, 480, 50, 55, 0x000000);
this.add.circle(200, 460, 14, 0xffffff); // visor
this.add.rectangle(200, 485, 20, 8, 0xffffff); // LED screen
this.add.rectangle(200, 510, 40, 35, 0x000000); // body
this.add.rectangle(225, 515, 12, 25, 0x000000); // backpack pack
// arms
this.add.rectangle(170, 505, 10, 22, 0x000000);
this.add.rectangle(230, 505, 10, 22, 0x000000);
// 4 legs
this.add.rectangle(182, 555, 8, 25, 0x000000);
this.add.rectangle(200, 555, 8, 25, 0x000000);
this.add.rectangle(218, 555, 8, 25, 0x000000);
this.add.rectangle(236, 555, 8, 25, 0x000000);
// 8 wheels
const wheels = [178,192,208,222,178,192,208,222];
wheels.forEach((x,i)=> this.add.circle(x, 582+(i<4?0:6), 7, 0x000000));
// Make robot solid for physics
this.player = this.physics.add.sprite(200, 480);
this.player.setBodySize(50, 70);
this.player.setCollideWorldBounds(true);
// Simple drawn ground line
this.ground = this.physics.add.staticGroup();
const groundRect = this.add.rectangle(640, 620, 1280, 20, 0xcccccc);
this.ground.add(groundRect);
this.physics.add.collider(this.player, this.ground);
// Draw portal
this.portal = this.physics.add.sprite(1100, 560);
this.add.circle(1100, 560, 22, 0x9900ff);
this.add.circle(1100, 560, 16, 0xffffff);
this.portal.setBodySize(40, 40).setImmovable(true);
this.physics.add.overlap(this.player, this.portal, enterPortal, null, this);
this.cursors = this.input.keyboard.createCursorKeys();
setupChatToggle();
setupChat();
updateLevelText();
}Game Source: Hi
Creator: QuantumBolt10
Libraries: none
Complexity: simple (43 lines, 1.8 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: hi-quantumbolt10" to link back to the original. Then publish at arcadelab.ai/publish.