Skip to content
← Back to Community
Minecraft WebGL Project Core
Profile icon
N3rdL0rd

Minecraft WebGL

Credit to @duck132912 for the menu. Thanks a bunch!

About

This is the final version of my WebCraft and MC-Engine projects. I merged them into one, and added a menu. (Once again, thank you, @duck132912!) Multiplayer is coming NEVER due to the fact that it would be almost impossible to get to work perfectly. I am ending the WebGL Minecraft project here and now.

Past versions

PLEASE UPVOTE IF YOU ENJOY!!!

NOTE

I will be experimenting with Voxel.js, so stay tuned!
I might just be able to make a multiplayer version using Voxel.js instead of WebGL.

EDIT: Click the open in new window button otherwise it just won't look very good.
EDIT EDIT: Thanks for all the upvotes, guys! I really appreciate it!
EDIT EDIT EDIT: Thanks for making this post the front page!

Voters
Profile icon
NicolaCen
Profile icon
KatarinaHowell
Profile icon
AbubekerRedi
Profile icon
JesseMiller5
Profile icon
NehemiahWatson1
Profile icon
MADOK1
Profile icon
macosfangamer
Profile icon
MaksimTsopa
Profile icon
helloworld2468
Profile icon
SpencerLewis-27
Comments
hotnewtop
Profile icon
Willard21

I noticed you appear to be rendering each triangle individually, and doing frustum culling on all of them. I know that seems like a logical way to improve performance by minimizing the number of things being rendered, but it's actually a trap.

WebGL can easily handle 1000x more rendering than you're supplying it right now. The bottleneck comes from making too many individual draw calls. It takes longer to render 1 cube with 12 individual triangles than it would to render 1,000 cubes stored in a single buffer with 1 draw call.

Profile icon
DeBeast591

Awesome, the textures could use some work, but other than that, 5/5 stars!

Profile icon
WilliamB

What is the generation technique used

Profile icon
N3rdL0rd
Profile icon
N3rdL0rd

@MatReiner 2d and cast to 3d

Profile icon
Dart

Is this your code?

Profile icon
N3rdL0rd

@Zexogon Sort of, sort of not. You know what I mean.

Profile icon
Dart

@HENRYMARTIN4 alright there are a lot of git hub posts with code like this but yours looks good keep making stuff :)

Profile icon
SilentShadowBla

100th upvote! epic job btw

image

Profile icon
N3rdL0rd

@SilentShadowBla yay!!!!!!!!!!
thank you!!!
I will gladly invite you to work on a repl with me if u want me to.

Profile icon
HackermonDev

the map isn't useful

Profile icon
mkhoi

@PDanielY It shows height, the whiter a place is the higher it is

Profile icon
AdCharity

Yeah sorry no

Profile icon
3941driB

LOL, so that's why @duck132912 was so busy! XD

Profile icon
NigelIsCoding

@3941driB 4battle is not my only thing

Profile icon
4battle

@duck132912 You were on only 4 hours ago!

Profile icon
NigelIsCoding

@4battle Btw you could have made something like https://login--duck132912.repl.co instead of the hours of php login of yours

Profile icon
3941driB

@duck132912 BlueTube's trending

Profile icon
N3rdL0rd

@duck132912 wow i looked on 4battle thanks for using ultracode yay

Profile icon
3941driB

OMG, I'm duck132912's friend!

Profile icon
NigelIsCoding

@3941driB I know, you come to my school

Profile icon
3941driB

@duck132912 Are you still on ^_^? You replied 2 minutes ago!

Profile icon
3941driB

@duck132912 Yay, it is!

Profile icon
BlueComet

WoW!This is amazing

Profile icon
amasad

Multiplayer is coming NEVER due to the fact that it would be almost impossible to get to work perfectly.

@HENRYMARTIN4 can you share what technical limitations exist to make this work? Maybe we, the Repl.it team, can help with this.

Profile icon
N3rdL0rd

