Code Monkey home page Code Monkey logo

wasabi's Introduction

Wasabi

Wasabi Vulkan Game Engine is currently a work-in-progress port for HasX11 Game Engine. Wasabi is designed to allow C++ programmers to write games and graphics applications easily without having to worry about the details of the tedious graphics APIs (Vulkan, Direct3D, OpenGL, etc...).

Current Features

OpenAL Sounds

Sprites

Text

Lights

Effects & Materials

Particles

Soft Particles

Particle Lighting

Basic Shadows

Soft Shadows

Cascaded Shadowmaps

Multi-directional Shadows

Deferred Rendering

Seamless Infinite Terrains (Geometry clipmaps)

Skeletal Animations (GPU-based)

Geometry Instancing

Havok Physics (mostly replaced by bullet)

Bullet Physics

File format for game assets

Map Editor

Linux Support

Mac Support

Assimp integration (and getting rid of FBX SDK!)

Building

Requirements

  • Vulkan SDK. You may also need to install vendor/gpu specific driver for Vulkan (or maybe that's not a thing anymore...)
  • Install cmake 3.15.
  • Install python3.
  • (Windows) Visual Studio (make sure to add the feature Visual C++ tools for CMake during installation)
  • (MacOS) XCode

Building Wasabi

git submodule init && git submodule update
mkdir build && cd build
cmake ..

This will automatically initialize and update submodule dependencies. On Windows, this will generate a solution build/Wasabi.sln, which you can open to use Visual Studio on the source code to edit/compile.

Usage

To link an application to Wasabi, you will need to link to Vulkan and to the wasabi library libwasabi.a (or wasabi.lib on Windows). On mac, you will need to add the following frameworks as well: Cocoa, CoreAudio, IOKit, CoreFoundation, CoreVideo, AudioUnit. You may use the CMake helper in CMake/LinkToWasabi.cmake (e.g. link_target_to_wasabi(wasabi_test "<PATH_TO_WASABI>") in your cmake file) to automatically link to the engine.

#include "Wasabi/Wasabi.hpp"

class MyApplication : public Wasabi {
public:
    WError Setup() {
        // start the engine
        WError status = StartEngine(640, 480);
        if (!status) {
            // Failed to start the engine...
            return status;
        }
        return status;
    }
    bool Loop(float fDeltaTime) {
        return true; // return true to continue to next frame
    }
    void Cleanup() {
    }
};

Wasabi* WInitialize() {
    return new MyApplication();
}

To start the engine, you need to implement the function WInitialize and make it return a new instance of a class that implements the Wasabi abstract class (in this case MyApplication).

MyApplication must implement 3 functions from Wasabi: Setup, Loop and Cleanup:

  • Setup(): All application setup code goes here. You will need to call StartEngine(width, height) here. StartEngine() creates the window and initializes the engine's resources. You shouldn't create any Wasabi objects (WObject, WGeometry, WImage, etc...) before calling StartEngine().
  • Loop(): This function is called every frame. This is where you update your application.
  • Cleanup(): This is called before the engine exits so you can cleanup resources.

Resources

Contribution

Contribution is highly appreciated! Please pick up or create an issue first. Once an issue has been selected and you wish to address it, fork the repository and create a branch to implement the necessary changes. Once you're done and you have tested your changes, submit a pull request and it shall be reviewed shortly and hopefully merged into the repository.

Acknowledgments

License

GNU Public license, feel free to go wild with this.

wasabi's People

Contributors

hasan-jawaheri 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.