One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2018-01-03 23:21:42

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Setting up your personal Linux test editor/server/client

The editor currently allows me to construct test scenes with any of the available objects.  Those scenes can be loaded by a game server, and the client can connect to that server, allowing me to test that object configuration inside the live game.

Here are instructions for how you can set up the same test system on your end, in Linux.

First, make sure you have these packages installed:

http://onehouronelife.com/compileNotes.php?nocounter=1


Then, grab this shell script:

https://github.com/jasonrohrer/OneLife/ … tSystem.sh


You can put this into a directory where you want the test system to reside.  Suppose it's called "testSystem"

Run the script from the command line:

cd testSystem
sh ./pullAndBuildTestSystem.sh

That should do the git pull for all the source code, build everything, and get it set up for you.  This may take a while.  Walk away and come back later.


Now, you should have the client, server, and editor built.


First, test that the client and server are working:


In a separate terminal:

cd testSystem/OneLife/server
./OneLifeServer

The server should be running in that terminal.


Then, in another terminal:


cd testSystem/OneLife/gameSource
./OneLife

That should launch the client.

Note that the test server has been set to NOT require correct login credentials.  Type any random email address and some random characters for a key and login.

You should find yourself at 0,0 in the world running on your test server.


Now quit the client.  In that same terminal, launch the editor:

./EditOneLife

The page navigation buttons are at the top.  Navigate to Objects, then Animations, then Scenes.

You are now looking at the scene editor.

Move the cursor with the arrow keys and then use the ObjectPicker on the right to place objects.  Place biomes using the ground picker on the left.

Press the button at the top to export a test map.  It will be saved as "testMap.txt"

Copy the test map into the server directory:

cp testMap.txt ../server/

Then in the server terminal, quit the server with Ctrl-Z.

Then restart the server so that it will use the test map:

echo 1 > settings/useTestMap.ini
rm testMapStale.txt
rm *.db
./OneLifeServer

Now run the client again and you should find yourself in the middle of your test map.

Offline

#2 2018-01-05 11:50:06

yvanhooe
Member
Registered: 2018-01-01
Posts: 137

Re: Setting up your personal Linux test editor/server/client

It works fine here. A strange bug in the editor though: I can't move more than 3 units up or more than 6 units left. I can move down and right correctly.

Last edited by yvanhooe (2018-01-05 11:50:14)

Offline

#3 2018-01-06 01:23:49

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

Ah!  That's actually normal...

The test scene in the editor isn't infinite.  You start in the upper left corner of the map, pretty much.  If you fill with biome texture, you'll notice that it stops up there too and leaves black beyond that point.

When you save a test map, it only saves the parts of the map that you actually touched.  It then loads those tiles into the middle of the infinite map on the server.  So if you walk out of your test map, you will find wilderness again.


A lot of the editor is hacked together in a "whatever was quickest" fashion.  As long as I know how it works, it's fine, right?

Which makes me hesitant to release it to the public, because it's not a "finished" piece of software, really.

Offline

#4 2018-03-02 00:43:52

Zeromus
Member
Registered: 2018-02-28
Posts: 60

Re: Setting up your personal Linux test editor/server/client

jasonrohrer wrote:
cd testSystem/OneLife/server
./OneLifeServer

I've gotten to this point and this file does not exist.  I'm not sure how to start the server.

Some other questions:

Will this server be identical to the live servers?  (when first generated)

If I restart the server will it maintain its state?

How do me and my friends connect to my server with the main game client?

Thanks!

Offline

#5 2018-03-02 00:51:38

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

Very strange...

And you ran pullAndBuildTestSystem.sh without error?

There are some additional instructions in:

OneLife/documentation/EditorAndServerBuildNotes.txt

That explains how to connect your clients, etc.


Yes, same proc-gen map.  If you mess around in the source, I think you can change the seed though.  You could also change various parameters that control map scale and density, etc.

The server saves the live map into various .db database files.  As long as those files aren't removed, the map is persistent forever.

Offline

#6 2018-03-02 00:59:40

Zeromus
Member
Registered: 2018-02-28
Posts: 60

Re: Setting up your personal Linux test editor/server/client

Everything else seems to have built fine.  I see in the further documentation about making the server.  I'll try that and see if it appears.

Offline

