
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...

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).
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...
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.
"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.
"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.
"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.
"The Bondage of the Will" (Martin Luther) - Reviewed on my faith blog.
Saturday, December 08, 2007
New Stars Status
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:

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...
- 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
- 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
- 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
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.

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.
"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:
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:
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:
- 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.
- Laser inertia - powerful lasers push two nuclei together directly. This is how fusion bombs work.
- 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.
"The Rebirth of Orthodoxy" (Thomas Oden) - Reviewed on my faith blog.
Subscribe to:
Posts (Atom)