No Man’s Sky: My Personal Challenge Mode

No Man’s Sky is a really fun game, but as I played through the main quest lines on Normal Mode, I discovered there are some aspects of the game that trivialize its challenges. The most notable of these issues are the teleporters on space stations and in player created bases – the first time I used one and I saw that my ship had magically followed me though the teleporter too, I literally said out loud, “awe, that’s a little cheaty, isn’t it?”. What follows is thus a few self imposed limitations that help make the game feel more like what I had hoped it would be.

1. Play in Survival Mode
I’ve never liked the concept of perma-death in computer games, but the death penalties in Survival Mode strike a good balance between punishment and a fun challenge. Starting out is definitely harder and one’s you’re over that hump, things like extreme weather are still a major concern (where as on normal, I was jaunting around in a radioactive super storm collecting crystals like it was a beautiful summer’s day). The biggest difference I have found is that the terrain manipulator chews through its charge much more quickly than on normal mode, meaning it takes more resources to mine the same amount (thereby increasing the usefulness of automated harvesters!).

2. No Cheating Death
One can cheat the death penalty by frequently dropping a save-game machine and creating a manual save point that they can go back to should they die. It’s totally fine to do this if the death was caused by a bug, a power outage, if your arm fell off and you had to be rushed to the hospital, etc. but to do it as a way to avoid the consequences of foolishness is just plain old cheating.

3. No Cheating the Randomness
Rather than just playing the game, some folks cheat by constantly reloading their saved game to force new ships or multi-tools to spawn until the one they want finally spawns for them. I don’t see the fun in that type of behavior. For me, the mystery of what’s next and making due with what I have are large parts of what I find so compelling about the game play experience. As my daughter’s friend said on cupcake day, “You get what you get and you don’t get upset”. 🙂

4. No Base/Station Teleporter Use
Update: I hadn’t considered the problem of doing the quest to go to the center of the galaxy while still enjoying the fun base building aspect of the game. With that in mind, it makes sense to have a single portal at my “cool awesome base” that I can go back to whenever I’d like, so that’s the only use I will make of the teleporter system.

Being able to teleport to and from any space station you have visited, as well as any base you made and bothered to create a portal at, completely trivializes space travel and makes the game waaaay too easy. Add to that the fact that your ship (and it’s cargo contents) magically travel with you too, and you’ve got a game play system that takes convenience a tad too far. I’m just going to go ahead and pretend it’s not there, because I definitely didn’t expect it to exist anyway (and using it on my first play in Normal Mode quickly made me realize it’s ridiculously over powered).

5. Inventory and Technology Limitations
I was straight up shocked when I read on the wiki that one can unlock 48 high capacity cargo slots. That’s insane! Sure, some people groan and whine about inventory management in games, but the truth is that inventory limitations encourage the player to make decisions and compromises that can later put the player into situations where they are forced to overcome adversity and it’s rising to those challenges that makes games (and life!) so rewarding. If you’re able to tote around the solution to everything, then you’re robbing yourself of the chance to find joy in creative success. With that in mind, here are my personal limitations on inventory and technology:

  • 36 General Inventory slots (48 max)
  • 16 High Capacity Cargo slots (48 max)
  • 12 Technology slots (14 max)

I considered limiting myself to only using pistol type multi-tools, due to their 10 technology slots (compared to the 24 of rifles), but that would be pretty boring. I already have a 10 slot A class pistol that I have fully loaded to my liking, so yeah, it would be pretty boring to leave it like that forever. Who knows when I will find something else I like better!

Similarly to multi-tools, I am not placing any limitations on myself for ships, freighters, frigates, and upgrades, as that would just limit my ability to have fun; Adhering to the intended randomness of the game is both a good throttle on “power creep” and an excellent incentive to keep exploring. Indeed, I was super excited when the crashed ship I found as part of the story was an S class shuttle! How cool is that, eh? I had just upgraded from the starter ship to an A class shuttle that I also really liked, so I will just keep using the A class model while I poke away at fixing the S class.

Apart from the above points, I’m just going to take it easy in general, enjoying the experience at a casual pace without trying to “min/max” or otherwise subvert the challenges and rob myself of the experience.

No Man’s Sky is Everything I Wanted from a Game

With the exception of pets and pet crafting, I suppose, but hot-damn does this game deliver in all other respects! Seriously, having played No Man’s Sky over the past couple of weeks, I have absolutely no desire to ever play Star Wars Galaxies or work on SWGEmu mods ever again! I mean, why bother when NMS has everything in it that I like about science fiction, crafting, creating, collecting, treasure hunting, and it looks amazing, and it plays great…

No Man's Sky

No Man’s Sky


Without any exaggeration, I spent thousands of hours of research and development on the four iterations of my solo SWGEmu based Star Wars Galaxies server, Legend of Hondo, only to find that it’s not really fun to play. Here’s why…

Being “the man behind the curtain” of Legend of Hondo, creating all the mods and molding the game into exactly what I thought a solo version of SWG should be, also meant that there wasn’t any mystery; In order to make it, I had to know exactly how everything worked! Worse yet, I also knew where to find all the loot, all the creatures, all the quests, and so on, which didn’t feel very fun. Short of reprogramming everything to be completely random (and I doubt that would even be fun anyway), I’m not sure how one can avoid that problem when programming an RPG.

And then the real kicker is the enormously massive, gargantuan amount of effort that almost all mods to Core3 and the SWG client require. Why? Well, neither have a proper programming reference guide, Core3 is a convoluted nightmare of a program, and the whole damned thing is based on the reverse engineering of Sony Online Entertainment’s buggy mess of a game client. I recently helped out with some programming for the Tarkin’s Revenge server, but I decided to throw in the towel when I took a step back and saw how working with the SWGEmu code base and SWG client utterly consumes my life. Things that would take 15 minutes to do in other projects can take literal days of head-desk stumbling over syntax in custom libraries and multiple languages, waiting for compilations, waiting for the server to boot, testing every possible permutation of the thing to catch the inevitable “gotcha” that some end user will uncover, and so on. In the end, it’s really not that fun to work on SWGEmu mods and given that programming is my hobby, what the hell is the point of doing it at all if it’s not fun? I mean, I love helping friends, but I literally giggled like a schoolgirl when I uninstalled Microsoft Visual Studio 2017, having used it only to help my friends when they were desperate to have their launcher updated. I hate to say it, but I get the same sort of joy when I think about not working on anything related to SWGEmu ever again.

