icebergthings / vm-76 Goto Github PK
View Code? Open in Web Editor NEW大概是一个沙盒游戏
License: GNU Affero General Public License v3.0
大概是一个沙盒游戏
License: GNU Affero General Public License v3.0
这个玩意貌似重写开工了
当初干嘛用float呢?浪费一倍的内存,效果还不一定有int好。
虽然是这么说的,但是float现在哪里不好了?
N卡和I卡都会炸。下面是I卡的调试记录。
Starting program: Y:\my\project76\VMGS\VMGS.exe
[New Thread 10480.0x2244]
[New Thread 10480.0x1c4c]
[New Thread 10480.0x5f4]
[New Thread 10480.0x22b4]
[12:33:16][VMGS][main] Hello! This is VM76. Nice to meet you!
[12:33:16][VMDE][init_engine] initializing the engine
[12:33:16][VMDE][init_engine] The system is little-endian.
[New Thread 10480.0x1fa4]
[New Thread 10480.0x164]
[Thread 10480.0x1fa4 exited with code 0]
[Thread 10480.0x164 exited with code 0]
[New Thread 10480.0x30a0]
[New Thread 10480.0x2860]
[New Thread 10480.0x209c]
[New Thread 10480.0x9dc]
[Thread 10480.0x2860 exited with code 0]
[Thread 10480.0x209c exited with code 0]
[Thread 10480.0x9dc exited with code 0]
[Thread 10480.0x30a0 exited with code 0]
[12:33:18][VMDE][glfw_error_callback] GLFW error 65543: WGL: Failed to create OpenGL context
[New Thread 10480.0x3544]
[New Thread 10480.0x1f68]
[New Thread 10480.0x2ccc]
[New Thread 10480.0x2b30]
[12:33:18][VMDE][init_graphics] OpenGL API: 3.3
[12:33:18][VMDE][init_graphics] UBO: GL33 Uniform Buffer Object
[12:33:18][VMDE][GL_info] ==========================
[12:33:18][VMDE][GL_info] OpenGL Info:
[12:33:18][VMDE][GL_info] Supproted GL Version 3.3
[12:33:18][VMDE][GL_info] ==========================
[12:33:18][VMDE][GL_info] Maximum vertex attributes: 16
[12:33:18][VMDE][GL_info] Maximum vertex output components: 128
[12:33:18][VMDE][GL_info] Maximum fragment shader storage blocks: 128
[12:33:18][VMDE][GL_info] Maximum texture size: 16384
[12:33:18][VMDE][GL_info] Maximum texture unit: 16
[12:33:18][VMDE][GL_info] ==========================
[New Thread 10480.0x11dc]
[New Thread 10480.0x2164]
[12:33:18][VMDE][init_engine] initialized the engine
[12:33:18][VMDE][Texture] Texture is loaded from ../Media/Font.bmp to texture unit
[12:33:18][VMDE][check_shader_compilation]
[12:33:18][VMDE][check_shader_compilation]
[12:33:18][VMDE][check_linkage]
[12:33:19][VMDE][Texture] Texture is loaded from ../Media/terrain.png to texture unit
[12:33:19][VMDE][Map] Init map with size 4, 4, 4 in chunk size 64
[12:33:19][VMDE][read_map] Reading map
[12:33:19][VMDE][generate_V1] Start generating maps, 256 x 256 x 256
[12:33:19][VMDE][generate_V1] Generated 0% (0 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 8% (1376256 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 16% (2752512 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 24% (4128768 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 32% (5505024 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 41% (6881280 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 49% (8257536 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 57% (9633792 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 65% (11010048 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 73% (12386304 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 82% (13762560 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 90% (15138816 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 98% (16515072 / 16777216)
[12:33:19][VMDE][generate_V1] Generated 100%, Complete
[12:33:19][VMDE][Map] Baking Chunks: 0% (0 / 64)
[12:33:20][VMDE][Map] Baking Chunks: 25% (16 / 64)
[12:33:20][VMDE][Map] Baking Chunks: 50% (32 / 64)
[12:33:20][VMDE][Map] Baking Chunks: 75% (48 / 64)
[12:33:21][VMDE][Map] Baking Chunks: 100%, map initialized
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_linkage]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_linkage]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_linkage]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_linkage]
[12:33:21][VMDE][RenderBuffer] Creating Render Buffer of 860 x 540
[12:33:21][VMDE][Texture] Texture is loaded from ../Media/skybox.png to texture unit
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_shader_compilation]
[12:33:21][VMDE][check_linkage]
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x0041c5ba in RenderBuffer::bind (this=0xb78e318) at ../VMDE/global.hpp:338
#2 0x0041b21d in VM76::EditorMainScene::render (this=0x84e990) at Y:\my\project76\VMGS\Scene\EditorMainScene.cpp:180
#3 0x0041d716 in VM76::SceneManager::render_scene () at Y:\my\project76\VMGS\Scene\scene.cpp:27
#4 0x0040176e in VM76::loop () at Y:\my\project76\VMGS\main.cpp:30
#5 0x004018f5 in VM76::start_game () at Y:\my\project76\VMGS\main.cpp:48
#6 0x00401abc in main (argc=1, argv=0x841690) at Y:\my\project76\VMGS\main.cpp:68
(gdb)
近期我在自己的电脑上改动了一下库的路径,不过这应该没什么关系。
待解决讨论之事,包括设计问题。随时可以补充。
# @bobcao3 Cryst这种协作项目那边其实也可以开一个这样的issue玩
↑ 那个 # 被当成一级标题一直没被发现
如你所见,我们目前的渲染结构还算干净,做Vulkan支持应该不算复杂。我们只需要更高一级的抽象。在基本渲染原理上,包括顶点缓冲啥的Vulkan和OpenGL没啥区别,最大的区别在于渲染drawcall的API上。我认为Vulkan的异步能力对我们是很有用的
e.g. 实现一个pascal支持(gcc太复杂了玩不起
比如enum TileList、namespace Audio、namespace VM76、#include "Tiles/tiles.hpp"……
如果嫌烦的话就叫一句“采用Ruby的”就好了,这样的话我就能把TileList光明正大地改成TileType了。
RT
“还是每个系统独立Makefile比较好” c6f1ff8
* 我开issue是因为我这里网络差
发现现在这个模型太不灵活了,引擎没起引擎的大作用(
主要问题在于太多硬编码的东西,也不灵活
正在考虑的新的渲染模型:
指令缓冲自生是一段编译完成的ASM76代码(或者说直接堆struct机器码),然后渲染调用指令用VM76尚未实现的BIOS功能来实现。参照Unity3D的渲染指令数量,这个不会是巨大工程
然后直接使用原来的XX::Draw的指令理论保持可用,但推荐把所有的渲染指令放进缓冲来降低以后
多线程支持的难度(现有的我尝试过多线程,lock复杂到想吃屎,然后根本没起多线程作用)
那么如何渲染呢?
让它尽量可配置化,其它的明天再补充xd
在做寒假作业的间隙悄悄咪咪溜出来讨论一下ASM76。
刚修好一个崩溃的bug(3052e256def3bff7ba701214460052be74899524,还是用逐行打mark和log的方法搞定的,不得不说这mark太好使了),结果还是不能正常运行。
log是正常的。
Y:\project76>mingw32-make run
cd VMDE && mingw32-make -f build/msw.makefile
mingw32-make[1]: Entering directory 'Y:/project76/VMDE'
mingw32-make[1]: Nothing to be done for 'all'.
mingw32-make[1]: Leaving directory 'Y:/project76/VMDE'
cd VMGS && mingw32-make -f build/msw.makefile
mingw32-make[1]: Entering directory 'Y:/project76/VMGS'
mingw32-make[1]: Nothing to be done for 'all'.
mingw32-make[1]: Leaving directory 'Y:/project76/VMGS'
cd VMGS && VMGS.exe
[20:18:10][VMGS][main] Hello! This is VM76. Nice to meet you!
[20:18:10][VMDE][init_engine] initializing the engine
[20:18:11][VMDE][glfw_error_callback] GLFW error 65543: WGL: Failed to create OpenGL context
[20:18:11][VMDE][init_graphics] OpenGL API: 3.3
[20:18:11][VMDE][init_graphics] UBO: GL33 Uniform Buffer Object
[20:18:11][VMDE][GL_info] ==========================
[20:18:11][VMDE][GL_info] OpenGL Info:
[20:18:11][VMDE][GL_info] Supproted GL Version 3.3
[20:18:11][VMDE][GL_info] ==========================
[20:18:11][VMDE][GL_info] Maximum vertex attributes: 16
[20:18:11][VMDE][GL_info] Maximum vertex output components: 128
[20:18:11][VMDE][GL_info] Maximum fragment shader storage blocks: 128
[20:18:11][VMDE][GL_info] Maximum texture size: 16384
[20:18:11][VMDE][GL_info] Maximum texture unit: 16
[20:18:11][VMDE][GL_info] ==========================
[20:18:11][VMDE][init_engine] initialized the engine
[20:18:11][VMDE][Texture] Texture is loaded from ../Media/terrain.png to texture unit
[20:18:28][VMGS][terminate] starting to terminate
[20:18:28][VMDE][terminate_engine] engine terminated
[20:18:28][VMGS][terminate] terminated successfully
Y:\project76>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.