Share your repls and programming experiences

← Back to all posts
Minecraft in JavaScript
lilpeen (222)

Minecraft in JavaScript

Update: Removed faulty game loop library, sped up game by 1000%

Controls:

Up - Space
Down - Left or Right Shift
Horizontal Movement - wasd
Camera Movement - Mouse
Switch Blocks - Number Keys
Place Block - Right Click
Destroy Block - Left Click

Comments
hotnewtop
Nayoar (574)

This (on notblockedgames.cf) is illegal. You have to give an option to opt out of cookies.

Edit: Ok, your entire website is very dodgy. Why does it give an unstoppable alert when I try to use inspect element?
Also, nice job obfuscating your IP-grabbing code. Nope nope nope.

lilpeen (222)

@minx28 Added an opt-out option, and no, I am not actually logging the IPs that I get.

tussiez (1648)

@DarthVader29 @lilpeen
DarthVader29, I'm the SortaCraft dev and no, this is not my game.

thrkturner (5)

@minx28 huh it doesnt for me, F12, ctrl + shift + i, all work

beeYeeter (6)

@LukeShomper you may have a nice house...
but do you have a house with a bomb shelter???


[deleted]

@RowanLong1 I built an underground city in my house but I didn't screenshot it

LukeShomper (58)

@RowanLong1 You make me sick, Do you have a house in a castle wall with a bomb shelter?

PyCoder01 (55)

@LukeShomper bois play real minecraft with RTX for the best experience.

beeYeeter (6)

@LukeShomper War? your castle shall fall under the fire of my bedrock stone launcher

JULIODIAZ1 (50)

@LukeShomper @RowanLong1 i was ging to make a doggo pixel art to beat both of yall but i accidentally deleted the tab T-T

Baconman321 (1097)

LOL looks like we got competition. In our (Ok, tussiez mostly made it, I just helped him make it work offline and such) minecraft (sortacraft), we are making gravitational pull (with terminal velocity), as well as light blocks. We are planning to add other cool stuff too!

Ok @tussiez come check out our competition!

Btw, nice! My school blocks anything with minecraft in the url (not this post tho...), but from what I have seen in the pics gives the impression hard work.
Keep it up!

lilpeen (222)

@Baconman321 Thanks! May I have a link to your Minecraft?

Baconman321 (1097)

@lilpeen not mine (although tussiez credits me a whole lot thanks tussiez :D), but yeh. It's really buggy right now, can't move (jumping has caused you to glitch up in the air and stay there), but come back later (tussiez and I are working on getting jumping done) and it might just work. Also, we might just use WASM to speed up the game. We also use web workers to make the game run faster (although it's still slow cuz it loads chunks), because web workers allow you to use multithreadedness. Overall, it's really laggy and buggy, but that's because of all the features we are putting in. Oh, it's also a PWA and works offline.

Link: https://sortacraft-1.tussiez.repl.co

(DISCLAIMER: NOT WORKING WELL YET).

lilpeen (222)

@Baconman321 World generation is great! Just need to fix the fact that you can walk through half slabs. Also, it may be a good idea to draw text to the canvas instead of in HTML elements because it's faster. Or at least disable highlighting for a better user experience. Just add another canvas right on top of the other one. All of the DOM events will go right through to the lower canvas. And what 3D rendering library are you using? I am using ThreeJS.

Baconman321 (1097)

@lilpeen He (tussiez) is using threejs. What text? It goes to another file for the new world generation. The only text I know of is the version display, which shouldn't take up as much power. Actually, putting it in canvas may be worse, since canvas is the element that gets constantly updated. As for the user select, I don't think that would be a good idea to turn it off, in case they want to copy/paste version, but yeah it might be a good idea. As for half slabs, he's working on that. Combining two slabs makes water (for a test he was doing).

lilpeen (222)

@Baconman321 The comments section chat isn't really time-efficient. If I shared the Minecraft repl with you, you wouldn't sabotage it right?

Baconman321 (1097)

@lilpeen XD no (I don't do that, besides u can revert changes if someone did happen to sabotage it). I can't really chat rn, but if u want help I can make it work offline by using recycled code from our service worker on our game.

lilpeen (222)

@Baconman321 I have shared it with you. There is a file in the root directory called chat.txt. If you or me have any questions we can leave them there.

Baconman321 (1097)

@tussiez He thought I was the owner XD. I had to give u credit where he thought I made the game. As I stated, I'm the math man, and the guy who helps with physics and performance, nothing more, nothing less :D. It has still been an honor (not saying I'm quitting, saying it has been an honor) to work with u on this :D

lilpeen (222)

@tussiez I can share it with you too if you want to check out the code.

tussiez (1648)

@tussiez On your thoughts about the GUI, the inventory is dependent on HTML elements since I'm too lazy to write down positions (e.g 254,542), however that's a good idea anyway. I am using CSS to animate the tools though, and that's why I'm using elements. Half slabs were actually a test, and it works :) The collisions don't check for slabs, however I could simply do ".5" instead of "1". Disabling highlighting isn't too hard..

