A point-and-click adventure game based on a short story a friend of mine wrote - coincidentally, during the process of making the game I found out it's due to be published about a month from now!
here WSAD controls
This miro board fleshes out the details, but here's a brief summary.
- A point-and-click adventure game made using Three.js in an environment made out of 3d 'bubble images' with cut scenes made from flat images stitched together.
- I achieved this by using the bubble camera built into google's street view app.
- Stylistically, the images are manipulated and distorted using an algorithm I made.
Coming soon:
- Cut Scenes made from flat images targeted with more interesting distorting algorithms.
- Check out this repo to see that code!
- Better and more tangible plot
- Inventory display
- Boss fight
Download Node.js. Run this followed commands:
# Install dependencies (only the first time)
npm install
# Run the local server at localhost:8080
npm run dev
# Build for production in the dist/ directory
npm run build- Add a new scene file to
src/scenes - Create a scene factory function in that file (e.g.
function bathroomFactory)- That function should create a new Three.js scene
- Setup all objects, interactions, etc fun three.js stuff for that scene
- Then return that scene
- When you need to move between rooms or checkpoints you need to load the new scene in the file that has the click handler
- Have an object in a scene
- Add a click handler to it
- From that handler call
addNoteToInventory,addImageToInventory, oraddObjectToInventorywith the thing you want to add
- Have an object in the scene that will be the activation thing for the moving
- Add a click handler to it
- Call
changeRoomwith the scene factory to use and the name of the room to save in the state
- Have an object in the scene that will be the activation thing for the moving
- Add a click handler to it
- Call
changeCheckpointwith the scene factory to use and the name of the checkpoint to save in the state
Use things like getState, getTimeline, or getInventory to make decision in your click handlers or get data to display.
It looks like this:
{
inventory: [
{
type: "note",
text: "lorem ipsum",
icon: "some icon image imported"
},
{
type: "image",
image: "some imported image",
icon: "some icon image imported"
},
{
type: "object",
description: "a knife",
icon: "some icon image imported"
}
],
timeline: {
checkPoint: "house-0",
room: "artroom"
}
}//TODO: make game state look something like this
game = { checkpoints: { checkpoint-0: { rooms: { bedroom: { geometry: [5, 32, 16], meshImage: "/some/url", objects: { changeRoomObjects: [ { id: "bedroom-door", exitTo: "hallway", geometry: [2, 5, 2], positionXYZ: [-2, -1.4, 3], color: "pink" } ], updateTextObjects: [ { name: "bed", text: "now's not the time...", geometry: [1.3, 0.8, 0.8], positionXYZ: [-1, -2.1, -4.5], color: "yellow"
}
],
inventoryObjects: [
{
type: note,
geometry: [0.3, 0.5, 0.3],
positionXYZ: [4.3, -2.4, -0.1],
color: "yellow",
text: "death is imminent",
onAddInventory: "note reads: death is imminent",
onAlreadyInventory: "note still reads: death is imminent..."
}
]
}
}
}
},
checkpoint-1: {
... etc
}
}
}
// TODO: make a function that can read said state and test it out