How to make a game on NeL(use the lib or import the project)?

Added by wangxuan2730 almost 4 years ago

I have read the code about NeL a month and a half, Now I want to do a demo on NeL, But I really don't know how to do it,
because I had never done the things like this. And now I have two idea, one is using the NeL lib(How to use it?), the other one is just build the whole project.


Replies (6)

RE: How to make a game on NeL(use the lib or import the project)? - Added by sfb almost 4 years ago

If I'm not mistaken the question isn't how you use the various classes of NeL but how do you incorporate its libraries into your build environment?

If that's the case you offered two suggestions:
  1. Import the project into your solution
  2. Link to the libraries.

The problem with option 1 is that NeL is built via CMake and so the project will not existing unless you have a clone of Ryzom Core checked out and built. The problem with option 2 is having a mechanism to find and link these. My suggestion is to go with option 2. For Tux Target I copied our (Ryzom Cores) external dependencies zip file and added the NeL .lib files and include folder. Then use a CMake project to find all of your dependencies and build your project. This is also the same build system that Ryzom Core uses (and a number of very large and popular open source projects like KDE) so you can always source some help from us.

You have a few options. I started a "shell" project that just displays "Hello World" through NL3D that finds dependencies and links them. It is not as sophisticated as the other NeL-related projects that I use CMake with and may need some work to 'modernize' it. The reality is that Project Shell was being created before Ryzom Core was open sourced. Now that Ryzom Core is open source our direction as a community has changed a little bit and so Project Shell's use and maintenance has been diminished.

Take a look and see how these projects accomplish it without the benefit of being in the Ryzom Core source tree.

Thanks!
sfb
/s

RE: How to make a game on NeL(use the lib or import the project)? - Added by wangxuan2730 almost 4 years ago

sfb

the second and the third can't be downloaded.

I have downloaded the first one , and how to use it(there isn't a sln file in it)? And how to use the Cmake to build the project , I have done this via CMake alone ,but it wrong!

It says :

CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindLibXml2.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:72 (FIND_PACKAGE)

未命名.jpg - 错误情况 (95.9 kB)

RE: How to make a game on NeL(use the lib or import the project)? - Added by sfb almost 4 years ago

Yeah, you'll need the externals and they will need to go into a folder called '3rdParty' one level above the highest level CMakeLists.txt (the root CMakeLists.txt.) For example:

  • C:\Projects
  • C:\Projects\3rdParty
  • C:\Projects\tux-target\CMakeLists.txt

I do this because this "global" 3rd party dependency collection can then be used with any/all of my NeL-based projects. Whenever I update NeL and/or dependencies all of my projects benefit.

One note of caution thuogh is that Neloid uses CEGUI and I have not included a CEGUI built with STLport. It will not compile for you until you do that. I didn't make Neloid easy because I'm the only person who has ever seen it. (=

Thanks,
sfb
/s

(1-6/6)