experimenting with making a threejs game using cursor

in GAMEDEV2 months ago (edited)

i asked one AI how i would go about using another AI to make a threejs game.

it walked me though how to set up a threejs project folder and how to use vite to test it in the browser.

cursor is a code editor like VS code with a built in AI assistant that alters your code for you. so you just use english to write code. it seems like you can be super productive if you know what to ask the AI. so I can ask one AI like grok, what kinds of vernacular to use on cursor. the more you know about game dev and computers in general makes AI assistants that much more useful.

running the game for the first time, i have a spinning green cube.

Screenshot 2025-03-10 at 5.46.21 PM.png

ok. now what should i do?
i just feel like there should be a torus rotating around the cube.

i tried that and it didnt work.

so then i thought i would try to make a sphere that the player can runs on like mario galaxy.

it sort of works but the camera is messed up

output 1.gif

Screenshot 2025-03-10 at 6.35.31 PM.png

ok so i decided to scrap that whole thing and have it make a top down dungeon crawler. i fed it @makerhacks hive post and it made something.

Screenshot 2025-03-10 at 8.43.16 PM.png

i eventually added doors that need keys. but it needs a lot of work to be even close to makerhack's game. but it looks cool! i kinda just want to see what kind of screen saver i can make with this stuff.

Screenshot 2025-03-11 at 3.46.50 AM.png

its supposed to generate a new room in the scene and build on what it has.

dcrawl.gif


and then i wondered how fast i could make some form of skate game.

skategame

Screenshot 2025-03-11 at 12.52.02 AM.png

dodge.gif

i was able to control the camera with the mouse and make an infinite runner that does skate tricks when he jumps.

pretty impressive for one day of work.

im not sure if you can add sounds or not.

this was way too addicting to play around with, not gonna lie, i was up till 3am messing with this.

trick.gif

this is all without writing a single line of code.

its just one main.js file that contains everything in the game

Screenshot 2025-03-11 at 11.38.45 AM.png

apparently AI's are really good when the code file they are working on is just one file. i dont see why an AI cant manage more than one but maybe it takes up too much memory. i know it takes a lot of memory to run the actual model.

the AI said i can use 3d models that i made in the game. right now all of them are generated using primitives. ill try that next. see what i can make.

the AI in cursor had me set up a threejs testing enviornment in the browser so i didnt need a server. so cool.

https://github.com/webgnar/threejsskate

the friend im hanging out with is all about AI. i dont like using it for art but am curious to see what it spits out when i use something like a 3d model generator.

Screenshot 2025-03-11 at 11.45.10 AM.png

i found a github of something like that and am trying to get it working. apparently M1 mac's are not the most compatible.

https://github.com/openai/shap-e

i didn't watch the youtube tutorial on how to do it. i used used AI instead. nice, but i should probably watch it cuz i couldn't get it working yesterday.

update: got it working using cursor lol.

but it... doesnt really work right lol.

python3 generate.py "a car"

Screenshot 2025-03-11 at 1.07.16 PM.png

right after i asked it why it doesnt look like a car i got this:

noooooo lol

well thats all for now. i had a fun day yesterday playing with this stuff. maybe ill buy a month of this just while im at the hacker house in brazil

Sort:  

Apparently this “vibe coding” is the new trend. Certainly impressive how far the tools have come :)

haha yeah. that is what its called. my friend is super into it. he claims its the future of how you will interact with a computer, no typing required. its certainly fun. you can write english to it, and surf the web while it cooks something.

I used to laugh when spy shows would have the tech person type “find me people in this area who match this description” instead of an sql query but here we are, basically doing that.

We’re living in the future!