Coder Social home page Coder Social logo

hagato's Introduction

hagato

Haskell Gamedev Toolkit

hagato is a Haskell library for developing games from scratch. It is not a game engine, but a collection of loosely coupled, easily combinable sub-libraries which can be used or ignored as desired, thus allowing developers to select features and technologies at will while remaining in full control of the overall game architecture. Some sub-libraries are thin integration layers over existing libraries, some are developed from scratch. The following sub-libraries are currently available, which can be imported individually:

  • hagato:with-core: types and functions for animations, math, camera, input, logging and game loop handling.
  • hagato:with-glfw: Vulkan-based window handling using the GLFW libary.
  • hagato:with-gltf: loader for the GLTF format to import 3D scenes (for Blender integration, for example).
  • hagato:with-gltf-vulkan: interop between GLTF and Vulkan.
  • hagato:with-vma: Vulkan-based memory handling using the Vulkan Memory Allocator (VMA) library.
  • hagato:with-vulkan: thin layer over the Vulkan API which offers features like constraint-based device and queue selection, virtual frames, recreateable entities, a descriptor set allocator and Vulkan-compatible camera handling and ray casting.

Many libraries have a companion sub-library with the name suffix *-effectful which provides an easy integration with the effectful ecosystem. None of the libraries can be considered complete, but they cover many common use cases and it is intended to evolve them on the go when actually developing games. Since the libraries are work in progress and Haddock documentation is still missing, a Hackage release is still pending.

Example: 3D Chess

chess.mp4

A fully functional and documented 3D chess game implemented with hagato can be found here. It demonstrates a great amount of features provided by the hagato package.

In order to run the chess example, execute cabal run. You need the Vulkan SDK installed and tell cabal where to find it, for example by using a cabal.project.local file:

package vulkan
  extra-lib-dirs:
    C:\Software\VulkanSDK\1.3.239.0\Lib

package VulkanMemoryAllocator
  extra-include-dirs:
    C:\Software\VulkanSDK\1.3.239.0\Include

The 3D models of the chess pieces and the textures of the chess board fields were created by Yanez Designs. The skybox of the 3D scene was borrowed from the Learn OpenGL cubemap tutorial. The chess board and its labels are self-made.

hagato's People

Contributors

typedbyte avatar

Stargazers

Evan Relf avatar  avatar Romain Viallard avatar Tobi Oloke avatar StrawberryTea avatar ابو الحسن الجاوي avatar 🍃 Greg 'Krait' Hab 🍂 avatar Lord Alveric avatar  avatar Dragos avatar ners avatar  avatar Jason Shipman avatar  avatar KlarkC avatar Adrian Sieber avatar Brian Sermons avatar Miao ZhiCheng avatar Woojin Cho avatar Benjamin Bray avatar Clemens Schmid avatar  avatar José Miguel Romero Espitia avatar Henning avatar Stephane avatar Robert Whitaker avatar João Alvim avatar Tim Pierson avatar Joana R avatar Ashley Rose avatar Shawn Eary avatar Sebastian Wålinder avatar Tristan de Cacqueray avatar Daniel Kahlenberg avatar Agnishom Chattopadhyay avatar Michel Boucey avatar  avatar  avatar LCG avatar James Haydon avatar Kari Pahula avatar Martin Šošić avatar Nikita avatar  avatar Josh Miller avatar Aaron Allen avatar  avatar Rodrigo Mesquita avatar Ruslan Gadeev avatar Eloi Torrents avatar Icy-Thought avatar Marco Z avatar Hamza Maimoune avatar  avatar  avatar Luis Morillo avatar Peter Storm avatar Dietrich Daroch avatar Daniel Harvey avatar Gil Mizrahi avatar Guy Black avatar John avatar toyboot4e avatar  avatar Luca Leon Happel avatar Mohammad Hasani avatar

Watchers

Tim Pierson avatar  avatar  avatar Shawn Eary avatar

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.