fuzzyastrocat (693)

EDIT: Check out the update here!

Many games here are 2D, so I thought I'd try my hand at 3D with THREE.js. I'm not done with the game yet, but I thought I'd post a sneak peek so that I can get feedback for it!

As of right now, there's no real goal (you can't win or lose). But you can go around and do stuff. Here's the controls:

  • Arrow Keys or WASD to move
  • Q and E or rightclick+drag to rotate the camera
  • Click and hold to saw stuff (when not placing — you have to be touching an object too)
  • Click on an item in the upper-left to craft it (these items will appear when you have the necessary resources to make them)
  • Click on a item you've crafted in the bottom bar to start placing it (a ghost version of it should appear in front of you, you can move around to position it as you like) and then click again to place it or right click to cancel.
  • NEW: Enter to chat!

As of now, you can build walls (with wood) and campfires (with stone and wood). There's a day and night cycle in place too, so your campfires will look good :D

And yes, this game is fully (server) multiplayer, so you can build a base with others! (Try opening two tabs if there's no one else around)

Enjoy! If you find any bugs or have any suggestions, please post them!

IMPORTANT: If the land is empty at first (no trees, rocks, etc), please let me know! (And then reload the page until it isn't.) I think I've fixed that bug but I'm not certain.

You are viewing a single comment. View All
RolandJLevy (487)

Hi @fuzzyastrocat, great - that's what I thought! It's good to know that's how you did it. I've been taking the same approach recently, mainly to hide API keys in .env files so people can't use them. Here is a very basic example I made:

This is the front end (client) code in an HTML repl

Here is a demo: https://html-unsplash-search-getting-api-keys-from-node-app.rjlevy.repl.co/

It connects to a Node repl via an endpoint like this which provides JSON for the front end: https://node-api-keys.rjlevy.repl.co/json?s=smile

Here is the Node repl which provides the JSON
https://repl.it/@rjlevy/node-api-keys-for-unsplash which can be tested here:

I hope that makes! :)