Bill MacKenty

 
 
 

Quivering Communist Zombie Space Death - Part 2

Posted in Games in education Text-based gaming on 06 - June 2011 at 07:11 AM (11 years ago). 48 views.

(Part 1 here) I have started this exercise late in the year, and haven’t had any luck grabbing students. Drat. I invited some teachers to participate, but they haven’t bitten. I intend to continue onward, building our text-based space game about quivering communist zombies. A simple exercise, to create a reasonably accurate model of the solar system, yes? Let’s dig. We start with the planets (trivial google search) and then move to modeling them in hspace. We use the new universe wiki to help us. We use this fairly well referenced guide to get us started. Creating the actual planets objects is pretty easy. In pennmush, logged in as a wizard (with hspace running, of course): @create Earth @create Mars @create Venus @create Sun etc... We then assign each object an attribute . 1 is an internal attribute for planets in our example, assume #4 is the object for earth, and #5 is the object for Mars @space/addobject #4=1 @space/addobject #5=1 And then we need to define size, mass, name and location. And here, friends, is where things get interesting. Let’s look at the actual command syntax: @space/setobject #5/NAME=Earth @space/setobject #5/MASS= MASS HERE @space/setobject #5/LOCATION=10000 10000 0 So, what is the mass of earth? Again, a google search reveals: 5.9742×1024 (it is referenced to NASA, and I checked the source, so it looks legit. A first task is to convert scientific notation to standard number that hspace can understand. We know 5.9742×1024 equals 5,974,200,000,000,000,000,000,000 (which is freaking huge) So we simply plug this in. @space/setobject #5/MASS= 5974200000000000000000000 We do the same thing for size. I know, MASS isn’t SIZE, but for the purposes of this game, this will work. According to the wiki, hspace uses size of an object for sensor reading (very weak sensors might not see pluto) and MASS for how much an object can “hold”. For planets, this is kind of irrelevant. But if you have a big ship that serves as an aircraft carrier, mass is important. We are using cartesian coordinates to represent position. We’ve placed the center of the sun at 0,0,0. So where do we put earth? We are not modeling orbits, but we are trying to be “about right” with distances. So we return to our resource page and look at how far earth is from the sun. We see the mean distance is 149,597,890 kilometers. so, if the sun is at 0,0,0, we can put the earth at 149597890,0,0 This puts the earth on a straight line from the sun - pretty far away! The syntax: @space/setobject #5/LOCATION=149597890, 0, 0 We’ll need a pretty zippy ship to get around our solar system. I wonder how fast a ship would need to be in order to make it from Earth to Mars in a decent amount of time?