@amasad Well, I was experimenting with Voxel.js and realized that I don't have admin in the bash shell, meaning that I can't use the browserify command to compile the scripts. I therefore cobbled together this instead of using the Voxel.js engine. I'm still looking for ways to run Voxel.js scripts on Repl.it. You can see the tutorial at http://voxeljs.com.

Profile icon
NigelIsCoding

You are welcome, I am happy to be mentioned.
News: Me and @3941drib are working on @4battle we could use a little help. Thank you @duck132912

Profile icon
N3rdL0rd

@duck132912 I could help if you like.

Profile icon
NigelIsCoding

@HENRYMARTIN4 Sure Ill ask 3941drib when I have a chance

Profile icon
N3rdL0rd
Profile icon
3941driB

@HENRYMARTIN4 You can. We need all the help we can get ;)

Profile icon
N3rdL0rd
Profile icon
NigelIsCoding
Profile icon
MarcPech

I cant build anything but other than that 4 stars

Profile icon
BlueComet

how did you make it so you could do tons of different things

Profile icon
maxomertor

cool

Profile icon
neutralcoder101

there is one thing that is when u dig down continuously u fall into the void but u don't die u just continuously fall down but other than that this is EPIC

Profile icon
neutralcoder101

also when u right click water it gets destroyed like other blocks

Profile icon
neutralcoder101

just work on that and your game will be PERFECT

Profile icon
neutralcoder101

and some trees and vegetation

Profile icon
Kringle200

That is so cool !!!!

Profile icon
StringentDev

image

Profile icon
N3rdL0rd

@Lethdev2019 i know. i wuz lazy...

Profile icon
JORDANSISNEY

When you think you're good at programming and someone makes this.

ITS JUST AMAZING :D Please don't stop working on it!! It could be so cool!!!!

Profile icon
N3rdL0rd

@JORDANSISNEY Voxel.js is a framework for building minecraft-like games in the web browser. I'll do stuff with that instead of WebGL. Therefore meaning the WebGL Minecraft project will end, but the Voxel.js Minecraft project will begin. Find out more at: http://www.voxeljs.com/

Profile icon
JORDANSISNEY

Ooooh. Well, I'm still definitely excited to see what else you do! :D @HENRYMARTIN4

Profile icon
N3rdL0rd
Profile icon
Darkgamer23

Wow this is amazing!

Profile icon
Epicmuffinepic

Guys this is my friend he is literally sitting next to me in class.

Profile icon
N3rdL0rd
Profile icon
sycrepl

The quality of the textures is a little disappointing. Make sure that when you're resizing the images you're doing it with a point filter or whatever it's called. Makes it so it doesn't fade. I have no clue what the WebGL code is for it though.

Profile icon
Coder100

Nice work!

while(true){ votes++; blocks.push(new Block(random(0, infinity), random(0, infinity))); }
Profile icon
N3rdL0rd
Profile icon
Coder100

No problem! @HENRYMARTIN4

Profile icon
AncientBison

OMG YOU ARE A AMAZING GOD AT CODING!!!

Profile icon
staticvoidliam7

nice

Profile icon
JordanDixon1

Pretty good. One problem though: You can look down infinitely and it kinda gives me nausea whenever I do lol other than that its fantastic.

Profile icon
N3rdL0rd
Profile icon
Epicmuffinepic
Profile icon
pipythonmc

This looks awesome! This must have taken a long time

Profile icon
[deleted]

This is a account that I have not seen in a long time. I am happy to see it again

Profile icon
N3rdL0rd
Profile icon
dan82

Nice work on this dude keep it up.

Profile icon
12608335

This is incredible! the menu looks great :D

Profile icon
N3rdL0rd

@12608335 i didnt make the menu, i just changed the background image. the original is at https://repl.it/@duck132912/Minecraft
i just changed the script to embed an iframe of https://minecraft-engine.henrymartin4.repl.co instead of https://classic.minecraft.net

Profile icon
NigelIsCoding

@HENRYMARTIN4 Thanks for the credit :D