I’d rather work on stuff like RocketTux and play No Man’s Sky!

Hard to believe that I am a year and half behind on finishing RocketTux. Apparently shit doesn’t get done when you don’t do it. Who knew?! 🙂 I ended up boring myself by rigidly sticking to the goal of finishing the art and levels rather than just doing what I felt like doing (which really is what one should do with their personal hobby projects). But I digress…

What’s so great about No Man’s Sky?

1. No Division of Labor? No Problem!
It was basically designed from the ground up to be the polar opposite of Star War Galaxies, in terms of what can be achieved by a single player. Fundamental changes to the combat system aside, much of my time modding SWGEmu was spent attempting to make a game that was explicitly designed to make it difficult for a single person to play alone, into a game that, at the very least, functioned properly for only one person. That’s totally not an issue with NMS, because even though it has multiplayer aspects, it is most definitely a game that can be enjoyed from start to “finish” by a single player.

2. A Strong Variety of Gameplay Systems
You know, No Man’s Sky is kind of a more complete version of Elite Dangerous, only it’s actually fun and it strikes a nice balance between simulation and arcade game… Huh. Anyway, from building your fleet of capital ships and sending them on missions, to cataloging the flora and fauna of millions of planets, there is a lot to do in No Man’s Sky and for the most part you are free to do it at your own pace and in your own way. Here’s a randomly organized point form list of different activities I have discovered:

  • Finding a cool ship to buy. There are two ways to go about this, one being standing in space stations and talking to the NPC pilots who fly in, the other being tracking down crashed ships to repair them.
  • Upgrading your suit and multi-tool, which can be done by traveling to new places in the galaxy to find merchants and treasure.
  • Shooting rocks. You can shoot holes right through’em!
  • Shooting rocks…. in space!
  • Seriously, shooting rocks is the basic manner in which one gathers resources. You can also punch trees when you upgrade to a Nintendo Power Glove.
  • Spelunking, aided by the terrain manipulator which can blast holes in the ground (or fill them in, if that’s how you roll).
  • Building bases, with the only limit being 20,000 items per base. You can have up to 5 bases per planet and there’s something like 18,446,744,073,709,551,616 planets, so hop to it, eh.
  • Building and upgrading a freighter fleet.
  • Sending your fleet on (imaginary) missions.
  • Building a base inside your capital ship. This impressed me when I whipped out curved hallway parts, but I literally exclaimed, “shut up! No way!” when I found that I can even add stairs and rooms! Imagine having your own custom Tantive IV and you’ll have a good grasp on feel of the interior.
  • Trading goods in a manner similar to other space truckin’ games. It’s less detailed than Elite Dangerous’s commodities system, yet one misses nothing in the process…
  • Fighting pirates in your ship. This includes attacking capital ships and looting the stuff that you shoot out of their holds.
  • Missions from various individual NPCs and the space station based guilds.
  • Learning languages and exploring the lore of the galaxy by chatting with NPCs and finding interesting places on the many worlds.
  • Building machines to harvest and process resources.
  • Collecting, upgrading, and using the different ground and water vehicles. Yup, there’s a frickin’ submarine even! I just got the basic car today and the handling of ground vehicles is similar to Unreal Engine or Crytek based games, with simplified controls. It’s definitely not like using a ground vehicle in Elite Dangerous, at all (though I actually liked that aspect of ED, for the most part).
  • Collecting stuff and using it to craft the items you need while doing the above things.

There are likely other things to do in the game that I forgot to mention (like following the main story line!), but I think that will give you a good idea of the breadth of the game. One thing that I really appreciate is how all of these things come together in a way that makes the game feel a lot more purposeful than Elite Dangerous. In ED there is basically only one game loop, which amounts to “earn money to get a bigger ship so you can earn money to get a bigger ship…”, and that’s very, very boring. Are there other aspects of ED? Sure, but they’re boring too. No Man’s Sky manages to offer a wide variety of things to do in a way that isn’t boring. Yay!

3. It’s Like I Stepped Into A Classic Science Fiction Novel
As a young man, I loved Issac Asimov’s Foundation series and robot books, and I also very much enjoyed Arthur C. Clarke’s Rendezvous with Rama, as well as other novels of the early scifi era. The art style of No Man’s Sky appears to be designed such that it’s as though the player has stepped into the cover art of a dusty book from store shelves past and begun an adventure almost as wild as their own imagination. While I suspect the post processing effects may be lost on the younger folks, I get what Hello Games was going for and I like it.

A few books I’ve kept though the years…


Now the game and its universe pales in comparison to those which are described by the great sages whose works defined the Science Fiction genre, but all things considered, given the gameplay systems and artwork, what they’ve created is phenomenal.

Picking Some Nits
From the perspective of a boy who grew up in the 80s and 90s on Star Trek reruns, TNG, Star Wars, and a plethora dusty old books, Hello Games has not let me down with No Man’s Sky. From the perspective of a man who went from playing a detailed online Star Wars game to later spending years modding that game into a single player experience, I can say with the utmost sincerity that Hello Games has not let me down with No Man’s Sky. It makes me wonder why I waited nearly three years to play it! That said, I do have a few thoughts on where I think it could improve a bit.

Let’s be real here, for all intents and purposes Earth is the Human universe. It’s literally the only place in the entirety of everything where we know we can exist. This tiny ball of dirt hurtling though the cosmos, slathered in water and a slight dusting of breathable air, is home to countless organisms which are as varied as the biomes in which they evolved. Alas, in No Man’s Sky, as far as I can tell, all celestial bodies have a single biome that covers their entire surface, meaning there are “snow planets”, “desert planets”, etc. (with the exception of planets that have both land and water biomes, I suppose). While it might be interesting to explore temperate transition zones, I can’t fault Hello Games for creating the planets without them, because it’s damned hard to do what they’ve done as it is!

