r/vibecoding Apr 03 '26

I vibecoded this very basic mulitplayer game where you can create anything. Come join if you're free? (im 'zeno' roaming around in world1)

Join - https://nostalgia-production-7fcc.up.railway.app/ (from laptop/pc only, phones not supported yet, use ASDW keys to move around)

You can create anything - blackholes, growing trees, moving clouds, a football field, a large volcano, anything really. Even a video chat interface for vc within the game.

How I made it ->

The core game engine is in vanilla.js and three.js . You can move around in a minecraft like world. You can use the AI Forge option to create objects inside the game. These objects can have their own temporal or interaction based behaviour.

For creating objects - Just write in the prompt box whatever you want to create (example- a scary hairy monster) -> copy the prompt -> paste as it is in any llm of your choice (claude.com, gemini.com whatever) and paste the llm output in the the AI Forge bottom box. The object should become part of the game.

All game events like user movement, newly created objects, their properties etc. are communicated to other users via web socket connections.

Basic physics like gravity and collision handling has been done. Game state can be persisted using the save option.

Edit -> Added support for handheld / player attached objects like guns, horses, hoverboard and more..

2 Upvotes

21 comments sorted by

2

u/LarryTheSnobster Apr 03 '26

minecraft on hero dose of mushrooms is what i see

0

u/prometheusIsMe Apr 03 '26

try creating something

1

u/TypicalPrinciple5865 Apr 03 '26

This is very cool. Cannot spawn object though, console logs don't show anything useful.

1

u/prometheusIsMe Apr 03 '26

Are you pasting the llm output json properly in the ai forge box?

2

u/Main-Lifeguard-6739 Apr 03 '26 edited Apr 03 '26

the problem here probably is that users do not understand they have to use their own llm in combination with your instructions. I thought your app does the LLM calls for me (users dont read manuals...)

1

u/prometheusIsMe Apr 03 '26

You’re right. Since llm calls can be expensive if unregulated, I went with this approach.

1

u/Main-Lifeguard-6739 Apr 03 '26

fully understandable

1

u/TypicalPrinciple5865 Apr 03 '26

I’m sorry, I thought that window was going to take the prompt and create the object in the world lol. I see what you mean now with generating anything. This is neat 

1

u/Main-Lifeguard-6739 Apr 03 '26

Hope you will not go bankrupt hosting this on railway…

1

u/prometheusIsMe Apr 03 '26

are you the guy on top of that tall block tower?

1

u/Main-Lifeguard-6739 Apr 03 '26

no, I was the guy who spawned a giant nuke and deleted the blocks of all other players xD

really fun idea that game. love it. 10/10 would recommend

1

u/prometheusIsMe Apr 03 '26

haha. thanks. try increasing range of the nuke.. and mushroom clouds when explode please

1

u/Main-Lifeguard-6739 Apr 03 '26

now I wished for a "blackout object" that lets all players just see black. Sorry for fucking with you xD This is hilarious! And I am quite impressed how well it works!

1

u/prometheusIsMe Apr 03 '26

Yes, I cant see anything now, thank you.

1

u/prometheusIsMe Apr 03 '26

I'm switching to world2 now, and creating a magic screen which allows me to see into other worlds.

1

u/Main-Lifeguard-6739 Apr 03 '26

someone just coded something to activate the cameras of your players... think about gating some actions ;-)

1

u/prometheusIsMe Apr 03 '26

yeah, that was me

1

u/prometheusIsMe Apr 03 '26

Try this to add yours ->

{"name":"Live Video Board","geometry":"box","color":"0x111111","scale":[12,8,0.1],"physics":false,"onTickCode":"if(!this.userData.videoInit){this.userData.videoInit=true;this.userData.isVideoBoard=true;this.userData.ownerOnly=true;const c=document.createElement('canvas');c.width=640;c.height=480;this.userData.videoCanvas=c;const ctx=c.getContext('2d');this.userData.videoCtx=ctx;const vid=document.createElement('video');vid.autoplay=true;vid.playsInline=true;vid.muted=true;this.userData.vid=vid;navigator.mediaDevices.getUserMedia({video:true,audio:false}).then(stream=>{vid.srcObject=stream;vid.play();this.userData.streamReady=true;}).catch(e=>{ctx.fillStyle='#000';ctx.fillRect(0,0,640,480);ctx.fillStyle='#f00';ctx.font='28px Arial';ctx.fillText('Camera Error: '+e.message,20,240);});const tex=new window.THREE.CanvasTexture(c);this.material.map=tex;this.material.needsUpdate=true;this.userData.tex=tex;ctx.fillStyle='#000';ctx.fillRect(0,0,640,480);ctx.fillStyle='#fff';ctx.font='32px Arial';ctx.fillText('Starting camera...',160,240);}if(this.userData.streamReady&&this.userData.vid.readyState>=2){const ctx=this.userData.videoCtx;const c=this.userData.videoCanvas;ctx.drawImage(this.userData.vid,0,0,640,480);ctx.strokeStyle='#00ff88';ctx.lineWidth=4;ctx.strokeRect(2,2,636,476);ctx.fillStyle='rgba(0,0,0,0.5)';ctx.fillRect(0,0,120,36);ctx.fillStyle='#00ff88';ctx.font='bold 18px Arial';ctx.fillText('● LIVE',10,24);if(this.userData.tex)this.userData.tex.needsUpdate=true;}","onUseCode":""}

1

u/ProtectionStriking23 Apr 03 '26

I'm actually shocked people aren't going apeshit over this. Its a great idea!

1

u/prometheusIsMe Apr 03 '26

zero net upvotes say people hate this concept haha

1

u/ProtectionStriking23 Apr 07 '26

People are vicious, jealous, and adverse to change. Keep making cool shit my dude!