As in the original prototype, weapons now require ammunition in order to fire. Each weapon can store a small amount of ammunition for itself, but once it runs out, additional ammunition must be delivered by the ship's crew. Individual crew hand-carry ammo bullets from a nearby ammo supply to the weapon.
Notice how in the above screenshot, some of the crew are carrying ammo to the weapons.
The purpose of this mechanic is to further emphasis the importance and role of the crew on the ship, and to make designing a ship for maximum crew efficiency a priority. If the closest ammo supply is too far from the weapon, then the weapon won't be able to fire as often. It will also be important to prevent narrow corridors from getting congested with too much foot traffic. Wider corridors and/or more ammo supplies may help if foot traffic becomes an issue.
Friday, August 24, 2012
Friday, June 29, 2012
StarWright - Attacking
For a very long time it has been possible to command a ship to move to a particular destination by right-clicking into empty space, but there has been no way to command a ship to approach and attack another ship. That has now changed!
This screenshot probably requires a bit of explanation:
- In their simplest form, attack commands are very simple to use and work almost exactly like move commands. Simply left-click on one of your own ships, and then right-click on an enemy ship to command your own ship to fly to the enemy ship and attack it. The computer will automatically determine the ideal distance from the enemy ship as well as the ideal flank to attack from (that is, whether to fire from the bow, stern, port, or starboard sides of your ship). A red circle will display the distance from the enemy ship, and a red ghost of your ship will show you exactly where your ship will station itself relative to the enemy ship.
- As an advanced "power player" feature, it is also possible to right-click on an enemy ship and then, without releasing the right mouse button, drag away from the enemy ship. Doing so allows you to adjust both the attack distance and the direction to attack from. Thin red lines show which weapons can hit the enemy ship. The screenshot above shows an in-progress right-click-and-drag away from an enemy ship.
It is currently not possible to manually adjust which flank your ship will fire from. This feature is hopefully coming soon.
Wednesday, June 27, 2012
StarWright - Modeless Sandbox
This is just a quick update to show off a refinement I made to the sandbox user interface.
If you remember from my previous blog post about the sandbox, I lamented the separation between the two separate Build and Play modes -- one mode for modifying ships, the other for playing the game. As simple and as easy as it was to toggle between the two modes, it was still annoying to have to toggle between them, and the separation discouraged making very quick design iterations.
My refinement is to eliminate those two distinct modes and instead display the toolboxes for ship parts and asteroids on the screen at all times by default. (They can be hidden by clicking the X and re-shown from the Panels menu.) Ordinarily, if you have no part or asteroid selected, then you can select and command ships like normal. If you want to modify a ship, simply select your desired part on the left and add it to your ship. Likewise if you want to have fun with an asteroid, select it from the toolbox on the right. Once you're done either building ships or placing asteroids, simply right-click to get rid of whatever you had selected and you'll be able to command your ships again, just like normal.
The elimination of the two distinct modes is definitely less annoying and more intuitive too. The few people who I've had playtest the game seem to agree. My only real lament now is that the presence of both toolboxes on the left and right can crowd the screen. It's not too bad on large monitors, and you can hide either or both of them if you want, so it's not a big deal, but I still wish the user interface was less crowded.
I also recently made another important refinement to the sandbox, which is the elimination of "ship grids". Previously, in order to build a new ship, you first had to place an empty "grid" into space, and only then could you put parts and rooms on the grid. In this latest version I streamline the process by allowing you to place a part directly into empty space, without requiring a grid first. To further extend your new ship, simply select a new part and when the mouse cursor is near the ship, the selected part will snap into position.
If you remember from my previous blog post about the sandbox, I lamented the separation between the two separate Build and Play modes -- one mode for modifying ships, the other for playing the game. As simple and as easy as it was to toggle between the two modes, it was still annoying to have to toggle between them, and the separation discouraged making very quick design iterations.
My refinement is to eliminate those two distinct modes and instead display the toolboxes for ship parts and asteroids on the screen at all times by default. (They can be hidden by clicking the X and re-shown from the Panels menu.) Ordinarily, if you have no part or asteroid selected, then you can select and command ships like normal. If you want to modify a ship, simply select your desired part on the left and add it to your ship. Likewise if you want to have fun with an asteroid, select it from the toolbox on the right. Once you're done either building ships or placing asteroids, simply right-click to get rid of whatever you had selected and you'll be able to command your ships again, just like normal.
The elimination of the two distinct modes is definitely less annoying and more intuitive too. The few people who I've had playtest the game seem to agree. My only real lament now is that the presence of both toolboxes on the left and right can crowd the screen. It's not too bad on large monitors, and you can hide either or both of them if you want, so it's not a big deal, but I still wish the user interface was less crowded.
I also recently made another important refinement to the sandbox, which is the elimination of "ship grids". Previously, in order to build a new ship, you first had to place an empty "grid" into space, and only then could you put parts and rooms on the grid. In this latest version I streamline the process by allowing you to place a part directly into empty space, without requiring a grid first. To further extend your new ship, simply select a new part and when the mouse cursor is near the ship, the selected part will snap into position.
Wednesday, May 30, 2012
StarWright - Crew
Starships now have crew on board. As in the most recent version of the original prototype, the crew on a ship are fully automated. Crew currently only have one job, which is to staff the ship's weapons and control room. In the future they will also have other tasks to perform, such as delivering ammunition and making repairs.
In order for a ship to have crew, you need to provide living quarters for them. In the current version of the game, there are two such rooms: A small "bunk" which provides space for 2 crew, and a larger "quarters" which provides space for 6 crew.
In order for a ship to have crew, you need to provide living quarters for them. In the current version of the game, there are two such rooms: A small "bunk" which provides space for 2 crew, and a larger "quarters" which provides space for 6 crew.
Thursday, May 24, 2012
StarWright - Fun with Asteroids
I'm in the middle of adding a crew simulation to the game, but I took a break to add asteroids to the existing game. Asteroids aren't very useful except for target practice.
When in Play mode, the toolbox on the left, which ordinarily shows the ship parts available, now shows a few different sizes of asteroids that can be placed into the sandbox. Each asteroid has a randomly-generated shape.
When in Play mode, the toolbox on the left, which ordinarily shows the ship parts available, now shows a few different sizes of asteroids that can be placed into the sandbox. Each asteroid has a randomly-generated shape.
Thursday, May 10, 2012
StarWright - CPU Profiling
When programming video games, it's very important to understand how much time your computer's processor is spending in various parts of the game's code. In order to better understand StarWright's code, I added a CPU profiler to my game engine to display graphically how much time is being spent in each section of code.
Here's what that profiler looks like: (Click to see full-size version.)
Each row of text represents a single section of code that is being measured. A section of code may also have a number of "sub-sections", which are indented in the above picture.
The colored bars indicate the "slices" of the game frame that are spent in each code section. You can think of the left edge of the profiler as representing the beginning of the frame, the right edge as representing the end of the frame, and the colored bars as representing the time within the frame that is spent on a specific task.
Here's what that profiler looks like: (Click to see full-size version.)
Each row of text represents a single section of code that is being measured. A section of code may also have a number of "sub-sections", which are indented in the above picture.
The colored bars indicate the "slices" of the game frame that are spent in each code section. You can think of the left edge of the profiler as representing the beginning of the frame, the right edge as representing the end of the frame, and the colored bars as representing the time within the frame that is spent on a specific task.
Sunday, April 22, 2012
StarWright - The Sandbox
Wow, it's been over two months since I last posted about StarWright! But I have been working on the game. In fact, I've been working on a very important change that should make the game much more accessible, understandable, and fun.
A few months ago I watched a talk by Bret Victor called "Inventing on Principle". In it, he talks about and demonstrates a few of his software programs he's created. A common principle of all the programs he shows is that they provide immediate feedback. For example, he demonstrates a scripting program in which he has created a prototype for a platform game. The left side of the screen contains a running game simulation, and the right side of the screen contains the game's programming code. Unlike most old-school programming languages (in which the author writes the code, compiles the code, and tests the code as three separate steps), as Bret modifies the scripting code, his changes immediately effect the game running on the left, so that as he modifies, for example, the gravity in his game world, he instantly sees the character fall faster or slower (or even upwards!) as he adjusts the gravity value.
Bret Victor - Inventing on Principle from CUSEC on Vimeo.
The key here is that all his changes have an immediate effect on how the game is played. This greatly speeds the design process, because every time you change a value, you can immediately see the result. And just as importantly, it makes, in his case, the scripting process much more intuitive, because our human brains are much better at connecting a cause with its effect if the effect happens immediately after the cause, instead of, say, a few minutes later.
I found his talk very inspirational because it made me realize that the "ship designer" user interface that I had created was born from an "old-school programmer" mindset. In the previous version of the ship designer, the player first "designed" a ship, then saved the ship, and then tested it in a separate simulation environment. The problem was, of course, that you couldn't tell what effect a design modification would have until you manually switch to the testing environment. The solution, I believe, is to combine the design interface with the testing environment, so that the player designs their ships directly in the testing environment and can see the immediate impact of, for example, adding that extra thruster.
Merging these two environments together was certainly not trivial. Allowing ships to be updated instantly in a live environment was a challenge, and keeping the nice U.I. features of the designer, such as undo/redo, was a bigger one.
I've dubbed this new merged design/testing environment "The Sandbox". Here are a couple screenshots of what it looks like currently:
Upon first glance, the top screenshot does look quite similar to the old designer interface, which has a similar menu bar at the top and a similar "parts toolbox" (albeit with more parts) on the left. But there are a lot of very nice additions to the old interface:
A few months ago I watched a talk by Bret Victor called "Inventing on Principle". In it, he talks about and demonstrates a few of his software programs he's created. A common principle of all the programs he shows is that they provide immediate feedback. For example, he demonstrates a scripting program in which he has created a prototype for a platform game. The left side of the screen contains a running game simulation, and the right side of the screen contains the game's programming code. Unlike most old-school programming languages (in which the author writes the code, compiles the code, and tests the code as three separate steps), as Bret modifies the scripting code, his changes immediately effect the game running on the left, so that as he modifies, for example, the gravity in his game world, he instantly sees the character fall faster or slower (or even upwards!) as he adjusts the gravity value.
Bret Victor - Inventing on Principle from CUSEC on Vimeo.
The key here is that all his changes have an immediate effect on how the game is played. This greatly speeds the design process, because every time you change a value, you can immediately see the result. And just as importantly, it makes, in his case, the scripting process much more intuitive, because our human brains are much better at connecting a cause with its effect if the effect happens immediately after the cause, instead of, say, a few minutes later.
I found his talk very inspirational because it made me realize that the "ship designer" user interface that I had created was born from an "old-school programmer" mindset. In the previous version of the ship designer, the player first "designed" a ship, then saved the ship, and then tested it in a separate simulation environment. The problem was, of course, that you couldn't tell what effect a design modification would have until you manually switch to the testing environment. The solution, I believe, is to combine the design interface with the testing environment, so that the player designs their ships directly in the testing environment and can see the immediate impact of, for example, adding that extra thruster.
Merging these two environments together was certainly not trivial. Allowing ships to be updated instantly in a live environment was a challenge, and keeping the nice U.I. features of the designer, such as undo/redo, was a bigger one.
I've dubbed this new merged design/testing environment "The Sandbox". Here are a couple screenshots of what it looks like currently:
Upon first glance, the top screenshot does look quite similar to the old designer interface, which has a similar menu bar at the top and a similar "parts toolbox" (albeit with more parts) on the left. But there are a lot of very nice additions to the old interface:
- The "Build" and "Play" buttons underneath the menu bar allow you to toggle between the build/design mode (which allows you to modify any ship in the sandbox) and the play/control mode (which allows you to control any ship in the sandbox as if you were playing a real game).
- There can be any number of ships in the sandbox, and every ship is a live simulation. Added a couple thrusters to your ship and want to see how it flies? Just switch to Play mode and fly it around! Not quite happy with the result? Switch back to Build mode and add another couple thrusters.
- Any previously-saved ship design can be added into the sandbox by loading it from the Ship menu.
- To create a new ship design, you plop down a new "grid" anywhere you want, in which you can start placing parts for your ship.
- To modify an existing ship, simply go into Build mode, select the part you want, mouse over the existing ship, and click where you want the part to go.
- You can pause or resume the game simulation at any time using the control in the upper right. It's often easier to modify ships while paused. Unpause and the simulation will instantly resume with your new edits.
It's not perfect -- for example, I'm not thrilled with the hard separation between Build and Play modes -- but it's a huge step forward, and the technology behind this could allow me one day to expand the sandbox into a full-blown live level editor.
Subscribe to:
Posts (Atom)







