Station Building in KSP

I’ve been doing various things in KSP since I last posted about it.  Re-did the Mun landing in the manner of Apollo 11, even including doing the midflight module reorganization so that the lander was on top.  The project I’ve been currently working on has been to assemble a space platform for holding fuel and other supplies for more remote missions to stock up on once entering orbit.

Behold, the Icarus I!

Behold - the Icarus I!

 

The station is built up from from three separate launches as you see it there.  The first launch took the base station module, which is on the right part of the image (including the crew capsule, six-way docking port on the right and solar panels).  The second launch was the middle fuel module (the orange tank, redundant engine, RCS tank, and nosecone) and the cross-shaped docking port connector.  The third launch brought an extra fuel module into play.

With this design, I have fuel modules with lifters that can be brought up to the station and bring up RCS fuel and a full orange tank.  They can then dock up and transfer fuel onto the station.  The station can hold five such modules in the main battery, and still have docking clamps available for other vessels to dock on and collect fuel / crew.  The individual fuel modules can even be undocked and deorbited if desired, since they have a probe controller onboard, RCS thrusters, RCS tanks, and an engine.

Having such a thing in orbit should make missions to other planets far easier to sort out – no need to carry fuel for the transit, just make sure you get enough empty tanks in orbit to fill up.

DOTA2 with SLI Graphic Corruption Fix

I’m using an NVidia GTX690, in 2d surround mode.  The GTX690 is an SLI card, and in 2d surround mode SLI is not optional.  Running DOTA2 on this system (even on just one monitor) causes all sorts of random graphic corruption.

This corruption manifests itself as flickering text, distorted polygons when hovering over menu items, that sort of thing.  Nothing terrible, but it’s annoying.  Fortunately, I found a fix!

This thread on the DOTA2 Dev forums worked perfectly for me.  I’ll summarize it here in case that thread disappears;

What I ended up doing was downloading the latest nvidia inspector. I changed my values for a few options. (see below)

‘Number of GPUs to use on SLI rendering mode’ : SLI_GPU_COUNT_TWO
‘Nvidia predefined number of GPUs to use on SLI rendering mode’ : SLI_PREDEFINED_GPU_COUNT_TWO
‘Nvidia Predefined SLI mode’ : SLI_PREDEFINED_MODE_FORCE_AFR2
‘SLI rendering mode’ : SLI_RENDERING_MODE_FORCE_AFR2

And a screenshot of my settings in NVidia Inspector follows;

NVInspector DOTA2 Configuration

 

The items in grey are unchanged.  Seems to have worked immediately, and performance seems fine.

State of the Game – ZenCoffee Edition

Thought I’d write something about what games I’m playing right now, and what I have on the backburner.  Ordering of these is pretty rough and mostly by level of interest of amount I’m playing it.

EVE Online

I’m an old-time EVE Online player, originally started in 2003.  However, over the years I’ve taken a few years off here and there, including the last break which was at the start of Incarna.  I decided to come back because some friends of mine resumed their accounts, and I read about a lot of the changes that had happened during my leave of absence.  It’s taken me a few weeks, but I’ve got myself mostly sorted out, and I’m running around high-sec doing incursions and missions and stuff like that.  Don’t know if I’ll ever get back into nullsec stuff, I don’t think I have the time.

Kerbal Space Program

I’ve had this recommended to me, and picked it up the other day.  KSP is awesome, for people interested in that sort of thing.  In essence, you assemble rockets / space stations / landers / rovers from out of basic components, and then launch them into space.  You can plan all sorts of space missions – from orbital rendezvous through to landing on the Mun (moon), and even on other planets.  Good fun, and it never gets old when a rocket fails catastrophically.

The Last of Us

Released by Naughty Dog, the same company that brought us the Uncharted series, The Last of Us is a post-apocalyptic third-person shooter/adventure with a great story and emotive, believable characters.  I’m only playing this in small doses.  Its R rating and high gore means it’s not appropriate for me to play this while the toddler is awake, and when she’s in bed the TV is usually appropriated for something else.

A-10C Warthog

Previously discussed at length.  I’m not playing this a whole lot right now due to other things happening, but this is still on my list to be continued with.

Rift

Since this went F2P, I gave it a go.  However, to be blunt, I’m not that impressed with it.  I can’t help but compare it to Guild Wars 2, and it usually comes in lacking.  I’m mostly just playing this with my wife when we feel like it, and other than that, it’s pretty low priority.  It is free though, which is a really big point in its favor.

Defiance

I grabbed this when it was on sale on Steam a while back.  It’s supposed to be a Syfy/Game fusion experiment.  As a shooter, it’s pretty mediocre.  As an MMO, it’s also pretty mediocre.  The graphics are acceptable, and the gameplay is entertaining, in a mindless way.  The lack of a levelling system makes it very accessible, but also leaves me feeling that there’s no progression at all.  It’s OK if you want to shoot stuff for a bit and not think too much about it.

Guild Wars 2

Played this quite extensively already.  It’s on low priority – mostly gets played now when my wife wants to play together.  I’ve got max level characters for Ranger, Elementalist, Guardian and Mesmer.  I prefer playing the Elementalist, it’s a lot of fun.

Star Citizen

It’s not even out yet, but I’m excited for this.  If you’re a fan of the old Wing Commander / Privateer / Freelancer series and space combat in general, you have to check out Star Citizen.  I’m also interested in X: Rebirth, but EgoSoft seems to be dragging their feet terribly, and to be frank, if SC is coming anytime close to XR’s release, EgoSoft should rename it to X: Stillbirth.

Elite: Dangerous

Again, also still being developed.  I was a huge fan of Elite back in the day, and this is being made by the same guy.  Definitely looking forward to this one, although obviously Star Citizen is the gorilla in the room for space sims currently being developed.

DOTA2 / League of Legends

I’ve put these two together because they sit in the same genre.  I’ve wanted to learn a MOBA for a long time, but never really found the inspiration.  Now with DOTA2 having a tutorial mode, maybe I’ll get around to it.

Starcraft II – Heart of the Swarm

Not a huge fan of the Zerg, but I’ve played through the SC2 original campaign, so was thinking of doing HotS when it comes on sale.

Some of the issue with the above two games is that I find myself increasingly unwilling to engage in PvP-only games, and particularly team PvP games.  It’s not that I hate losing or anything like that, it’s just that I want to play on my terms in my own time, and not feel that I’m letting anyone down by just dropping out because of RL concerns.

And for that reason, I tend to find myself gravitating towards games that can be played single-player or alone, or that support drop-in / drop-out gameplay.

Kerbal Space Program!

I recently picked up Kerbal Space Program from Steam, at lots off.  Awesome game, if you’re into that sort of thing.  I first used the stock Kerbal X rocket, and tried to get it into orbit.  After a few misfires (whoops), I managed to get it into orbit and deorbit it into the sea with the crew alive.  Yay!

Next up, I went and grabbed MechJeb2, which is an autopilot / information mod.  MechJeb can be used for a LOT of data about your rocket.  In particular, I wanted it to show me delta-V data for my stages.  I’ll admit it.  I use the autopilot for launches.  I know I can do a launch, orbit and circularize by hand, so I’m not too proud to admit to using MechJeb to handle that for me.

So, I then decided to replicate the Gemini 7/6A launches, and do the orbital docking.  Built the rocket myself according to the spec in the tutorial, with the exception that I installed a MechJeb2, two solar panels, and a battery pack on the side of the capsule.  I also put some standard canards on the first stage booster.

I used MechJeb2 to handle the launch and orbit circularization (100km), and also used it to get the capsules on an intercept course.  From there, everything was done by hand.

After some time, I managed to get them within a few meters of each other…

Gemini 7/6A Docking Approach

And then slowly, slowly, slowly coming together, I had to reorient and back away because I was targetting the capsule, not the docking port, so they were inches from bumping.  Fixed that up, and…

Gemini 7/6A Docking Complete!

Success!  After cheering for a bit, I detached Gemini 7 and deorbited it, using MechJeb’s landing guidance (no autopilot, just the projection).  Got it down within 3km or so of the KSC.

Then, I assembled a suitable lander for the Mun along with a transfer stage booster.  After messing about with trying to make a primary lifter that would have enough delta-V, I came up with this design…

Errm….  It didn’t go so well.  That was a staging failure – the clamps didn’t release when the rockets fired, and hitting space detached both the clamps and separated the rockets, which then resulted in the catastrophe you see.

In the end, I resorted to using the Zenith Rocket Family pre-built lifters.  I wanted to make sure that my stage would be appropriate, and make sure I could actually DO it.  When I do an interplanetary launch, I’ll probably use the Nomad Interplanetary Drive Family boosters.

I used MechJeb to handle most of the navigation.  The point here was to see just what happens, and to pay attention to how the various orbital mechanics actually work.  Then I’ll do it myself with no autopilot, since i know the rocket can do it and have fuel to spare.  Anyway, success!

Putting a Kerbal on the Mun!

I even had enough delta-V to get them back to Kerbin safely!  Great success!

Much stuff about orbital mechanics learned.  Now to to it with no navigation assistance besides what’s built-in, and once I have that down pat, plan a mission to Duna!

SVN Version Control for Gaming

DCS World is a big, complex game.  And it gets updated a fair bit.  And sometimes, just sometimes those updates break it.  In addition, I make customizations to the game’s scripts to make it work with my setup, and so I tend to lose those changes every update.  A better solution is required.

Enter Subversion (SVN).  Subversion is a version control system usually used for managing versioning for source code.  It allows you to commit changes into a repository, roll back changes if required, and also bundle up sets of changes into branches or tags.

It’s possible to set up your own local SVN repository and use that to manage game installations like this, even if the game is already installed.  First, go and get TortoiseSVN and install it.  Then, go and edit the security settings for your game folder so you can have write access to it without needing to elevate (if you’re using Vista/7/8).

For this example, the game we’ll be bringing into versioning will be in D:\Example\Game, and we’ll be making a local SVN repository in D:\Example\SVN.  We’ll do an initial import, tag it, edit some stuff, commit a new tag, and roll back.

Step 1 – Create the Repository

Create the folder D:\Example\SVN, however you’re going to.  Then right click on it, and click TortoiseSVN.  Click Create repository here.

Create SVN Repository

Now, in the dialog box that appears, click “Create folder structure” followed by OK.

Create default folders

Step 2- Importing Content

Now, right click on your game folder, then click TortoiseSVN, Import.  This will open the Import dialog;

SVN Import Settings

Edit the repository URL to file:///D:/example/SVN/trunk .  This causes the folder to be imported into the trunk of the SVN repository.  Type in a sensible import message, like “Initial import of version FOO”.  Tick “Include ignored files” to make sure you get absolutely everything, and hit OK.

Wait.  This will take a while.  All the content in that folder is being imported into the repository and being marked.  Note that this will take a fair amount of disk space, but disk space usually isn’t at a real premium these days.

Step 3 – Changing over your install to the SVN Repository

Now that you’ve imported everything, you have something scary to do.  You’re going to delete/move your entire game folder somewhere else and then check out SVN into it.

Go into your game folder, and move its entire contents somewhere else, or delete them.  You want that entire folder clear.  Then, right click on the game folder, and click SVN Checkout.

SVN Checkout

Make sure that the repository URL is the location that you imported the folder into (the trunk of your SVN repository).  Make sure that the checkout directory is the game directory you just cleared.  And check out the HEAD revision (this means the latest revision in SVN).

This will also take a while to run.  Once it’s done, you should see a green check mark on the game folder.  This means that the folder and all its recursive contents are consistent with SVN.  Congratulations.  Now we need to learn how to do some SVN housekeeping.

Committing changes to the trunk

The trunk is where the main, currently active version of your game should reside.  This is what you currently have checked out.  Now, let’s assume you just ran a game update, and it modified files and added some new ones. The modified ones are picked up with a red cross, the new ones are missed.  In order to commit all the new files into SVN, we’ll need to do a commit.

Right click on the game folder, then click Commit.

SVN Commit Dialog

In this box, review the list of changes made.  Make sure that ‘Show unversioned files’ is selected – this will show you files that got added to the game’s folder since the last commit.  This is vital so you can add files that may have been added by the patcher.  Tick ‘Check: All’ if you’re happy with the list of changes made, enter a reasonable message and click OK.

All the changes made will be commited into the repository you have checked out (most likely the trunk), and that version will then be the new head revision.

Making a tag

