Giter Site home page Giter Site logo

vulkan-voxel-game's Introduction

Vulkan Voxel Game

Game Screenshot

This project is a simple voxel renderer made using Vulkan and C. It's a small demo example and not a full game, but it successfully demonstrates the basic principles of building texture atlases, chunk generation, and dynamic chunk loading without a game engine

This project's code and assets are 100% public domain, and you can do whatever you like with them.

Current Features

  • Chunks
    • Internal faces are culled
  • Infinite terrain
    • Chunks are loaded and unloaded dynamically
  • Textured blocks
    • Texture atlas is generated at runtime from the resources in assets/blocks
  • Can move camera
    • Spectator mode (no physics currently)

Goals

We will add these later at some point, but they're not present right now:

  • Destroying blocks
  • Adding blocks
  • Being able to walk around without flying
  • Entities
  • Block picker

Non-Goals

These are pretty cool features for a game, but they aren't really core to the concept of a voxel renderer.

  • Lighting
  • Water / Transparency
  • Inventory support

How to build

Before you can run the program, you need to ensure that you have installed the Vulkan libraries and headers.

$ cd assets/shaders
$ ./compile.sh
$ cd ..
$ make

Run from the project root directory.

$ ./obj/vulkan-triangle-v2

How to modify image assets

Block textures can be found in the assets/blocks/ directory. These textures are in the farbfeld format. If you want to edit these files, you can use ImageMagick tools to convert them to png format, and then back again to farbfeld format once you are done editing.

Example:

$ convert up.ff up.png

Credits and Acknowledgments

Part of this project is based upon https://vulkan-tutorial.com.

I also referenced my prior example project: https://github.com/pimpale/vulkan-triangle-v1

External Libraries

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.