etorth / mir2x Goto Github PK
View Code? Open in Web Editor NEWopen source MMORPG game
open source MMORPG game
When I compile it in the Mac13.0 environment, I am prompted with an error:
【clang-11: error: unknown argument: '-fcoroutines'】
How can I resolve this error
[ 31%] Built target mir2x_3rds
[ 32%] Building CXX object common/src/CMakeFiles/common.dir/colorf.cpp.o
clang: fatal error: unknown argument: '-fcoroutines'
make[2]: *** [common/src/CMakeFiles/common.dir/build.make:63:common/src/CMakeFiles/common.dir/colorf.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1189:common/src/CMakeFiles/common.dir/all] 错误 2
make: *** [Makefile:152:all] 错误 2
root@wikeyi-Parallels-Virtual-Platform:/mir2x/b# gcc -v20.04' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.2.0-5ubuntu1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Ubuntu 10.2.0-5ubuntu1~20.04)
After clicking "Server-> Launch"
Failed to load mapbindbn. Is there some map preparation needed?
Log:
2019/10/13 10:01:31 772788 INFO [monoserver.cpp->CreateDBConnection:223] Connect to SQLite3 Database (mir2x) successfully
2019/10/13 10:01:31 773379 WARNING [monoserver.cpp->LoadMapBinDBN:241] Failed to load mapbindbn
2019/10/13 10:01:31 773482 INFO [actorpool.cpp->Launch:638] Actor thread 0 launched
is topic
CMake Error at /mir2x/build/phmap-prefix/src/phmap-stamp/phmap-build-.cmake:49 (message):
Command failed: 2
'make'
See also
/mir2x/build/phmap-prefix/src/phmap-stamp/phmap-build-*.log
phmap-build-err.log:
/usr/bin/ld: CMakeFiles/ex_mt_word_counter.dir/examples/mt_word_counter.cc.o: in function main': mt_word_counter.cc:(.text.startup+0x743): undefined reference to
pthread_create'
/usr/bin/ld: mt_word_counter.cc:(.text.startup+0xd06): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[5]: *** [CMakeFiles/ex_mt_word_counter.dir/build.make:97:ex_mt_word_counter] 错误 1
make[4]: *** [CMakeFiles/Makefile2:1067:CMakeFiles/ex_mt_word_counter.dir/all] 错误 2
make[3]: *** [Makefile:146:all] 错误 2
在编译的时候,需要依赖libpinyin,通过client目录下的CMakeLists.txt中的注释,我clone了libpinyin,并进行编译,但是后面make的时候出现找不到glib.h,我添加了glib-2.0,但是后面仍旧提示包含头文件错误,我的libpinyin或者glib库版本有问题?大佬能否告知应该选择那个版本的libpinyin或者glib库?
这是我的报错信息:
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
from /usr/include/glib-2.0/glib.h:32,
from /usr/local/libpinyin/include/libpinyin-2.8.1/novel_types.h:29,
from /usr/local/libpinyin/include/libpinyin-2.8.1/pinyin.h:26,
from /mnt/f/Dev/mir2x/client/src/ime.cpp:8:
/usr/include/glib-2.0/glib/gtypes.h:34:10: fatal error: glibconfig.h: No such file or directory
34 | #include <glibconfig.h>
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [client/src/CMakeFiles/client.dir/build.make:566: client/src/CMakeFiles/client.dir/ime.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1369: client/src/CMakeFiles/client.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Hi,
It seems that my platform perhaps requires an extra package check statement to properly link the SDL2 libraries. Without it, SDL2_INCLUDE_DIRS
and SDL2_LIBRARIES
are empty:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c822ad33..ef87d3c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,6 +136,7 @@ IF(WIN32)
FIND_PACKAGE(FreeType REQUIRED)
ELSE()
FIND_PACKAGE(SDL2 REQUIRED)
+ pkg_check_modules(SDL2 REQUIRED sdl2)
ENDIF()
MESSAGE(STATUS "SDL2 found: SDL2_INCLUDE_DIRS: ${SDL2_INCLUDE_DIRS}, SDL2_LIBRARIES: ${SDL2_LIBRARIES}")
可以给个联系方式吗?可以合作不?
I build the repo source code on Ubuntu 20.04 successfully. Then I run client --server-ip=192.9.241.118
. However, the client is always displayed "[000%]root/texture/**DB". Am I probably doing something wrong at any step?
Hello, when i try to git clone the code, it says "This repository is over its data quota.Account responsible for LFS bandwidth should purchase more data packs to restore access"
Could you give an another way to download the gif and map resource files?
Thanks~
需要sudo apt install libsdl2-gfx-dev
不然缺少/SDL2/SDL2_gfxPrimitives.h
Have you considered supporting mac os?
How often will the public beta version of the exe be available for download
Can you make more documents to help me get started?
Hello, Etorth,
Thanks for your good project. i installed and started the game, but after learning "治愈术",the client crashed, then i cannot not login in any more via 'test' account , any idea about the issue?
"Caught exception: In file skillboard.cpp:528, function: setMagicLevel: no magic icon for magic: 治愈术
hello bro, can u give me a contact. i need to some helps
I suppose this is a simple dependency issue, but I didn't found what is missing, can you help me ?
[ 32%] No install step for 'sol2' [ 33%] Completed 'sol2' [ 33%] Built target sol2 Scanning dependencies of target mir2x_3rds [ 33%] Built target mir2x_3rds Scanning dependencies of target common [ 33%] Building CXX object common/src/CMakeFiles/common.dir/colorf.cpp.o c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: *** [common/src/CMakeFiles/common.dir/build.make:63: common/src/CMakeFiles/common.dir/colorf.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1111: common/src/CMakeFiles/common.dir/all] Error 2 make: *** [Makefile:152: all] Error 2
[ 62%] Building CXX object server/src/CMakeFiles/monoserver.dir/actormonitortable.cpp.o
In file included from /home/make/500GB/mir3.git.all/mir2x/server/src/podmonitortable.hpp:25,
from /home/make/500GB/mir3.git.all/build/server/src/podmonitorwindow.hpp:7,
from /home/make/500GB/mir3.git.all/mir2x/server/src/actormonitortable.cpp:27:
/home/make/500GB/mir3.git.all/mir2x/server/src/fltableimpl.hpp:21:10: 致命错误:Fl/Fl_Table_Row.H:没有那个文件或目录
21 | #include <Fl/Fl_Table_Row.H>
| ^~~~~~~~~~~~~~~~~~~
编译中断。
查了下
有
fltk /usr/include/FL/Fl_Table_Row.H
...这cmake生成的文件看不明白。
Server is started, client fails, and I must confess I do not understand the reason.
~/GitHub/mir2x/b/install/client$ ./client * This is the initialization of Log functionality * For info/debug/warning/fatal messages. * Log file: [/tmp/mir2x-client-v01.g3log.20210113-161520.log] * Log functionality established! * All messges will be redirected to the log after this line X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 152 (GLX) Minor opcode of failed request: 3 (X_GLXCreateContext) Value in failed request: 0x0 Serial number of failed request: 100 Current serial number in output stream: 101 g3log g3FileSink shutdown at: 16:15:20 713983 Log file at: [/tmp/mir2x-client-v01.g3log.20210113-161520.log] ~/GitHub/mir2x/b/install/client$ cat /tmp/mir2x-client-v01.g3log.20210113-161520.log g3log g3FileSink shutdown at: 16:15:20 713983
我在WSL1中编译,使用的是gcc12.3版本,编译出错,下面是cmake输出,还请大佬指导一下
` In file included from /mnt/f/Dev/mir2x/common/src/luaf.hpp:10,
[build] from /mnt/f/Dev/mir2x/common/src/luaf.cpp:1:
[build] /mnt/f/Dev/mir2x/common/src/strf.hpp: In instantiation of ‘std::string str_any(const T&) [with T = std::variant<luaf::luaNil, std::unordered_map<luaf::luaVarWrapper, luaf::luaVarWrapper, luaf::_details::_luaVarWrapperHash, std::equal_toluaf::luaVarWrapper, std::allocator<std::pair<const luaf::luaVarWrapper, luaf::luaVarWrapper> > >, long long int, double, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >; std::string = std::__cxx11::basic_string]’:
[build] /mnt/f/Dev/mir2x/common/src/strf.hpp:371:94: required from ‘std::string str_any(const std::vector<T, Args ...>&) [with T = std::variant<luaf::luaNil, std::unordered_map<luaf::luaVarWrapper, luaf::luaVarWrapper, luaf::_details::_luaVarWrapperHash, std::equal_toluaf::luaVarWrapper, std::allocator<std::pair<const luaf::luaVarWrapper, luaf::luaVarWrapper> > >, long long int, double, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >; Args = {std::allocator<std::variant<luaf::luaNil, std::unordered_map<luaf::luaVarWrapper, luaf::luaVarWrapper, luaf::_details::_luaVarWrapperHash, std::equal_toluaf::luaVarWrapper, std::allocator<std::pair<const luaf::luaVarWrapper, luaf::luaVarWrapper> > >, long long int, double, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >}; std::string = std::__cxx11::basic_string]’
[build] /mnt/f/Dev/mir2x/common/src/luaf.cpp:232:25: required from here
[build] /mnt/f/Dev/mir2x/common/src/strf.hpp:348:49: error: no match for ‘operator<<’ (operand types are ‘std::stringstream’ {aka ‘std::__cxx11::basic_stringstream’} and ‘const std::variant<luaf::luaNil, std::unordered_map<luaf::luaVarWrapper, luaf::luaVarWrapper, luaf::_details::_luaVarWrapperHash, std::equal_toluaf::luaVarWrapper, std::allocator<std::pair<const luaf::luaVarWrapper, luaf::luaVarWrapper> > >, long long int, double, bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >’)
[build] 348 | return dynamic_cast<std::stringstream &>(ss << t).str();
[build] | ~~~^~~~
[build] compilation terminated due to -Wfatal-errors.`
client
g3log created log at: Tue May 31 11:43:07 2022
LOG format: [YYYY/MM/DD hh:mm:ss uuu* LEVEL FILE->FUNCTION:LINE] message
(uuu*: microseconds fractions of the seconds value)
2022/05/31 11:43:07 638619 INFO [initview.cpp->void InitView::addIVLog(int, const char*, ...):203] [000%]Loading root/texture/itemDB
2022/05/31 11:43:07 638609 INFO [initview.cpp->void InitView::addIVLog(int, const char*, ...):203] [000%]Loading root/texture/progUseDB
2022/05/31 11:43:07 638726 INFO [initview.cpp->void InitView::addIVLog(int, const char*, ...):203] [000%]Loading root/texture/mapDB
server
g3log created log at: Tue May 31 11:49:23 2022
LOG format: [YYYY/MM/DD hh:mm:ss uuu* LEVEL FILE->FUNCTION:LINE] message
(uuu*: microseconds fractions of the seconds value)
2022/05/31 11:49:23 939640 INFO [actorpool.cpp->ActorPool::ActorPool(int, int):78] Server FPS: 10
2022/05/31 11:49:48 447546 INFO [monoserver.cpp->void MonoServer::CreateDBConnection():371] Connect to database mir2x.db3 successfully
2022/05/31 11:49:48 448267 WARNING [main.cpp->int main(int, char**):125] Exception in main thread: std::bad_alloc
Hi,
I'm hitting an error during make
.
In file included from /home/mike/src/Applications/mir2x/client/src/pngtexdb.hpp:24,
from /home/mike/src/Applications/mir2x/client/src/inventoryboard.cpp:19:
/home/mike/src/Applications/mir2x/common/src/zsdb.hpp:76:14: error: ‘FILE’ in namespace ‘std’ does not name a type
76 | std::FILE *m_fp;
| ^~~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [client/src/CMakeFiles/client.dir/build.make:303: client/src/CMakeFiles/client.dir/inventoryboard.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1108: client/src/CMakeFiles/client.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
Arch Linux, amd64.
囧,膜拜~~
// 对于PNG 文件 单个文件压缩是没有意义的,他本身就已经压缩过,所以再压缩反而使文件变大 更让资源加载变的更慢
我个人写了一个大包代码,只是简单的大包成一个文件,测试 proguse.zsdb 比压缩后还小3M
`└─# cat /tmp/mir2x-monoserver-v01.g3log.20211105-095720.log
g3log created log at: Fri Nov 05 09:57:20 2021
LOG format: [YYYY/MM/DD hh:mm:ss uuu* LEVEL FILE->FUNCTION:LINE] message
(uuu*: microseconds fractions of the seconds value)
2021/11/05 09:57:20 936691 INFO [actorpool.cpp->ActorPool:78] Server FPS: 10
2021/11/05 09:57:24 451103 INFO [monoserver.cpp->createDefaultDatabase:360] Create default sqlite3 database done
2021/11/05 09:57:24 451208 INFO [monoserver.cpp->CreateDBConnection:371] Connect to database mir2x.db3 successfully
2021/11/05 09:57:24 461429 WARNING [main.cpp->main:125] Exception in main thread: std::bad_alloc
`
想请教下这两种情况:
情况A: 怪物搜寻附近玩家并主动发起攻击;
情况B: 怪物被玩家攻击后对玩家进行反击。
这两种情况是如何保证在一个线程里完成的呢。
虽然使用mutex很容易实现,但是这种情况下大量进行加锁/解锁,会严重影响程序效率吧。
我看到你的程序中会先从 m_offenderList 里面读取玩家UID,如果没有读取到则从 m_inViewCOList 计算出最近的玩家UID。
我没有搞明白这是如何保证它们在一个线程里面安全执行的
Hello, etorth
There is something wrong about display of npc name, even if i ran the client with --always-draw-name option, there is still no display. also the f'loating damage number is “+58”, “+8” which should be “-58”,“-8”.
could you please give some suggestions about the issue.
my environment is ubuntu os, any font need to be installed?
This repo has used LFG to storage big files.
Do not clone with --recursive that will cause you stuck in "Filtering content ..."
Just clone and pull or lfg pull.
那个二进制文件好像无法下载啊 大佬可否留个QQ 好交流啊
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.