• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

johnpayne-dev/MinecraftC: A Raytraced Minecraft Classic 0.0.30a port to C

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

johnpayne-dev/MinecraftC

开源软件地址(OpenSource Url):

https://github.com/johnpayne-dev/MinecraftC

开源编程语言(OpenSource Language):

C 100.0%

开源软件介绍(OpenSource Introduction):

MinecraftC - A Raytraced Minecraft Classic Port to C

Features:

  • True to the original version (0.0.30a)
  • Implemented fully in C using SDL2 and OpenGL 1.1
  • Original music and sounds
  • A modded and vanilla version
  • Works on Windows, Linux, and MacOS
  • CMake build system

Raytracing:

  • Uses an 8-bit distance field as an acceleration structure
  • In some cases, performance is better than the original
    • 60+ fps at 1080p on the integrated graphics cards I've tested
  • To enable raytracing, download the modded binary and enable it in the mods screen under options

Screenshots

Screen Shot 2022-07-31 at 12 57 49 PM

Screen Shot 2022-07-31 at 12 57 54 PM

Screen Shot 2022-07-31 at 12 43 33 PM

Screen Shot 2022-07-31 at 12 43 39 PM

Downloads

Building

Note: if you would like to build the vanilla version, remove -DMINECRAFTC_MODS=1 from the cmake command

Requirements:

  • git
  • cmake
  • A compiler of your choice

Windows instructions for Visual Studio:

  1. Run the following commands:
git clone --recursive https://github.com/johnpayne-dev/MinecraftC.git
cd MinecraftC
mkdir Build
cd Build
cmake -DMINECRAFTC_MODS=1 -G"Visual Studio 17" .. # replace "Visual Studio 17" with your version
  1. You should now have MinecraftC.sln in your directory that you can open with Visual Studio and build

MacOS instructions for Xcode:

  1. Run the following commands:
git clone --recursive https://github.com/johnpayne-dev/MinecraftC.git
cd MinecraftC
mkdir Build && cd Build
cmake -DMINECRAFTC_MODS -GXcode ..
  1. You should now have MinecraftC.xcodeproj in your directory that you open with Xcode and build

  2. (optional) If you would like it in a .app format, you can run this command to convert your executable:

python3 Scripts/MacOS-App.py <path-to-executable> [developer-id]

Providing the developer id will sign the .app, which you can find by running security find-identity

Linux instructions (untested):

  1. If you don't have SDL2 already, run these commands:
sudo apt-get update
sudo apt-get install libsdl2-dev
  1. Run the following commands:
git clone --recursive https://github.com/johnpayne-dev/MinecraftC.git
cd MinecraftC
mkdir Build && cd Build
cmake -DMINECRAFTC_MODS=1 ..
make

Modifying Resources

If you're creating a mod and want to change or add any .png or .ogg resouces, then run this script to update the resource headers:

python3 Scripts/EmbedResources.py

It will recursively go through all .png and .ogg files in Resources/, and convert them to .h

Known Issues

  • There is no survival mode, it was removed for simplicity and compatibility with raytracing
  • A few sounds have the incorrect pitch, I'm waiting for cute_sound.h to implement pitch shifting
  • Load file and save file are not implemented
  • If raytracing doesn't turn on, then something is going wrong with OpenCL, report an issue and I can help troubleshoot



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap