Git Product home page Git Product logo

shooting-star's Introduction

Shooting Star

Outline

A small frontend framework for game development. This framework is supported on Windows and Linux.

Quick Start

Install dependencies:

  • Linux
    • X11
    • vulkan
  • Windows
    • user32
    • xinput
    • vulkan-1

Create a project with Cargo. Then, add a following line to Cargo.toml:

[dependencies]
sstar = { version = "0.1.9", features=["with-default-shaders"] }

Write main.rs as follow (this is a program that creates a window and clears it default color):

use sstar::app::SStarApp;

fn main() {
    let mut app = SStarApp::new("Sample Program", 640.0, 480.0, 10);
    while app.update() {
        app.flush();
    }
    app.terminate();
}

Vertex Shader Interface

If you use a custom vertex shader, you should use following definitions:

#version 450

layout(push_constant) uniform PushConstant {
    vec4 scl;
    vec4 rot;
    vec4 trs;
    vec4 col;
    vec4 uv;
    ivec4 param;
} constant;

layout(binding=0) uniform UniformBuffer {
    mat4 view;
    mat4 perse;
    mat4 ortho;
};

layout(location=0) in vec3 in_pos;
layout(location=1) in vec2 in_uv;

License

This software (shooting-star) is published under the CC0 public domain. However, some dependencies may be linked when building an app using this software. See LICENSE-ALL in detail.

shooting-star's People

Contributors

tengu712 avatar

Stargazers

rai avatar

Watchers

 avatar

shooting-star's Issues

第一回プロジェクト整理

必要に応じて

  • VulkanAppを構造化する
  • ファイルを構造化する
  • UMLを描く
  • constにできるところはconstにする
  • skd_プレフィックスを消す

カメラを切り替える

所詮UI用の平行投影カメラとworld用の透視投影カメラの二つしかいらないので、uniform bufferを二つ作るのが良さそう。
uniform bufferの切り替えは、ModelData::paramかDescriptorSetで(どうせimage textureを切り替えるので)。

ライセンス関連

このリポジトリ内の「コード」はパブリックドメインとして良いので、Releaseを出す場合のみ問題になる。ユーザがぼくだけにしても、これを利用してゲームを作り、それを頒布するときに必要なので。

フレームワーク化

ゲームロジック以外の部分を提供するプロジェクトとする。ゲームロジックは、規定の関数を持ったdllあるいはsoを動的にロードする。

コードの保守性のためにABIはcdeclとする。

画像を切り替える

今のところ良い方法がわからない。rendering objectの数だけdescriptor setを作っても良いが、動的確保のコスト次第。少しでも負荷を軽減するために、予めrendering objectの個数分poolを確保するが、使いまわせなくなったらsetを作ると良いか。

キー入力

マウスはなくていい。コントローラーの入力はボタンだけ対応するアクシスも対応する。

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.