Tags are commonly used to mark a specific revision of your SVN repository.  For our purpose, we have a perfect use for tags – saving specific versions of our game.  Let’s assume that the current committed version is version 1.1 of the game and you want to make a tag for that so you can roll back to it at another stage.

First, we’ll need to create a folder in your repository for tags to live.  Right click on your game folder, then click TortoiseSVN and Repo-browser.

In the repository browser, right click on the very top of your tree on the left, and click Create Folder.  Name the folder ‘tags’.  Run through the message box, and let it finish.  Then click on the top of the tree, right click and click Refresh.  You should now see the ‘tags’ folder.  Hit OK on the repository browser to close it.

Now, right click on your game folder, which should already have all the changes committed, click on TortoiseSVN, then click “Branch/Tag…”.

SVN Branch/Tag Dialog

In this box, change the path to /tags/release-1.1 .  This is what you’re going to create the tag as.  Note that your source data is from the trunk.  Enter an appropriate log message, and hit OK.  Creating a tag from existing committed data is very fast, and takes very little disk space.  You can select ‘HEAD revision’ to definitely create the tag from the head revision, otherwise it’ll use whatever revision you currently have checked out to make the tag.  Or the working copy of the data (which may have uncommitted changes).

If you now go into the Repo Browser you’ll see your created tags under /tags .

Reverting to the currently checked out revision

Let’s say you accidentally blew up some files, or a patch went bad or similar.  There’s a few ways you can revert effectively, but you need to be able to revert a few kinds of changes;

  • Files that were modified
  • Files that were deleted
  • Files that were added

Now, by definition all files that were added will be unversioned.  So, right click on your game folder, click TortoiseSVN, then click Revert.  Check ‘Select all’ to make sure everything’s selected and review the list.  Now click ‘Delete unversioned items’ review that list, and hit OK to clear out any items that were added by accident.  Finally, hit OK on the Revert dialog box to revert back to the checked out revision.

Your install is now back the way it was.  Easy!

Reverting to a different tag

Let’s say that you need to (for some reason) roll back to a whole different release you previously tagged.  First, make sure that your currently checked out working copy is all committed and OK, since it’s going to go away in a moment.

Right click on the game folder, then click TortoiseSVN, Switch.  Click the ‘…’ next to the dialog box, and go find the tag you want to switch to.  Hit OK, and your working copy will change to the tagged release.

WARNING!  When you switch, your working copy is no longer of the trunk revision!  It’s now of the tagged revision!  This means that if you commit any changes, they will be commited to the tag, not to the trunk.  This is probably not what you want.  Then again, it may be.  Just be aware that a switched working copy is no longer of your trunk, and that tags aren’t necessarily static.  Note that at any time, you can review the commit log for the trunk or a tag so you can review what was changed.  This is why messages are so important.

To change back to the trunk, repeat the process, but select ‘/trunk’ as the path.  Select ‘HEAD revision’ to make sure you get the latest revision of the trunk.

Conclusions

With those basic processes, you can use TortoiseSVN to manage updates and do version control for all sorts of things – including game files which are largely binary.  The basic scenarios you’ll need to handle with SVN are;

  • Saving a working game update:  Commit, then Tag the HEAD revision appropriately.
  • Reverting broken, uncommitted changes to the HEAD revision:  Revert, selecting to delete all unversioned files.
  • Switching to a previously tagged release:  Switch to the tag you made.  Keep in mind that your working copy is now the tag, not the trunk.

Have fun!

FOV Adjustments for TripleHead Setups

Many games appear to do horrible things with the viewport when you are using a display with a strange aspect ratio – such as a triple head setup.  The aspect ratio of my setup is 48:9, which plays merry hell with viewports in flight sims that are designed to look ‘normal’ with a 16:9 setup.  The usual result is that views are horrendously thin vertically.

Anyway, I did some trigonometry (which is probably a bit broken) and came out with a formula that lets you convert a FOV figure that’s intended for a normal aspect ratio and convert it to an FOV that’s appropriate for a triplehead setup.

\displaystyle \theta = 2 \tan ^{-1} ( 3 \tan \frac{\alpha}{2} )
Where
\alpha = original FOV
\theta = new FOV

Using this, the result that you get is the ‘original’ view, instead of being spread horizontally across three monitors and then the vertical component being hopelessly thin will be spread across only the center monitor.  This means that you’ll see extra stuff on the left and right that wouldn’t have been in that viewport normally, but the vertical view will be normal.