I wouldn't say the game is laggy.. it typically runs about 30-40 fps on Chromebooks, but works fine on more powerful devices. Keep in mind Chromebooks can't handle Minecraft very well (They've released Education Edition for the Chromebook, but it's a very "lightweight" version of the game)

Thanks for the feedback!

tussiez (1648)

@Baconman321 Yeah :) I cannot thank you enough for all the help, SortaCraft wouldn't be where it is today if it weren't for you. I think we're almost "done" on physics.

lilpeen (222)

@tussiez Yes chromebooks are slow. You are definately doing better than me on performance, especially with block destruction.

tussiez (1648)

@tussiez With your help, SortaCraft is over 2x faster, offline, and we can jump! (However it isn't working right now)

Baconman321 (1097)

@tussiez There's so much more to do, the performance can still get much faster...

Baconman321 (1097)

@lilpeen Ez fix. Cache main file that deals with game, that way it is served over internet faster. If course, this only helps on startup time, but can still help improve. The rest, try using web workers because then you have multiple threads doing different things (especially good for math). You can also do WASM which speeds up things faster since its an assembly language, meaning it can run faster than javascript and is also compiled instead of interpreted.

tussiez (1648)

@lilpeen I can help you with Web Workers - they're a big help
I'm available sometime after 2-3 EST

tussiez (1648)

@Baconman321 Oof yeah
Especially geometry data generation
It's all math and could be done on the GPU

Baconman321 (1097)

@tussiez When I first read that, I was like "Oh, no are we not gonna work on physics?", then I saw "after 2-3 EST" (XD). Uhm, also I can work 2-3 CST, but did u say u are available 2-3 EST (I forgot if u said we can collab on ur game 2-3 CST or 2-3 EST)?

tussiez (1648)

@Baconman321 If @lilpeen wants to, I could write down some quick instructions on how to use Web Workers today, but that's probably it. I still need to fix jumping, so I'm still available at 2-3 CST.
The reason why I put EST is because I don't know what time zone @lilpeen is in.. 2 EST = 1 CST
Sorry about all the confusion, I'm in school right now

lilpeen (222)

@tussiez Same time-zone eastern standard time. I can research webworker myself it's fine but thank you.

Baconman321 (1097)

@tussiez XD, ok yea see u at 2-3 CST. I should make a tutorial on web workers and such...

lilpeen (222)

@Baconman321 @tussiez The slownessof this comment section is killing me!! Use the chat file in the repl I shared!!

tussiez (1648)

@lilpeen Got it! Feel free to ask for help anytime.

sojs (341)

Nice job Baconmans school. My schools proxy and firewall I bypass uber-easily. It is absolute trash. There technique is just blocking certain sites that they choose, doesn't matter the URL. Feel bad for [email protected]

sojs (341)

Wow no offense but that load time is [email protected]

Been like that for hours lol (like 2 minutes now)

Baconman321 (1097)

@sojs It's a game with more features, that's why it's slower. Plus, I have some ideas on how to make it faster.
Wait, this game, or the one tussiez and I made?

lilpeen (222)

@sojs World gen is amazing though

Baconman321 (1097)

@sojs XD its on a chromebook, so the extension only blocks "actual" requests (one you type in the address/search bar) and Iframes that need to be blocked. I just fetch the website then put it as a srcdoc attribute XD (ofc I can't load external file resources, but good for reading articles).

sojs (341)

The tussiez and u one. Also I'm on a chromebook so it would be slow with features or not lol. @Baconman321

Baconman321 (1097)

@sojs Funny, you, tussiez and I are on chromebooks for school (u on school chromebook?), yet I have not heard of a school except for mine that uses chromebooks (ok I've only been to two schools and the current one has chromebooks but still).

sojs (341)

Nice. I created and a proxy server myself. It would not work in your case though, because in you need to put the url you want to go to in the URL. (such as https://proxy.sojs.repl.co/proxy/https:/slither.io)
You also cant log into stuff with google on it, because google is very particular about what sites you are able to login to it [email protected] Also super glitchy if u r playing multiplayer. Cant guarantee it will work.

sojs (341)

Most schools think use chromebooks now. And yes, I'm on a school [email protected]

sojs (341)

I've made one like that at https://repl.it/@sojs/chromium-browser-1. The problem with chromium unblockers is that if u dont have hacker plan it you cant load to many sites on it otherwise it crashes (repl memory used up)[email protected] And the shift key doesnt work so you have to look up "lowercase to capitol letters to get what you want lol.

Baconman321 (1097)

@sojs XD school blocks anything with "proxy" in it.

sojs (341)

hehew. ur school is tough. Hold [email protected]

Baconman321 (1097)

@sojs Don't come to my school if u wanna learn coding. Also, it's for autistic kids so.... (ye Im autistic)

BCP (7)

@Baconman321 I'm on a chromebook and it's a school chromebook the fps isn't that good

Baconman321 (1097)

@BCP That's the problem we are trying to fix. We want performance to be really good.

JRStudios4 (2)

@Baconman321
Well, you got more competition now.

lilpeen (222)

@JRStudios4 I NEED to know how it is that fast. Also, how long did it take and what 3D rendering library are you using?

JRStudios4 (2)

@lilpeen It uses webGl and it took about three years of coding 8 hours a day and debugging. It uses a type of cookie that helps speed up the loading process significantly. The cookie also handles storage, so that I don't have to use PHP or something to do it. PHP pauses to load, so it is a bit slower. Also, the strategy of JS that I used is a certain order that does the slowest thing first, and speeds it up. So with the cookie and the JS that it uses, the loading is shared, and ultimately sped up.

lilpeen (222)

@JRStudios4 I am only on my 4th month, so you just wait!

JRStudios4 (2)

@lilpeen I am updating mine as I am typing this. It will soon have commands and mobs.

JRStudios4 (2)

@lilpeen Updating as i'm typing. It will soon have mobs.

lilpeen (222)

@JRStudios4 Can you maybe send me an MDN article or something on this cookie you speak of?

Baconman321 (1097)

@JRStudios4 It's minekahn but you modified it, didn't you? (It says minekahn at the top)

Baconman321 (1097)

@lilpeen A cookie is just a way of storing things in the browser on the client side.

lilpeen (222)

@Baconman321 Yea I was wondering what he was talking about when he said cookie.

Lushlesss (3)

@JRStudios4 Did you just copy this from Khan Academy or what ._.

Willard21 (274)

@lilpeen Since it's actually my project, I'll answer your question about how it's so fast.

As JR says, I am indeed using WebGL for it. I store every visible block face in 1 buffer for each chunk. The faces are stored as world coordinates so that I don't need to perform any translations or transformations on them at render time.

Textures are stored in what's called a "texture atlas", which is 1 giant texture with all the other textures arranged in a grid inside it. Then when I'm building my buffers, I pass in the coordinates of the specific block texture I want to render.

At render time, I set uniforms for the camera matrix and player position (for the fog) once at the beginning of the frame. After that, I don't touch uniforms again because they're so slow. WebGL is very interesting in that it can render millions of textured triangles per frame, but it maxes out between 1,000 and 10,000 function calls per frame. So the trick is to render as much as possible in as few draw calls as possible.

JRStudios4 (2)

@Lushlesss In a way. The code is at least 94% different.

Lushlesss (3)

@JRStudios4 So, you deleted it for what reason?

tussiez (1648)

@Lushlesss Hold on guys.
So it's @Willard21's project, and not @JRStudios4?

tussiez (1648)

@tussiez @Willard21, after looking at the Repl, are you the original writer of MineKhan? Amazing job!

lilpeen (222)

@Unzor Yea exactly stfu that is what a license is for. You do not realize your stupidity your accusations are all based off things that prove that I made it.

JRStudios4 (2)

@Lushlesss It's not mine, my friend gave it to me, and gave me all the credit. My explanatory was just what the code looked like a lot. His name is will, so I supposed that it was a nickname he gave himself. I don't have a khan academy account.

jakel181 (10)

@JRStudios4 I spoke to @Willard21, the original creator, he does not know you nor did he give you permission to claim any credit.

JRStudios4 (2)

@jakel181 I have already explained this.

Lushlesss (3)

@JRStudios4 What kind of friend would just give you thousands of lines of codes and not ask to be given any credit. Way too generous of a friend in my books.

Baconman321 (1097)

@lilpeen Woah, watch your language please. I know he swore first, but that doesn't give the excuse to swear back. At least, don't use the very vulgar words.

JRStudios4 (2)

@Lushlesss Hey, we've known each other for almost our whole life. When I met him I had LITERALLY just turned two. (plus he's a nice guy)

Baconman321 (1097)

@jakel181 Yes. Piracy is punishable, both by repl TOS and by state/country law! @JRStudios4

lilpeen (222)

@Baconman321 Ok sorry, I'll delete the comments

JRStudios4 (2)

@jakel181 Isn't that what I did when I deleted it?

Baconman321 (1097)

@JRStudios4 Claim that the MineKhan game is yours?

JRStudios4 (2)

@Baconman321 WHAT DID I SAY? I ALREADY EXPLAINED THIS

Baconman321 (1097)

@JRStudios4 Huh, I didn't see an explanation. I'll look again.

From what I see, you are claiming that he "gave" the entire credit to you for his game, and you made the same game just different code. Can you verify this? Because it seems pretty skeptical right now NGL.

Lushlesss (3)

@JRStudios4 Look, dude. You're literally just digging yourself into a deeper hole at this point. You should either admit to copying this or keep trying to pretend to be the innocent user.

Lushlesss (3)

@JRStudios4 Take that out of context lmao. But seriously just admit to copying the code, Joseph Romriell. 10/10 name btw

Lushlesss (3)

@JRStudios4 lmao magic I'm joking. You should really think twice before putting your full name in your code

JRStudios4 (2)

@Lushlesss My full name? Oh. That was when I was operating publicly, and I got to brag to my buddy that I can code, but then covid hit, so I switched to repl. I did it. That is what I said. Are you not familiar with the ceaser cipher?

Lushlesss (3)

@JRStudios4 I'm confused that made no sense to me at all. You were bragging to your friend that you could code and when covid happened you switched to repl and then you said "I did it." Wdym. What did you say. Also, yes, I'm familiar with Ceaser cypher

JRStudios4 (2)

@Lushlesss Im confusing. I know. I did it means "I plagiarized minekhan" and I asked if you know the ceaser cipher because I put it in that comment that you said to delete. The ceaser cipher part of that breaks into "I DID IT".

angrydoge (481)

I just looked over this thread, @Unzor jeez with the swearing, but then saying "imagine being toxic" and you'd already dropped at least 1 F bomb and a few other curse words.
@JRStudios4 you cant say he plagiarized without any proof -_-

tussiez (1648)

@dabombdgdzjr @JRStudios4 @Lushless @jackel181 @lilpeen
Sorry about the ping, but this situation escalated really quickly. Afaik, JRStudios4 plagiarized Willard21's MineKhan?
Plus, why all the swearing? I thought Repl.it was kid-friendly..
@Unzor "tuss didn't even make it" - no I didn't make @lilpeen's game, I wrote https://sortacraft-1.tussiez.repl.co

angrydoge (481)

E̴̡̧̢̧̧̞̲͈̮̳̪͇̹͇͎̱͕͙̣̦̲̻̬͎̫͕̟̣̰͙̰̘̟̬̣̻̮̤̮͚͚̪̣̖͖̖͔̰̼̙̯̺̗̒̍̀̑̄̓̈́͂̇̿̾̽̿͑͜͜͜ͅ @tussiez

angrydoge (481)

Ȇ̴̡͈̜͇͚̯̗̣͎͛̊̄̀̇͆̚͝Ė̷̢̈́̑̇̀͆̅̈̋͘͜Ȩ̷̣̫̜̞̰̗͉̭͖͖͑́̓̈͌̅̈̆̿͋̄͜E̵̡͚͉͒͋E̵̞̩͔̝̠̙̫̪͖̹̦̝̠͉̙͋̿̍̃̅̀̐̉͑͘ @tussiez

angrydoge (481)

Ȩ̵̧̨̡̨̨̡̨̨̛̥͇͈̜̞̣̥̘͖̗̹̰̜̱̖̪͖̟͖̬̤͙̝̼̠͔̼̖̻̹̘̭̮̤͔͙͍̟̟͍̼͙͙̖͍̳̪͇̦͈͈̙͚̳̹͙̻̟͍̖̹̼̻̱̙̱͔͙͉̤̤̳͉̺͖̻͙͔̹̭̠̥͓̜̣̱̭̫̜̮̻̙͉̻̬͇̫̦͎̖̙̼̫̣̳͍̘̀͛͛́̅́͂̔̀̽̿͊̈́̓͛̎̎̄̏͌͆̏̅̀͗̀͂̚͜͜͝ͅͅͅͅE̸̢̛͚̞͙̙̱̙͓̲̺͎̻̲͎̟͔͇̦̮͉̣̻͇͂͗̔͐̈́̅̍̀͒̀͋̄̉͌̌̅̓̔̉̋̋̏̾̒́̉̎̄̄̕͘͝͠͝ͅẸ̶̢̡̢̧̨̱̙̟̳̝̣̹̣̪̮̣̱̯͙͕̭̼̦̟̝͇̞̮̦͙̻̤̣̻͕̞͉̣̪̪̬͓̠̰̪̪̦̲̲̟̱͉͉̩͓͍͕̲͔̭͚̟̼̙̬̬̳͚̮̭̤͓̟͖̮̗͈͍̜̝̗͎̤͓̱̟̭͖͉͔̩̹͇̪͇̎͆̐̄̄͜ͅͅḜ̵̛̼̤͓͔̙̰̫̩̖̫̗̳̱̩̈́̌̎̓͐̂͐̾̀̔̈͛́̈́̓̃̈́̾̀͑̇̓͌̌̈́̃̈́͊̈́̎͒͂͊̀̿̒̆̉̐̈́̔̕͘̕̚͝͠͝͝Ě̸̡̢̨̛̛̛̜̲̤̟̠̜̻̞̘̲̥̠̞̭̖̬͉͉̻̪̬̞͖͎͈̯̪̝̻̖̙̹̭̰̪̥̣̰̞̪̙̝̦̟̭̲̥͙̤̘̼̺͍͈̲͕͇̗̻͈͖͇͚̀̔̌̔̈́̋̿̃̀̐̆̍͊͐͋̂̓́̃̇͒̿̽̏̾̀͂͛͌̃̀̋͋͗̀̉̊̒͆̀̔̈́̓̊͒̀̄͌̑́͆̓̃̇́̀͊̓͌̂̑̃̏̊̓͛̄̓̓̒̂̄̾̿̀̑͑͛̉͆͛̋̉̍̌̌͗́̀̔͗̓̃̋̏̈́̈̈́͊̈́̿͗̇́͊̂̏̍͋̊̆̈́̀̀̀̈́͆̇͂͐̐̒̒͘̕͘̚͘͘̕̕̕̚͜͝͝͠͠͝͠͝ͅȨ̵̢̢̢̨̛̭̤̟̗̠̣̲̗͎̱̳̯̺̪͈̙͙̝̱̹͈̩̫̲͔̳͎͍̺̭͉̞̫̼͉̙̬̝͉͓̲̲̫͉͈͈͉̠̳̠̩̏̀̃̾̅̀͋̅͆̑̈́̈́̔͗͑̎̈͒̽̆͂̏̅͛̄͐́̈́̅͘͝͠͝͝ͅĘ̶̧̡͕͎̘̪͍̟̯͖̣̘̞̘̪̜̰̬̤̤͎͎͖̫̟̤̪͍̠̖̪̼̲͓͙͇̲̞͇̰̤͙͉͍̱̘̝͍̥̬̹͊̃͜͜͜E̸̡̧̡̨̧̧̧̧̢̧̛̛̛̛̲͍̝̼͔̝͇͕̳̳͉̯͕̙̻̹͓̬͔̫͇̻͈̗̳͔̻͍̩̮̼̯͎̙̯̙͙̝͙̰͇̯̗̺̝̥͈͉̖̖͉͔̞̘̤̱̪̪̝̰̣̯̟̟̝͎͓̝̞̳̱̤̮̲͕̜̰͌͑̏̐̉̑̈́̓̋͑͑̓̇͑̈̋̆͌͌̎̄̈́͗́̋̎̀̋̀͌͂̓͋̀̒̋̑̈́̇̂͗̍̈́̿̾̌̈̓̃̌̊͑͋̊̂̽̃̍̄̌͗̆̓̅́͐͂̃͂͗̐̎̿̄̿̍̽̐̌̅̈́̌̓̒͛̍̆̓̈́̂̓͛̏͗̏́̇̈́͊̊̾̅̓̃̓̒̂͌͆͐͐̌̈̿̅͐̎̏͘̚̕̚͘̕͘̕͘̕͜͝͝͝͠͠͠͠͝͠͠͝͝͠͝͠͝͝ͅͅͅͅĘ̸̡̢̡̨̢̡̡̡̨̢̧̨̺͈̞͈̺͇̹̙̙̗̹̞̺̼̼͕̱̺̹̩͉̩̩̗̞̭̜͔͇̠̫̤̭̻̝͕̳̭̠̹̬̱̝̭̝̭̹̝̗̦̟̭̳͕̤͚̻̮͔̗̜͚̯̼͚̯̪̣̠͓̺͖̻̤͖̣̫̥̗͉͚͍͈̳̯͎̦͚̹͖̰͉̺͕͚͈̬̟͎̪͚͖͍̜͇͖͖͕̼͕̯͙͎̹̈́̈̽̊̏̾̉́́̂̒͒̏̅̽͑̓̔̈̔̉̈͑̂̒̅̕̚̕͘͜͜͜͜ͅͅͅͅͅͅ @tussiez

Baconman321 (1097)

@tussiez NO DON'T RESPOND MORE OR HE'LL GO "E" CRAZY

JULIODIAZ1 (50)

@sojs it dosent do that 4 me

iocoder (162)

i go to notblockedgames.cf and its blocked. the irony @lilpeen

lilpeen (222)

@ridark The entire website is blocked!?!

lilpeen (222)

@ridark That would be kinda difficult. I would have to copy evey single one of my game files and put them in a repl.

iocoder (162)

@lilpeen u dont have to, im just saying that if u did something like that it would allow school blocked websites ppl to view it

lilpeen (222)

@ridark Yea ik. I was thinking about making a new game website anyway; one that is easier to manage. I would still use other hosting because it gives me access to things like apache configuration through .htaccess files but I might make it somehow integrated with repl so you will be able to use either.

iocoder (162)
(Edited comment: reposted/changed)

@lilpeen

maybe you should make a replit html site with all the stuff that notblockedgames.cf has (since it is yours)
cause of my school tho on my other laptop i can prob get to it

iocoder (162)

@PyCoder01 searches "what is ddos router"

NOOOOOO! xD

iocoder (162)

@PyCoder01

GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD

iocoder (162)

@PyCoder01

I can get your location

how..? plz dont

lilpeen (222)

@ridark Just look up "location from ip"

iocoder (162)

@PyCoder01 i have looked into the ip logger and found something...

>:)

lets stop using this post for commenting nonsense

iocoder (162)

@PyCoder01 i just kidding, i actually deleted the ip logger thing after i created it cause i was joking too.

lets stop using this post for commenting nonsense

yes lets stop

iocoder (162)

@PyCoder01 i didn't get ur fake ip or real ip in that case

CodeLongAndPros (1624)

@PyCoder01 I hope you don't mean that.
If you initiate a distributed-denial-of-service against replit, you could get ip banned.

tussiez (1648)

@ridark ah yes, Lightspeed Systems!

fuzzyastrocat (1865)

This appears to be copied from https://notblockedgames.cf/games/minecraft-updraded.html. Can you provide an explanation as to how these two are the same?

3DKTH3PR0 (3)

@fuzzyastrocat Woah your right! @lilpeen I also want to know how and why those are the same

lilpeen (222)

@Unzor Thank you for correcting your mistake

jakel181 (10)

@fuzzyastrocat Yes, I can confirm lilpeen is the creator of both notblockedgames and this minecraft re-creation

fuzzyastrocat (1865)

@lilpeen Ok, just wanted to make sure that this wasn't copied.

iocoder (162)

givs upvote this is great, can you make the Space key make the player go up, and shift make the player go down? go here for key codes and stuff

lilpeen (222)

@ridark Thank you for your feedback, I have updated the controls!

NoahJospeh (28)

@lilpeen make sure you update the controls in the description. Its still says q for up, and e for down

iocoder (162)

@NoahJospeh this is my version: minecraft

Control: Up: Space, Down: Shift, W: Forward, A: Left, D: Right, S: Backwards (everything else is the same)

Click to use the pointer in the middle of the screen

CodeLongAndPros (1624)

I'm delisting this for 3 reasons.
Number one: This appears to have noted upvotes.
Number two: The code is stolen, as @minx28 said
Number three: This has an IP logger, which is against ToS

lilpeen (222)

@HahaYes Yes there was just a misunderstanding so he un-delisted it.

CodeLongAndPros (1624)

@HahaYes I relisted it because of some confusion and innocent until proven guilty.

LukeShomper (58)

Lol you guys like my house?

cowboyyall10 (8)

why 32x32 anyways?
a typical minecraft chunck is 16x 16. like you can make the entire world 16 16x16 chunks by 16 16x16 chunks.

tussiez (1648)

@cowboyyall10 I'm not the creator of this game, but it doesn't make a real difference, other than load time.

jakel181 (10)

@cowboyyall10
Load time, we plan to expand in the future.

JULIODIAZ1 (50)

THIS IS AMAZING even though your limited in this game, its shown me what you can do with this website, i think everyone should upvote and say more than just "cool."

beginner10coder (12)

How do you upvote anyway :) @JULIODIAZ1

I actually don’t know how to upvote

HimanshuShekha4 (51)

@beginner10coder click in the arrow like box at the left side of the comment

LuckyOreos (203)

Hmm one of my friends said you copied it but I guess they were wrong. No hard feelings! Good job anyways I still made some cool stuff with program And yo I should be the one who is replying with a mean comment. Cause dude calling a 14 year old dumb is really sucky. And yes a lot of your repls have syntax errors.

lilpeen (222)

@DarthVader29 Do know how many accusations of stealing this code I have gotten? Anyone, including you, would be as angry if not more angry as me. And sorry about the insulting comment. If you or anyone else has questions about the copyright of this project, contact @jakel181#3600 on discord.

peepogg22 (1)

LOL i love minecraft and this make me love it more its brilliant see how you can do a game so similar with your own brain

Name12 (161)

wow!
I'm impressed.
maybe I should stop learning python and move to JS HTML CSS

RAVI19 (1)

@Name12 You should not leave PyThon.

tussiez (1648)

@lilpeen Great job!
I recommend looking at Threejsfundamentals' "Voxel Engine" website if you want to make a faster game :) I've created a modified version of this in SortaCraft

lilpeen (222)

@tussiez Not copied check the post ^

tussiez (1648)

@lilpeen Not copied, it's his own website

DominicHuieWhit (52)

not too laggy, 5 different blocks, my only critique is the world generation...

jakel181 (10)

@DominicHuieWhit
We plan to add terrain generation later.

DarkswordsmanJG (43)

The best Minecraft copy I have EVER seen

port4006 (1)

When will the RTX feature come?

Bookie0 (6262)

Minecraft

but what are these irregularities?!

lol good job anyways! :D

and...uh, wanted to do something but then I can't move:
=/

lilpeen (222)

@Bookie0 The irregularaties are just ThreeJS drawing things at low quality. I'll find out how to get rid of them. Also sorry about the error I was probably working on something.

lilpeen (222)

@Bookie0 Kind of fixed the irregularities.

tussiez (1648)

@Bookie0 If you want the technical explanation, this is because your display doesn't have a high pixel density. This means you can see the individual pixels on your screen, and that's why it looks like diagonal lines drawn have jagged edges. One fix for this that I think @lilpeen has applied is Anti-Aliasing, which interpolates the jagged lines and adds a "blur" so these edges are less visible.

tussiez (1648)

@Bookie0 Err.. welcome? Idk
It isn't a game issue though

Bookie0 (6262)

@tussiez no was just saying thx for the explanation! ;)

