Infinideastudio / NEWorld

NEWorld is a free game with similar game rules to Minecraft.
116 stars 29 forks source link

是否能考虑NEWorld跨平台 #5

Closed riteme closed 8 years ago

riteme commented 8 years ago

目前NEWorld是使用OpenGL来渲染的,个人觉得因该可以跨平台的。
有计划使NEWorld能多平台编译吗?

HydroH commented 8 years ago

恭喜你再次提出了一个千古难题……

riteme commented 8 years ago

恭喜你再次提出了一个千古难题……

我简单尝试了一下,似乎小问题还很多诶...是当初写的时候就没有考虑吗...

感觉网络部分好像比较麻烦......

taxerap commented 8 years ago

只能说:计划是有的。

DWVoid commented 8 years ago

现在某些部分平台依赖严重(比如某人的Netycat,不用vs都编译不了),以及最难解决的OpenGL与OpenGLES的转换问题,需要将底层函数通过类封装,方便跨平台代码的管理(会牺牲性能,但是没用办法)

在 2016-03-17 11:06:35,NPCTheSBest notifications@github.com 写道:

只能说:计划是有的。

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

ghost commented 8 years ago

目前正在研究在Mac上编译NW。Netycat用了Winsock,这个必须要改写。另外的GLFW、OpenAL、freetype是跨平台的,但是头文件位置不同平台不一样。ModLoader中需要增加UNIX动态库支持。

DWVoid commented 8 years ago

@DLaboratory 不是说桌面版,最大的市场其实是移动版。话说你那个准备什么时候整理?好了告诉我一声,水的方块渲染要重写了,而且不加tile光用bud的流动速度也太快了

ghost commented 8 years ago

@DREAMWORLDVOID 我觉得如果想要跨硬件平台,最好应该使用封装好的图形渲染库,比如Ogre3D、Irrlicht,纯裸的OpenGL不是长远之计,想要DirectX/OpenGL ES就懵逼了。

DWVoid commented 8 years ago

然而NW的一大特点就是直接调用底层提高效率。我的意思是针对不同平台做简单封装,而不是用库,毕竟NW的模型都是实时生成的,库更新模型一秒几十个会死人的。况且,NW计划的图形支持是OpenGL/OpenGLES3

在 2016-03-18 18:15:39,"D Laboratory" notifications@github.com 写道:

@DREAMWORLDVOID 我觉得如果想要跨硬件平台,最好应该使用封装好的图形渲染库,比如Ogre3D、Irrlicht,纯裸的OpenGL不是长远之计,想要DirectX/OpenGL ES就懵逼了。

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

ghost commented 8 years ago

@DREAMWORLDVOID 好吧,要搞一个平台封装。

ascchrvalstr commented 8 years ago

图形库的问题已经解决了,网络也容易解决,最主要的还是编写人员的素质问题。。。毕竟有的人喜欢这个有的人喜欢那个。。。

ascchrvalstr commented 8 years ago

先修复那一大堆bug再考虑跨平台的事情

ghost commented 8 years ago

经过了一晚上的疯狂调试、尝试、修改、错误、修改、尝试、错误、尝试、修改、错误、……,我现在终于能够说,在Mac OS X上,除了Netycat和OpenAL外,所有不涉及这两个模块的代码都能通过clang++的编译了!

dlaboratorydeMacBook-Air:source dlab$ for i in *.cpp; do echo '=========='; echo $i; clang++ -std=c++11 -c -w $i -DNEWORLD_GAME -DNEWORLD_TARGET_MACOSX -framework OpenGL -I /usr/local/include -I /usr/local/include/freetype2; done
==========
AudioSystem.cpp
In file included from AudioSystem.cpp:1:
./AudioSystem.h:2:10: fatal error: 'AL/ALDevice.h' file not found
#include <AL/ALDevice.h>
         ^
1 error generated.
==========
BlockFuncs.cpp
==========
Chunk.cpp
==========
ChunkPtrArray.cpp
==========
ChunkRenderer.cpp
==========
Definitions.cpp
==========
Effect.cpp
==========
Frustum.cpp
==========
FunctionsKit.cpp
==========
GLProc.cpp
==========
GUI.cpp
In file included from GUI.cpp:4:
./AudioSystem.h:2:10: fatal error: 'AL/ALDevice.h' file not found
#include <AL/ALDevice.h>
         ^
1 error generated.
==========
GameView.cpp
In file included from GameView.cpp:15:
In file included from ./Menus.h:4:
./AudioSystem.h:2:10: fatal error: 'AL/ALDevice.h' file not found
#include <AL/ALDevice.h>
         ^
1 error generated.
==========
Globalization.cpp
==========
HeightMap.cpp
==========
Hitbox.cpp
==========
Items.cpp
==========
Menus.cpp
In file included from Menus.cpp:1:
In file included from ./Menus.h:4:
./AudioSystem.h:2:10: fatal error: 'AL/ALDevice.h' file not found
#include <AL/ALDevice.h>
         ^
1 error generated.
==========
NEWorld.cpp
In file included from NEWorld.cpp:9:
./AudioSystem.h:2:10: fatal error: 'AL/ALDevice.h' file not found
#include <AL/ALDevice.h>
         ^
1 error generated.
==========
Network.cpp
In file included from Network.cpp:1:
./Network.h:6:10: fatal error: 'Netycat\include\Netycat\Netycat.h' file not found
#include <Netycat\include\Netycat\Netycat.h>
         ^
1 error generated.
==========
OnlinePlayer.cpp
==========
Particles.cpp
==========
Player.cpp
==========
RandGen.cpp
==========
Renderer.cpp
==========
Setup.cpp
==========
Shader.cpp
==========
ShadowMaps.cpp
==========
TextRenderer.cpp
==========
Textures.cpp
==========
World.cpp
==========
WorldGen.cpp
==========
WorldRenderer.cpp
==========
linearrand.cpp
==========
linearrand.unittest.cpp
==========
mersenne.cpp
==========
mersenne.unittest.cpp
taxerap commented 8 years ago

目前已有跨平台的计划并且已经开始实施