Coder Social home page Coder Social logo

atxi / polymer Goto Github PK

View Code? Open in Web Editor NEW
86.0 13.0 3.0 1009 KB

In-development Minecraft client using C++ and Vulkan.

License: MIT License

CMake 0.12% C++ 76.98% C 22.52% Batchfile 0.02% GLSL 0.34% Shell 0.02%
minecraft c-plus-plus vulkan minecraft-client minecraft-clone

polymer's Introduction

Polymer

In-development Minecraft client using C++ and Vulkan.

It can only connect to offline Java servers at the moment, but online mode is planned. There's currently no physics, but there's a spectator-like camera for looking around.

It uses the original assets that are downloaded from the resources server.
The downloaded assets will be stored in %appdata%/Polymer/ on Windows and ~/.polymer/ on Linux.

Screenshots

Polymer Image

Running

Main development is done on Windows. It can run on Linux, but not tested much.

  • Requires blocks-1.20.1.json that is generated from running Minecraft with a certain flag or from the polymer release page.
  • Requires compiled shaders. Get them from the release page or read the building section below if manually building.
  • Requires an internet connection on first launch so it can download the necessary assets.

Running the exe will connect to localhost with the username 'polymer'. The server must be configured to be in offline mode.

You can specify the username and server ip by command line.
polymer.exe -u username -s 127.0.0.1:25565

Currently only a spectator camera is implemented for flying around and rendering the world. By default, you will be in the survival gamemode on the server. If you want chunks to load as you move, you need to put yourself in spectator gamemode. You can do this in the server terminal or in game with the command /gamemode spectator.

Building

The project is configured to use vcpkg as a dependency manager, so follow the directions below.

Requirements

  • C++ compiler (tested with MSVC 2022 and Clang)
  • CMake

Windows

  • Open terminal in polymer folder.
  • git submodule update --init
  • cmake -B build -S . --preset msvc
  • MSVC: Open the generated build/polymer.sln and build in x64 Release mode.
  • The final executable will be in the build/Release folder.

Compiling the shaders requires glslc, which can be obtained from Vulkan SDK.

  • Compile the shaders with compile_shaders.bat. VULKAN_SDK needs to be set in your environment variables.

Linux

Linux uses GLFW for managing the window. Install it with your package manager.

  • sudo apt-get install libglfw3 libglfw3-dev
  • Open terminal in polymer folder.
  • git submodule update --init
  • cmake -B build -S .
  • cd build && make
  • The final executable will be in the build/bin folder.

Compiling the shaders requires glslangValidator.

  • sudo apt-get install glslang-tools
  • Compile the shaders with compile_shaders.sh.

polymer's People

Contributors

atxi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polymer's Issues

Readme and Releases

Add instructions to build and submit binary's in releases or throught github actions

Game crashes with a "Failed to connect" error

I tried running the polymer.exe file; it shows a white window, then crashes and spits out this error. I've tried to connect using a different port, but I get the same result.

PS C:\Users\Administrator\Downloads\polymer> .\polymer.exe -u polymer -s 127.0.0.1:25565
Polymer: Windows
Asset time: 382.968994
Connecting to '127.0.0.1:25565' with username 'believer'.
Failed to connect

(not an issue) for the last few days ive been working on polymer

for the last few days ive been working on polymer, and i'd like to show you what im doing with it (this is just a personal project because i want to learn more about 3d rendering)

image

physics are half implemented, temporary entity renderer (cubes only for now) (also renders players with their usernames), temporary attack button 'E' to attack entities around you within 5 blocks, local client-side commands for debugging

coming: pause menu to adjust settings on the fly with your mouse, full physics and collision detection so that the player cant phase through blocks

ive learned heaps from this lil side-project, i finally (mostly) understand 3d -> 2d projection

vsync is not working

vsync is not working. RTX 2060. Archlinux. Fix: remove if (mode == VK_PRESENT_MODE_IMMEDIATE_KHR) {
best_mode = mode;
}

Low FPS on first build & debug

Hi, I'm interested in your nice work, and I've tried polymer.exe from releases.
The client worked fine and was running like, 1k+ fps.

Later I tried to build the polymer exec on my own, so I configured cmake and build target as provided instructions.
But the console was flushing with some warning outputs, and it was 10fps or lower...

What was wrong? (log attached)

https://pastebin.com/1VhhZu3w

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.