Humans have been building paths, roads, towns, villages, and cities since the dawn of time and ya know what, other critters here on Earth build these types of structures too. In No Man’s Sky the entire galaxy appears to be inhabited by creatures who never considered these concept. Nope, they either roam aimlessly or they travel exclusively by space ship. Again, in a game as vast as this one, something’s gotta give – I can imagine the headaches it would cause to create procedurally generated cities, complete with buildings, people, shops, homes, and NPC activity, on a global scale. That could be a game in and of itself…

W = Forward
S = Backward
A = Turn Left
D = Turn Right
SHIFT = Turbo
L CTL = Brake
Mouse Movement = Camera Panning

That’s how ground vehicles are done on PC the man, come on! 🙂 Seriously though, I can live with the mouse moving left/right for steering, as it’s light years better than vehicles in SWG. Space movement in No Man’s Sky also feels better than the Jump to Lightspeed space flight in SWG.

And finally, one space station interior? Really? Just one, for the whole galaxy? Where the NPCs all stand in the same locations? OK, but only because you wow’d the absolute crap out of me with the rest of the game!

So, No Man’s Sky…
It’s a good game. I like it a lot. I like it, because it’s chalked full of awesome; I like it, because I can shut it off and miss a damned thing!

Using the portal at base Psychedelic Hondo

Base Snow Hondo

Base Hondo Under No Man’s Sky

Ps. It play’s alright on my old as dirt computer (AMD FX-8320 CPU / AMD R9 270 2GB graphics / 24GB DDR3 1600MHz RAM) at 1080p using the default settings. I drop to 15 FPS when looking at my largest base (even from far away), but most other times I am in the 30 – 60 FPS range (with some hitching though). By comparison, I can run 3 instances of Star Wars Galaxies, at max settings with 4x AA and 16x AF forced in the driver, while also running the server in a virtual machine and using several tabs in Chrome without the computer breaking a sweat – these 8 core FX CPUs weren’t terrible at everything, eh. 🙂

SWGEmu – Using a RAM Drive to Reduce SSD Wear When Compiling

If we could go back nearly twenty years to the internet of yore, we could read a post I made where I dreamed about having enough RAM to do something useful with a RAM drive in Windows 2000. Since then I think the most use I have gotten out RAM drives has been their use in Linux distributions such as Damn Small Linux and Knoppix. That was until I recently upgraded to 24GB of RAM from 12GB, because the price on DDR3 finally dropped to sane levels and I really wanted to give this a whirl.

What Are We Doing?
We’re using our extra system RAM as a “scratch pad” file system so the GCC compiler can put its junk there while it does its thing.

Why Are Doing This?
The main reason is because SSDs (solid state drives) wear out a little bit every time they are written to and the process of compiling the SWGEmu server (Core3) writes a hell of a lot files to the drive, thereby reducing the drive’s operational life time. This is likely not significant for enterprise MLC based SSDs, but it absolutely is important for consumer grade TLC and 3D NAND drives, as they are designed to be more for reading data than constant writing of data – Compiling large software is an edge-case, abnormal usage for this kind of hardware. The other reason is that doing this is significantly faster, because it eliminates the write and seek speed bottle necks that exist even when using a fast SSD (well, probably not significantly over an NVME M.2 SSD, but I don’t have one to test that assumption).

Requirements
– A VirtualBox based SWGEmu development environment running Debian/Devuan Linux.
– 20GB RAM will just barely squeeze by with a Windows 10 host OS, so more than that would be ideal.
– A solid state drive and a rotational hard drive.

The Setup
Being completely honest here, this setup is a little complicated, but it makes sense when you look at it on the whole, because the configurations tries to play to strengths of all the hardware that is available. We use the SSD to store the development environment, because that allows it to boot quickly and dramatically improves the performance of Grep searches of the code base and other read-heavy activities. We use a standard old rotational hard drive to store the RAM disk image, log files, and Berkeley database files, because they are frequently written to, but in such a way that the slowness of the drive isn’t really a problem for a testing/development environment. And of course, we use the RAM Drive as the place where GCC spits out its object code and does its executable linking, because that’s an epic ass load of disk writes for what are essentially a bunch of temporary files.

The first thing you will need to do is create the empty virtual disk where you will be storing the RAM drive images. On the settings panel for your VM in VirtualBox go to Storage > Sata Controller > Plus Sign and follow the steps to create a new 20GB VDI image somewhere handy on your rotational hard drive (I put mine in S:\Rob\VirtualBoxVMs\ for instance). In the VirtualBox world, this is the same thing as plugging an empty hard drive into the machine, so the next time you boot up your VM you will need to manually configure the new drive. The steps for that are,

1. Use “sudo cfdisk /dev/sdb” in a terminal to create a partition table that has a single 20GB linux partition. It’s visual and pretty straight forward.

2. Format the partition using “sudo mkfs.ext4 /dev/sdb1”.

3. Create a mount point for the drive.
mkdir /home/swgemu/hd

4. Add the partition to the /etc/fstab file so it will automatically be mounted at startup.
sudo nano /etc/fstab
Add the following line to the file and save it:
/dev/sdb1 /home/swgemu/hd ext3 errors=remount-ro 0 1

Next we need to setup VirtualBox so it can handle the RAM drive. This is where your system specs are important. Compiling Core3 requires approx 850MB of RAM per core used, the Xfce based dev environment needs about 600MB, Windows 10 needs roughly 2GB, and the RAM drive will need a whopping 10GB to house Core3’s crazy volume of object files. On my system I compile using 6 of the 8 cores available on my system and I like to round up to 1GB/core to be on the safe side. So that means that on the System page of settings for my virtual machine I allocate 16,384MB of RAM to the VM, ensuring that the system has enough RAM to avoid ever using the swap file. If you use more or fewer cores, adjust your RAM value accordingly.

Side Note: In the past, Core3 used only 650MB per core and the compiled objects only took up about 4GB on the drive. How times have changed!

Having allocated the RAM, we now need to create a mount point for the RAM drive and add it to fstab so that it will also be ready on boot up.
1. Create a mount point for the drive.
mkdir /home/swgemu/ramdrive

2. Use fstab to create the RAM drive.
sudo nano /etc/fstab
Add the following line to the file and save it:
tmpfs /home/[yourUserName]/ramdrive tmpfs nodev,nosuid,noexec,nodiratime,size=10240M 0 0

