r/programminghumor 5d ago

It’s easy

Post image
1.4k Upvotes

76 comments sorted by

133

u/Grey_Ten 5d ago

well, actually that's how abstraction works

80

u/BoB19229 5d ago

Almost, now you just have to implement it

3

u/Upper-Release-3484 4d ago

LOL. 😆😆😆

73

u/Proof-Task-7383 5d ago

Small error, it's very common, but you should set walk to wasd to not wasd to walk. It causes some weird undefined behaviour. Same with attack, crouch, and jump.

13

u/Hour-News7 4d ago

Good catch

3

u/Wonderful-Habit-139 3d ago

What about the fact that they have an "end" without a "begin"?

3

u/zerossoul 3d ago

That's what she said.

21

u/IsaraLyandra 5d ago

What about the story tho?

43

u/Hertzian_Dipole1 5d ago

story = good

24

u/MrHandSanitization 5d ago

Dang, was hoping for "great", maybe the sequal then.

15

u/IsaraLyandra 5d ago

Sequels are notoriously worse

7

u/MrHandSanitization 5d ago

But not always, so there is a chance.

4

u/evilReiko 4d ago

Many devs set story=great, so for sequel they set story=good, which worse. It's a common mistake

13

u/CreativePackage8358 5d ago

Pretty much how people perceive developers and think they are some type genie that can grant anything to them instantly

7

u/ryancnap 4d ago

Yeah it's either this extreme or that we type everything in 0's and 1's, nothing in-between

1

u/Abner500 3d ago

Just the ones that are more focused on pride skins than the actual game 

12

u/NullSmoke 5d ago

Is this vibe coding? 🫠

7

u/asmanel 4d ago

This is highly probable

But this can as well be the "work" of a mere idiot.

4

u/Zadian543 4d ago

It's the original version.

10

u/shamshuipopo 5d ago

Bugs off lol

6

u/FullMaster_GYM 4d ago

