{"id":13624846,"url":"https://github.com/0kzh/minicraft","last_synced_at":"2025-04-16T01:32:50.707Z","repository":{"id":209917462,"uuid":"717294980","full_name":"0kzh/minicraft","owner":"0kzh","description":"A web-based Minecraft clone, built with THREE.js","archived":false,"fork":false,"pushed_at":"2023-11-30T23:13:26.000Z","size":12009,"stargazers_count":70,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-01T22:02:33.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://minecraft.kelvinzhang.ca","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0kzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-11-11T03:11:29.000Z","updated_at":"2024-07-24T20:39:48.000Z","dependencies_parsed_at":"2024-04-16T11:05:36.137Z","dependency_job_id":null,"html_url":"https://github.com/0kzh/minicraft","commit_stats":null,"previous_names":["0kzh/minicraft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0kzh%2Fminicraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0kzh%2Fminicraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0kzh%2Fminicraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0kzh%2Fminicraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0kzh","download_url":"https://codeload.github.com/0kzh/minicraft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691852,"owners_count":17186887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:47.072Z","updated_at":"2024-11-08T13:31:40.463Z","avatar_url":"https://github.com/0kzh.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/othneildrew/Best-README-Template\"\u003e\n    \u003cimg src=\"https://github.com/0kzh/minicraft/assets/9621004/7bcb67eb-2491-4dc5-8649-c6f7035aaf97\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eMinicraft\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A web-based Minecraft clone using THREE.js\n    \u003cbr /\u003e\n    \u003ca href=\"https://minecraft.kelvinzhang.ca\"\u003e\u003cstrong\u003eDemo »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/othneildrew/Best-README-Template/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/othneildrew/Best-README-Template/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\nA Minecraft clone built in [THREE.js](https://threejs.org/) as a final project for a [graphics course](https://student.cs.uwaterloo.ca/~cs488/Fall2023) at the University of Waterloo. \n\nhttps://github.com/0kzh/minicraft/assets/9621004/1b5432d7-dc20-4147-b8db-5fa180d94142\n\n### Features\n* Voxel-based rendering system\n* Infinite world generation\n* Breaking/placing blocks\n* Tweened FOV changes when sprinting\n* Day/night cycles\n* Dynamic shadows based on sun position\n* Block lighting sources\n* Transparent blocks\n* Sound effects\n\n### Developing\n- `npm install`\n- `npm run dev`\n- Navigate to [localhost:5173](http://localhost:5173)\n\n### Controls\n- `WASD` keys to move the player\n- `Double tap W` to sprint \n- `Space` to jump\n- `Left click` to break blocks\n- `Right click` to place blocks\n- `Numbers 1-9` to cycle through toolbar\n- `R` to reset position\n- `Esc` to disable pointer-lock/go into orbit mode\n\n### Screenshots\n**Orbit view**\n![Orbit view](https://github.com/0kzh/minicraft/assets/9621004/8e46ce09-9442-4bb1-94b2-d2394e403cdf)\n\n**Procedurally generated ore**\n![Procedurally generated ore blocks](https://github.com/0kzh/minicraft/assets/9621004/2f4a0342-1246-4663-896d-5bdabafdda3f)\n\n**Render fog**\n![Render fog](https://github.com/0kzh/minicraft/assets/9621004/6cea76fe-8b29-4738-aa2a-3df59c70f06f)\n\n### Objectives\n1. Voxel Rendering System: Implement a voxel rendering system for a 3D matrix of blocks, each with unique properties like texture and translucency, and create a data structure and functions for rendering each voxel.\n\n2. Texture Mapping: Develop a texture mapping system to apply image textures to block faces, with support for transparency in textures for blocks such as leaves, grass, and water.\n\n3. Procedural Terrain Generation: Generate an infinite world using noise functions, rendering it in 16x16 chunks, with dynamic loading/unloading of chunks as the player moves, and adding fog for depth illusion. Ensure generated structures like trees render seamlessly between chunks.\n\n4. Performance Optimizations: Implement at least three optimizations for smooth browser gameplay\n\n5. Block Shading: Shade blocks based on their orientation relative to a simulated sunlight source.\n\n6. Player Physics and Collision Detection: Develop a simple physics engine for realistic player movement, including walking, jumping, and gravity, along with efficient collision detection to prevent passing through objects.\n\n7. Interactive Block Mechanics: Implement mechanics to allow players to break and place blocks, using raycasting for block detection, highlighting, and enabling block removal or placement.\n\n8. Skydome: Create a skydome encompassing the play area, with a dynamic day-night cycle that affects the world's lighting conditions, featuring transitions between dawn, daylight, dusk, and night.\n\n9. Procedural Generation of Environmental Structures: Algorithmically generate and place natural structures like trees and flowers, ensuring logical placement and natural patterns without unnatural overlaps.\n\n10. Lighting: Enhance the lighting engine to support day/night cycle effects and additional placeable light blocks which will influence the visibility and shading of nearby objects.\n\n### License\nThis project is licensed under the MIT License.\n\n### Sources\n- [Reinventing Minecraft world generation by Henrik Kniberg](https://www.youtube.com/watch?v=ob3VwY4JyzE)\n- [Tutorials by Coffee Code Create](https://www.youtube.com/playlist?list=PLtzt35QOXmkKALLv9RzT8oGwN5qwmRjTo)\n- [How Minecraft Actually Works by Alan Zucconi](https://www.youtube.com/watch?v=YyVAaJqYAfE)\n- [Three.js Journey by Bruno Simon](https://threejs-journey.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0kzh%2Fminicraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0kzh%2Fminicraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0kzh%2Fminicraft/lists"}