lilpeen (222)

@Bookie0 With @tussiez 's comment, I have fixed the irregularities even more, and they are now completeley gone (mostly)!

Bookie0 (6262)

Wow pretty cool, looks nice! :) @lilpeen

lilpeen (222)

@Bookie0 Not copied check the post ^

lilpeen (222)

@Bookie0 From the post, do you understand that this was not copied?

Bookie0 (6262)

@lilpeen well idk lol a post descrip is just a post descrip ¯\_(ツ)_/¯

better bring this up with the mods (@moderation)

lilpeen (222)

@Bookie0 Bruh go look at the website, I updated it to say I am the creator. Did you even follow the directions?

lilpeen (222)

@Bookie0 Did you not see this in the post?

To everybody that is saying it was copied from https://notblockedgames.cf
It was not copied, that is my website and you can check the website yourself in the updates section. In fact, the game is embedded with an iFrame pointing to this exact repl.

msgaalex (35)

I've been trying to make a minecraft of my own, and was wondering how you calculated what block to break.

lilpeen (222)

@msgaalex So basically, I use a raycaster (in ThreeJS) and mark the interception point of the first target on the x axis.
const raycaster = new THREE.Raycaster();
raycaster.setFromCamera({x: 0, y: 0}, camera);
const targets = raycaster.intersectObjects(scene.children);
targets is an array containing all of the intercepted objects. We only need the first target (target[0]). Lets say the x interception point is 43.8. I divide that by the block size, lets say 20. It evaluates to 2.19. Truncate that (remove the decimals), and you have 2. That is the x block the raycaster just intercepted. Repeat for the y and z axes and you have the x, y and z coordinates for the block the player just clicked.

