Monday, October 12, 2015

libHexPlanet: Sphere 7

I got sphere 6 working using a texture for the vertexes and sending position indices (I didn't get a chance to post the screen shot).

However, both my machines have limits of 256 KB for textures, this works out to 16384 vertexes, which is sphere 6.

I'm going to give up on indirection, and just spam all the vertices.  It took a little doing, but it's working.

Sphere 7:

And I can now do sphere 10, which is so detailed, the individual hexes are turning into pixels:

Thursday, October 01, 2015

libHexPlanet: Shading!

I figured there should be a way to have the shader do the triangle/hex reprojection, and I found it!

The shader calculates the nearest point, and uses the terrain type (one byte) to pick a color.

Thursday, September 10, 2015

Plates in libHexPlanet

I finished this a while back, but forgot to post an update...
This is sphere 9 (200k) hexes.  I've also significantly sped up generation so sphere 10 and 11 are pretty quick.

Now I need to figure out the math for plate collisions...

Friday, April 24, 2015

libHexPlanet

I'm always interested in world building, and I saw some talk about generating entire spheres of hexes.  This is not straight forward, since you can't make a sphere entirely out of hexes (you usually get twelve pentagons).

I saw one guy who embraced the variation, and would randomly make more pentagons (with a septagon to balance each past twelve).  He also moved the points around, so the whole map is a little irregular.

There is another project - HexPlanet, which just has the twelve pentagons.  I've found that code a lot easier to work with, and when you have 100k+ hexes, twelve pentagons is hardly noticeable...

I've finally got it into a state where I can easily generate some map data.  Here is sphere 9, which is nearly 200k hexes.  I should be able to get sphere 10 working (nearly 600k hexes), with an stretch goal of sphere 11 (should be over 1.5M hexes).

The terrain is a little hard to see, since it is entirely random.  But you can see how small the hexes are in sphere 9.

Friday, September 05, 2014

Youtube Filter Extension - Inception

There are a lot of young kids watching Youtube videos.  I went looking for the parental controls, and found Google's statement: Youtube is for people 13 and over.  To which I respond, hahahahahahaha

I thought about using a Squid proxy, but the video is encoded into a GET request, which Squid didn't seem ready to handle...

Then I saw this extension, and it looks like a good way forward...

Monday, August 11, 2014

Bridgehead

"Bridgehead" (David Drake) - I was unpleasantly surprised by this book.  I expect a lot more from Drake, and this was not up to his usual standard.  He took an unusual idea (FTL via some sort of row and column based system), and wrapped it up in a lot of mystery and drama (which are not his strong suit).  The combat was a fairly minor part of the book, and always one-sided.

Tuesday, June 10, 2014

C++: make the simple case broken

I've been programming C++ for twenty years, and I learned something yesterday about a fundamental class that I use a lot...

int main(int argc, char **argv)
{
   std::map<int, int> myMap;
   myMap.insert(std::make_pair(0, 1));
   myMap.insert(std::make_pair(0, 2));
   printf("%d\n", myMap[0]);
   return 0;
}

What should this program print?  1 or 2?  If you said 2, you'd be horribly wrong!

Because, sometimes, you just want your insert operations to fail.

If you don't want total failure, you need to write:

int main(int argc, char **argv)
{
   std::map<int, int> myMap;
   myMap.insert(std::make_pair(0, 1));
   std::pair::iterator, bool> i = myMap.insert(std::make_pair(0, 2));
   if (!i.second)
      i.first->second = 2;
   printf("%d\n", myMap[0]);
   return 0;
}

That's why I love C++.

Tuesday, April 08, 2014

Crowdsourcing your brainstorming

Back in the days of Mudge, it was easy to brainstorm an idea like industrial applications of black holes.

Now, it's harder.

I figured I would make use of the largest collection of nerds that I know about - Reddit (seeing as how Slashdot has gone down the tubes).

Reddit is divided into groups, and finding the right one can be somewhat of a challenge.

The most direct would be /r/AskScience, since it is really a science question (or, applied science).  But they take a dim view on science fictiony things.

There is also /r/AskScienceFiction, which sounds perfect.  Except, everything there is in role-playing form (it should be /r/AskLARP or something).  There are other more conceptual/design subreddits, but they are all low traffic.

So, I just had to ask my question in a RP fashion, and try and make sense of RP answers.

The answers weren't spectacular.  But I must give credit to /u/Sriad for the best one.  I had thought about using extreme matter compression, but I was thinking of something like a diamond press (which would not be forceful enough).  Treating it more like a fusion bomb makes a lot of sense.

Thursday, December 12, 2013

"Trader's World"

"Trader's World" (Charles Sheffield) - I am really liking Sheffield.  This book reads like the Golden Age of SF, but is from 1988.  Reminds me of the Stainless Steel Rat.  Earth is recovering from WWIII, and the traders hold together the big nations through diplomacy and trade.

Saturday, November 30, 2013

Starfarers

"Starfarers" (Poul Anderson) - I'm not sure what to say about this book.  The main idea is the development of a zero energy reactionless drive (so, no FTL, but lots of STL).  The story is told in two parts, the first follows the first star ship (traveling thousands of light years towards signs of other reactionless ships); the second follows the second generation explorers, settlers, and traders.

The two stories help to break up some of the monotony (not much happens in 495 pages - at one point, I broke out the old "I'm sorry, my friend, but you must die to make the movie more interesting!").  However, it seems like the whole thing could have been made shorter.

Wednesday, November 20, 2013

NedOS on real hardware!

It took some doing (and it's still not where it is on simulators), but it's something.

Saturday, September 14, 2013

Voxel Worlds

I think I need to work on some sort of voxel world building game (aka Minecraft - or should I say, NedCraft, MiNed?)

Some numbers:
Figure 1 GB allocated for the world (which should fit nicely into memory on modern machines - you could go to 2 or 4, but not 10 or 20 yet).  One byte per block gives 255 active textures (plus empty).  That should be plenty (Minecraft has a ton of items and creatures, but those can be handled separately).

1e9 blocks sounds like a lot, until you start trying to fill a globe with them...

That's 1000 blocks cube, if each block is one meter, that's only a 1km cube (which is a pretty small planet).

You might use a lazy system for allocating, but that opens the possibility of the total storage growing enormous over time.

It seems better to limit the depth, and spread the blocks over a greater area...

Of course, you need some volume above the surface as well...

500 m high, 500 m deep... 1 GB goes fast!

Wednesday, August 28, 2013

Soylent People Are Green!

(you know, green, like they care about the environment)

I seem to remember something about some guy trying to develop a food replacement blend.  I didn't think much of it until I saw it on Ars, and checked out the blog.

"Suppose we had a default meal that was the nutritional equivalent of water: cheap, healthy, convenient and ubiquitous."

There is something in geek culture called "life hacking".  Just like you might hack software or hardware to scratch an itch, you can hack your body to make it a little better.

That's the approach here - the creator started with a personal project (simplify meals), and is now open sourcing it for everyone.  I think it will be interesting.

Sunday, June 16, 2013

Gentoo Defeated Me

You know it's bad when you start thinking about finishing your own operating system, rather than wrestling with getting an existing one to work...

My old laptop has Ubuntu 10.4 (which expired June 1).  Lots of stuff has started breaking, I've known I needed to update the OS for a long time.

I hate 12.4 (which was the natural upgrade), so I figured I would try Gentoo.  I'd be able to build any software I need.

I've been trying to build Gentoo on two machines since December.  Neither works.  They have different processors and graphics, but, ironically, they both fail in the same place (X server fails to load KMS module).

I just pulled the Gentoo live DVD, and it looks good.  X starts up (although my wireless isn't recognized...).  I looked for a "Install this!" button, but alas, no such thing.

I searched for "Install Gentoo from live dvd".  I found a forum post which pointed to a wiki page.  The wiki page wouldn't load, so I had to go through the Google cache, only to discover the page was deleted - due to incompatible license.  Wonderful.

Sunday, September 23, 2012

LoN for Noobs: Starting Out

Light of Nova has its own unique quirks which set traps for the unwary, and hide gems from the uninformed.  I'll try and shed some light on them:

  1. Starting out, don't worry about any mothership modules apart from crystal and metal gathering.  Build the others to collect the training rewards, but focus on these two.  (I'll post a queuing guide next)
  2. Do the first adventure - that will give you a new commander.  The next commander is a ways in.  Best to hit those with better tech.
  3. Find a governor and a main fighter.

You want a governor with metal or crystal skill (ideally both, but that rarely happens).  Fuel is useless.  Crystal is needed for research, while metal is needed for advanced flagships.

Your main fighter will have tempest skill (and ideally vulcan or destroyer).  This is because the computer guys love fighters and are optimized for killing cruisers and battleships (and fighters are too flimsy for big fights).

You will get fifteen commanders over time, and have upwards of six planets (each needs a governor).  You will want a battleship commander, and Longbow commanders are good for killing enemy player's flagships.

Use your experience potions on your governor (your fighter will get plenty of xp from fighting).  Don't worry too much about rank at first.  You can rank up your governor with medals a couple times to get him more points for politics skill and his resource specialization.

Light of Nova

I finally found a Stars-like that people are playing (and it was even on Facebook!)

The mechanics are pretty straightforward (build, build, build), and politics plays a pretty important part.  There is even a story that is not entirely terrible.

And I've got a spreadsheet!

Wednesday, August 22, 2012

Manic Digger

Been having a blast in Manic Digger.

It's an open source clone of Minecraft.  One of the cool features is seasons; in the winter, the top layer of water freezes, and you can pick up "water" blocks.

Then, you can take those blocks and drop them somewhere, and create waterfalls.

The mountain on the left has already been covered, and you can see the water starting to flow on the mountain in the distant center.

I was working in a mine when the water hit the bottom, and found myself having to fight a flood in!

Friday, April 20, 2012

Hell's Faire

"Hell's Faire" (John Rngo) - This is the fourth book in the Posleen trilogy.  Apparently, Ringo was finishing the third book when 9/11 happened, and got writer's block through press time.  This book continues where the third left off (plus a small - "we last left our heros"), and finishes the war on Earth.

Ringo says in the afterword that this series was written for his enjoyment (not intended for publishing).  If you don't take it too seriously, it is definitely fun.  The Sheva (named Bun Bun, after Sluggy Freelance) gets up-armored and close support weapons and fights its way towards the main character.

Friday, April 06, 2012

Blackhole Applications

I've been trying to work through some of the implications of constructing and using artificial black holes.

It's particularly interesting, because the numbers are very constrained: either you get a lot of power for a short time (and light mass), or less power for longer time (and high mass).

My latest problem is dealing with increasing power over the lifetime.  A hole which is going to last 20 years, will deliver 66% more power after just 10 years (and things start to get out of hand after that).

I see several possibilities:
  1. Design for final power - with longer lasting holes, this isn't too bad.  An 800 year hole (6.7e8 kg) will produce just 10% more power after 100 years.  But with our 20 year hole, you are significantly underpowered (or over-engineered) for most of your usable life.
  2. Refit over time - either transplant the hole into a new hull every once in a while, or perform deep reconstruction every few years.  This seems possible, but you need to make sure you don't miss a refit!

This also brings up another issue: disposal (or recharging) of holes.

When a hole hits about 2.28e5 kg, the lifetime is roughly 1 second - that's 2e22 J released in one second (so, Watts).

Basically an enormous bomb (almost 5 million megatons of TNT).

Easy disposal is to chuck the thing into the sun before it gets to this point.  But that needs to be included in the cost - you're building up a lot of energy which you are going to throw away.

"Recharging" would require putting mass back into the hole (which is likely pouring out gigawatts of hard x-rays and gamma rays).  Not an easy task.

Thursday, April 05, 2012

Solar Germany

A fascinating post from Ars:
"That has rocketed from an installed capacity of 6GW in 2008 to 25GW in 2011—amounting to half the world's installed solar power, with 7.5GW installed in that year alone."
The article has some interesting data about the bulk price of electricity, but I was startled by these numbers.

I recently heard Germany was going to shut down all their nuclear reactors.  I figured they were on a trend to freeze to death just before the lights go out (I'm pessimistic like that :)

From Wikipedia:
"The installed nuclear power capacity in Germany was 20 GW in 2008 and 21 GW in 2004."
So recent solar panel installations have nearly replaced nuclear.

That is a _lot_ of solar panels.  There are a lot of factors, but there is only about 1 KW/m^2 to work with (and efficiency should cut into that hard).

Or, at least 25 million square meters of panel!

US production from solar? 0.9 GW (2010) - yay us.