Giter VIP home page Giter VIP logo

dspbptk's Introduction

DSP Blueprint Toolkit

项目开发中,以下内容仅供参考

简介

这是一个蓝图解码/编码库,用于处理游戏戴森球计划中的工厂蓝图。

特点

  1. 纯C语言编写,且代码经过高度优化,解析全球蓝图仅用时0.025秒(游戏里点一下得卡好几秒)
  2. 全缓冲,编解码过程除了blueprint_t内部无动态内存分配
  3. 多线程友好,每个编解码器的内存空间独立

开发计划

  1. 计划支持Python API,具体实现还在探索中

使用

  1. 添加头文件
#include "lib/libdspbptk.h"
  1. 使用前需要先初始化编解码器
dspbptk_coder_t coder;
dspbptk_init_coder(&coder);
  1. 调用编码/解码函数。
blueprint_t blueprint;
blueprint_decode(&coder, &blueprint, string/*blueprint code*/);
// Edit blueprint here.
blueprint_encode(&coder, &blueprint, string_edited/*blueprint code edited*/);
  1. 使用结束后必须释放编解码器和蓝图
dspbptk_free_blueprint(&blueprint);
dspbptk_free_coder(&coder);

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.