Code Monkey home page Code Monkey logo

lixizhi / nplruntime Goto Github PK

View Code? Open in Web Editor NEW
266.0 266.0 80.0 244.27 MB

NPL - Neural Parallel Language

Home Page: https://paracraft.cn

License: GNU General Public License v2.0

CMake 0.79% C 44.79% C++ 47.92% Shell 0.74% Objective-C 0.05% Batchfile 0.09% C# 0.64% Lua 1.29% HLSL 0.37% Makefile 1.64% M4 0.88% Perl 0.06% Assembly 0.13% Awk 0.01% DIGITAL Command Language 0.38% GLSL 0.03% Objective-C++ 0.01% Roff 0.01% NSIS 0.14% Python 0.05%
lua npl paracraft programming-language tatfook

nplruntime's People

Contributors

bbksoft avatar chenjinxian avatar darrengzy avatar devilwalk avatar hetter avatar hyz1992 avatar imfoollink avatar jinganglang0013 avatar kkvskkkk avatar lipengg avatar liuluheng avatar lixizhi avatar onedou avatar onedus avatar quanwei1992 avatar sleepingbuffer avatar tatfookpbb avatar winless avatar wxaxiaoyao avatar xuntian avatar zhangleio avatar zhiyuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nplruntime's Issues

NSI script optimize

  • add npl.bat and npls.bat as in ParaCraftSDK that reference the paraengineclient.exe.
  • can we add an option in nsi UI to check if we want to install to ENV path (check by default)
  • add two program file links for NPL: github wiki web link and npl.bat (which will start the local NPL code wiki site)
  • display license file for NPL runtime in installer. Either one is fine.

Get Block Id and Data in one C api

optimize the BlockEngine:GetBlockFull(x,y,z) function.

We do the following:

  • create a C++ function that returns block_id, block_userdata in one call, such as BlockRegion::GetBlockFullDataByIndex in BlockRegion.cpp
  • create a C function and add it using ParaEngineFFI in NPL. When ffi is not available, it can fall back to two calls to standard functions.

this is how to return multiple values in ffi:

隐藏一种类型的方块

支持一个可以隐藏某类型方块的接口

只隐藏方块本身的显示,其余逻辑保持原本的样子

思路:
1.将BlockTemplate临时设置为transparent & invisible
2.rebuild all renderable chunks to take effect.
3.better remove aabb for mouse picking

@kkvskkkk

自动化lua bind实现

通过使用python+clang分析c++代码, 自动化的生成Lua bing代码

实现目标

  1. 开发人员实现功能的时候, 绝大部分情况下不需要考虑lua bind的事情(部分特殊优化例如ffi代码需要手工实现lua bind)
  2. 减少模版的使用, 降低exe文件大小
  3. 生成的lua bind代码完全基于luabind, 保持对现有的规则兼容
  4. 透明化包装类, 甚至减少包装类用lightuserdata来实现各种功能
  5. 更高效的转换c++ struct和各种std对象, 尽量避免userdata的使用

centos 7 64编译NPLRuntime报错。NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp:423:21: error: ambiguous overload for ‘operator=’ (operand types are ‘std::string {aka std::basic_string<char>}’。

以前都没遇到过的,今天编译试了2台centos 7 都有如下错误?
[ 26%] Building CXX object ParaEngineServer/CMakeFiles/ParaEngineServer.dir/root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp.o
/root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp: In member function ‘virtual bool ParaEngine::CParaEngineAppBase::LoadNPLPackage(const char*, std::string*)’:
/root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp:423:21: error: ambiguous overload for ‘operator=’ (operand types are ‘std::string {aka std::basic_string}’ and ‘NPL::NPLObjectProxy’)
*pOutMainFile = sMainFile;
^
/root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp:423:21: note: candidates are:
In file included from /usr/include/c++/4.8.2/string:52:0,
from /root/NPLRuntime/NPLRuntime/ParaEngineServer/../../Client/trunk/ParaEngineClient/Core/PEtypes.h:530,
from /root/NPLRuntime/NPLRuntime/ParaEngineServer/../../Client/trunk/ParaEngineClient/renderer/RenderCore.h:7,
from /root/NPLRuntime/Client/trunk/ParaEngineClient/Core/Platforms.h:7,
from /root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngine.h:2,
from /root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp:8:
/usr/include/c++/4.8.2/bits/basic_string.h:546:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]
operator=(const basic_string& __str)
^
/usr/include/c++/4.8.2/bits/basic_string.h:565:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]
operator=(_CharT __c)
^
/usr/include/c++/4.8.2/bits/basic_string.h:580:7: note: std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::operator=(std::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]
operator=(basic_string&& __str)
^
/usr/include/c++/4.8.2/bits/basic_string.h:580:7: note: no known conversion for argument 1 from ‘NPL::NPLObjectProxy’ to ‘std::basic_string&&’
make[2]: *** [ParaEngineServer/CMakeFiles/ParaEngineServer.dir/root/NPLRuntime/Client/trunk/ParaEngineClient/Core/ParaEngineAppBase.cpp.o] Error 1
make[1]: *** [ParaEngineServer/CMakeFiles/ParaEngineServer.dir/all] Error 2
make: *** [all] Error 2
~/NPLRuntime

NPL.load() 不能加载.npl

例如:
local a = NPL.load('a');
有文件 npl_mod/a/a.npl
无法加载此文件。
如果将 a.npl 改为 a.lua,则正常。

