Giter Club home page Giter Club logo

ember's Introduction

Worldforge

Join us on Gitter! Appveyor build status Build with CMake

cyphesis ember

The WorldForge project lets you create virtual world system. We provide servers, clients, tools, protocol and media. You provide the world. Everything we do is Free Software.

This is the main monorepo which contains all the components needed for you to either host or access a Worldforge virtual world.

Some of the features we provide.

  • Fully scriptable through Python
  • Live reload of both rules and world entities; edit your world without having to shut down or reload
  • Complete 3d physics simulation
  • Complex AI system, using Behavioral Trees and Python scripts
  • Out-of-process AI, allowing for distributed AI clients
  • Persistence through either SQLite or PostgreSQL
  • Powerful built in rules for visibility and containment of entities
  • Emergent gameplay through multiple simple systems interacting
  • Quick and powerful procedural terrain generation

Components

These components make up the Worldforge system. Each of them in turn contains a README file which explains more about how they work.

  • The Cyphesis server is used for hosting a virtual world.
  • The Ember client is the main graphical client.
  • Eris is a client support library.
  • Squall provides features for syncing assets between servers and clients.
  • WFMath contains various math related functions.
  • Mercator provides features for generating procedural terrain.
  • Atlas handles all communication between different components.
  • Varconf provides configuration support.

Installation

The simplest way to install all required dependencies is by using Conan. This setup requires CMake 3.23+

Make sure you have installed a c++ compiler (g++ or clang), Conan, CMake, Subversion and ImageMagick (if you're building the server).

conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
conan install . --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
cmake --preset conan-release -DCMAKE_INSTALL_PREFIX=./build/install/release
cmake --build --preset conan-release -j --target all
cmake --build --preset conan-release -j --target install
cmake --build --preset conan-release -j --target mediarepo-checkout 
cmake --build --preset conan-release -j --target media-process-install 

The last two invocations are only needed if you also want to host your own server.

NOTE: The invocation of the target "media-process-install" is optional. It will go through the raw Subversion assets and convert .png to .dds as well as scaling down textures. If you omit this step Cyphesis will instead use the raw Subversion media. Which you might want if you're developing locally. This step also requires ImageMagick to be installed.

If you only want to build the server or the client you can supply these options to the "conan install..." command: "-o Worldforge/:with_client=False" or "-o Worldforge/:with_server=False".

CMake < 3.23

If your CMake tool is an earlier version, < 3.23, you can't use the "presets" system with Conan. Instead you have to issue these commands:

conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
conan install . --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
mkdir -p build/Release && cd build/Release
cmake ../.. -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install/release
cmake --build . -j --target all
cmake --build . -j --target install
cmake --build . -j --target mediarepo-checkout 
cmake --build . -j --target media-process-install 

Tests

The test suite can be built and run using the check target. For example:

cmake --build --preset conan-release --target check

API documentation

If Doxygen is available API documentation can be generated using the dox target. For example:

cmake --build --preset conan-release --target dox

Building libraries

By default, all components will be built and only the server and client will be installed. However, you can force installation of libs also either by setting the CMake variable "NO_LIBS_INSTALL" to "FALSE", or by invoking CMake in the directory of the lib you want to build.

Developing locally

We use Conan for our dependency handling. If you're developing locally you can issue this command to setup both a " debug" and "release" environment.

conan install -s build_type=Debug . --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True --update  && conan install . --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True --update

You might also want to look into the .gdbinit file to see how you can set it up to ungrab the mouse when debugging.

Running a server

To get a server running you need to build the project and then start the "cyphesis" artifact.

Running a client

To get a client running you need to build the project and then start the "ember" artifact.

Worlds data

This repository does not contain any of the demonstration worlds that we provide, since they often change a lot. They can instead be found at Worldforge Worlds. If you build through Conan these will be automatically installed and used. However, if you're setting up your own world you probably want to clone the Worlds repository and use that instead. You can either configure Cyphesis to load from a different location by setting WORLDFORGE_WORLDS_PATH at CMake time, or by altering the content of "cyphesis.vconf.in" ("autoimport" setting).

Media

When building and running Cyphesis you need access to the media, which is stored in Subversion. The Subversion server is at https://svn.worldforge.org:886/svn/media/trunk. The CMake command "mediarepo-checkout" will do a "sparse" checkout which will only fetch a subset of media, omitting source media. If you intend to do development and need the full media you can issue the CMake command "mediarepo-checkout-full" instead which will checkout all media.

Media is stored in "app/cyphesis/mediarepo".

Conan packages

We use Conan for our third party dependencies. In most cases we use the packages provided by Conan Center, but in some cases we need to provide our own packages. These can all be found in the tools/conan-packages directory.

License

All code is licensed under GPL v3+, unless otherwise stated.

How to help

If you're interested in helping out with development you should check out these resources:

ember's People

Contributors

alriddoch avatar atorkhov avatar bentley avatar bregma avatar davidjfelix avatar demarii avatar demitar avatar digimax20 avatar dkstiler avatar erikogenvik avatar junrw avatar llnz avatar manuelafm avatar mpreisler avatar netsysfire avatar noirb avatar olekw avatar razor85 avatar sajty avatar skogler avatar sryan avatar sunwaylive avatar zzorn 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

ember's Issues

Backtrace in Ember client

Hopefully the following backtrace will be useful to you:

(gdb) 
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6152859 in __GI_abort () at abort.c:79
#2  0x00007ffff6152729 in __assert_fail_base (fmt=0x7ffff62e8588 <error: Cannot access memory at address 0x7ffff62e8588>, 
    assertion=0x555556978490 <error: Cannot access memory at address 0x555556978490>, file=0x555556978368 <error: Cannot access memory at address 0x555556978368>, line=232, 
    function=<optimized out>) at assert.c:92