msgaalex (35)

@lilpeen Thanks! This really helps! :D

lilpeen (222)

@msgaalex Not copied check the post ^

msgaalex (35)

@lilpeen I know it isnt copied

poetaetoes (316)

@lilpeen
Please explain whats wrong and how to fix please.

lilpeen (222)

@poetaetoes Oh yea sorry that is my fault. I was going lower the resolution of the textures to make them more pixelated and hopefully improve performance but I never finished it.

lilpeen (222)

@poetaetoes I have rolled back the changes and it is working now.

JULIODIAZ1 (50)

Is it possible to save our worlds with like a seed system like minecraft? How I would do this and its a very inefficient way is that you have a state for every possible block and have numbers for those states, as i said very inefficient and im sure smarter people than me will think of a better way of approaching this. Im fairly new to coding and thats why I cant think of anything smart.

lilpeen (222)

@JULIODIAZ1 Usually seeds are only used to create worlds, not the other way around. Think of seeds like a hashing algorithm, they can not be reversed. Also, I don't think there is any way to store 3 dimensional block positions in any better overall way than 3 dimensional arrays. Some may be more efficient, but the current way can be used easier in most cases.

JULIODIAZ1 (50)

@lilpeen oops, like i i said: im new to coding so i suck.

tussiez (1648)

