eventhorizon5 / skyscraper

The Skyscraper Project (Skyscrapersim) - an open source building, city, and elevator simulator
https://www.skyscrapersim.net
GNU General Public License v2.0
26 stars 7 forks source link

Skyscraper Next (online engines/multiplayer support) #45

Open eventhorizon5 opened 7 months ago

eventhorizon5 commented 7 months ago

This is for tracking and planning the Skyscraper Next project effort, which is to create a version of Skyscraper that is hosted online on Linux servers, and allows a desktop frontend client application to connect to a hosted cluster/map. This effort in simple terms is to move the Engine Contexts feature (which added multi-building support on a map, via running multiple sim engines and script interpreters in parallel) from the standalone desktop application to internet servers. Help with the C++ coding would be greatly appreciated.

The code is kept in the "next" branch. The first part of the effort was to move around Skyscraper's codebase, splitting it into separate client and server applications. The client application so far is the original wxWidgets "frontend" with some components removed, and the SBS engine's low-level 3D graphics system moved over to it. The server application contains a server application frontend, most of the SBS engine (minus the low-level 3D graphics code), the Engine Contexts code (moved from the frontend) and also the script interpreter code (also moved from the frontend). The majority of this is just moved code, not much works yet.

eventhorizon5 commented 7 months ago

Currently I'm working with OpenMPI to see if I can get it to manage a cluster of servers running the Skyscraper server application. I've attached a graph of the current design concept.

next_mpi

eventhorizon5 commented 7 months ago

Here's the current startup messages of the server application, currently it launches an SBS engine which shows it's banner, and then enters a runtime loop.

ryan@arcturus:/data/src/skyscraper/server$ bin/server
Server initializing...
Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
MovableObjectFactory for type 'StaticGeometry' registered.
MovableObjectFactory for type 'Rectangle2D' registered.
Loading library /usr/local/lib/OGRE/RenderSystem_GL.so.13.6
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/RenderSystem_GL3Plus.so.13.6
Installing plugin: GL 3+ RenderSystem
OpenGL 3+ Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/RenderSystem_GLES2.so.13.6
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_CgProgramManager.so.13.6
Installing plugin: Cg Program Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Plugin_OctreeSceneManager.so.13.6
Installing plugin: Octree Scene Manager
Plugin successfully installed
Loading library /usr/local/lib/OGRE/Codec_FreeImage.so.13.6
FreeImage version: 3.18.0
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,psb,cut,xbm,xpm,gif,hdr,g3,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
*-*-* OGRE Initialising
*-*-* Version 13.6.5 (Tsathoggua)

Starting instance 0...

 Scalable Building Simulator 2.0.0.2838 Alpha
 Copyright (C)2004-2023 Ryan Thoryk
 This software comes with ABSOLUTELY NO WARRANTY. This is free
 software, and you are welcome to redistribute it under certain
 conditions. For details, see the file gpl.txt

0>
Loading building data from Simple.bld...

0> Preparing objects...
0> Processing geometry...
0> Finished prepare
^C
Danik2343 commented 6 months ago

It's Cool! I love Skyscraper Sim. Its childhood!

eventhorizon5 commented 2 months ago

I'm planning on going a different direction with this for the time being, I decided that the multiserver model for the sim engines might be too complex for starting out, I might transform Skyscraper into a standalone server app that still uses the graphical wxWidgets frontend, but that can serve multiplayer games. I'll try reworking the "next" branch code, and see what I can come up with.