#7 2018-03-02 01:01:52

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

So can you find your OneLife/server folder?

What's in there?  Can you post the directory listing?

Offline

#8 2018-03-02 01:03:28

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

Oh, are you running on Linode?

The test environment is meant for desktop linux.

Perhaps the build failed part-way through when it tried to build the graphical parts (the game client) on Linode?

I'll try running it on my linode and see what happens.

Offline

#9 2018-03-02 01:10:43

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

Okay, I just tried the pullAndBuildTest script on Linode, and it works fine.

It does fail to build the game client (can't find OpenGL headers), but then it goes on to build the server.

So... that's pretty great that the script makes it so easy.  Cool!

(This script was meant to help people build a test environment to look for bugs long ago, not to help them setup their own server).


SO.... not sure why yours isn't working.


The very last step on my script was this:

g++  -Wall -Wwrite-strings -Wchar-subscripts -Wparentheses -g  -DLINUX  -O0 -I../..  -o OneLifeServer server.o map.o ../gameSource/transitionBank.o ../gameSource/categoryBank.o ../gameSource/objectBank.o ../gameSource/animationBank.o ../gameSource/ageControl.o ../gameSource/folderCache.o ../gameSource/SoundUsage.o ../commonSource/fractalNoise.o kissdb.o lifeLog.o foodLog.o backup.o triggers.o dbCommon.o playerStats.o failureLog.o ../../minorGems/io/linux/TypeIOLinux.o ../../minorGems/util/stringUtils.o ../../minorGems/util/StringBufferOutputStream.o ../../minorGems/io/file/linux/PathLinux.o ../../minorGems/system/unix/TimeUnix.o ../../minorGems/system/linux/ThreadLinux.o ../../minorGems/system/linux/MutexLockLinux.o ../../minorGems/util/TranslationManager.o ../../minorGems/network/linux/SocketLinux.o ../../minorGems/network/linux/HostAddressLinux.o ../../minorGems/network/linux/SocketClientLinux.o ../../minorGems/network/linux/SocketServerLinux.o ../../minorGems/network/linux/SocketPollLinux.o ../../minorGems/network/NetworkFunctionLocks.o ../../minorGems/network/LookupThread.o ../../minorGems/network/web/WebRequest.o ../../minorGems/network/web/URLUtils.o ../../minorGems/util/SettingsManager.o ../../minorGems/system/FinishedSignalThread.o ../../minorGems/crypto/hashes/sha1.o ../../minorGems/formats/encodingUtils.o ../../minorGems/io/file/unix/DirectoryUnix.o ../../minorGems/util/log/Log.o ../../minorGems/util/log/AppLog.o ../../minorGems/util/log/FileLog.o ../../minorGems/util/log/PrintLog.o ../../minorGems/util/printUtils.o ../../minorGems/game/doublePair.o ../../minorGems/util/StringTree.o    -lpthread

That's where it builds the OneLifeServer executable.

Does your run look different?

On Linode, the networking is so fast that running this whole process over and over is really quick.  So put it in a different test directory and run it again....

I was able to save the non-error output to file like this:

./pullAndBuildTestSystem.sh > out.txt

Can you do that and email it to me?

Offline

#10 2018-03-02 02:28:34

Zeromus
Member
Registered: 2018-02-28
Posts: 60

Re: Setting up your personal Linux test editor/server/client

Here is my server directory:

backup.cpp      failureLog.h  lifeLog.cpp                   makeStressTestClient          printFoodLogStatsHTML.cpp          sampleTestMap.txt     triggers
backup.h        foodLog.cpp   lifeLog.h                     map.cpp                       printLifeLogStatsHTML.cpp          serverCalls.h         triggers.cpp
configure       foodLog.h     makeFileList                  map.h                         protocol.txt                       server.cpp            triggers.h
dbCommon.cpp    HashTable.h   makePrintFailureLogStatsHTML  playerStats.cpp               runHeadlessServerLinux.sh          settings              webViewer
dbCommon.h      kissdb.cpp    makePrintFoodLogStatsHTML     playerStats.h                 runServer.bat                      stressTestClient.cpp
failureLog.cpp  kissdb.h      makePrintLifeLogStatsHTML     printFailureLogStatsHTML.cpp  runValgrindHeadlessServerLinux.sh  test

The file I ran to do all this was pullAndBuildLatest.  No .sh extension.  Not sure if that is perhaps the wrong file.

I tried running it again in a new folder and see  a bunch of stuff like this:

Makefile:736: game.dep: No such file or directory
Makefile:736: spriteBank.dep: No such file or directory
...

Offline

#11 2018-03-02 15:58:25

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,805

Re: Setting up your personal Linux test editor/server/client

Okay, there was a bug in the instructions.  The "ln" lines for the server referenced OneLifeDa7 by mistake.  It should be OneLifeData7.

Please look at the latest version here:

https://github.com/jasonrohrer/OneLife/ … dNotes.txt

If you run pullAndBuildLatest, it will fetch the older version of this document for now (until I post a new binary release).

Offline

#12 2018-03-06 19:08:13

KRN
Member
Registered: 2018-03-06
Posts: 20

Re: Setting up your personal Linux test editor/server/client

After day of struggling i finally managed to pull this off yay smile
I by chance had VirtualBox(=VB) Linux on my WinPC and soo i have set it all up there.
I have Server,Client,Editor and even my custom little script (.sh) that uploads the map into the server (and i made Tutuorial/howTo together with it as well). I even managed to connect from outside VB to the server.
But its not the same ... for example picking berry from bush turns it into Flint,than goosePond aaand at the end into emptyBerryBush XD. And connectig from inside VB is not a possibility either cause i get less than 20 FPS ;-(

Soo the only issue i have is that i cannot use this Windows (old) version and i was wandering which of the scripts i should start to make .exe for me, that would be the same version as i currently have the server running at (the most Up to date).
(i would than just copy in into my "Main OS"(=Windows) and play on VB hosted server)(aaand post Finished & Posted tutorial with scripts and steps on how to do it all AutoMagically for everyone else wink)

Last edited by KRN (2018-03-06 19:09:13)

Offline

#13 2018-03-06 21:10:28

Zeromus
Member
Registered: 2018-02-28
Posts: 60

Re: Setting up your personal Linux test editor/server/client

Regarding your berry picking issue, I had the same thing!  You need to find your cache files (cache.fzc) and delete them.  There should be three of them in your data folders.  I think you have to do this every time you update your server.

Offline

#14 2018-03-07 09:27:21

Zenchess
Member
Registered: 2018-03-07
Posts: 27

Re: Setting up your personal Linux test editor/server/client

If you have purchased the game, you can connect to the official servers and it will auto-update your client

Offline

#15 2018-03-08 17:07:21

ElPasmo
Member
Registered: 2018-03-05
Posts: 4

Re: Setting up your personal Linux test editor/server/client

jasonrohrer wrote:

Okay, there was a bug in the instructions.  The "ln" lines for the server referenced OneLifeDa7 by mistake.  It should be OneLifeData7.

Please look at the latest version here:

https://github.com/jasonrohrer/OneLife/ … dNotes.txt

If you run pullAndBuildLatest, it will fetch the older version of this document for now (until I post a new binary release).

I've tried today. pullAndBuildLatest seem to be correct. But I'm stuck in the same place, there is no "OneLifeServer" executable. Running debian with i3. Client runs without issue.

I solved running make on the server directory.

Last edited by ElPasmo (2018-03-08 17:09:42)

Offline

#16 2018-03-08 17:30:39

ElPasmo
Member
Registered: 2018-03-05
Posts: 4

Re: Setting up your personal Linux test editor/server/client

Managed to compile all.

I'm able to launch the client that resides in the root folder. If I try to launch the cliente of OneLife/gameSource it crashes with a segmentation fault.

If I try to login into my custom server, server crashes with Segmentation fault after the following output:
Placing new Eve: trying radius of 102 from camp

Offline

#17 2018-03-08 20:53:18

gnuhow
Member
Registered: 2018-03-08
Posts: 8

Re: Setting up your personal Linux test editor/server/client

For some reason all of my textures are very strange. Bears look like carrot plots and berry bushes change to dead goose ponds after I pick a berry. Also the ground looks like sheep wool.

Did I do something wrong setting this up?

Offline

#18 2018-03-08 20:55:56

gnuhow
Member
Registered: 2018-03-08
Posts: 8

Re: Setting up your personal Linux test editor/server/client

ElPasmo wrote:

Managed to compile all.

I'm able to launch the client that resides in the root folder. If I try to launch the cliente of OneLife/gameSource it crashes with a segmentation fault.

If I try to login into my custom server, server crashes with Segmentation fault after the following output:
Placing new Eve: trying radius of 102 from camp


Make sure you are in the /OneLife/server directory when you run the server. For some reason it can only read whatever directory you are in. The windows client has the same issue.

Offline

#19 2018-03-08 21:46:50

Zeromus
Member
Registered: 2018-02-28
Posts: 60

Re: Setting up your personal Linux test editor/server/client

gnuhow wrote:

For some reason all of my textures are very strange. Bears look like carrot plots and berry bushes change to dead goose ponds after I pick a berry. Also the ground looks like sheep wool.

Did I do something wrong setting this up?

Read my comment above about deleting your cache files.

Offline

#20 2018-03-08 21:59:20

gnuhow
Member
Registered: 2018-03-08
Posts: 8

Re: Setting up your personal Linux test editor/server/client

Zeromus wrote:
gnuhow wrote:

For some reason all of my textures are very strange. Bears look like carrot plots and berry bushes change to dead goose ponds after I pick a berry. Also the ground looks like sheep wool.

Did I do something wrong setting this up?

Read my comment above about deleting your cache files.


I deleted all four cache files and it still has the same problem, none of the textures were fixed.

Offline

#21 2018-03-08 22:56:21

egrigby
Member
Registered: 2018-03-02
Posts: 15

Re: Setting up your personal Linux test editor/server/client

Can I get the system requirements for a linux server?

Thanks

Offline

#22 2018-03-08 23:25:59

Zenchess
Member
Registered: 2018-03-07
Posts: 27

Re: Setting up your personal Linux test editor/server/client

gnuhow wrote:
Zeromus wrote:
gnuhow wrote:

For some reason all of my textures are very strange. Bears look like carrot plots and berry bushes change to dead goose ponds after I pick a berry. Also the ground looks like sheep wool.

Did I do something wrong setting this up?

Read my comment above about deleting your cache files.


I deleted all four cache files and it still has the same problem, none of the textures were fixed.


This is probably a mismatched dataVersionNumber , i.e. your client is not on the same version as your server.  There is a dataVersionNumber.txt in the client's root folder and there is also such a file somewhere in the source of the server.  Make sure they match.  And like I said earlier, if you've bought the game you can update to the latest version by just logging into the official servers and your client will auto-update.

Offline

#23 2018-03-09 04:56:49

gnuhow
Member
Registered: 2018-03-08
Posts: 8

Re: Setting up your personal Linux test editor/server/client

This is probably a mismatched dataVersionNumber , i.e. your client is not on the same version as your server.  There is a dataVersionNumber.txt in the client's root folder and there is also such a file somewhere in the source of the server.  Make sure they match.  And like I said earlier, if you've bought the game you can update to the latest version by just logging into the official servers and your client will auto-update.

I am on version 61 on both atm. I tried reinstalling both client and server twice as well.

Offline

#24 2018-03-09 14:21:43

ElPasmo
Member
Registered: 2018-03-05
Posts: 4

Re: Setting up your personal Linux test editor/server/client

gnuhow wrote:
ElPasmo wrote:

Managed to compile all.

I'm able to launch the client that resides in the root folder. If I try to launch the cliente of OneLife/gameSource it crashes with a segmentation fault.

If I try to login into my custom server, server crashes with Segmentation fault after the following output:
Placing new Eve: trying radius of 102 from camp


Make sure you are in the /OneLife/server directory when you run the server. For some reason it can only read whatever directory you are in. The windows client has the same issue.

Yep, that's checked.

Offline

#25 2018-03-10 13:13:10

gnuhow
Member
Registered: 2018-03-08
Posts: 8

Re: Setting up your personal Linux test editor/server/client

gnuhow wrote:

For some reason all of my textures are very strange. Bears look like carrot plots and berry bushes change to dead goose ponds after I pick a berry. Also the ground looks like sheep wool.

Did I do something wrong setting this up?

I fixed by using Ubuntu desktop for a server instead of Debian minimal. I also updated because of the new update.

Offline

Board footer

Powered by FluxBB