Doing this in something like A-10 with the left and right MFCD’s works great – the MFCD appears on the central monitor and pretty well fills it, which is what you’d expect.  Without adjusting FOV, you just get about 1/3 of the MFCD into the display.

A conversion chart appears below for those who don’t want to do math;

FOV Conversion Chart
Standard FOV Triplehead FOV
20 55.76
30 77.59
40 95.03
50 108.88
60 120.00
70 129.09
75 133.04
80 136.67
90 143.13
100 148.75
110 153.72
120 158.21
130 162.33
140 166.16

75 degrees is included here because that’s the default FOV for a lot of the DCS simulations.  The triplehead FOV of this (133 degrees) winds up being very close to the value that I figured out by eyeballing it (which was 135 degrees), so I’m fairly happy this is accurate.

IR Head Tracking with FreeTrack

I’ve recently been learning to fly in DCS: A-10c Warthog, deciding to stick to just one flight sim until I get good at it.  What I’ve been interested in is whether a head tracking system would be useful, and whether I’d like it.  The TrackIR 5 head tracking system runs about $200, which is a bit costly for an experiment – particularly if I didn’t like it.

First, some background.  A head tracker is a system which monitors your head for movement, and then can be used to shift the point of view in a simulator appropriately.  Some work from facial recognition, but most work by having either infrared reflectors or emitters in fixed positions on a harness on the user’s head, which are then monitored by a camera.  The TrackIR is one such system, and has high compatibility with many simulators and is quite popular.  But it’s expensive.

Enter FreeTrack.  FreeTrack is a free system which uses (slightly modified) Webcams and a head harness made with some infrared LEDs to implement a head tracking system.  I decided to make myself up a really cheap FreeTrack setup to see whether I liked it at all.  Total cost?  About $20.

The Hardware

I went down to my local games shop, and was lucky enough to pick up an old-style Playstation 3 Eye for $9 (!!!).  The PS3Eye is ideal for this sort of thing since it can be easily disassembled and turned into an IR camera and can do decent resolution and framerate (320×240 @ 120fps).  I ripped out the IR filter lens inside the camera (wrecking the filter in the process), and replaced it with a piece of cut-out developed photographic negative.  The black part of a photographic negative is quite opaque to visible light, but nearly transparent to infrared.  I only used one layer, but in hindsight I probably should have used 2-3 layers of film.

For the headset, I simply used three IR LEDs in series with a 220 ohm resistor and a 9V battery.  This means the LEDs will have about 40mA going through them, which is within their spec.  Those are mounted onto a hat (photos will be forthcoming) so that two of the LEDs are on the corners of the visor, and the third is in the middle at the top of the head, all pointing towards the camera.  I then covered each LED with a thin layer of Blu-Tac to act as a diffuser.  Blu-Tac is surprisingly permable to IR light.

The Software

Firstly, I got drivers for the PS3Eye from here.  Secondly, you’ll also need FreeTrack itself.  Setup here is quite easy, follow the instructions you can find at this link.

When FreeTrack is running, mess about with your sensitivities.  You will probably notice that FreeTrack will crash if you just hit Start.  Click on the tabs that let you select the framerate, and the Stream button that lets you view the settings for the camera, and it’ll be fine when you hit Start.

Assuming it all runs, you’ll now need to get it running in your flight sim.  We’ll assume you’re using DCS A-10c like me.  Download the Eagle Dynamics DLL‘s from the FreeTrackNoIR project (another head tracker) and then drop the files into a ‘headtracker’ folder under (I assume that the root of your DCS A-10c install is in C:\A10C for brevity);

C:\A10C\bin\headtracker    <-- put 64 bit DLL and files here
C:\A10C\bin\x86\headtracker     <-- put 32 bit DLL and files here On starting up A-10, it should ‘just work’. The Test

It’s impressive.  The level of immersion provided by something so simple is amazing.  You will definitely want to enable deadzones for all the axes though otherwise it’ll look like you have the shakes.  But once you get it tuned right, it’s amazing.  Just being able to naturally look out of the cockpit is incredible.

It’s impressive enough that I’ve just ordered a TrackIR.