#3  0x00007ffff6163f36 in __GI___assert_fail (assertion=0x555556978490 <error: Cannot access memory at address 0x555556978490>, 
    file=0x555556978368 <error: Cannot access memory at address 0x555556978368>, line=232, function=0x555556978420 <error: Cannot access memory at address 0x555556978420>)
    at assert.c:101
#4  0x000055555638210c in Ogre::AxisAlignedBox::setExtents(float, float, float, float, float, float) ()
#5  0x0000555556381dc1 in Ogre::AxisAlignedBox::AxisAlignedBox(float, float, float, float, float, float) ()
#6  0x00005555563dc688 in Ember::OgreView::Convert::toOgre(WFMath::AxisBox<3> const&) ()
#7  0x00005555564c5aa9 in Ember::OgreView::Model::ModelMount::scaleNode(WFMath::AxisBox<3> const*) ()
#8  0x00005555564c569f in Ember::OgreView::Model::ModelMount::rescale(WFMath::AxisBox<3> const*) ()
#9  0x00005555564c7a33 in Ember::OgreView::Model::ModelAttachment::updateScale() ()
#10 0x00005555564c82e1 in Ember::OgreView::Model::ModelAttachment::model_Reloaded() ()
#11 0x00005555564d1435 in sigc::bound_mem_functor0<void, Ember::OgreView::Model::ModelAttachment>::operator()() const ()
#12 0x00005555564cf912 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, Ember::OgreView::Model::ModelAttachment> >::operator()() const ()
#13 0x00005555564cdbc0 in sigc::internal::slot_call<sigc::bound_mem_functor0<void, Ember::OgreView::Model::ModelAttachment>, void>::call_it(sigc::internal::slot_rep*) ()
#14 0x00005555561fb14d in sigc::internal::signal_emit0<void, sigc::nil>::emit(sigc::internal::signal_impl*) ()
#15 0x000055555620aa36 in sigc::signal0<void, sigc::nil>::emit() const ()
#16 0x0000555556463e9b in Ember::OgreView::Model::Model::loadAssets() ()
#17 0x0000555556485d84 in Ember::OgreView::Model::ModelDefinition::reloadModels() ()
#18 0x0000555556485d0f in Ember::OgreView::Model::ModelDefinition::reloadModels()::{lambda()#1}::operator()() const ()
#19 0x0000555556486fda in std::_Function_handler<void (), Ember::OgreView::Model::ModelDefinition::reloadModels()::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#20 0x00005555563f3b76 in std::function<void ()>::operator()() const ()
#21 0x00007ffff7c4c6fc in Eris::EventService::runOnMainThread(std::function<void ()> const&, std::shared_ptr<bool>)::{lambda()#1}::operator()() const ()
   from /usr/local/lib/liberis-1.4.so.0
#22 0x00007ffff7c4cf1e in std::_Function_handler<void (), Eris::EventService::runOnMainThread(std::function<void ()> const&, std::shared_ptr<bool>)::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /usr/local/lib/liberis-1.4.so.0
#23 0x00005555563f3b76 in std::function<void ()>::operator()() const ()
#24 0x00007ffff7c4ccc3 in Eris::EventService::processOneHandler() () from /usr/local/lib/liberis-1.4.so.0
#25 0x00005555561f6a05 in Ember::Application::mainLoop() ()
#26 0x00005555561f8e62 in Ember::Application::start() ()
#27 0x0000555556222d07 in main ()

Entire stack built from source using checkouts from Github. All checkouts on master except CEGUI, which didn't build, so I reverted to orgin/v0-8. Ubuntu 20.04, gcc 9.3.0.

Not sure if the problem was my build, but I couldn't get the binary distributions to work either. The apt-repository packages claimed that they weren't properly signed, and the dpkg distribution lacked the dependencies. Not really seeking support, just trying to be helpful.

Fedora 26 ember crash on startup "Could not load gui"

Hi. I've installed ember, cyphesis and dependencies from the packages supplied by the Fedora team.
The configuration screen comes up, I leave everything as-is, the program starts loading stuff and then fails.

Here are the messages -
Starting Ember....
Registering: list_commands
Registering: quit
Registering: toggle_erispolling
Starting Ember version 0.7.2
Initializing Ember services
Registering: loadscript
Registering: connect
Registering: meta_refresh
Registering: meta_abort
Metaserver Service created
Registering: set_value
Registering: get_value
Setting home directory to /home/neilt/.ember
libGL error: failed to create drawable
X Error of failed request: 0
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 26 (X_GLXMakeContextCurrent)
Serial number of failed request: 29
Current serial number in output stream: 29
AL lib: (EE) alc_cleanup: 1 device not closed
[neilt@wol worldforge]$ less ~/.ember/ember.log
[neilt@wol worldforge]$ > ~/.ember/ember.log;ember
Starting Ember....
Registering: list_commands
Registering: quit
Registering: toggle_erispolling
Starting Ember version 0.7.2
Initializing Ember services
Registering: loadscript
Registering: connect
Registering: meta_refresh
Registering: meta_abort
Metaserver Service created
Registering: set_value
Registering: get_value
Setting home directory to /home/neilt/.ember

I've looked in the ember.log file, and it fails immediately it tries to start CEGUI for the second time -
.
.
.
[19:56:55] INFO Finished loading 214 modeldefinitions.
[19:56:55] INFO Registering: set_level
[19:56:55] INFO The material '/base/simple' has 4 supported techniques out of 4
[19:56:55] INFO The material '/base/simple' has best supported scheme High. Was looking for Experimental
[19:56:55] INFO The material '/base/simple' has 4 supported techniques out of 4
[19:56:55] INFO The material '/base/simple' supported with scheme High
[19:56:55] INFO The material '/base/normalmap' has 8 supported techniques out of 8
[19:56:55] INFO The material '/base/normalmap' supported with scheme High
[19:56:55] INFO The material '/base/normalmap/specular' has 8 supported techniques out of 8
[19:56:55] INFO The material '/base/normalmap/specular' supported with scheme High
[19:56:55] INFO Best graphics level is High
[19:56:55] INFO Using graphics level Medium
[19:56:55] INFO Registering: toggle_inputmode
[19:56:55] INFO Registering: reloadgui
[19:56:55] INFO Registering: toggle_gui
[19:56:55] INFO Binding key tab to command /console_focus for state gui.
[19:56:55] INFO Setting CEGUI logging level to 'standard'.
[19:56:55] INFO Starting CEGUI
[19:56:55] FAILURE (CEGUI) CEGUI::ScriptException in function 'static void CEGUI::LuaFunctor::pushNamedFunction(lua_
State*, const CEGUI::String&)' (/builddir/build/BUILD/cegui-0.8.7/cegui/src/ScriptModules/Lua/Functor.cpp:222) : Una
ble to get the Lua event handler: 'debug.traceback' as first part is not a table
[19:56:55] FAILURE GUIManager - error when creating gui.
Exception: CEGUI::ScriptException in function 'static void CEGUI::LuaFunctor::pushNamedFunction(lua_State*, const CEGUI::String&)' (/builddir/build/BUILD/cegui-0.8.7/cegui/src/ScriptModules/Lua/Functor.cpp:222) : Unable to get the Lua event handler: 'debug.traceback' as first part is not a table
[19:56:55] INFO Deregistering: toggle_gui
[19:56:55] INFO Deregistering: reloadgui
[19:56:55] INFO Deregistering: toggle_inputmode
[19:56:55] CRITICAL Error during startup.
Exception: Could not load gui, aborting. Make sure that all media got downloaded and installed correctly.
[19:56:55] INFO Service 'Server Service' stopped.
[19:56:55] INFO (Ogre) Unregistering ResourceManager for type SoundDefinition
[19:56:55] INFO (Ogre) Unregistering ResourceManager for type EntityRecipe
[19:56:55] INFO (Ogre) Unregistering ResourceManager for type TerrainLayerDefinition
[19:56:55] INFO (Ogre) Unregistering ResourceManager for type EntityMappingDefinition
[19:56:55] INFO (Ogre) Unregistering ResourceManager for type ModelDefinition
.
.
.

