Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Windows Support (as a patch) #104

Open
larioteo opened this issue Nov 11, 2024 · 2 comments
Open

Native Windows Support (as a patch) #104

larioteo opened this issue Nov 11, 2024 · 2 comments

Comments

@larioteo
Copy link

larioteo commented Nov 11, 2024

Hello @jdah,

Cool project! I enjoyed your video and I wanted to try it myself.

To start, I looked into your implementation, but I noticed that the project wasn't prepared out-of-the-box for Windows. However, given that your code and libraries seemed already platform independent, I added native Windows Support in 25 minutes... with premake5.

Let's be real, Windows is still the most used OS worldwide, especially in gaming, and it's also a pleasure to develop on. I hope you don't mind that I created this patch. Only 2 changes were necessary in your code, a missing explicit cast in worldgen and a little bug fix in the sort header -- likely related to the switch to Clang instead of GCC.

Minecraft-Weekend-Windows-Patch.zip

  1. git clone
  2. git submodule update --init --recursive
  3. download and unpack contents of patch (the source folder should be merged carefully, isntead of copy paste...)
  4. execute generate-build.bat
  5. open visual studio and press play

Yes, I could also offer you a PR, but as it seems you don't care about/like Windows or Microsoft for some reason, maybe you don't want to support it, I don't know. I thought that there are a lot of people out there, that could benefit from your project, so I decided to pack everything to a small zip file and upload it here.

Regards,
random-developer

@Pedroma34
Copy link

Thank you.!
Few things, though. Make sure to install Clang toolchain for Visual Studio 17 (run the installer, click modify VS17->individual components->C++ Clang compiler and MSBuild support for LLVM (clang-cl) toolset.
It's about 8gb but then it should build just fine.

@larioteo
Copy link
Author

larioteo commented Nov 17, 2024

Yeah, forgot about the setup, thank you to.

Also for beginners, you can reach full FPS in release mode, which is normal, cause in debug mode, the math stuff is slow, due to optimizations turned off.

Beyond that premake5 can create also build files for cmake for all operating systems, in my opinion it's a good choice for cross platform support. Also other configurations are possible, but for that the lua files may be set up correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants