Thursday, September 18, 2008

Decoys

(Continuing my musings on D)

Garbage collection:
  • Although it's always fun to mock people who fail due to memory leaks while using a garbage collected language...
  • I think D simultaneously defeats C++ and Java/C# here...
  • But, but, C++ has garbage collection libraries! Yea, in ten years of programming I haven't used a C++ garbage collection library. I have used Purify, Valgrind, and even overloading new and delete; looking for memory leaks (not to mention the NewStars code is loaded with memory leaks...)
  • Java has garbage collection, and only garbage collection - unless you use Embedded Java, then you get no garbage collection! Enjoy!
  • D "makes the easy case work". The default is garbage collection, with overrides for self-managed memory (of various forms).
Built-in documentation:
  • Doxygen ('///' and '/***/') works on C++ and Java (it's an extension of JavaDocs)
  • However, it needs to run as a separate step of the build.
  • This can be confusing. For example, I ran the debug build, and didn't see Doxygen (although it might be in there, with make spewing thousands of pages of output...). Some of the code uses it, some doesn't. So, I started converting everything to not use it (it's ugly and confusing, if you're not going to generate the docs). Until I discovered than there is a build that does use it (and the code not using it, needs it)
  • Less ugly Doxygen style comments are built into the D spec. There is a compiler switch to do the docgen run.
Design by Contract (DBC):
  • Programming is all about assumptions. When writing new code, you've got some idea of what's going on in the program, and what the inputs will be, and what sort of outputs you can create.
  • Of course, assumption are made to be broken. That's why I'm always sprinkling my code with plenty of 'asserts'.
  • DBC formalizes all of this. 'assert' is part of the spec (rather than being an ugly macro). Also, there are 'in' and 'out' blocks for functions (to check inputs and outputs). Classes have 'invariant' statements, which are processed before and after functions (to ensure class invariants are maintained).

Wednesday, September 17, 2008

Duck Hunt

(Continuing my thought process for considering a new language)

Nine to five, I hack C++. Not just any C++. Imagine hundreds of thousands of lines of code, spread across dozens of directories in a twisty maze. Make takes from twenty to thirty minutes (that's a parallel make, serial is over an hour), and sometimes fails in odd ways.

The program has to run on about five different compiler/platform environments (Windows, plus various forms of UNIX - including a Sparc).

Over the past few weeks, I've been running into all sorts of nasty C++ problems (weird template problems, compiler mismatches, spaghetti recompilation).

As I've been looking for solutions to the problems on the Internet, the C++ Frequently Questioned Answers keeps coming up.

The guy makes a lot of good points. And I started to wonder, does he have some constructive recommendation (besides, "Don't use C++").

It's called D.

I think, what I'm looking for isn't Python or Ruby to replace Tcl. I need something to replace C++. With features like Python or Ruby (rapid development, functional programming).

That's D.

Things are still a little fresh (spec is rapidly moving, environment issues). But considering that, it is working remarkably well. I mean, C++ is way older, and still has issues!

A good place to start is with the overview.

Tuesday, September 16, 2008

New Stars Status

Finally getting to the point where I can start on the battle VCR!



It took a lot of bug fixes to get to this point...
  • Implemented ship to ship scanning
  • Fixed bug causing battle messages between fleets the player owns
  • Fixed a bug where planets could not see enemy ships in orbit
  • Added a speed spinner to fleet move orders
  • Fixed a bug when right-clicking on mixed friendly and enemy fleets in one point
  • Fixed a bug where some fleet GUI items would appear in view planet mode
  • Fixed widths of some widgets to fix jumpy universe view size
  • Added previous and next buttons to the message pane
  • Removed ship object id from ship names (just in fleet)
  • Improvements to the scripting interface
The JOAT player is pretty well into colonizing a second planet. The War monger has no orders beyond scanning...

The battle was really anti-climatic. The current battle engine has the JOAT scout escape without a shot fired. I will need to investigate that outcome...

Friday, September 12, 2008

Need a New Duck

And show me how to get down
How to get down baby
Get it?!

Quack, Quack, Quack!
I've probably forgotten more about programming languages than most people know (since most people know zero programming! :)

Basic, Pascal, Visual Basic, C, C++, Perl, Verilog, Java, various assembly languages (including PipeWrench, don't ask), Awk, Tcl, Lex, Yacc, ML (which we all thought stood for "My Language"), VHDL.

At this point, I've pretty much settled on C++ and Tcl. (plus Perl for text processing).

Tcl is great for rapid development, and GUI design.

C++ is great for interface definition, large projects, and general hacking. I don't know Bjarne's background, but it must include a lot of hacking.

But I've been getting the feeling I need a new language.

I tried Ruby. But "everything is an object" doesn't seem any better than "everything is a string" (Tcl).

I've played with Python, but again, it doesn't really replace Tcl for me.

I've used Darcs, which is the poster child of Haskell. That's pretty much turned me off that... The other functional languages are even more obscure.

Erlang seems to have potential for the multicore future. But it seems to be different in annoying ways, "just cause".

Tuesday, September 09, 2008

Stuff I've read lately

"The Birth of Christianity" (John Dominic Crossan) - Reviewed on my faith blog.

"Patriots" (David Drake) - Not your typical Drake. Ok, but more character focused. He should stick to tanks and such :)

Saturday, August 30, 2008

New Stars Status

Trying to work up to a battle in the two player game. I am trying to actually walk the players through their turns as they would be doing them (i.e. spending a lot of time micro-managing).

Part of that is implementing the "accelerated BBS" option (so I don't have to generate 30 turns before reaching colonization pop).

Then, I added the research tax option (visible in the dialog below). This uncovered several bugs in communicating this information from the player file to the server.



I also fixed the scanner pane so that it resizes itself to fill up the window. There is a somewhat annoying flicker as you click from explored to unexplored planets (due to different widths on the left)...

I also found/fixed a bug for JOAT w/o IFE getting Quick Jump 5 instead of Long Hump 6 (IFE properly gives the Fuel Mizer).

As well as a bug in the growth formula when planets exceed 25% capacity (aided by AccBBS).

Interesting note, on Linux, the two players are right next to each other. That means I can use it for some quick battles (and I need to fix the homeworld placement logic...)

Wednesday, August 13, 2008

Stuff I've read lately

"Dark Light" (Ken Macleod) - Sequel to "Cosmonaut Keep". Very short, but pretty good. Follows the adventures of the previous characters on a planet some light years from the last (they got their light drive working). The libraries here don't have the third book...

"In My Place Condemned He Stood" (J. I. Packer and Mark Dever) - Reviewed on my faith blog.

Tuesday, August 12, 2008

New Stars Status

Started in on more bugs:




Here we can see the new universe caused by fixing the randomization of the hab distributions. I also added the player relation dialog, and changed the underlying implementation. With those changes done, I can revamp the battle engine - in preparation for the battle VCR.

I also fixed some of the automation, to improve fuel consumption during scouting missions.

I looked into the fails during generation huge universe (dense and packed). They are running out of planet names. We will need to generate another 1k names...

Friday, July 18, 2008

Stuff I've read lately

"Cosmonaut Keep" (Ken Macleod) - This is some of the best space opera I've read in a long time. Really what I've been looking for lately. Reminds me more of Asimov, and the like. The story is a little confusing at first, because it covers two time frames: the first is in the future on a distant planet, where humans and aliens live together; the second is the near future, where humans make first contact with the aliens.

I look forward to the next book, "Dark Light".

Wednesday, July 16, 2008

New Stars Status

I started in on some of the bugs:


Here we can see the new fleet composition pane. I still need to connect the "battle plan", "estimated range", and "cloak" areas. Also, I need to add a drop down with other fleets in this location (for fleet to fleet transfers). I also need to implement the Split/Merge buttons.

I also fixed the "close enough" check when adding waypoints. That was one of the first features in the GUI, when the canvas had a lot fewer things floating around. At some point, all the new canvas objects threw off the logic. It should work much better now. I also fixed the "redraw paths on delete" bug.

Then there is the production queue. I fixed the "remove all" problem mentioned, and improved the checks which combine nearby items. Also, the production queue and waypoints list should behave better when adding multiple (always inserting at end, rather than sometimes at the beginning).


I looked into the research tax. It is a top level XML thing, so I may want to adjust that through the C++ interface. I also gathered some data on the hab distribution. It is looking fairly flat. I want to gather a few more data points to be sure... I also started on handling shift and control down, but that will need more effort.


I'm not entirely happy with where this check in is (should have a few more features), but the code has been this way since Saturday (IIRC) and I haven't had a chance to work on it, and might not for a few days...

Monday, July 07, 2008

New Stars Status

Some more operative bugs (and much needed new features):
  1. Floating-point exception while generating a huge universe (names underflow?)
  2. Need a redraw of paths on delete waypoint
  3. Waypoints always insert at 0 (should be end)
  4. Fix close enough on shift-click (canvas is returning a list?)
  5. Feature - drag waypoints
  6. Need to clear the current filename on open (fixed locally)
  7. Feature - recent files, remember working directory (.ini)
  8. Production Queue (PQ) - shift/control click, hot keys
  9. Generate player files automatically on new game
  10. PQ - "Remove" removes all on a multiple item!
  11. Messages on planetary build (will need filter!)
  12. Research tax in GUI
  13. Ship Designer - delete needs a refresh
  14. PQ - collect ships above and below on add
  15. Messages for fleet complete orders and new planet scans
  16. Feature - View all fleets (F3)
  17. Feature - Fleet composition and split/merge
  18. Scanner pane focus arrow, update on next (fleet/planet)
  19. Hab distribution is uniform
  20. Speed and fuel in fleet orders

Wednesday, July 02, 2008

Stuff I've read lately

"God and Religion" (Bertrand Russell) - Reviewed on my faith blog.

"Surprised by Hope" (N.T. Wright) - Reviewed on my faith blog.

"Introduction to Christianity" (Joseph Cardinal Ratzinger) - Reviewed on my faith blog.

"Agent to the Stars" (John Scalzi) - I'm running out of Scalzi and Stross to read at the local library. I had actually seen this book. But the cover art is really bad. I didn't even realize it was science fiction. I found the text online, and read a bit, and realized it is sci-fi, and classic Scalzi. Very enjoyable.

Friday, June 06, 2008

New Stars Status

Trying to crush off the bugs from the last bug report...


Here we can see the main fixes. I've added a player command to the Tcl interface, mainly to implement player relations. However, I think the main player relation code will need to be reworked...

I also fixed the mining rate calculation, and max defenses calculation (and the resources now say max/max instead of 0/max).

I also added some menus (view race - previously only accessible through F8, research - ditto/F5, battle plans - stub, change password - stub).

I fixed a bug where using the race wizard would break viewing your current game race, and another where planetary resources display as 0 on the first turn.

Wednesday, June 04, 2008

Stuff I've read lately

"Halting State" (Charles Stross) - This is very near future fiction, about 10 years out. It is basically a mystery/spy thriller featuring a nerdy programmer and an accountant. I found it pretty well done. The zombie flash mob at the end was a nice touch.

Tuesday, May 20, 2008

Stuff I've read lately

"Nebula Awards 26" (James Morrow ed.) - I guess 1990 wasn't a very good year for short stories in science fiction. I didn't like any of them, at all. There was one by Ursala Le Guin, which was just ok. I read "Left Hand of Darkness" about three years ago, and couldn't remember the specifics. The novella by Haldeman was kind of interesting, but was very Hemingway specific, and I didn't really get it.

Thursday, May 15, 2008

Stuff I've read lately

I finished the Simak book, the last stories were:

"All the Traps of Earth" (1960) - Very reminiscent of Asimov's "Bicentennial Man", which I guess, wasn't written until 1976... so a point for Simak, there.

"Death Scene" (1957) - Very short, somewhat ominous feeling, but ends well.

"Reunion on Ganymede" (1966) - War heroes overcome their differences by blasting robot animals.

"The Money Tree" (1958) - Alien botanists help out a local thug.

"Party Line" (1978) - Interstellar communication via psychic hot-line/chat room.

"The Answers" (1953) - Man loses his drive to expand after learning life has no purpose.

"The Thing in the Stone" (1970) - Ironically, I picked up Simak because he is listed as a Christian author. The previous stories weren't exactly pinnacles of Christian doctrine. This one at least had a touching ending. The "thing" in the stone is some sort of universal war criminal. The main character meets an energy being attendant, which he first takes as a sort of "loyal pet". But, in the last paragraph, this being is revealed as a "shepherd", waiting for the redemption of the "thing". So, not all bad.

Thursday, May 08, 2008

Stuff I've read lately

"Inheritor" (C.J. Cherryh) - The third book in the "Invader" series. It feels like Cherryh has slowed things down a little. The story is taking longer to progress, and the stress for the characters isn't quite as challenging. But, the story is still pretty compelling, and the universe is interesting.

I've also started a collection of short stories by Clifford D. Simak. The collection is called "The Creator amd Other Stories".

The first story (from 1935!) is called "The Creator", about a couple of guys who meet an energy being who claims to be the creator of the universe -- and kill him. Not a high quality story.

"Shotgun Cure" (1960). This is shorter and punchier, but the ending falls flat. Aliens cure the human race of all disease, but we get kind of dumber. How much dumber? Do the aliens come back to harvest us for lunch? It doesn't say...

Thursday, May 01, 2008

Stuff I've read lately

"The Last Colony" (John Scalzi) - This is the last book in the "Old Man's War" trilogy. I think it ended strongly. Scalzi's humor remains, and there is some good action. I thought it was interesting that the base colony size is 2500 colonists, the same as Stars.

Wednesday, April 30, 2008

New Stars Status

Started in on the bugs from last update...


  • Fixed names with spaces (caused planet names in the test bed to shift... which required an update to the orders.tcl)
  • Added display of max infrastructure (which is stored in the turn file). This caused me to realize that turn 0 does not have a max infra calculation. I also realized we did not factor in OBRM and JOAT...
  • Added display of defenses (including max)
  • I moved the "bottom right" frame (which shows planets, fleets, minefields, etc.) over to the left. This makes more room for the starmap. I also changed the display to 800x600, and shrunk the hab bars to make things fit better, and fixed the hab pluses to use a brighter color.
  • Fixed message display when you have no messages.

Thursday, April 24, 2008

New Stars Status

Bug report:
  • Planet names file stopped at first space (no multi-word planet names)
  • No max calc for planetary mines, factories, and defenses
  • No mining rate calc
  • Missing pop-ups on population, resources, scanner, defenses
  • Missing gui cargo transfer (work-around: use waypoint 0 load/unload)
  • Missing clear planetary queue button (work-around: manually clear, who ever uses this button?)
  • Missing route button (not a big usage, it adds a move order on newly constructed ships, basically automation)
  • Missing starbase display panel
  • Missing mineral display in bottom right
  • Missing message display
  • Need menu commands for Research (dialog is done, use F5), Generate (done, F9), Planet/Fleet view (not done, F3), battle plans (not done, F6), Player relations (not done, F7)
  • Battle engine improvements
  • Report menu
  • Scanner pane filters/options
  • Starbase and fleet icons in bottom right
  • Pop-ups in bottom right
  • Should probably disable add to queue from empty/unowned planets... (server will reject the commands... I hope...)

Sunday, April 20, 2008

New Stars Status

A few more minor improvements, but they're the sorts of things that are important for playability:
  • Implemented slot compatibility checks (no engines in weapon slots!)
  • Implemented slot moving (used to have to discard and re-add)
  • Implemented cost and design feature labels in ship designer
  • Fixed a crash when the production window is not open, and a new design is created (tried to update the production list with the new design...)
  • Improved zoom-in/zoom-out behavior (less shifting of the center point)


Here we can see the path highlighting I added last time. It also shows a ship with no engine being rejected. I also made the ship designer window a default size, which should reduce window resizing jitter. You can also see the cost/feature labels below the ship layout.

Wednesday, April 09, 2008

Stuff I've read lately

"The Faded Sun: Shon'Jir" (C.J. Cherryh) - This is the second book in the Faded Sun universe. I hadn't realized there was a trilogy here. In the first book, "the People" (mri) were reduced from millions to two (and brother and sister at that). The second book focuses on a human sent with the last two mri on a journey to their homeworld. Not the best Cherryh, but pretty good.

Saturday, April 05, 2008

New Stars Status

Ok, sorry, been a long while... things are pretty close now, and it is sometimes hard to be motivated to finish :)



I've fixed the clearing of private information from enemy scans. This was a lot more intrusive than I had imagined.

We have to clear the fleet and design names from enemy scans. So what do we put there? I'm leaving it blank (so players can't name their designs "War Pig Scout" and confuse people...). But then, I had to update the client to fill in "War Pig Scout" when it sees a scout with a blank name. Except, where does "War Pig" come from? Seems, we never added a place to store the names of known enemies (players start without knowing the names and ids of other player races).

So, then I had to update the PlayerData structure, and the toXML and parseXML, and the regression files...


In other news, I added a highlight to the path of the currently selected ship (not shown).

I also fixed the next turn generation in the client. Note, it just goes ahead and generates a multi-player turn when any one player hits generate...

Tuesday, April 01, 2008

Stuff I've read lately

"Old Man's War" (John Scalzi) - This is the first book in the series including "Ghost Brigades". I didn't mind reading them out of order, there is not much overlap. Scalzi has an interesting universe here, it will be interesting to see where he takes it.

Monday, March 31, 2008

Card Game Client

The client is now usable. Here we can see a game of Texas hold-em. The cards can be moved around, and the movement is reflected to the other clients. I also have added the code to pop up more information on more complicated card sets.

Friday, March 28, 2008

Stuff I've read lately

"Manifold: Space" (Stephen Baxter) - This is a continuation of the Manifold: Time "manifold universe". It is basically an alternate history (near future), where now there are many alien intelligences (thanks to our hero's efforts in the first book). Baxter attempts to deal with the Fermi paradox by claiming galactic catastrophes. I'm not familiar with the physics involved, but it wasn't real satisfying. I liked the first book better, but this one had some touching points, and some interesting tech.

Sunday, March 23, 2008

Card Game Client

I've gotten the hello protocol working. Here you can see a jumble as three clients connect to each other on my machine.




The network topology is arbitrary. That is, any client can act as a server for new players to join. In my example, the client on the left started serving. Then the client on the right connected. The first stopped serving, then the second started. The third client connected to the second. You can see the third client sees welcome from both when it connects. The original two only see the new player when added.

I need to add the in-game messages. And I should probably handle clients quitting gracefully...

Saturday, March 22, 2008

Card Game Client

I haven't forgotten NewStars! I'll have another update soon...

But I have also thrown together a card game client (modeled after Apprentice). My client allows any card set, and will support any number of connected players (eventually). I have shuffling, drawing, and playing cards (including moving cards around) done.

Here is an odd nine card hand (and I forgot to shuffle until after drawing about six cards):



The main thing I need to add is the network messages for starting the game, and reflecting playing and re-arranging cards (I have the network connectivity [listen and call], as well as the code to reflect messages to everyone).

Friday, March 14, 2008

Stuff I've read lately

"Manifold: Time" (Stephen Baxter) - I was very curious where Baxter was going with this book. He starts with solid premises: the promise of off earth expansion and the inevitability of entropy (heat death of the universe). This theme peaks about halfway through (~page 206), as the main characters watch a video stream from the end of time.

Turns out, Baxter is bootstrapping himself an alternate history series (not that there is anything wrong with that). I have started the second book (Manifold: Space). We'll see how it goes...

Friday, February 29, 2008

Stuff I've read lately

"Invader" (C. J. Cherry) - Second book in the "Foreigner" series. It picks up right where the last left off. Cherryh is always rough on her poor characters. But Cameron (the guy in this one) spends a lot of time struggling with a powerful sense of loneliness. Kind of unusual for Cherryh, but very well done.

"The Ghost Brigades" (John Scalzi) - Apparently this book is a sort of sequel to "Old Man's War". At least, it is set in the same universe. I will have to read that one, because it is a pretty interesting universe. Scalzi does a good job with building deep characters.

Saturday, February 23, 2008

Stuff I've read lately

"The Android's Dream" (John Scalzi) - This is the first Scalzi book I've read. I find his humor to be unique, and I like it a lot. I found myself laughing out loud frequently (first book to do that to me was the Hitchhiker's Guide).

Friday, February 08, 2008

Stuff I've read lately

"The Far Side of the Stars" (David Drake) - This is the third novel in the Lt. Leary series. It is classic Drake, classic Lt. Leary. I was surprised to see an all-knowing tree, though. Don't normally see something so mystical from Drake. Of course, Leary uses it to find a bauble for his current employer, and protect his country from a sneak attack :).

Wednesday, January 30, 2008

Stuff I've read lately

"Diamond Dogs, Turquoise Days" (Alastair Reynolds) - This is two novellas bound together, set in the "Chasm City" universe. I found the first to be way too much "Cube" (although Reynolds is at least gracious enough to give Cube a nod). The second story, about an ocean of biological computers storing personalities, was much better. Although Reynolds tries to tie it back to the first in one line, which seemed a stretch.

"Foreigner" (C. J. Cherryh) - Classic Cherryh. Although the main character doesn't start his stress time until about one hundred pages from the end (of 373). The subtitle is "a novel of first contact", which I find an overexploited topic. Actually, it is a "novel about how first contact can seem to go well at first, then later it turns out the parties were talking past one another, leading to lots of misunderstanding and tragedy." Of course, that is too long for the subtitle :)

"Why the Ten Commandments Matter" (D. James Kennedy) - Reviewed on my faith blog.

"The Selfish Gene" (Richard Dawkins) - Reviewed on my faith blog.

Thursday, December 27, 2007

Stuff I've read lately

"Understanding the Dead Sea Scrolls" (Hershel Shanks ed.) - Reviewed on my faith blog.

"In the Shadow of the Ark" (Anne Provoost) - Ditto.

Tuesday, December 18, 2007

Stuff I've read lately

"The Sharp End" (David Drake) - Drake delivers once again. You can always count on him for quality military SF. This story covers the less told story of a squad of Slammers sent to investigate new "business opportunities".

"The Bondage of the Will" (Martin Luther) - Reviewed on my faith blog.

Saturday, December 08, 2007

New Stars Status

I fixed a bug due to clicking near a projected ship path. Also, I've added the future paths (show below).



Next step is to fix the scan of enemy ships (mentioned previously), and add checking to the ship designer.

Friday, November 30, 2007

Stuff I've read lately

"Rainbows End" (Vernor Vinge) - Vinge hasn't written a lot of stuff. I've read his far future stuff (A fire upon the deepness in the sky), which is pretty good. This book is much nearer future. Wearable computing is nearly ubiquitous. And medical technology has gotten pretty good (the "heavenly minefield" as Vinge calls it). The book follows several viewpoints, but the key one is an Alzheimer's patient recently cured. He is trying to adapt to the new culture, and restore some of what he's lost (as well as finally maturing!).

Saturday, November 17, 2007

New Stars Status

Lots of minor problems need fixing. So, I grabbed a bunch and fixed them:
  1. Selecting a planet crashes the program, if the production window has been closed.
    • Fixed the update calls to check for the window's existance
    • Added the "change production" button to bring the window back
    • Defaulted the window to not be shown

  2. No enemy designs in the ship designer
    • Added an interface from the nstclgui dll back to Tcl
    • Updated the ship designer code to show it

  3. GUI oddities when clicking near planet names and fleet flight paths
    • Fixed the ordering of canvas objects so planets are on top


This is taken from the JOAT the turn after they detect the WM scout. I suspected the scan code was not clearing private info. Now I am sure...

Wednesday, November 07, 2007

Hey Taxi!

I was looking for a fun little game to play when I get tired of whatever it is I'm working on. I'm tired of solitaire, and the statistics in free cell make it too stressful (same for spider solitaire).

So, I've started hacking Hey Taxi into Tcl. I worked on it about 5 minutes last night, and in less than a half hour this morning, I've got a pretty fun framework. Here's a screen shot:



I've bound up arrow to -10 Y acceleration. If you go below 0, you move up properly. Not sure how much I'll need to add to keep it fun... I think I at least want X thrust.

Update: I added X thrust.

Source for heytaxi.tcl

set ::gravX 0
set ::gravY 1

set ::velX 1
set ::velY 1

set ::taxiID 0

proc eventLoop {} {
if {$::taxiID == 0} { return }

incr ::velX $::gravX
incr ::velY $::gravY

set coord [.c coords 1]
if {$::velY < 0 || [lindex $coord 3] < [.c cget -height]} {
.c move $::taxiID $::velX $::velY
}
after 1000 eventLoop
}

proc thrustUp {} {
incr ::velY -10
}

proc thrustLt {} {
incr ::velX -5
}

proc thrustRt {} {
incr ::velX 5
}

pack [frame .fVel] -side top
pack [label .fVel.lLX -text "X Velocity:"] -side left
pack [label .fVel.lVX -textvariable velX] -side left
pack [label .fVel.lVY -textvariable velY] -side right
pack [label .fVel.lLY -text "Y Velocity:"] -side right

pack [canvas .c] -side top

set ::taxiID [.c create rectangle 10 10 20 20 -fill yellow]

bind . <keypress-up> thrustUp
bind . <keypress-left> thrustLt
bind . <keypress-right> thrustRt

after 1 eventLoop

Thursday, November 01, 2007

New Stars Status

Small changes, but good.



I added the calculations for terraforming to the planet display. I haven't updated the environment bars to show the swing, but you can see the final habitability. I have also been working on correlating our planetary production formula to the original Stars algorithms.

Interesting thing, I found a "bug" in Stars. Stars keeps population in terms of kilotons (100 people per kiloton). When your population grows, you often generate some fraction of a kiloton of people (0..99 people). We weren't previously storing or calculating with this. When I added it, I noticed a difference between our calculations and Stars (the Stars.xls sheet has been invaluable).

So, should the fraction of a kiloton of people contribute to population growth? I thought so, but apparently, the fraction is kept on the side and added in after growth is calculated. I have implemented "bug compatibility", although the other way is commented in the code.

Wednesday, October 31, 2007

Stuff I've read lately

"Glasshouse" (Charles Stross) - This book made Stross and Morgan start to run together in my head. Stross depicts another version of "life eternal" after the singularity. It didn't seem very pleasant. Hacked assemblers editing people's memories, huge wars fought across the galaxy against dictators willing to do anything. Life so painful, you willingly submit to have your memories erased. But at least Stross managed to fit in an interesting mystery :)


"The Creationists" (Ronald Numbers) - Reviewed on my faith blog.

Saturday, October 20, 2007

New Stars Status

A lot of progress. Some highly visible, some more subtle.

I added the JOAT's final ships (destroyer and remote miner).



I fixed the scrap code to take into account the proper return (was just 100%, now it takes into account Ultimate Recycling, and presence of a starbase. (The JOAT immediately scraps his remote miner). I also had to update the client code to allow issuing the scrap command.



I finally fixed the client to show resources generated (currently pulled from the turn file, not calculated).



The availability of the destroyer also altered the scanning pattern for the JOAT:

Wednesday, October 17, 2007

What is Nuclear Fusion?

Normal matter (stuff) is made up of atoms. These atoms (normally) are made up of protons (positive particles) and neutrons (neutral particles) in a "nucleus", and surrounded by electrons (negative particles). The negative particles repulse other negative particles, while attracting positive particles. The positive particles act in the opposite manner.

In nuclear fusion, very high temperature and pressure are used to squeeze nuclei together. When done to lighter elements (hydrogen - 1 proton, and boron - 5 protons, are favorites), energy is released.

Nuclear fusion holds great potential for cheap, plentiful energy. Hydrogen and boron are very plentiful fuel sources. It is not free from radioactive concerns. Different forms of fusion involve different amounts of radioactive materials (inputs and byproducts). Some are somewhat higher than current fission reactors. Some are less.

The sun is an existence proof for fusion power. There, huge pressure is available due to gravity (the hydrogen is compressed to 150,000 kg/m^3). This allows fusion to occur at a relatively low temperature - 13.6 million degrees. At this temperature, the hydrogen gas becomes "plasma" - the fourth state of matter (after solid, liquid, and gas). In a plasma, the electrons are separated from their nuclei, and the whole thing can be manipulated using electromagnetic fields (very convenient for us).

A typical commercial power planet produces around 1 gigawatt (1 billion watts). Using fusion as the sun does would require 170 billion tons of hydrogen, in a cube-shaped reactor 1 mile on a side (and it would have to sustain the enormous pressure and heat of the sun).

Obviously, some innovation is required to make fusion power work here on Earth. The most promising current projects are:
  1. Tokamak - this is the most well funded type of project. A big donut-shaped container, surrounded by magnets, is used to hold the fusion plasma.
  2. Laser inertia - powerful lasers push two nuclei together directly. This is how fusion bombs work.
  3. Polywell - this design was championed by Robert Bussard (of Bussard ramjet fame). Unfortunately, Dr. Bussard died recently. The project is continuing without him.

Monday, October 15, 2007

Stuff I've read lately

"Broken Angels" (Richard Morgan) - This was the second book in the Takeshi Kovacs trilogy. If I had read them in the proper order, the whole Martian thing would probably made a whole lot more sense :)

"The Rebirth of Orthodoxy" (Thomas Oden) - Reviewed on my faith blog.

Saturday, September 29, 2007

New Stars Status

Wow! I got to use polar coordinates (I couldn't remember how to figure it out with regular geometry :)


Here we have the JOAT turn 4. The JOAT's armed probe has been refueled, and is moving along. The WM's armed probe has been spotted by the planetary scanner. I still need to work out some information hiding.

I've also implemented the last direction logic (and draw it in the GUI).

Friday, September 28, 2007

Stuff I've read lately

"The Jungle" (David Drake) - This is Drake's cover of the story "Clash by Night" by Henry Kuttner (which is at the back of the book). Not the greatest Drake (no real military action, just hacking through a very dangerous jungle). I think the most interesting part was that the two commanding officers each thought they personally were cowards, and the other man a true hero.

"Evolutionism and Creationism" (Ben Sonder) - Reviewed on my faith blog.

Wednesday, September 19, 2007

New Stars Status

Check out the scan radii!



This is turn two for the JOAT. He's scanned four planets using his built-in pen scan. I've also added his initial freighter. He is still missing his Remote Miner and Destroyer.

I also fixed the "N light years from Place" readout.

Tuesday, September 18, 2007

Stuff I've read lately

"Woken Furies" (Richard K. Morgan) - Apparently the third Tak Kovacs book. Poor Tak, he seemed to be getting his rage/father anxiety under control at the end of Altered Carbon. But things took a turn for the worse at some point and he is raging again. I'm a little disappointed in Morgan for going with the "Martians" deux ex machina. They made some interesting flavor for his universe, but I don't like them as plot elements. In fact, I think he may have killed off this storyline, which is too bad.

"Kingdom Principles" (Myles Munroe) - Reviewed on my faith blog.

Monday, September 17, 2007

Tech Level 8 Approaching!

"What do you mean, 'Tech Level 8 approaching?'"

"On a Hawkman rocket cycle. Shall I inform his majesty?"

"Idiot! The emperor would shoot you for interrupting his wedding with this news!"

(with apologies to Flash Gordon)

GURPS uses the concept of tech levels running from 1 to 16. There is a general, societal tech level, but it can also be broken out into categories like power generation, medicine, motive systems, etc. When GURPS was originally written (~1980's) first world nations were described as tech level 7.

So what is predicted for tech level 8?
  1. Computers are about 10 time more powerful. The GURPS authors beat themselves up a lot over this. Computers are probably thousands or millions of times more powerful from a frequency/number of transistors point of view. But from a functionality point of view, it's not too bad.
  2. Human cloning. This one looks on target.
  3. Prosthetics/Bionics. I think we are close on this one. The war in Iraq has been a big driver just in the last few years. We are getting pretty close to full functionality and look for prosthetics.
  4. Robots. I forget the exact capabilities for TL 8. But we are getting pretty good here. Things like humaniform and combat robots are not until TL 9 or 10.
  5. More efficient in-system space travel. I think the development of ion engines has made this possible. There is also some cool ideas in fission driven (but non-radioactive exhaust) rockets. Unfortunately, I doubt governments will do much innovation. The private sector might have some effect (but would they be allowed to develop a fission rocket?).
  6. Fusion power. Ahh, fusion power. Always twenty years away. One of the first things I researched on the world wide web (back in 1998). I'll look into this more depth.

Saturday, September 15, 2007

New Stars Status

Some good progress the last week. I discovered the "JOAT w/IFE" is actually a JOAT w/cheap engines. StructuralElement::isBuildable did not include LRT or PTR calculations.



This screen shot shows the changes in the client. I've always displayed fuel, but the engine was not giving ships their fuel. And moving was not consuming fuel. I've used the War Monger's armed probe to test running out of fuel, and initial speed selection (which ignores return trip, right now). Planetary scan also works (although you can't see it here).

Next step, I think, is to add more player orders to the Two Player test and re-create some of the other tests (fleet follow, combat, bombing, load-unload, and planetary invasion).

I will see what opportunities present themselves for adding some code useful for computer guys.

Friday, September 07, 2007

Stuff I've read lately

"Altered Carbon" (Richard K. Morgan) - This book was very well done. Morgan creates a very interesting universe. People can be saved and restored, and transmitted digitally (and FTL). Bodies are considered temporary and interchangeable (people refer to them as "sleeves"). The main problem I had was trying to understand why more people don't have backups, and why rich people only have one. Also, why there weren't more crimes that carried the erasure penalty? "Double sleeving" (being in two bodies at once) was the only crime on Earth, most colony worlds didn't have any such crimes.

"The Probability of God" (Stephen Unwin) - Reviewed on my faith blog.

Thursday, September 06, 2007

New Stars Status

Things are starting to come together. I have worked mostly on the two player test case. I ended up going after the initial fleet code.

Here is the JOAT w/IFE player (the warmonger posted previously is the other):




Note that JOAT gives all tech at 3, and IFE is good for +1. The fuel mizer is available, so the starting long range scout makes use of it (as well as the Rhino Scanner). I expect a bug, in that IT plus IFE and CE gives Prop 7, which can use Alpha 8. But for some reason, Stars! only gives the Long Hump 7. I'm not worried enough to change anything.

Note that we are not seeding the random generator, so player 1 is back at Marge :)

Thanks to John for adding in all the scanners. I had added the Bat Scanner in XML myself, but I wasn't looking forward hacking in all the others.

I also hacked up a quick tech browser in pure Tcl (using tdom to parse the XML):



Next step will be to add the tech readouts to this, and probably making it editable to enable quick fixes.

For the engine, the next step is scan. Then I will modify the tests to send the scout before the colony ship.

Saturday, September 01, 2007

New Stars Status

Some good progress on the code base. Not a lot visible, because a lot of it is in the initial conditions (making sure all players get the same mineral concentrations and minerals - trying to figure out the distribution of starting minerals).

I started work on the research control dialog, then discovered that players were not getting initial tech. I have it fixed for some of the races now.

I also took care of the initial conditions of the starting starbase (which was initially empty).

Another irritating bug was that the client would open to planetMap(0). That is just what planet is first in the client data. I've fixed it so it goes to the lowest object id planet you own.

The colonize test is looking really good. With initial minerals and factories, the colony ship builds fast, and can move and colonize in one turn. I am moving off of it for now (since the next step would be to give players the initial colony ship - which is supposed to be built with max available tech, which is the beginnings of computer players...).

I created a new two player test. This should be a base for the most of the other existing tests.

Here is the initial load of the war monger player, with a quick F5 to bring up the research panel:

Monday, August 27, 2007

Stuff I've read lately

"Remnant Population" (Elizabeth Moon) - meh. The story of an old woman contacting an alien civilization is just kind of weird. What really bugged me was a universe with both STL sleeper ships and FTL. It made me want to break out GURPS Vehicles and try to come up with an economic situation where that could possibly make sense.

"The Exemplary Husband" (Stuart Scott) - Reviewed on my faith blog.

"Once a Hero" (Elizabeth Moon) - This looks like a mil-SF book; but it's more like a drama set in a military background. I'll probably read one or two more in this series to see where she is taking it. That's three Elizabeth Moon books in a short span, I still like "Speed of Dark", but I'll probably take a break.

Saturday, August 18, 2007

New Stars Status

Not much progress the last month.

I created a command line version of the client. It just loads the C++ New Stars Tcl library, and issues a bunch of commands. A lot of them use information eye-balled from the files. Here is a sample from orders2400.tcl (which updates the first turn file):


#### copy the colony ship
set colShipId -1
for {set i 0} {$i < $::numHulls} {incr i} {
if {[newStars $::ns_hull $i $::ns_getName] eq "Colony Ship"} {
set colShipId $i
}
}


Another file is applied in 2403 to give the load colonist, move to planet, and colonize orders.

Here is the final screen shot:




I had to fix the server to properly update client object ids to server ids (I didn't see this before, because the client actually generates the turn through the client data - that's a bug...).

I also had to fix the client to properly use GUI load commands (otherwise you need another turn).

The mining rates are probably off. There is an oddity in the battle engine, in that the colony ship and star base try to fight. I need to add lots to the client to get a better feeling for how much ships cost and how long they will take to build.

Wednesday, July 25, 2007

Stuff I've read lately

"The Speed of Dark" (Elizabeth Moon) - I liked this book a lot. On the surface, it is a book about autistic people. But it is also a book about being different. About trying to fit in, being pressured to fit in. Not just fit in, but to be like everyone else.

And everyone knows the speed of dark is faster than the speed of light (Neverending Story 2). That's why it's dark until light gets there. Dark got there first!

"Misquoting Jesus" (Bart Ehrman) - Reviewed on my faith blog.

Monday, July 16, 2007

Gianormites of the World Unite!

Gianormous has made it into the dictionary! Except the dictioneers (who else compiles dictionaries?) misspelled it! Everyone knows it's giant-enormous, not gigantic-enormous. Their spelling (ginormous) looks like "djinn-or-mus". Blech!

So everyone needs to start using gianormous. Then the dictioneers can get it right next edition.

Monday, July 09, 2007

New Stars Status

Ok, more progress. We almost have a game:



Here is page 2 of the New Game Wizard. I recreated the race from the colonize test (Ugly Ducklings), and made a tiny sparse game for them by themselves.

Here is the first turn in the client:



I've added 30 factories and 50 mines to autobuild. I had to fix the code to handle this. It would try to build the factories, see no G, and then skip to research. It now works. Here is 2401:



18% growth rate. 20 resources, mines are 5 per. Autobuild shows 0% done for all.



Next turn. 23,600 * 1.18 = 27,848. 23 resources gives 2 factories, and 1 at 30%. Mining rates may be off... concentrations are 80, 76, 20. I forget how to calculate it right now... Original G must of been 15 or 16.

I need to repair the regression. Lots of them have uninhabitable home worlds. The old code was more forgiving of this...

I'd also like to develop a command line version of the client (for regressions to insert player commands).

Then I will add the intervening turns to colonize test, to make it a new game -> first world colonized test. Then I can check the numbers.

Friday, June 29, 2007

Stuff I've read lately

"Igniting the Reaches" (David Drake) - This is the first book in the trilogy continued in "Through the Breach" and finished in "Fireships". I would say the quality is consistent through all three books. Also, each book stands fairly well on its own. Still, I would of preferred to read them in the proper order.

"In the Grip of Grace" (Max Lucado) - Reviewed on my faith blog.

Wednesday, June 20, 2007

Stuff I've read lately

"Paying the Piper" (David Drake) - This "Hammer's Slammers" novel is classic Drake - plenty of action, punctuated by brief breaks.


"The Purpose-driven Life" (Rick Warren) - Reviewed on my faith blog.

Friday, June 15, 2007

New Stars Status

I actually got a lot done the last month. I have integrated my old universe generation code into the main engine. While I was there, I fixed a bug in the tech research code, and in the colonization code. Now, the colonize test works; and I have added it to the regression. I discovered an oddity in the way planets are handled for players (separate objects), and I will probably rebuild it into a single true object with per-player data views.

Here is the new game wizard:




Only page 1 is done. Page 2 is the race list (the normal wizard has a third page, with victory conditions). Currently, it always saves the game to newFile.xml. I will add a save dialog shortly. The main thing is to update the struct UnivParms to include a race list. Then, update the engine to pull in the races. Then I can add them to the gui.

If you do 'newStars -n newFile.xml' it will generate a universe according to your parameters (to stdout). But there will be no players. We also need to work on random seeds.

Wednesday, May 30, 2007

Stuff I've read lately

"Fireships" (David Drake) - This is the third book in a Sir Francis Drake-like future setting. The second was "Through the Breach". I will have to read the first. It was very good. I usually consider Drake to be light on characters. But the characterization was very well done. The ending is tidy, without feeling contrived. And Drake continues to pull off the "history repeated" without damaging suspension of disbelief.


"Essential Truths of the Christian Faith" (R. C. Sproul) - Reviewed on my faith blog.

Friday, May 11, 2007

Stuff I've read lately

"The Independent Command" (S. M. Stirling) - It's a shame the trilogy has come to an end. Stirling had finally come to grips with the universe and characters. This book is a big improvement over the other two. It has a good treatment of an alien culture and first contact scenario. The ending felt a little rushed and pat, but I have seen far worse. About forty pages from the end, I was thinking, "I need a gianormous space battle right about now." There were plenty of opportunities, but Stirling didn't go there. Not sure why.

"Drawing Near" (John Bevere) - Reviewed on my faith blog.

Thursday, May 10, 2007

New Stars Status

Things are moving, slowly but surely:


Here I have taken the colonizeTest (turn zero, player one file) and removed the colonize order. I then added it back through the GUI and saved. A diff of the files yields:

$ diff guiout.xml colonizeTest_P1_Y2402.xml
246,247d245
< <NONPLAYERFLEETDATA>
< </NONPLAYERFLEETDATA>

295a294,295
> <NONPLAYERFLEETDATA>
>
</NONPLAYERFLEETDATA>

For some reason the GUI places NONPLAYERFLEETDATA before the universe planet list, while the newStars -r command places it after. Not sure why... But that is close enough for non-technical people...

Next step is to add starbase designs and create new game. Then let the bugs commence!

Monday, April 30, 2007

Stuff I've read lately

"Privateer" (S.M. Stirling) - I found this book to be much better than the first. Perhaps Stirling is settling into the material. It is still very campy, but I think that is the target audience. The main issue I have is with Stirling's battle balancing. He takes somewhat fair conditions, then throws in radical elements to make it wildly against the heroes. Then he has to pull out crazy saves for the heroes. I'd much prefer to just see a straight-up fight.

"Understanding the Purpose and Power of Prayer" (Myles Munroe) - Reviewed on my faith blog.

Sunday, April 29, 2007

Musical Interlude

Put down that chainsaw and listen to me!
It's time for us to join in the fight.


It's time to make a mountain out of a molehill,
So can I have a volunteer.


Buy some sensible shoes and a Chevrolet,
Then party 'til your broke and they drag you away, it's ok.

Tuesday, April 24, 2007

New Stars Status

After much delay, I have load and unload orders working. Here is a clip from the load unload test:



Here we can see the idle fleet has been changed to move to Beta 9 and unload its colonists. I need to fix the text for the order in classdef.h. I also need to fix the engine to understand all the various Stars! cargo orders. But first I need colonize and new game generation. Then the game should be playable.

Friday, April 20, 2007

Stuff I've read lately

"Through the Breach" (David Drake) - This is a classic Drake military sci-fi book set in his "sidereal-bubble" universe. It has a almost overwhelming age of sail feel, but I think he manages to pull it off. The science is hard enough to maintain my suspension of disbelief, and the universe has a lot of character. This one seems a lot harsher than I remember Drake's books being, and the impact on the characters psyche is very well done.

Sunday, April 08, 2007

Stuff I've read lately

"The Dawn of Amber" (John Gregory Betancourt) - I liked the original books by Zelazny, the world was unusual and the characters well done. This one didn't seem as good. Not sure if I am no longer as interested in that world, or if Betancourt is still warming up.

"Judas and the Gospel of Jesus" (N. T. Wright) - Reviewed on my faith blog.

Saturday, April 07, 2007

Ruby.new chunky_bacon

Do you want to learn Ruby? Do you want a bookful of random stuff? Better random stuff than I can write? Lots of chunky bacon? Check out "Why's Poignant Guide to Ruby".

Word is C++ is dying, and everyone knows Tcl has never been more than a zombie. So I need a new language. Is Ruby it? Please don't suggest Java, I know I need to learn Java, but I refuse. :)

Friday, March 30, 2007

Stuff I've read lately

The Rising: Volume 1 of the Flight Engineer (James Doohan and S. M. Stirling) - Why do we eat twizzlers? You see the bag, you know they aren't very good, but "mmmm... twizzlers", you get them. Then you eat them all. Then you think, "That wasn't very good." And they're not good for you. Some books are like that. Any Star Wars book not by Timothy Zahn, any Star Trek book - this book. I like twizzlers, so I read this book. I told myself, "Maybe Stirling will keep the quality high." I was fooling myself. I mean, mining antimatter from a planet! Why? Why? Ah, well, I'll let you know how the next one is :)

Speaking My Mind (Tony Campolo) - I have spared the zero readers of this blog (I don't need to read it, I already know what's here...), and posted this review on my Faith blog.

Friday, March 23, 2007

Fixing Star Wars - Episode 2

Wow, were in the home stretch now. I think it was about 2 in the morning at this point... :)

Episode 2 is in pretty good shape. Mostly trimming for time and tempo, and patching to fit in the other changes we've made:
  • Cut Obi-wan's bartender friend, and reduce the library search. It slows everything down. Remember any scenes of Jedi training should have them older than five years old.
  • Remove the factory fight (and flying R2). It adds nothing.
  • Shorten the interrogation of Obi-wan and monster arena fight. The action doesn't climax until after the Jedi arrive, and then the stormtroopers arrive. This leads to some amount of saturation.
  • If that isn't enough time savings, the asteroid chase can also be removed. It adds little, and Obi-wan can still need Anakin to relay his message (Ben's ship is too small, or has a random failure).
  • Put in some conflict between Anakin and uncle Owen. That had to be the easiest connection back to the original trilogy, and Lucas dropped it on the floor.
  • Remember that Count Dooku is Darth Maul (per Episode 1). This can help to maintain the suspense on whether Dooku is good, evil, or just independent.
That is most of the changes. I will put together all the changes for 3, 4, and 5 into a final post.

Wednesday, March 21, 2007

We Come in Peace!

We come in peace.
We come in peace.
WE COME IN PEACE.


New orders: KILL KILL!

do do doo to do doot

Tuesday, March 20, 2007

Fixing Star Wars - Episode 1

(See the previous post: Fixing Episode 6)

Flush with success, we asked ourselves: "Could episode 1 be fixed?" It seems impossible, but let's look at the problems:
  1. Gungans
  2. Confusion in the final act (four disparate settings)
  3. Amidala, the eleven year old politician
  4. Anakin, the five year old love interest
  5. Slow start (the fate of the whole galaxy rests in trade negotiations at a backwater world?)
  6. Darth Maul -> Count Dooku issues
  7. C3PO (a protocol droid) built by a five year old for his enslaved mother?
  8. Light treatment of slavery on Tatooine
  9. Midichlorians (or was it mitochondria?), 'nuff said
Ok, that's a lot of issues. But we can tackle them one-by-one.
  1. One, two, and five are somewhat related, and can be solved together. I think everyone can agree the treatment of the Gungans falls somewhere between atrocity and poorly done. More subtly, they slow down the story at the beginning, and overly complicate the story at the end. It seems Lucas was trying to show that the rebellion includes metropolitan and rural interests. This can be done better by reducing the footprint of the Gungans to a minority population in the cities (on top of cleaning the material). This quickens the introduction, and eliminates one setting in the finale. A handful of Gungans can help Amidala to retake the palace.
  2. Handled mostly above. Also improvement needed in how Anakin influences the battle.
  3. Amidala needs to be either: a beauty queen (like American idol for a position more like England's queen, i.e. public relations) or the daughter of a more senior politician. She should also be older, maybe early twenties. This gives a lot of room to play a smart, rebellious youngster against older politicians.
  4. Ok, I think Anakin was supposed to be closer to ten; but you put him next to Liam Neeson, and he's going to look tiny. A lot of the problem is Lucas is very fuzzy/odd about the Jedi order. From episode 4, Luke is "too old". He was about twenty. But Anakin is "too old" too! Clearly, you have to be about three to be a Jedi! That's kind of creepy. Actually, that's a lot creepy. Combined with 3, Anakin can be about 16. Say 13 is the cutoff.
  5. Handled mostly above. The pod racing scene also could be reduced. Time savings should be converted into deepening characters, settings, and politics.
  6. The Count Dooku issue will raise its head again. But the first step is to stitch together Maul and Dooku. There are supposed to be two Sith (master and apprentice). Instead we get master, old apprentice, new apprentice, and robot apprentice (General Grievous). The solution is to make Maul the mask for the public figure of Dooku (you can even keep both actors). Hmm, now you can't kill Maul at the end of Episode 1, but that's ok. Maul kills Qui-Gon, knocks out Obi and makes his escape.
  7. C3PO is clearly part of Amidala's staff. If you want to show off Anakin's skill, he can create a robot we don't see in the late trilogy (or one we know less about).
  8. There is room in Episode 1 to deepen this. But resolution should probably wait until 2 or 3.
  9. I said 'nuff said!
Ok, that was painful. But we made it! Epsiode 1 is fixed! Now finish them!

Thursday, March 15, 2007

New Stars Status

I used to tell John how a certain GUI feature was only a handful of lines of code in Tcl. He would always come back with, "Yea, but it takes you a whole day to write those lines." It's true. I would look through man pages, and experiment with the console, then finally write a line or two; and modify another line or two.

The latest changes have had me thinking a lot. I need to add waypoint tasks when the user changes the waypoint task drop down. I realized the first step was to add the code to find the planet a fleet is in orbit of (or deep space).

That is finally done. Compare these two screen shots to an older fleet view:




Part of the trouble was I no longer have access to a Visual C++ compiler. The key was to use -mno-cygwin on g++ cygwin. But then I had to rebuild the whole tool chain...

Next step is to add the code to the waypoint task updater.

Saturday, February 24, 2007

Laugh til your ribs hurt!

It's not often something makes me laugh until my ribs hurt. Laughing so much, you cannot get air, and it becomes painful. The clearest time I remember, was watching Mytery Science Theater do "The Attack of the the Eye People" (two the's). It was just after Joel said, "It's not really much of an attack. More like, the minor vandalism of the eye people."

More recently, it was the Daily WTF: http://thedailywtf.com/Articles/Unsolved_Murder.aspx

Not sure why exactly. Maybe something I remember from college, "It is an honor to die for my employer!"

Saturday, January 27, 2007

Stuff I've read lately

Mirror Dance (Lois Bujold) - Another quality Vorkosigan book. About as good as "The Vor Game". Better than Komarr.

Ruled Britannia (Harry Turtledove) - It is a shame Turtledove has decided to sacrifice quality for quantity. The idea of a revolution hinging on a play is just weird.

A Song of Stone (Iain Banks) - I like the use of the second person ("I go this way and you go that way"). You don't see that very often. For the plot, all I can say is "Very postmodern." The main character is so weak and conflicted that he takes six pages to die.

Monday, January 22, 2007

Snowman!

I made me a snowman!

Friday, December 08, 2006

Stuff I've read lately

Jarhead (Anthony Swofford)(audio) - I wouldn't normally talk about an audio book, since I don't really count them. Going in, I was thinking, "How serious was the first Gulf War, really?" (for Americans) But, I forget, that at the time, it was deadly serious. In the end, it wasn't very serious (Swofford was in all of two "battles", and never fired his weapon), but it still affected the men involved. It was, of course, deadly serious to the Iraqis killed.


The Vor Game (Lois Bujold) - Another quality Vorkosigan book.


The Faded Sun: Kesrith (C. J. Cherryh) - Ahh, Cherryh. This book is classic Cherryh. 'The People' start the book with having been decimated from millions to maybe thousands. By the end, there are two...


Stanger in a Strange Land (Robert Heinlein) - Coming from a UNIX background, I already knew 'grok'. So I wasn't sure what effect it was supposed to have on me. Otherwise, this book is supposed to be one of Heinlein's best. But I didn't see anything special.

Tuesday, December 05, 2006

Infinite Improbability

Hello all! Not sure how many readers I have left (after chasing off most in the comments section...)

The Way of the Master radio is particularly vocal on proving the existence of God. I've dealt enough with atheists that I am skeptical.

Let me try to do their argument, and you can counter in the comments.

Thanks!

God is infinite. (definition)

The universe had a beginning (entropy, background radiation, expansion, etc.)

The creation event requires an infinite - one or more of:
infinite regression (turtles all the way)
multi-verse (infinite probabilistic universes)
infinite, uncreated, creator God

Thanks again!

Monday, December 04, 2006

Fixing Star Wars - Episode 6

So, a co-worker and I got to talking, and we decided to fix Star Wars. I mean, everyone likes Star Wars, but with just a little fixing, it could be great!

We started with Episode 6 (Return of the Jedi). An episode with a lot of good stuff, but showing the beginnings of Lucas' mad ego trip. A trip ending in the horror that is the prequel trilogy...

Ok, what problem(s) are we solving?

  1. Two death stars (episodes 4 and 6) are just silly and irritating

  2. The whole Luke-Leia brother-sister thing is kinda icky

  3. How dangerous is this whole rebellion thing, if no major characters die?

  4. Ewoks should of been wookies
The solution set is like this:
For #1, Episode 4 should probably keep its climactic ending. So, something big needs to blow up. Might as well leave it the Death Star, as originally filmed. The Empire should realize one, big capital ship is less useful than many (the whole "systems slipping through the fingers" statement). The project in Episode 6 should be a fleet of super star destroyers (probably best to remove the SSD from Ep 5). Or you could keep the Death Star in 6, and have Luke help to knock out a Star Destroyer using the force.

