experimenting with making a threejs game using cursor

in voilk •  2 months ago

    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 shoudl 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.

    Screenshot 2025-03-11 at 3.46.50 AM.png

    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.

    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 didnt watch the youtube tutorial on how to do it. i used used AI instead. nice, but i should probably watch it cuz i coudlnt get it working yesterday.

    well thats all for now. i had a fun day yesterday playing with this stuff.

      Authors get paid when people like you upvote their post.
      If you enjoyed what you read here, create your account today and start earning FREE VOILK!