Before you reboot, go ahead and open /etc/fstab so you can add the following “mount binds” which will seamlessly allow Core3 to read/write the log and Berkeley database files to different physical hardware than what is normally mounted at these locations. Such is the power of *NIX file systems!

/home/swgemu/hd/logs /home/swgemu/workspace/Core3/MMOCoreORB/bin/log none defaults,bind 0 0
/home/swgemu/hd/databases/ /home/swgemu/workspace/Core3/MMOCoreORB/bin/databases/ none defaults,bind 0 0

Finally, before you reboot you will need to copy the following files from the /home/swgemu/workspace/Core3/MMOCoreORB/build/unix directory to your documents folder, as they are required by the build process and will end up being hidden by a mount bind later on.

/home/swgemu/workspace/Core3/MMOCoreORB/build/unix/conf3400.sh
/home/swgemu/workspace/Core3/MMOCoreORB/build/unix/stamp-h1
/home/swgemu/workspace/Core3/MMOCoreORB/build/unix/config/config.h.in

Now is the time to reboot!

After the system has loaded, you will need to a “first build and save” to prime the system, after which you will be able to simply use the ramdrive.sh bash script to load and save your RAM drive image.

1. Setup the RAM drive environment by creating some mound points and bind in the RAM drive. It’s important to keep in mind that everything in ~/ramdrive gets deleted when the system reboots.
cd ~/ramdrive
mkdir tmp
mkdir build
cd build
mkdir unix
sudo mount –bind /tmp /home/swgemu/ramdrive/tmp
sudo mount –bind /home/swgemu/ramdrive/build/unix /home/swgemu/workspace/Core3/MMOCoreORB/build/unix

2. Copy the above saved files into the ramdrive directory
/home/swgemu/ramdrive/build/unix/conf3400.sh
/home/swgemu/ramdrive/build/unix/stamp-h1
/home/swgemu/ramdrive/build/unix/config/config.h.in

3. Build the server as you would normally. I use a simple build script that tells me how long the compilation took, because that’s fun for me.

4. Run the “./ramdrive.sh save” command to copy the contents of /home/swgemu/ramdrive/build to a Tarball image that can be restored each time you reboot the system. The image gets saved to /home/swgemu/hd/ with a file name like so, ram-image-2019_05_23-.tar.gz.

Here is a copy of ramdrive.sh

Usage:
./ramdrive.sh load
./ramdrive.sh save

Both of those uses should self explanatory. When you start the system, first thing you should do is open an terminal and run ./ramdrive.sh load to configure the RAM drive and populate it with the previously compiled object code. Any time you have made significant C++ changes, you will want to save a new RAM drive image so that the compiler doesn’t have to catch up compiling changes from way back when, as well as the ones you’re currently working on. As complex as it this whole thing is, it’s really that simple to use it once it’s all setup!

Unfortunately the WordPress theme I am using butchers code, which is why I put link to a copy of the file above, but here’s the code anyway:


#!/bin/bash
# Moves SWGEmu build files to and from hard drive back / ram drive

# Bail if not passed argument
if [ -z "$1" ]
then
echo "Usage: ramdrive "
exit 1
fi

ARG=$1
DIR="/home/swgemu/ramdrive/build"
HD="/home/swgemu/hd"
STAMP=$(date +"%Y_%m_%d")

if [[ $ARG == *"load"* ]]
then
echo "Mounting /tmp to RAM drive..."
cd ~/ramdrive
mkdir tmp
mkdir build
cd build
mkdir unix
sudo mount --bind /tmp /home/swgemu/ramdrive/tmp
echo "Loading most recent RAM disk image...."
cd $HD
tar -zxvf ram-image-*.tar.gz -C $DIR
echo "Mounting Core3 build/unix to RAM drive..."
sudo mount --bind /home/swgemu/ramdrive/build/unix /home/swgemu/workspace/Core3/MMOCoreORB/build/unix
echo "RAM Drive ready for use!"
exit 1
elif [[ $ARG == *"save"* ]]
then
echo "Saving...."

cd $HD

if [ -f "ram-"* ]
then
echo "Archiving previous file..."
FILENAME=$(ls ram-*)
mv $FILENAME old_$FILENAME
fi

cd $DIR
tar -zcvf $HD/ram-image-$STAMP-.tar.gz unix
echo "Contents of RAM Drive saved to hard drive!"
exit 1
else
echo "Usage: ramdrive "
exit 1
fi

With all that said, I’m not sure how practical this is for the general SWGEmu modding community to use, but here it is anyway! Mostly, I just wanted to share this, because the younger me inside thinks it’s “so cool!” to be able to do these kinds of things now lol… However, using this setup cut my compilation times down by about 300 seconds while I was working on mods for Tarkin’s Revenge and it definitely saves my 250GB SK Hynix SSD from a whole lot write cycles, which should increase its life span as my Windows 10 system disk and the place where I keep my favorite games and projects.

Staying with WordPress.com after all!

For all the things I said in this post about GitHub Pages being easy to use and so on, the reality is that what WordPress.com has here is more functional and handy for my purposes. I can add posts and images easily from my Linux or Windows desktops, from my Chromebook, and even from the app on my phone. The same cannot be said about GitHub Pages, which I pretty much have to update using my desktop; It’s a bit of a pain in the rear, so much so that I haven’t posted anything in months.

This said, I am not going to be paying for the “no ads” plan again, because it’s way too expensive for what we low-traffic bloggers get for the money…

Far as what posts are to come, having just spent the past couple months doing some volunteer programming for some old friends on their SWGEmu based server, there are a few nuggets of interest I can share with the general SWGEmu modding crowd, as well as a few other topics I have been mulling over… Did you know that Stardew Valley is a super fun game? I picked it up last Christmas for the kids and ended up playing more than they have lol… I’ve also decided to play No Man’s Sky, because it looks to be a nifty mix of scifi shooty-shooty-pew-pew and treasure-hunty-craft-craft, which are essentially why I liked Star Wars Galaxies so much (and why most of my time in Guild Wars 2 is spent running around collecting stuff…). I’m also pretty proud of the mods I made to my rain barrel last week, finally bringing to life a tangled and cobwebby dream!