@lilpeen are you using PlaneGeometry and culling sides?

tussiez (1648)

Good job! You're still on Trending XD

lilpeen (222)

@ZDev1 Bruh it is me did you even read the post? It says on the website that it is me.

jakel181 (10)

@ZDev1 yes lil peen is luke and I am jake

lilpeen (222)

@BrandonWilcox Bro stfu your stupid. Read the god damn post before making accusations. Do you not see the gigantic IMPORTANT on the second line? It is literally one of the biggest words on the entire page. Read the post.

BrandonWilcox (0)

@lilpeen Yes i read it before i posted, but why would you go to a coding website and just paste a link?

lilpeen (222)

@BrandonWilcox How dumb are you what do you mean "paste a link" the post confirms that it is my website. It says on the website that it is me.

jakel181 (10)

@BrandonWilcox This is not copied, please see notnblockedgames.cf for proof or look at commits. The copyright is registered to both myself and lil-peen (luke)

Dart (1200)

@lilpeen hey I know you mean well but please try to be more polite and don’t use profanity in your comments please.

lilpeen (222)

@DartZII I literally can not provide any more evidence to the fact that I coded the game. Even after filling up the screen with text pointing to the evidence, I have received multiple accusations saying I copied the game.

Dart (1200)

@lilpeen some people are just dense lol, I know you didn’t copy all though at a glance I can see why someone might think you did. Amazing post and if anyone leaves a comment saying you copied tell them I endorsed your post or something and if they keep bothering you about it just @ me in a comment :)

Nayoar (574)

@DartZII ban this guy, he's pulling IPs using some very obfuscated code. See my comment on this post. Can talk on Discord about it if needed

Joelina2009 (0)

This doesn't work.. it shows uncaught reference even when i didn't change code

lilpeen (222)

@Joelina2009 It's working on my end. What browser are you using, and exactly what error are you getting?

GabrielWood2 (1)

Sure, definitely isn't copied...there's LITERALY a whole BLOCK that SAYS "notblockedgame.cf" How isn't that copied!?!?

lilpeen (222)

@GabrielWood2 BRUH BECAUSE IT IS MY WEBSITE!!!

lilpeen (222)

@GabrielWood2 You didn't even read the post before you started making accusations.

jakel181 (10)

@GabrielWood2 notblockedgames is a website we created.