I have attached the entire ember.log -
ember.log

Help text is unreadable

image

This is most obviously missing newlines and potentially other formatting.

Steps to reproduce:

  1. Start up ember.
  2. Click the ? button.

Crashing on Start

Ubuntu 10.10 x64 with ATI HD4870 Graphics card running propietary drivers.

volli@volli-pc:/build/hammer/work/local/bin$ ./ember
According to my calculations Ember should be installed in /home/volli/build/hammer/work/local/bin/..
Starting Ember....
Registering: list_commands
Registering: quit
Registering: toggle_erispolling
Starting Ember version 0.6.2
Initializing Ember services
Registering: loadscript
Registering: connect
Registering: meta_refresh
Registering: meta_abort
Metaserver Service created
Registering: set_value
Registering: get_value
Setting home directory to /home/volli/.ember
Crashed with signal 11, will try to shut down SDL gracefully. Please report bugs at https://bugs.launchpad.net/ember
./ember: Zeile 111: 17905 Speicherzugriffsfehler $bindir/ember.bin --home $homedata "$@"
volli@volli-pc:
/build/hammer/work/local/bin$

http://pastebin.com/JNybeT6e gdb output

http://pastebin.com/6B6JaEKv gdb backtrace

OGRE must be built with thread support

Using Ubuntu 18.04 on Azure to build
Have followed instructions and installed all supporting libraries. Have defeated most errors that have been thrown so far however not able to get passed this error right now

./hammer.sh build ember

results in

/home/daniel/hammer/work/source/worldforge/clients/ember/src/components/ogre/OgreSetup.cpp:52:2: error: #error OGRE must be built with thread support.
 #error OGRE must be built with thread support.
  ^~~~~

crash on launch (debian, v0.7.2+dfsg-1+b1)

$ ember --debug
Starting Ember in debugger....
/usr/bin/ember.bin: symbol lookup error: /usr/bin/ember.bin: undefined symbol: _ZN7varconf10ParseErrorcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev
[Inferior 1 (process 5355) exited with code 0177]
No stack.

Crash when killed

Steps to reproduce:

  1. Connect to any server. In this case I got my local instance of cyphesis.
  2. Get killed by wolves or goblins or so.
  3. Segfault. Trace attached. Because of conan conflicts I can not rebuild ember, so the trace will be of limited use since I could not recompile with debugging symbols enabled.

Trace

System info:

  • OS: Arch Linux
  • Ember version: 05d49f7

ember crash on Slackware 14.2 (64-bit)

I compiled ember and dependencies using the package build script on SlackBuilds.org. It starts, then crashes with the following error (that actually a GUI does start before the crash, contrary to what it says.)

d@cosmos:~$ ember
Starting Ember....
Registering: list_commands
Registering: quit
Registering: toggle_erispolling
Starting Ember version 0.7.2
Initializing Ember services
Registering: loadscript
Registering: connect
Registering: meta_refresh
Registering: meta_abort
Metaserver Service created
Registering: set_value
Registering: get_value
Setting home directory to /home/d/.ember
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
==== Error during startup ====
Could not load gui, aborting. Make sure that all media got downloaded and installed correctly.