As always, I make no promises as to the frequency, regularity, and usefulness of my posts, but at least there will be more than none. 🙂

SWGEmu – 2019 Verbose Server Setup Guide (for Devuan Linux)

Far and away, the most popular post on this blog has been the original “SWGEmu Verbose Server Setup Guide“, so as a sort of parting gift to the handful of readers of this blog, I figured I would post an up to date version of the guide that works with the current iteration of the SWGEmu source code. I’ve decided to keep the blog live after I stop paying for “no-ads”, but I will be posting new content over on GitHub Pages rather than here.

SWGEmu Simple Server Setup using Devuan 2.0 ASCII

This guide is for people who want to setup a custom SWGEmu server, but aren’t interested in using SWGEmu project’s ZonamaDev tool. If you plan on contributing to the SWGEmu project, it’s better to use ZonamaDev, because it’s the standardized work environment for their project and they will help you solve problems with it. Using this guide will give you a working system that will build and run the server code, but you’re on your own for tech support.

Devuan 2.0 is Debian 9 without SystemD. It uses Xfce as its default desktop environment, which is convenient, because it’s both efficient and easy to use. While one could setup a server and build environment without a GUI, Xfce is so small and handy that it may as well be used, given how powerful and cheap PCs are these days.

Keep in mind that it’s not a good idea to use the generic passwords that I have provided in this guide if you’re going to be using the resulting system to host a public server!

1. Download and install VirtualBox
– I used version 5.2.16 in Window 10 Home 64Bit
https://www.virtualbox.org/wiki/Downloads

2. Doanload the “netinst” network installer image for Devuan
Main Page: https://devuan.org/get-devuan
Direct File: https://mirror.leaseweb.com/devuan/devuan_ascii/installer-iso/devuan_ascii_2.0.0_amd64_netinst.iso

3. Open VirtualBox and create a new virtual machine.
– Click the New button
– Name: My SWGEmu Server
– Type: Linux
– Version: Debian 64bit
– Memory: 2048MB minimum, more is better though, so use most or all of the green area if you won’t be doing much with the host system as well.
– Create a new virtual hard disk now
– VDI (VirtualBox Disk Image)
– Dynamically allocated
– 20GB

The final size of the VirtualBox image file will only be about 6GB on the disk, but it can expand up to 20GB without you needing do anything, which is nice – probably unnecessary, but a nice potential time saver down the road.

4. Configure the setting of the new virtual machine.
– Click the settings button

General Window > Advanced Tab
– Shared Clipboard: Bidirectional

System Window > Processor Tab
– CPU Slider: Set it to the max green area.

If you have 6-8 CPUs available, but only 3 or 4 are shoring in the green area, in my experience with AMD FX processors, it’s safe to use up to 4 of 6 or 6 of 8. More CPUs exposed to the virtual machine will reduce the compile time of the SWGEmu server considerably.

– Extended Features: Enable PAE/NX

System Window > Acceleration
– Paravirtualization Interface: Default
– Hardware Virtualziation: Enable VT-x/AMD-V and Enable Nexted Paging.

Display Window > Screen Tab
– Video Memory: 64MB or more

Storage Window
– Background Information: This is where you can add “loop back file systems”, in the form of a new VDI files, which can be mounted in Linux as extra storage. The nice thing about Unix-like operating systems is that other devices, such as remote computers, other hard drives, or one of these loop back files, are seamlessly grafted onto the file system, so the OS treats it like any other part of the file system. You can use this for such things as using “mount bind in your fstab file” to put the Berkeley DB files for the server into their own file or just having a handy Linux formated backup file that is located on a different hard drive than the VDI file for your OS.
I personally have a small solid state drive (SSD), so I have my OS VDI file on the SSD with only a 512MB swap partition inside it to save space on the SSD. To augment the limited amount of swap space, I have another 8GB VDI file on my much larger normal hard drive, which acts as a Linux swap file. Linux allows for setting the priority of swap space, so it will first write to the fast 512MB on the SSD, and if that gets full it will use the slower, larger 8GB on the hard drive. Generally speaking, the swap space rarely gets used at all, even when compiling. There’s lots of powerful customizations you can come up with here, if you’re willing to research on how to use it!

– Storage Tree: Click your FILENAME.vdi and if it is installed on an SSD, put a check in the Solid-state Drive box that pops up on the right side of the window.

Network Window > Adapter 1 Tab
– Attached to: Bridged Adapter

This will allow the virtual machine to get an IP address directly from your router, but we are going to setup a static ip address in Linix so that the game client can always find the server.

Shared Folders Window
– To save some sanity and storage space, you can have one folder to store the TRE files for both the game client and the server. It’s really easy to do by first sharing the game client folder in Windows (right click the folder > Properties > Sharing Tab > Share button > choose “Everyone” in the drop down and click the Share button), then accessing that shared folder from Linux in the virtual machine. . The Windows share will need to be given a name, I suggest calling it SWGEmu.

– Click the [+] button the right
– Folder Path: Other > Navigate to where you have SWGEmu installed > OK > OK

5. Install Devuan Linux
– Make sure you are connected to the internet.
– Select your VM and click the Start button
– In the Select Startup Disk window, navigate to where you saved the iso file for Devuan, select it, press Open, press Start
– Use the keyboard arrow keys to select Graphical Install and hit the Enter key.
– Language: Select yours!
– Country: Select yours!
– Keyboard Conig: American English is the default
– *wait a while*
– Host Name: swgemu (or any other single word you’d like)
– Domain name: leave it blank
– Root Password: 123456 or anything else you would like. 🙂
– Username: swgemu
– Username for account: swgemu
– User password: 123456 or anything else you would like. 🙂
– Timezone: Select yours!
– Partitioning: Guided – Use entire disk

If you know lots about Linux or you want a custom partition setup, this is the step where you can set that up. There are lots of guides on the internet to help you with this step. However, the default “Guided – Use entire disk” will suffice!