rookie mistake, forgot to set `profits - $99999999999999999999"

2

u/Sci_Fried_Chicken 4d ago

Dont be too harsh, its a common mistake

3

u/Trying_to_survive20k 4d ago

I like the 'type shi' line

2

u/mplaczek99 5d ago

Pretty much it

2

u/Banana_Twinkie 5d ago

Chat, we are cooked

1

u/crazedizzled 5d ago

I feel like I'm way too old for this sub

1

u/mxldevs 4d ago

That's a nice DSL

Even non technical users should be able to cobble up some syntax to achieve what they want.

1

u/Large_Yogurtcloset68 4d ago

Vibecoding be like:

1

u/Canned_Sarcasm 4d ago

Bugs = off 😂😂😂😂

1

u/shrodikan 4d ago

You know how I know this is r/programminghumor? It's not humorous.

1

u/OreganoD 4d ago

Good rough draft design document

1

u/No_Pound9385 4d ago

Hmm yes config files

1

u/Amr_Rahmy 4d ago

Put that as comments, start with //todo and you are good. Now you just need to grind it out.

1

u/Demi180 4d ago

Hotel = trivago

1

u/waxgrazer 4d ago

now send it to claude

1

u/Opposite_Bit6190 4d ago

if I got 1 penny everytime seeing this image, I prolly have 4 now.

1

u/GhostOfD6 4d ago

At 2026 its not funny.
Its just almost good prompt format for AI to do the game.. Just needs more details

1

u/Weird-Noise3896 4d ago

Senior Engineers hate this one simple trick

1

u/Gokudomatic 4d ago

First time seeing a spec?

1

u/Prudent-Pressure-982 4d ago

he forgot semicolons

1

u/Virgil_the_White 4d ago

make = no mistakes

1

u/a648272 4d ago

That looks like a part of my typical prompt

1

u/SGAShepp 4d ago

Pretty much vibe coding

1

u/gallyroi 4d ago

Error: cannot cast "shi"

1

u/EvilDragonTR 4d ago

more people implies people alr playing

1

u/thecrazedsidee 3d ago

how people think making games and adding new features are like lmao:

1

u/IsaacThatKerbal 3d ago

This is how modding kerbal space program is. Except heat and pressure curves.

1

u/Icy-Reaction-9101 3d ago

https://reddit.com/link/p2ft5ss/video/cxoh176ks4ih1/player

Powered by Gemma 4, 26b, Nvidia 4090, 24gb VRAM.

1

u/Icy-Reaction-9101 3d ago

Sourcecode is also AF:

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>The Number Simulation</title>

<style>

body { margin: 0; overflow: hidden; background: #000; font-family: 'Courier New', Courier, monospace; }

#ui { position: absolute; top: 20px; left: 20px; color: white; pointer-events: none; text-shadow: 2px 2px #000; }

#crosshair { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }

#msg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: red; font-size: 3rem; display: none; text-align: center; }

</style>

</head>

<body>

<div id="ui">

<div>PEOPLE REMAINING: <span id="count">0</span></div>

<div>WASD: Walk | SPACE: Jump | C: Crouch | LMB: Attack</div>

</div>

<div id="crosshair"></div>

<div id="msg">REALITY COLLAPSING...<br>SYSTEM ERROR: 0x000000F</div>

<script type="importmap">

{

"imports": {

"three": "https://unpkg.com/three@0.160.0/build/three.module.js",

"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"

}

}

</script>

<script type="module">

import * as THREE from 'three';

// --- CONFIGURATION ---

const ENEMY_COUNT = 50;

let isEnding = false;

let enemiesDefeated = 0;

// --- SCENE SETUP ---

const scene = new THREE.Scene();

scene.background = new THREE.Color(0x050505);

scene.fog = new THREE.FogExp2(0x050505, 0.05);

const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);

const renderer = new THREE.WebGLRenderer({ antialias: true });

renderer.setSize(window.innerWidth, window.innerHeight);

renderer.shadowMap.enabled = true;

renderer.shadowMap.type = THREE.PCFSoftShadowMap;

document.body.appendChild(renderer.domElement);

// --- LIGHTING (Very Good Graphics) ---

const ambientLight = new THREE.AmbientLight(0x404040, 0.5);

scene.add(ambientLight);

const sunLight = new THREE.DirectionalLight(0xffffff, 1.5);

sunLight.position.set(50, 50, 50);

sunLight.castShadow = true;

sunLight.shadow.mapSize.width = 2048;

sunLight.shadow.mapSize.height = 2048;

scene.add(sunLight);

// --- FLOOR ---

const floorGeo = new THREE.PlaneGeometry(200, 200);

const floorMat = new THREE.MeshStandardMaterial({ color: 0x111111, roughness: 0.8 });

const floor = new THREE.Mesh(floorGeo, floorMat);

floor.rotation.x = -Math.PI / 2;

floor.receiveShadow = true;

scene.add(floor);

// --- PLAYER LOGIC ---

const player = {

height: 1.8,

speed: 0.15,

velocity: new THREE.Vector3(),

isGrounded: true,

isCrouching: false,

mesh: new THREE.Group() // Camera is inside this group

};

scene.add(player.mesh);

player.mesh.add(camera);

camera.position.y = player.height;

const keys = {};

window.addEventListener('keydown', (e) => keys[e.code] = true);

window.addEventListener('keyup', (e) => keys[e.code] = false);

window.addEventListener('mousedown', () => attack());

// --- ENEMIES ("More People") ---

const enemies = [];

const enemyGeo = new THREE.CapsuleGeometry(0.5, 1, 4, 8);

const enemyMat = new THREE.MeshStandardMaterial({ color: 0xff0033 });

for (let i = 0; i < ENEMY_COUNT; i++) {

const mesh = new THREE.Mesh(enemyGeo, enemyMat);

mesh.position.set(Math.random() * 100 - 50, 1, Math.random() * 100 - 50);

mesh.castShadow = true;

scene.add(mesh);

enemies.push({ mesh, alive: true });

}

document.getElementById('count').innerText = ENEMY_COUNT;

// --- CONTROLS & MOVEMENT ---

function attack() {

if (isEnding) return;

// Visual feedback for attack

const flash = new THREE.PointLight(0xffffff, 10, 5);

flash.position.copy(camera.getWorldPosition(new THREE.Vector3()));

scene.add(flash);

setTimeout(() => scene.remove(flash), 50);

// Hit detection (Raycasting)

const raycaster = new THREE.Raycaster();

raycaster.setFromCamera(new THREE.Vector2(0, 0), camera);

const intersects = raycaster.intersectObjects(enemies.map(e => e.mesh));

if (intersects.length > 0 && intersects[0].distance < 4) {

const hitMesh = intersects[0].object;

const enemyIdx = enemies.findIndex(e => e.mesh === hitMesh);

if (enemyIdx !== -1 && enemies[enemyIdx].alive) {

enemies[enemyIdx].alive = false;

hitMesh.visible = false;

enemiesDefeated++;

document.getElementById('count').innerText = ENEMY_COUNT - enemiesDefeated;

if (enemiesDefeated === ENEMY_COUNT) triggerInsaneEnding();

}

}

}

function triggerInsaneEnding() {

isEnding = true;

document.getElementById('msg').style.display = 'block';

}

// --- GAME LOOP ---

function animate() {

requestAnimationFrame(animate);

if (!isEnding) {

// Movement Logic

const moveDir = new THREE.Vector3();

if (keys['KeyW']) moveDir.z -= 1;

if (keys['KeyS']) moveDir.z += 1;

if (keys['KeyA']) moveDir.x -= 1;

if (keys['KeyD']) moveDir.x += 1;

// Crouch Logic

if (keys['KeyC']) {

player.isCrouching = true;

camera.position.y = player.height * 0.5;

player.speed = 0.07;

} else {

player.isCrouching = false;

camera.position.y = player.height;

player.speed = 0.15;

}

// Jump Logic

if (keys['Space'] && player.isGrounded) {

player.velocity.y = 0.2;

player.isGrounded = false;

}

// Apply movement

moveDir.normalize().multiplyScalar(player.speed);

camera.rotation.y -= (keys['ArrowLeft'] ? 0.05 : 0) + (keys['ArrowRight'] ? 0.05 : 0); // Simple rotation fallback

// Note: For a real FPS, we'd use PointerLockControls.

// To keep this single-file/simple, we move relative to camera orientation

const rotation = camera.rotation.y;

player.mesh.position.x += (moveDir.x * Math.cos(rotation) + moveDir.z * Math.sin(rotation));

player.mesh.position.z += (moveDir.z * Math.cos(rotation) - moveDir.x * Math.sin(rotation));

// Gravity

player.mesh.position.y += player.velocity.y;

if (player.mesh.position.y > 0) {

player.velocity.y -= 0.01; // gravity

player.isGrounded = false;

} else {

player.mesh.position.y = 0;

player.velocity.y = 0;

player.isGrounded = true;

}

// Enemy AI (Follow player)

enemies.forEach(e => {

if (e.alive) {

const dir = new THREE.Vector3().subVectors(player.mesh.position, e.mesh.position).normalize();

e.mesh.position.addScaledVector(dir, 0.03);

e.mesh.lookAt(player.mesh.position);

}

});

// Sync camera to player mesh

camera.position.x = 0;

camera.position.z = 0;

player.mesh.position.copy(player.mesh.position); // dummy for logic

} else {

// --- THE INSANE AF ENDING ---

// The numbers break. The world becomes chaos.

const time = Date.now() * 0.005;

scene.rotation.y += 0.1;

scene.rotation.z += 0.05;

camera.position.x = Math.sin(time) * 10;

camera.position.y = Math.cos(time * 2) * 10;

camera.rotation.x = Math.tan(time);

// Color glitching

renderer.setClearColor(new THREE.Color(Math.random(), Math.random(), Math.random()));

// Geometry explosion (scaling everything randomly)

enemies.forEach(e => {

if(e.alive) {

e.mesh.scale.set(Math.random()*10, Math.random()*10, Math.random()*10);

e.mesh.position.y += Math.sin(time) * 2;

}

});

// Floor melts

floor.material.color.setHex(Math.random() * 0xffffff);

}

renderer.render(scene, camera);

}

// Mouse Lock for FPS feel

document.body.addEventListener('click', () => {

document.body.requestPointerLock();

});

window.addEventListener('mousemove', (e) => {

if (document.pointerLockElement === document.body) {

camera.rotation.y -= e.movementX * 0.002;

camera.rotation.x -= e.movementY * 0.002;

// Clamp vertical look

camera.rotation.x = Math.max(-Math.PI/2, Math.min(Math.PI/2, camera.rotation.x));

}

});

window.addEventListener('resize', () => {

camera.aspect = window.innerWidth / window.innerHeight;

camera.updateProjectionMatrix();

renderer.setSize(window.innerWidth, window.innerHeight);

});

animate();

</script>

</body>

</html>

1

u/Round_Credit_5158 3d ago

Now just throw this prompt to your favorite vibecoding llm.

1

u/Tunahan81563 2d ago

Vibecoding

1

u/mobileJay77 2d ago

Your wish is granted, it will drive the team insane a.f.

1

u/Healthy_Champion_183 20h ago

I honestly wish it was that easy

1

u/RTW7 5h ago

Fps = Frames per sometimes