视频输出插件变为可按照MOD

Just moved movie codec here:

Make this a mod project to be uploaded to mods site in keepwork.com
the mod should be an install once mod, meaning that it is loaded only on demand by the C++ engine.

I think it should be a special mod zip file like
Mod/MovieCodecPlugin.zip
Once loaded as an ordinary mod, it will deploy itself and then unload and disabled.

ModBase:SetEnabled(false)
ModBase:ExtractMod()
ModBase:CheckVersion()

read/write compressed XML file

some xml movie entity file in paracraft can be as large as 1-4MB, which is too large for our git cloud.
The C++ version of ParaIO. read /write xml may optionally support (de)compressing the xml file into zip file without changing the extension.

The reader code can automatically detect if xml is compressed or not. So all we need to change is the npl writer code in Paracraft.

buffer picking 返回结果

应用buffer picking 返回的结果是一个整型数据集合。而常规拾取本身期望能获取鼠标当前选中的场景中的对象。

调用代码:
NPL.load("(gl)script/ide/System/Scene/BufferPicking.lua");
local BufferPicking = commonlib.gettable("System.Scene.BufferPicking");
local result = BufferPicking:Pick(nil, nil, 2, 2);

合并pr#109,Assimp update之后fbx动画读取不正确

  • Assimp update (#109)

  • update physics interface

  • db support non-ascii code path

  • Revert "db support non-ascii code path"

This reverts commit 3abf77c.

  • FBX particle/UV exporter

  • update physics

  • resolve conflicts

  • update server make list

  • Revert "update server make list"

This reverts commit e363f8f.

  • update server make list

  • fix compile error

  • Revert "fix compile error"

This reverts commit 47dd78d.

  • Revert "update server make list"

This reverts commit 0c62de8.

  • Revert "update physics"

This reverts commit 1420d0d.

  • Revert "FBX particle/UV exporter"

This reverts commit 548ab0f.

  • Revert "update physics interface"

This reverts commit 72546e5.

  • add GetField2

None default Value, it is faster then GetField

  • add GetField2

  • optimised CAttributeClass

  • return nil if get value fails

  • BlockRegion supported compressed file

  • xml reader supported read zip file

  • xml reader supported read zip file

  • add ZipAddData

  • fix ZipAddData bug

  • fix ZipAddData bug

  • update ZipAddData

  • BMaxParser support read zip file

  • edit box supported align text

  • update fbx

  • fix compile error

  • update offsetworld command

  • optimize BlockEngine:GetBlockFull

  • fixe compile error

  • skip unsupported property

  • fix compile error

  • update assimp

  • update assimp

  • update assimp

  • update assimp

  • delete unused files

Support HTTP2 protocol

  • https://en.wikipedia.org/wiki/HTTP_pipelining
    NPL 支持在一个TCP上跑多个协议的。 @陈鎏 你如果感兴趣, 可以考虑用NPLRuntime C++ to support HTTP2's HPACK, Multiplexing, binary等几个重要功能. 其实NPL目前的协议已经部分实现了HPACK和binary zip compression.

see also :

这个是http2的设计:

  • Client--》Server 用32位的奇数
  • Server--》Client 用32位的偶数 = 奇数 + 1

这个设计主要是HTTP2 有一个设计是Server Push就是可以预测Client的请求, 主动将数据推送给Client。 比如你访问了index.html, Server预测你一定会需要index.css, 那么Server会主动Push数据给Client. 不需要Client发任何请求

升级assimp库

最近发现越来越多的fbx文件 读取时有兼容问题, 升级一下assimp看能不能解决这些问题

NPL Message ID Mapping Should be Automatic

// we expect all remote NPL runtime's public file list mapping to be identical
int file_id = m_msg_dispatcher.GetIDByPubFileName(file_name.sRelativePath);

这个设计感觉限制性很强啊
LiXizhi 9/27/2016 6:33:56 PM
嗯 这个我一直希望改改。 在建立连接时,同步一下这个表。
刘世峰 9/27/2016 6:34:03 PM
既然都用文件名作publicfile了,为什么不在远程机器上直接激活文件名呢
不需要同步啊 两边各自用各自的表就好了
LiXizhi 9/27/2016 6:34:32 PM
对 是可以做到的。
刘世峰 9/27/2016 6:34:44 PM
双方只需要知道自己关心的那个文件名就好了
相当于一个接口名
LiXizhi 9/27/2016 6:35:07 PM
是这样的, 为了节约带宽, 实际传的是ID。
发送方需要知道接收方的ID是什么
刘世峰 9/27/2016 6:36:03 PM
传id的限制太大了 两边的上层逻辑不一定一样 那么很可能id就对不上
LiXizhi 9/27/2016 6:36:56 PM
我在设计时, 是希望自动同步ID的。 但是后来一直没有做这里。
刘世峰 9/27/2016 6:37:09 PM
就直接传文件名,每次浪费几十个字节 应该影响不大吧
LiXizhi 9/27/2016 6:37:10 PM
所以NPL的代码中, 你是看不到ID的。
刘世峰 9/27/2016 6:38:02 PM
嗯 自动同步倒也是可以解决问题
LiXizhi 9/27/2016 6:38:52 PM
还是尽量省一点。
刘世峰 9/27/2016 6:39:27 PM
嗯 也是 毕竟每个message都有这部分

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.