– Had disk selection: It’s the VDI you created earlier, so just click continue.
– Partitioning: All files in one partition (recommended for new users)
– Partitioning: Finish partitioning and write changes to disk
– Warning Message: Select Yes, press Continue again. 🙂
– *wait a while*
– Configure Package Manager: Select your country
– FTP Mirror: default Devuan mirror
– HTTP Proxy: Generally speaking, leave this blank. If you need to setup such a thing, look up how to do so on the internet.
– *wait a while*
– Popularity Contest: No
– Software Selection: Devuan desktop environment, Xfce, standard system utilities
– *wait a while*
– Grub boot loader: Yes
– Device for boot loader installation: /dev/sda (the VDI hard drive)
– Installation Complete: Continue and the system will reboot

6. Configure the desktop
– First system boot: login with swgemu / your password
– Panel (toolbar) config popup: Select single empty panel
– Grab the panel drag it to the top or bottom of the screen.

– Right click Panel > Panel Preferences
– Set the length to 100%, Row Size to 26 or so, and click Lock Panel
– Click the Items tab in the and add the following stuff to the toolbar: Applications Menu, Window Buttons, Separator, CPU Graph, Notification Area, Workspace Switcher. Feel free to add anything else you’d like too, of course.

– Right click the Separator on the Panel (it’s a vertical line) > Properties > click the Expand box and change the style to Transparent if so desired. This makes the Panel function the same as the Windows Taskbar.

7. Configure the Sudo
– Open a terminal and add the swgemu user account to the sudoers file
su
*enter password for the root user account*
visudo
*arrow down to the line below root ALL=(ALL:ALL) ALL and type*
swgemu ALL=(ALL:ALL) ALL
*ctl+x, yes save the file, press enter*
exit
sudo apt-get update
*enter password for the swgemu user account*

The system is already up to date, due to the network installer downloading the latest versions of everything! 🙂

8. Configure VirtualBox
– Install the system software we will need to use the VirtualBox Guest Additions
– Open a terminal
sudo apt-get install build-essential dkms linux-headers-amd64 linux-headers-4.9.0-6-amd64

– In the VirtualBox window click Devices > Insert Guest Additions CDROM image…
– Applications Menu > File Manager
– In the File Manager click the CD icon that is labeled VBox_GAs… to mount the CDROM image.
– File > Open Terminal Here
– In the terminal type
sudo sh VBoxLinuxAdditions.run
– reboot (Applications Menu > Logout > Restart)
– Login again and rejoice in your ability to copy and paste between the host and the guest!
– Open a terminal and add the user to the VirtualBox share group so it can access the Windows shared directory.
sudo adduser $USER vboxsf

9. Install the other software that is required and is available from Devuan/Debian
– Open a terminal
sudo apt-get install git autoconf libdb5.3-dev gdb libtool libreadline-dev libdb-dev libssl-dev libboost-dev openjdk-8-jre openjdk-8-jre-headless mariadb-server-10.1 mariadb-server-core-10.1 libboost-dev libdb5.3 libmariadbclient-dev-compat cmake
– This will install a bunch of other packages automatically, which is normal/good.

10. Install Lua 5.3.2 from source
– Open a terminal
cd ~/Downloads
wget https://www.lua.org/ftp/lua-5.3.2.tar.gz
*wait for it to download*
tar xvzf lua-5.3.2.tar.gz
cd lua-5.3.2
sudo make linux install

– If it gives the errors:
install: cannot stat ‘lua’: No such file or directory
install: cannot stat ‘luac’: No such file or directory
– just press the up arrow and run “sudo make linux install” and it will properly copy the newly compiled binary files to the system directories…

11. Clone the SWGEmu server software
– Open a terminal
mkdir workspace
cd workspace
git clone http://review.swgemu.com/p/PublicEngine.git
*wait a while*
git clone http://review.swgemu.com/p/Core3.git
*wait a while*

You now have two new directories with the SWGEmu software:
/home/swgemu/workspace/Core3
/home/swgemu/workspace/PublicEngine

12. Configure the SWGEmu environment
– Build the idl compiler and put it in the system path
– Open terminal
cd ~/workspace/PublicEngine/MMOEngine
chmod +x bin/idlc
sudo cp bin/idlc /usr/local/bin/idlc
– Add the idl compiler to the class path so Java can find it
echo ‘export CLASSPATH=”/home/swgemu/workspace/PublicEngine/MMOEngine/bin/idlc.jar”‘ >> /home/swgemu/.profile

Update 2019.05.27: Benjamin Castelli kindly wrote to me (thanks!) to indicate that he had to do the following to get the class path to work for the IDL compiler:
– Add CLASSPATH=”/home/swgemu/workspace/PublicEngine/MMOEngine/bin/idlc.jar” to /etc/environment

– Add a symbolic link to MMOEngine so Core3 can find it
cd ~/workspace/Core3
ln -s ../PublicEngine/MMOEngine MMOEngine
– reboot

13. Configure and build SWGEmu
– Open a terminal
cd ~/workspace/Core3/MMOCoreORB
git checkout unstable
git pull
– Note: You should have already been on the unstable branch and up to date.
make config
make cleanidl
make -j4 build-cmake
– Note: use make -j# where # is the number of cores you allocated to the virtual machine. When in doubt, count the bars in the CPU graph on the Panel.
*wait a while*

14. Give the server access to the game client files
– The server references a significant amount of data directly from the files that get installed with the game itself (“TRE” files). As such, you will need to install SWG from your original CDs, download the official SWGEmu launcher, and run the launcher so it can update your SWG installation to be compatible with SWGEmu.
– As suggested in step 4, you can simply point your virtual machine to the Windows folder where you installed SWGEmu, thus granting the server access to the TRE files that it needs. Alternately you can open that shared folder from the VM and copy the TRE files into the VM itself. I’ll describe how to do both; you can choose which suits your needs.

Pointing to the TRE files on the Windows host system:
– The windows share is automatically mounted at /media/sf_SWG
– Open /home/swgemu/workspace/Core3/MMOCoreORB/bin/conf/config.lua (with the default text editor, Mousepad, by double clicking the file).
– Scroll down to
TrePath = “/home/swgemu/Desktop/SWGEmu”
– and change it to
TrePath = “/media/sf_SWG”
– Save the file and close it.