For #2, simply remove it. There are ways of resolving a love triangle beside declaring one leg illegal. More in point 3.

#3, kill Han. Probably at some point in the shield generator mission. This doesn't mean that Luke and Leia have to be together. It's ok for Leia to feel some grief and not be with anyone...

#4, 'nuff said.


That is on top of a lot of minor fixes. All the characters need de-cardboarding. The construction site makes no sense (a no-tech world in the middle of nowhere - should be a ship yard some where). We are not concerned with fixing, or remaining consistent with the books (most of which were terrible). You can keep Leia's encounter with the cute ewok as a young wookie.

Thursday, November 16, 2006

New Stars Status

I've fixed the economics page. The last page of the race wizard is also done:



I still need to connect the "All expensive tech start at level 3" button to C++ (there was an engine change needed). And to add the drop down for "Spend extra points".

I've started adding the GUI elements for cargo load and unload:




I need to take changes in these elements back into C++, and add the ability to create these orders from scratch.

Musical Interlude

Everything you know is wrong!
Black is white, up is down, and short is long.
And everything you thought was just so important
doesn't really matter at all.

...

Just as the floating, disembodied head of colonel Sanders
starting yelling,
"Everything you know is wrong!"

Wednesday, November 15, 2006

New Stars Status

I fixed the oddity in the ship designer.

Here are the next pages of the race wizard:






Still need to connect some of the economic spinners to the C++ code. Then I can finish page 6, and the race wizard will be done!

Tuesday, November 14, 2006

New Stars Status

Here is the current status of the race wizard:




Steps 1 and 4 are done. The point calculation code is done. I need to fill in the other pages.

New Stars Status

Woohoo! Ship designer is mostly done...



Moving from slot to slot does not work (you have to discard, and re-add). There are also some oddities in the interface after finishing a design off a blank hull.

I will try to fix the oddity before polishing off the race wizard.

Monday, November 13, 2006

New Stars Status

Made some more progress on the ship designer today. The component button brings up the list of components, and the available hull types button brings up the list of hulls. This uncovered a bug in the engine; there is no function to determine if a particular player can build a given hull. This is currently stubbed to always true. I haven't looked into the enemy hull code yet...




Next step is to enable the copy button.

Sunday, November 12, 2006

Shocking Interview

I was poking around on the Way of the Master Radio website, and I found this clip. Make sure to watch it all the way to the end, or skip to the end if you've had enough...

Friday, November 03, 2006

New Stars Status

Here is the next screen shot:



We can see: the planetary environment display under the ship designer, the planetary build queue, a packet in the space display, and the ship designer dialog.

The ship designer dialog still needs a lot of work. It will currently display existing designs, but it cannot separate ships and starbases. It will not display enemy designs.

I have the drag and drop code for doing new designs, and I need to plug it into the "Copy Existing Design" and "Edit Selected Design" buttons. I also need to transmit the drag and drop commands back to C++ so that the new design can be saved.

That brings us up to date on the New Stars GUI. I will hopefully make some progress now :)

Thursday, November 02, 2006

Stuff I've read lately

Perelandra (C.S. Lewis) - These middle of Lewis' space trilogy. I like Perelandra. It presents a very interesting view of the early fictional view of the solar system (with habitable Mars and Venus). Mars represents the old way, with angels directly guiding people. The intended system on Earth is fuzzier, due to its lead angel rebelling against God. Earth then becomes the place where God is made flesh (in Jesus), for the salvation of all. Venus is the newest creation. The Adam and Eve of that planet are free to choose, but two representatives from Earth are sent to fight over them.

That Hideous Strength (C.S. Lewis) - The last of the space trilogy. I didn't like the ending so much. It did kind of remind me of Stross' "Atrocity Archives" some.

Have Space Suit - Will Travel (Robert Heinlein) - A fun book. I think he could of taken a more serious turn to it, but it is targeted at a younger audience.

Saturday, October 14, 2006

New Stars Status

The first few screen shots will come quickly, as I catch up to the current status. Here is a turn file with a fleet in space, and a minefield selected. Note I need the little yellow pointer under the current selection, a minefield graphic, and better ship graphics... I also need to write the orbitting code. Our files have some issues with consistancy. The fleet really does have 0 fuel.

Friday, October 13, 2006

New Stars Progress

To help motivate me to make more progress, I will post updates on the current status of New Stars GUI. Here is the first shot:

Thursday, October 12, 2006

Call Me Back, Ishmael

"Ishmael" (Daniel Quinn) is an update on the idea of the noble savage. The author presents a choice between two lifestyles - "Takers" and "Leavers". The Takers take their lives into their own hands. They plant more food than the can eat, and grow without limits. The Leavers leave their fates to the gods (growing and shrinking population as the environment shifts). He stops short of saying technology is evil.

Unfortunately, I do not think this jives with actual history. I believe "Guns, Germs, and Steel" (Jared Diamond) presents a much better view of pre-history and anthropology. The peoples who retained stone age technology throughout the technology revolution in the West did so because they lacked the opportunity to do so (not out of some conscience choice). New data is showing massive die-offs of local bird and animal populations in pre-Columbian America. It was only the plagues introduced in the 1600's by the Spanish allowed the animal populations to be restored in time for the American settlers of the 1800's to find an "unspoiled wilderness" and come in and kill them off again...

We do not know why early American agricultural societies disappeared. It may of been disease, a long drought, or invasion by neighbors. It's possible that without animal power (see GGS) they simple said "it's not worth it" and returned to a hunter-gatherer lifestyle.

Thursday, October 05, 2006

More Drugs

Let me start by saying some people need (or appear to need) less drugs. These are people you look at and say, "He needs less drugs". Some people need more drugs. "Are you SAD (social anxiety disorder)? Then you need more drugs." TV commercials are always telling people they need more drugs.

Well, I officially need more drugs (I couldn't use any less than my current 0). So newDrugs / oldDrugs == infinite. That's an infinite (percent) increase in drugs! Don't worry, it's not like I have some horrible disease or anything. Thanks for your concern.

So, if any new posts are particularly good (or bad); it's not me, it's the drugs.

Enjoy!

Tuesday, October 03, 2006

Now it begins

Space Ghost (SG): Now it begins! Who all here is evil?
Zorak (Z): I'm evil!
Brak (B): I'm evil!
Z: Oh, you are not!
B: I am too!
Z: You're as harmless as a babies butt!
SG: Zorak!
Z: Well he is.
B: I am not a babies butt.
SG: Sorry Brak, I'm going to have to go with Zorak on this one. You simply lack the mental capacity to be evil.
B: I don't get it.
SG: You have to, oh say; come up with plots against the universe, hatch evil plans to conquer planets, and just be plain mean most of the time.
Z: You're just too nice.
B: I forget how to be mean. That radiation half lobotomized me.
SG: Say, I've got an idea. Why doesn't Zorak teach you how to be mean?
Z: Oh man, do I haf'ta?
SG: Yes you haf'ta!
Z: Alright Brak, repeat after me: "Space Ghost, I will destroy you!"
B: Space Ghost, I will destroy you, if you don't mind.
Z: I WILL destroy YOU!
B: I will destroy you?
Z: I WILL DESTROY YOU!!
B: Alright! I will destroy you!
Z: You, and your little dog too.
B: You, and... Hey! I like his dog, Francine is a good puppy.
Z: No, that was just a threat.
B: You want to hurt Francine. You're a big, bad, green, thingy, guy...
SG: Bug?
B: Bug. Space Ghost, shoot that thingy-thing on your arm.
SG: Destructo-ray?
B: Destructo-ray, so he doesn't hurt Francine.
SG: Gladly, Brak, my dear old chum. {BLAST}
Z: Hey! What did you do that for!
SG: That was for Francine! Hey wait, I don't have a dog.
Z: Yea, tell me about it.