LabyStudio / js-minecraft

A browser sandbox that provides all basic features to understand the render and physics engine of Minecraft.
Other
76 stars 31 forks source link

Refactoring this app #5

Closed ekmas closed 8 months ago

ekmas commented 1 year ago

Hi, I like this project a lot. The main issue with why the app is so laggy is that you literally added whole libraries to this app. I think the better approach would be to use npm to install all these libraries and then use a module bundler like webpack or rollup.

I can help you with that if you're interested :D

LabyStudio commented 9 months ago

The reason I refused to use such tools is that I never wanted to achieve anything with this project. For me, it was just a way to pass the time during school so I had something to jump around when I was bored.

I also wanted to understand and document all the important features of the Minecraft rendering engine. So the focus for me is more on the code and being able to debug it without issues. Compiling it into a big garbage only makes it worse to debug it in the browser.

LabyStudio commented 9 months ago

But of course it only makes sense to refactor it in order to implement it correctly. But to be honest, I would just rewrite it right away if I had the time 😅

CrazyH2 commented 9 months ago

But of course it only makes sense to refactor it in order to implement it correctly.

But to be honest, I would just rewrite it right away if I had the time 😅

@LabyStudio

Hi, I just wanted to say that Kleat has improved the fps a lot. It was bad due to the font rendering as it was rendering every single character from a image file rather that using a normal font and importing that. Heres the github commit: https://github.com/Kleeat/js-minecraft/commit/d8ddcc7fd2cfe8bf3cc8a1a740ef7e5133121b15

bitlogist commented 8 months ago

Thank you, @CrazyH2 that information was very useful. Thank you, @LabyStudio for making the best repo I've ever seen in my life. I just think it would be nice to save changes made by players in the default multiplayer server.

CrazyH2 commented 8 months ago

Thank you, @CrazyH2 that information was very useful. Thank you, @LabyStudio for making the best repo I've ever seen in my life. I just think it would be nice to save changes made by players in the default multiplayer server.

Your welcome. I am currently improving this project a bunch, and have made it so you can join any cracked server and build and place blocks with the help of someone else.

bitlogist commented 8 months ago

Thank you, @CrazyH2 that information was very useful. Thank you, @LabyStudio for making the best repo I've ever seen in my life. I just think it would be nice to save changes made by players in the default multiplayer server.

Your welcome. I am currently improving this project a bunch, and have made it so you can join any cracked server and build and place blocks with the help of someone else.

I am working on a survival mode because it would be so fun to play survival in the browser.

CrazyH2 commented 8 months ago

Thank you, @CrazyH2 that information was very useful. Thank you, @LabyStudio for making the best repo I've ever seen in my life. I just think it would be nice to save changes made by players in the default multiplayer server.

Your welcome. I am currently improving this project a bunch, and have made it so you can join any cracked server and build and place blocks with the help of someone else.

I am working on a survival mode because it would be so fun to play survival in the browser.

@bitlogist Do you want to join up because i am currently working on it to.

I have added a lot

CrazyH2 commented 8 months ago

Thank you, @CrazyH2 that information was very useful. Thank you, @LabyStudio for making the best repo I've ever seen in my life. I just think it would be nice to save changes made by players in the default multiplayer server.

Your welcome. I am currently improving this project a bunch, and have made it so you can join any cracked server and build and place blocks with the help of someone else.

I am working on a survival mode because it would be so fun to play survival in the browser.

@bitlogist, How is it going?

bitlogist commented 8 months ago

It's going well. I managed to render tools (an iron pickaxe) by making them special blocks.

bitlogist commented 8 months ago

My friend, @intfract, has a repo with these changes.

CrazyH2 commented 8 months ago

My friend, @intfract, has a repo with these changes.

Ok, thanks I will take a look