Copying the TRE files into the virtual machine:
– Open a terminal
mkdir ~/Desktop/SWGEmu
cp -v /media/sf_SWG/*.tre ~/Desktop/SWGEmu

15. Set a static IP Address
– In Windows open a command prompt
Start > Search Box > Type cmd > Hit the Enter Key

– Get your computer’s IP address
ipconfig

In the output, look for the heading Ethernet adapter Local Area Connection. Under it you will find your IPv4 address, which could look like 192.168.0.112 or 10.0.0.47 or 192.168.1.101 on most home networks. The fist three numbers in those chains are the network address and the last number is your computer on the network. Your router (also referred to as a ‘gateway’) is most often the first device on the network, so its number would look like 192.168.0.1 or 10.0.0.1 etc. For your Linux VM, you want to use a unique number that won’t be used by another device as well. 87 is a safe bet!

– In the VM, create the static IP address, being sure to edit the correct ip addresses for your network.
– Open a terminal
sudo nano /etc/network/interfaces
– Arrow down and comment out the following line by putting a # before it
iface eth0 inet dhcp
– Add the following lines
iface eth0 inet static
address 192.168.0.87
netmask 255.255.255.0
gateway 192.168.0.1
– ctl+x to exit and save the file.
– reload the network interface to use the static ip address (or reboot)
sudo /etc/init.d/networking reload

16. Configure the MySQL database server
SWGEmu uses two database technologies, MySQL and Berkeley. The MySQL server is used to store account related information, such as character names, passwords, permission levels, and other various other bits of data. The majority of the “game data” that makes up the world, such as quest states, event timers, inventories, etc. is stored in a series of Berkeley database files. You don’t need to configure anything for the Berkeley DB, but you do need to setup the MySQL DB.

– Open up a terminal and configure the root password (to 123456). Initial password is blank. Answer Y to all questions.
sudo mysql_secure_installation

– Create the database
echo ‘CREATE DATABASE swgemu;’ | sudo mysql -uroot -p123456
echo ‘GRANT ALL ON *.* TO `swgemu`@`localhost` IDENTIFIED BY “123456”;’ | sudo mysql -uroot -p123456

– Install the SWGEmu database templates
mysql -p123456 -e source -e ~/workspace/Core3/MMOCoreORB/sql/swgemu.sql;
mysql -p123456 swgemu -e source -e ~/workspace/Core3/MMOCoreORB/sql/datatables.sql;
mysql -p123456 swgemu -e source -e ~/workspace/Core3/MMOCoreORB/sql/mantis.sql;

– Update the server IP address in the SQL database
mysql -p123456 swgemu -v -e “update galaxy set address=’192.168.0.87′”

17. Boot the server for the first time
– Open a terminal
cd ~/workspace/Core3/MMOCoreORB/bin
./core3

– You will notice some error messages like the following, because only the planet Tatooine is enabled by default.
ERROR: Unable to load screenplay SidorasBey, zone rori is not enabled.
– If all is well, you will see the following message:
(47 s) [Core] initialized
– After that, the first time the server boots it will calculate the navigation meshes that are used by the AI, which can take a long time (and must be done for every planet).

18. Configure the game client
– Go to the directory on the host system where SWGEmu is installed…

– Edit swgemu.cfg so that it reads:
.include “swgemu_login.cfg”
.include “swgemu_live.cfg”
.include “swgemu_preload.cfg”
.include “options.cfg”
.include “user.cfg”

– Edit swgemu_login.cfg so that it points to your server:
loginServerAddress0=192.168.0.87

– Edit user.cfg for Godmode, multiple instances, frame rate, and extra information when examining items:
[SwgClient]
allowMultipleInstances=true

[ClientGame]
freeChaseCameraMaximumZoom=10
0fd345d9 = true

[ClientLimits]
SetFramesPerSecond=68

[ClientUserInterface]
debugExamine=1

19. Log into the server with the game client on the admin account
– Username: swgemu
– Password: 123456
– Log out and close the game.
– On the server, open a terminal and give the swgemu game account admin privilages
mysql -p123456 swgemu -v -e “UPDATE swgemu.accounts SET admin_level=’15’ WHERE username=’swgemu'”
– Log back into the game on the swgemu account a create a character that will now have “God Mode” privilages.


That’s all that is really needed to run a server. You could even forgo using the Xfce desktop and only install the basic command line of Devuan, but it only saves about 3GB of hard drive space by doing so, which isn’t much in today’s world. Also it should be noted that you can skip all the VirtualBox stuff and simply install Devuan directly onto the hard drive of a real computer and then copy the TRE files from your desktop to your server using a USB stick. Nothing says you must use a virtual machine, it’s just much more convenient in today’s world of multi core CPUs with 8GB+ of RAM and huge, fast storage drives.

Also of note is that I basically have fumbled my way through the SQL portion of this guide – it works, but it’s not my area of expertise. If you’re going use this guide to build a server that you plan on hosting to the public, it’s important to understand that, as with any public facing networked computer, you need to pay close attention to the configuration and security of your server. While this guide gets you a functioning SWGEmu server, it does that and ONLY that. The rest is up to you! 🙂


Update: Bad News for fellow AMD FX CPU Owners

So after playing with this setup, I discovered that compiling Core3 took literally twice as long as it used to! With the Legend of Hondo VM, based on the 2016 version of Core3 and running in a Debian 8 VM running under Windows 7 64 bit, the compile time was 492 seconds using 6 cores (as seen in this post). Today the compilation too a whopping 1140 seconds in my Devuan 2.0 guest, on a Windows 10 64bit host! WTF, eh?

Attempting to mitigate the issue, I installed the backported version of kernel 4.19, upgraded VirtualBox to 5.2.26, disabled the Spectre mitigation in Windows 10 (Meltdown is N/A for this CPU, according to Inspectre.exe, which I believe means the patch isn’t running in Windows), and added “nopti noibrs” to the kernel parameters in grub on the VM, but nothing helped.

What a bummer – compiling software with GCC was the one thing this o’l FX-8320 was great at!

For comparison, I recompiled Legend of Hondo in its Debian 8 VM on this Windows 10 host and it only took 474 seconds. That’s 2.4 times faster!

For further comparison, I compiled Core3 in a current version of the ZonamaDev environment (Debian 9 with kernel 4.9) and it also took way too long, coming in at 1061 seconds.

Well, it’s clearly not a problem with the Windows 10 host or VirtualBox. The problem is either the new version of Core3 or the new version Devuan/Debian/Linux.


Bonus: How to use Linux Kernel 4.19 in Devuan 2.0

This is something I had to do on my computer when I installed Devuan 2.0 directly, as version 4 kernels before 4.12 don’t work very well with my AMD R9 270 video card. It’s not a hard process, but it can be a bit confusing if you’ve never done it before.

1. Add the backports repo to the sources list
– Backports are software that is newer than versions that normally are available with a version of Debian/Devuan. In this case we’re using a newer version of the linux kernel itself.
– Open a terminal and type
sudo echo “deb http://deb.devuan.org/merged ascii-backports main” >> /etc/apt/sources.list
sudo echo “deb-src http://deb.devuan.org/merged ascii-backports main” >> /etc/apt/sources.list

2. Update the system
– Open a terminal and type
sudo apt-get update
sudo apt-get -t ascii-backports upgrade

3. Search for available kernels
– Open a terminal and type
apt-cache search linux-image

– This will return a list of kernel images that are available. They have specific names. At this time, we’re looking for linux-image-4.19.0-0.bpo.2-amd64, but some of the numbers might be higher by the time you read this, so change them as you need.

4. Install the kernel and kernel headers
– Open a terminal and type
sudo apt-get install linux-image-4.19.0-0.bpo.2-amd64 linux-headers-4.19.0-0.bpo.2-amd64

5. Reboot to start using the new kernel
– The system will automatically boot using the newest kernel.

Semi-Nerdly YouTube Deleted

Just thought I would post here to say that, yes, I did remove all my videos. Sorry about all the broken links, etc. Life goes on.

Why did I delete my YouTube account?

1. Google bothers me.
I swear, the only reason Google has not failed as a company is because they make so much money selling ads that they’re simply able to buy their way out of their mediocrity and regularly unhinged malarkey. From the, “change for the sake of change” that continues to make their services worse (Gmail in particular), to how they can’t even be arsed to properly curate YouTube Kids (despite being an extraordinary wealthy company), Google disappoints me over, and over, and over again. Top it all off with how gross and slimy they are when it comes to privacy, they’re just not a company I wish to support. Sadly, I have practically everything tied to my Google account, so it may well be impossible for me to De-Google entirely at this point…

2. I really don’t like making videos anyway.
Meh, there are just so many other things I would like to do with my time. Couple that with the fact that no one cares anyway and, well, why bother? It’s not like I was posting useful tutorials or whatnot and there’s plenty of content on every topic imaginable anyway. The world does not need me to make videos! 🙂

3. YouTube kinda sucks now, eh?
Seriously, it’s so full of complete and utter bullshit that there’s really only a tiny microcosm of useful or relevant content now. Also, it’s neigh unwatchable without using ad blocking software of some type too; I understand that bandwidth/hosting is expensive and that content creators deserve to be paid, but it’s really gone too far. The same can be said about our the satellite TV, where broadcasters have stooped so low as to put banner ads over the show. Truly, the current incarnation of the advertisement industry is a blight upon humanity… I digress. YouTube, it jumped the shark several years ago.

Anyway, I thought I would post this here so that it was visible on the side bar. Have fun!

Semi-Nerdly is Moving to GitHub Pages

Semi-Nerdly: Now at https://tatwi.github.io/semi-nerdly/

For me, this move makes sense for a lot of reasons. The big one being that the workflow and tools I use for creating web pages on GitHub Pages is exactly the same as how I have documented my GitHub projects since 2014. That being, essentially,

1. Open the Geany editor.
2. Write some stuff, using Markdown for formatting.
3. Use Git on the command line to push the content to the GitHub repo.
4. Rejoice!

The only real issue is that GitHub limits repositories to 1GB of storage, which means I won’t be able to host many images in my tutorials/guides/etc. However, I will make up for that by sticking image galleries in my Google Drive if need be.Objectively, the most important things I write about here have to do with my projects on GitHub anyway and despite being pretty excellent at documenting my projects when compared to many open source creators, I do need to dedicate more time to documenting RocketTux, Rescue Girlies, and Legend of Hondo. Yes, I am sure some WordPress.com readers enjoy see pictures of me digging gross stuff out of old keyboards and how the keyboards look after I’ve cleaned them, but I am sure I’ll still feel strangely compelled to make posts like that on GitHub pages too.

Honestly folks, hardly anyone ever reads this site anyway, according to the stats on the WordPress.com dashboard. The most popular post, by far, has been my Verbose Guide to Creating a SWGEmu Server, which is sadly now quite outdated. I considered making an up to date version of that post, but really the ZonamaDev system is perfectly fine if you don’t mind using SystemD (bleh…) and I posted a copy of my Legend of Hondo virtual machine on my Google Drive, so there’s nothing really to setup to use it. Apart from that, the only other truly notable post I have made on WordPress.com was my rant about the French Canadian keyboard (ISO layout) which has been surprisingly popular. I have also noticed more online sales descriptions of laptops specifying the keyboard type, so who knows, maybe the post struck a chord with some folks of influence in the industry. Let me tell ya, using a keyboard that is different from what you were trained on is a serious impediment to productivity! I digress… 🙂 Anyway, as far as I can tell GitHub Pages doesn’t have any metrics, so that’s one less thing to ponder in the cricket chirping quiet of humid summer nights!

So here’s the plan:

I will keep this tatwi.wordpress.com blog alive and let it go back into ad-showing free-mode this summer, changing the main page to indicate that new activity is happening on GitHub pages. I’m really sorry about this and allow me to apologize in advance for the inappropriate ads that Google Analytics will inevitably display here (Ad-Block you say? Why yes, the Internet sure has become utterly insufferable without it, eh? Sigh…). After I have setup the main page and I am satisfied with the amount of content I have brought over to GitHub pages, I will redirect the semi-nerdly.ca domain name to the GitHub Pages site and I will keep paying for the domain name through one registrar or another.

Well, that’s it for now. I did make a post today over on the new site about Making a Button with GIMP if you’re interested in that sort of thing.

Take care!