Ember shut down successfully.
Deregistering: toggle_erispolling
Deregistering: quit
AL lib: (EE) alc_cleanup: 1 device not closed

"undefined reference" build errors

I can not get it to build (on Arch Linux) because ld complains about tons of undefined references. In fact, it is almost 2000 lines so I had to put the output into a separate logfile.
ember-build.log

I used the following commands to build:

cd $srcdir/ember
conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan --force
mkdir -p build && cd build
CONAN_REVISIONS_ENABLED=1 conan install .. --build missing
cmake ..
make all media-download

Which is what the README says. CONAN_REVISIONS_ENABLED=1 is required for conan because otherwise it errors out before installing any modules, I just followed the instructions in the error I got. --force is also required or it errors out when the remote was already added. -j is configured somewhere else on my system, so I removed it from the make command, this has no effect on the outcome.

Crash after character selection

I compiled ember using the hammer script on Gentoo. When I start the game I get up until the character selection. Shortly after the "Entering world..." screen appears ember crashes with:

Crashed with signal 11, will try to detach the input system gracefully. Please report bugs at https://bugs.launchpad.net/ember

The interesting part of the ember.log is:

FAILURE (Ogre) WARNING: material common/compositors/bloom/BloomBlend2 has no supportable Techniques and will be blank. Explanation: 
Pass 0: fragment program Bloom2_ps cannot be used - not supported.

and:

WARNING (Eris) received op with valid refno (1005) but no response is registered
WARNING (Eris) received op with valid refno (1006) but no response is registered
WARNING (Eris) received username does not match existing
WARNING (Eris) no-one handled op:{from:"943",to:"943",seconds:10818.5,args:[{args:[],parent:"set",objtype:"op"}],parent:"think",objtype:"op"}
WARNING (Eris) no-one handled op:{from:"76",to:"943",seconds:10818.5,args:[{id:"943"}],parent:"look",objtype:"op"}
WARNING (Eris) no-one handled op:{from:"171",to:"943",seconds:10818.5,args:[{id:"943"}],parent:"look",objtype:"op"}
CRITICAL (Eris) got sight of queued entity 10 somehow

This could be related to #4 and #22

Depth of Field is misbehaving

Many textures are blurry for no reason. I assume this depth of field thing is for performance reasons but it appears there is no way to change this behavior.

image

The texture is perfectly sharp when you look at it with an angle of about 90°.

image

Expected behavior:

The textures which are close to you are not blurry and this effect is not nearly as obvious.

ember 0.7.2 fails to build with gcc9 (debian / fedora)

https://bugzilla.redhat.com/show_bug.cgi?id=1674851

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925674

Atlas.cxx: In function 'int tolua_Atlas_Atlas_Message_MapType_iterator__eq00(lua_State*)':
Atlas.cxx:1911:43: error: 'std::map<std::__cxx11::basic_string, Atlas::Message::Element>::iterator' {aka 'struct std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string, Atlas::Message::Element> >'} has no member named 'operator=='; did you mean 'operator*'?
1911 | bool tolua_ret = (bool) self->operator==(value);
| ^~
| operator

make[6]: *** [Makefile:435: Atlas.o] Error 1

Build on Ubuntu 20.04

Using the hammer.sh process for building, the install-deps installed OGRE 13.4.1, so when it got to ember, it did this:

Ember client...
Configuring...
CMake Error at CMakeLists.txt:258 (find_package):
Could not find a configuration file for package "OGRE" that is compatible
with requested version "13.4.2".

The following configuration files were considered but not accepted:

.../src/worldforge/hammer/work/local/lib/OGRE/cmake/OGREConfig.cmake, version: 13.4.1

This is from a clean build from tonight.

Changing terrain page size will mess up the map reliably

image

Steps to reproduce:

  1. Connect to any server.
  2. Change terrain page size.
  3. Chaos.

Expected behavior:

Do not apply this setting until ember has restarted. Display a warning like "This setting will take effect after reconnecting to the server or restarting ember". Additionally, the terrain settings are missing tooltips.

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.