The title of this post comes from the name of an old game we used to play way too much back in the mid-80's at the University of Alabama on the dorm computers. We always loved the simple title of it. Just "Begin".
I bring this up because I began the process of adding ship vs. ship combat in the game today. It's still got a very long way to go, but you can click on an enemy ship now and bring up the combat screen, even though it doesn't do anything right now except check that the two ships are in the same location and don't belong to the same player. I'm trying to build the distrust of the data passed to the screen in from the very beginning this time.
So after I got that basic setup done, I went back and started adding a few things I'll need for combat, like ship signatures and sensor ratings. Basically, a ship's signature is calculated by CLASS + ARMOR - CLOAKING. So a new Class 0.1 ship would have a signature of 0.1. Cloaking can take this to a negative value, but new ships won't start with cloaking. So then if you take the signature value and add to it the Sensor value of the opposing ship, if that value is over 0.0 then the opposing ship can see you. So without some time of cloaking, all ships will be visible.
I can then use that derived value to help determine how close the two ships are to each other when combat starts, modified by certain things which I haven't fully fleshed out yet.
Lots of progress has been made in March. I'm looking forward to seeing what I can get done in April.
Tuesday, March 29, 2011
Asteroid Fields and UI
Lots of work today on the ship interface for asteroid fields. I'm pretty much done with landing on an asteroid and scanning asteroid squares, other than adding a check to see if the crew member associated with each action gets a skill bump.
I also did some work on adjusting the layout for the ship screens, since I wasn't really happy with it yet. I'm still not completely satisfied, but it's better. I generally like to go with a nice clean interface that isn't cluttered up with a lot of noisy objects, and sometimes I have to remind myself of this like I did tonight.
I've also made myself a major to-do item to harden the code around setting new actions for ships, since I discovered several security holes that would let someone get their ship severely out of whack in the database. Mostly this just involves not trusting the input coming in via the GET or POST actions.
I also did some work on adjusting the layout for the ship screens, since I wasn't really happy with it yet. I'm still not completely satisfied, but it's better. I generally like to go with a nice clean interface that isn't cluttered up with a lot of noisy objects, and sometimes I have to remind myself of this like I did tonight.
I've also made myself a major to-do item to harden the code around setting new actions for ships, since I discovered several security holes that would let someone get their ship severely out of whack in the database. Mostly this just involves not trusting the input coming in via the GET or POST actions.
Monday, March 28, 2011
Asteroid Fields Continued
Today was mostly trying to completely finish up the Asteroid functionality with regards to ships. Ships can now land on asteroid squares and by tomorrow ships will be able to scan asteroid field squares that the player does not have currently in their library.
I decided to go ahead and make a player scan every possible square in an asteroid field to reveal the squares, as opposed to only making the player scan squares that actually have rocks in them. My reasoning for this right now is that I want the exploration of asteroid fields to be long and tedious, since these fields are going to yield the best rewards in the game for minerals. This also makes a complete scan of an asteroid field a valuable commodity. I may revisit this in the future, but for now I'm going to go with it.
I'm also trying to do some testing on the asteroid field code at the same time, and have closed up several vulnerabilities that would have allowed the player to cause mischief.
I decided to go ahead and make a player scan every possible square in an asteroid field to reveal the squares, as opposed to only making the player scan squares that actually have rocks in them. My reasoning for this right now is that I want the exploration of asteroid fields to be long and tedious, since these fields are going to yield the best rewards in the game for minerals. This also makes a complete scan of an asteroid field a valuable commodity. I may revisit this in the future, but for now I'm going to go with it.
I'm also trying to do some testing on the asteroid field code at the same time, and have closed up several vulnerabilities that would have allowed the player to cause mischief.
Thursday, March 24, 2011
Success!
I completed a fairly large step in the game development today, and for the first time a new resource was created by a ship completing a Scoop Gas Giant action, as shown in the report sent below. Before today all items in the game were created by me running SQL queries directly on the database. This means that the first block in the resource pyramid leading to in-game production is complete. The next step will be ships being able to Harvest Comets and then building mining outposts on top of mineral deposits found on planets, moons, or comets.
Wednesday, March 23, 2011
Cargo
More cargo work today since I found another corner I coded myself into. Turns out that since you can remove all the Cargo Modules off a ship, that leaves you with a zero sized cargo hold so once I forced the cargo moves to not be able to overload a ship then you couldn't put a Cargo Module back onto the ship in order to install it.
I thought of several ways to get around this, but what I ended up doing for now is that if you have a 0/0 cargo hold on a ship, you're allowed to move one Cargo Module over to temporarily overload the ship until you install that module, which will give you a 0/500 cargo hold at that point and let you resume normal cargo operations.
I'm heading out of town tomorrow until Sunday, so there probably won't be much going on in the game until next week.
I thought of several ways to get around this, but what I ended up doing for now is that if you have a 0/0 cargo hold on a ship, you're allowed to move one Cargo Module over to temporarily overload the ship until you install that module, which will give you a 0/500 cargo hold at that point and let you resume normal cargo operations.
I'm heading out of town tomorrow until Sunday, so there probably won't be much going on in the game until next week.
Tuesday, March 22, 2011
Coded into a Corner
Not much going on today. I had dinner after work with some colleagues in from Atlanta.
I had intended to wrap up some of the work on the Scoop Gas Giant action tonight, but to do that I needed to do some work on moving cargo around. When I dug into that code I realized I had coded myself into a bit of a corner last month where my Move Cargo code worked great but didn't necessarily know if it was moving cargo from a ship to a colony or vs. versa.
So I had to redo some functions I had that returned the amount of current cargo and the max cargo, which will allow me to make sure when you scoop up that He3 from a gas giant you don't overload your cargo hold. This side trek does let me cross off one item from my todo list, which was to make sure that the Move Cargo functionality respects maximum cargo hold size, which it wasn't doing before.
I had intended to wrap up some of the work on the Scoop Gas Giant action tonight, but to do that I needed to do some work on moving cargo around. When I dug into that code I realized I had coded myself into a bit of a corner last month where my Move Cargo code worked great but didn't necessarily know if it was moving cargo from a ship to a colony or vs. versa.
So I had to redo some functions I had that returned the amount of current cargo and the max cargo, which will allow me to make sure when you scoop up that He3 from a gas giant you don't overload your cargo hold. This side trek does let me cross off one item from my todo list, which was to make sure that the Move Cargo functionality respects maximum cargo hold size, which it wasn't doing before.
Sunday, March 20, 2011
Cargo and He3
So today I decided to work on ships being able to scoop gas giants. It turns out I haven't had a ship orbit a gas giant in a while, so first I had to fix a lot of bugs that have crept in. Then I got the Scoop Gas Giant action 95% complete and had to switch over to Cargo for a while.
I hadn't put in the code to calculate how much space a ship's cargo hold had remaining, but that's in the game now. The next step is to use this information to enforce limits on items being put into the cargo hold, whether you're transferring items or basically creating a new item in the case of the Scoop Gas Giant action which is the source of He3 in the game. He3 will be used by ships for moving and jumping to new systems, and will power Fusion Reactors at colonies. It will likely also be used in the construction of some items in the game. He3 will basically be the lifeblood of the game, and will make Gas Giants and some comets very valuable resources.
I'll have the new action and cargo hold limits wrapped up by tomorrow night.
I hadn't put in the code to calculate how much space a ship's cargo hold had remaining, but that's in the game now. The next step is to use this information to enforce limits on items being put into the cargo hold, whether you're transferring items or basically creating a new item in the case of the Scoop Gas Giant action which is the source of He3 in the game. He3 will be used by ships for moving and jumping to new systems, and will power Fusion Reactors at colonies. It will likely also be used in the construction of some items in the game. He3 will basically be the lifeblood of the game, and will make Gas Giants and some comets very valuable resources.
I'll have the new action and cargo hold limits wrapped up by tomorrow night.
Friday, March 18, 2011
Colony Governors
It's now possible to add and remove colony governors and the colony interface screens are coming along nicely. It's not ready for screenshots to be posted, but maybe sometime next week it will be far enough along to show off.
Thursday, March 17, 2011
Scans
Not a lot going on today, but I did make some changes to the way ships find Interstitial Access Points (IAPs). IAPs are basically wormholes and are how ships jump from one star system to another. To find an IAP, a ship has to be in a space square and use the Scan System Square command, which will probably take about 20 minutes - the Sensors skill of your ship's Science Officer.
Once the scan completes, if you're in the same space square as an unknown IAP, your ship will discover it and it will be added to your company's library. If you're not in the same square as an IAP, the report generated will tell you approximately how far away you are from the nearest unknown IAP. This will allow you to triangulate in on the unknown IAP until you finally discover it.
Originally, I had it set so that the scan just told you how far away you were from the closest IAP, even if you already knew the location of it. I thought that might be too frustrating though, so I've changed it to this new method.
Once the scan completes, if you're in the same space square as an unknown IAP, your ship will discover it and it will be added to your company's library. If you're not in the same square as an IAP, the report generated will tell you approximately how far away you are from the nearest unknown IAP. This will allow you to triangulate in on the unknown IAP until you finally discover it.
Originally, I had it set so that the scan just told you how far away you were from the closest IAP, even if you already knew the location of it. I thought that might be too frustrating though, so I've changed it to this new method.
Tuesday, March 15, 2011
Colonies
I was staring at the list of what is left to do for ships and realized that I needed to do some work on colonies first. Ok, ok, I didn't really have to, but I've been doing stuff for ships for weeks on end, and I finally got tired of staring at empty colony screens.
I'm not ready to post any screenshots by a long shot, but colonies are slowing becoming more than just a place for ships to land. In the process, I've firmed up some of the design for colonies, which I need to update in the Wiki at some point. Ok, ok, I need to put anything at all in the Wiki at this point since it only really has one page right now.
My artist has been trying to cheat me on pixels lately, but after administering a light flogging to him I've just about got all the asteroid graphics into the game now and I've been working on the tools used to build asteroid fields to make them easier to work with. It looks like I spoke a bit too soon about getting away from Firefox, since Chrome doesn't seem to handle large numbers of small images on a page very well. After I submit, Firefox does not reload every image, but pops up almost instantly, where Chrome seems to want to download every image again.
I'm not ready to post any screenshots by a long shot, but colonies are slowing becoming more than just a place for ships to land. In the process, I've firmed up some of the design for colonies, which I need to update in the Wiki at some point. Ok, ok, I need to put anything at all in the Wiki at this point since it only really has one page right now.
My artist has been trying to cheat me on pixels lately, but after administering a light flogging to him I've just about got all the asteroid graphics into the game now and I've been working on the tools used to build asteroid fields to make them easier to work with. It looks like I spoke a bit too soon about getting away from Firefox, since Chrome doesn't seem to handle large numbers of small images on a page very well. After I submit, Firefox does not reload every image, but pops up almost instantly, where Chrome seems to want to download every image again.
Monday, March 14, 2011
New Employees
I updated the Hire New Personnel page recently, so that you can hire new employees using credits and they will have relevant skills depending on your choice. Right now you can choose Command School, Engineering School, Academy of Science, or School of Management, and the new employee will have 0.1 skill in whatever skills match those choices.
Later on, I plan to make this process a bit more complicated, and add a small amount of randomness to the process. I'd love to come up with a way to have the employee creation system be a sort of homage to the old Traveller rules and the character creation in Ultima IV where you had to answer a series of questions to determine what kind of character you started with.
I'm still pondering on how to do this without just ripping off the Traveller system. For now, it is possible to get the employees you need to run the various functions that ships need.
Later on, I plan to make this process a bit more complicated, and add a small amount of randomness to the process. I'd love to come up with a way to have the employee creation system be a sort of homage to the old Traveller rules and the character creation in Ultima IV where you had to answer a series of questions to determine what kind of character you started with.
I'm still pondering on how to do this without just ripping off the Traveller system. For now, it is possible to get the employees you need to run the various functions that ships need.
Thursday, March 10, 2011
Asteroid Fields
I'm about 95% complete with the new Asteroid Field functionality, so I think it's safe to show off the first screenshot, featuring the view from a ship inside an Asteroid Field.
This screenshot features every type of asteroid except Carbonaceous. There's even an exotic asteroid hidden in there. This is just a small 13x13 section of a field, which can be up to 23x23 squares wide. I'll probably push that up to 25x25 before long since I'm just going to assume that most players will have good screen resolution and if they don't then they'll just have to use the scroll bars a bit more.
This screenshot features every type of asteroid except Carbonaceous. There's even an exotic asteroid hidden in there. This is just a small 13x13 section of a field, which can be up to 23x23 squares wide. I'll probably push that up to 25x25 before long since I'm just going to assume that most players will have good screen resolution and if they don't then they'll just have to use the scroll bars a bit more.
Ditching Firefox
I've been using it for quite a while now, but today I finally decided to stop using Firefox in favor of Google's Chrome browser. I probably should have done it a long time ago but the straw that broke the camel's back was a bug where Firefox ignores the CSS defined for Font size and uses the default size that you've set in Windows 7. Even Internet Explorer doesn't do this. Supposedly there's a workaround for it in FF, but screw that. I just want it to work.
So far there's been zero compatibility problems with Project Libertine and Chrome. It's also faster and the Chrome browser still uses the Firebug plugin flawlessly. Chrome also makes Google Apps like Gmail work better, so I'm pretty happy with the switch so far.
So far there's been zero compatibility problems with Project Libertine and Chrome. It's also faster and the Chrome browser still uses the Firebug plugin flawlessly. Chrome also makes Google Apps like Gmail work better, so I'm pretty happy with the switch so far.
Monday, March 7, 2011
Asteroids
The Asteroid Field rework is coming along nicely. I've got the library view of Asteroid Fields done, so now all I need to do is get it working on the Ship View and add the necessary ship actions that will allow a ship to enter the field and land on asteroids and what not.
I've also got to import all of the asteroid images that Jake sent me. He went a little crazy and I probably have about over 1600 asteroid field images to get put into the system and setup properly. It's a little nutty, but the variety available means there will never be two asteroid fields in the game that look alike.
I'm not quite ready to put up a screenshot yet, but I'll get one out by the end of the week.
I've also got to import all of the asteroid images that Jake sent me. He went a little crazy and I probably have about over 1600 asteroid field images to get put into the system and setup properly. It's a little nutty, but the variety available means there will never be two asteroid fields in the game that look alike.
I'm not quite ready to put up a screenshot yet, but I'll get one out by the end of the week.
Sunday, March 6, 2011
Weekend Update
Recent work has been mostly more cleanup. I've got the look and feel of the ship interface pretty close to how I want it, but I will let a real artist have a go at sprucing it up some in the future. Right now it's pretty plain and utilitarian, but that sort of appeals to me in a way.
I've also been doing some planning work and pretty much have the road map laid out to finish up ship functionality. It's a larger list than I thought, and will require some colony functionality as well, but I'm chewing up small chunks of the work at a fairly regular pace these days. I try to make myself commit at least a few lines of code each day, even if it's just fixing a bug or adjusting the look and feel just a bit.
The next major chunk I've started on is a total rewrite of the asteroid field functionality. I had originally intended each asteroid to be a separate small planet that you would orbit and land on, but I didn't really like the way it was looking and didn't want a huge list of 20 to 30 rocks that you had to choose from. After getting the asteroid graphics back from Jake last year, I had an "Asteroid Epiphany" and decided that I would make asteroid fields be just like planet maps.
Instead of "orbiting a planet" you can "enter asteroid field" and something like a 25x25 map will be displayed, with the asteroids being made up of squares on the map. A lot of the squares will be empty space that you can't interact with, but the others will be treated just like planet squares that you can scan or land on.
I should have a screenshot up later this week. I think it's going to look pretty sweet.
I've also been doing some planning work and pretty much have the road map laid out to finish up ship functionality. It's a larger list than I thought, and will require some colony functionality as well, but I'm chewing up small chunks of the work at a fairly regular pace these days. I try to make myself commit at least a few lines of code each day, even if it's just fixing a bug or adjusting the look and feel just a bit.
The next major chunk I've started on is a total rewrite of the asteroid field functionality. I had originally intended each asteroid to be a separate small planet that you would orbit and land on, but I didn't really like the way it was looking and didn't want a huge list of 20 to 30 rocks that you had to choose from. After getting the asteroid graphics back from Jake last year, I had an "Asteroid Epiphany" and decided that I would make asteroid fields be just like planet maps.
Instead of "orbiting a planet" you can "enter asteroid field" and something like a 25x25 map will be displayed, with the asteroids being made up of squares on the map. A lot of the squares will be empty space that you can't interact with, but the others will be treated just like planet squares that you can scan or land on.
I should have a screenshot up later this week. I think it's going to look pretty sweet.
Wednesday, March 2, 2011
Update
I've been doing a lot of cleanup work and have slowly added a few new features, but it's mostly just steadfast avoidance of reworking the planet code, which is probably going to take several days of work to finish.
I have added a method for ships to detect when other ships are present to the game again. At one point I just generated a list in the Ship Actions area, but since I didn't want to have to implement a scroll bar if the list of ships was long, I decided to have a graphical proximity indicator that doubled as a link to take you to a new page that will show a list of ships that are present and give you options to attack or scan them.
Here's a screenshot of how it looks at the moment. I'm not completely happy with how it looks or the placement yet, so it will likely change several times before I settle on something.
I have added a method for ships to detect when other ships are present to the game again. At one point I just generated a list in the Ship Actions area, but since I didn't want to have to implement a scroll bar if the list of ships was long, I decided to have a graphical proximity indicator that doubled as a link to take you to a new page that will show a list of ships that are present and give you options to attack or scan them.
Here's a screenshot of how it looks at the moment. I'm not completely happy with how it looks or the placement yet, so it will likely change several times before I settle on something.
Subscribe to:
Posts (Atom)