2
0
Эх сурвалжийг харах

Someone just HAD to ask for a better ship model

SimonDarksideJ 1 жил өмнө
parent
commit
8aad0f22c9

+ 37 - 13
FuelCell/Documentation/2-FuelCell-Setting-the-scene.md

@@ -217,25 +217,44 @@ Before you start modifying the `Game1.cs` file, rename it to `FuelCellGame.cs`.
 public class FuelCellGame : Game
 ```
 
-Then add the following code, after the existing declaration of the `GraphicsDeviceManager` member of the `Game` class:
+Then add the following code, replacing the existing declaration of the `GraphicsDeviceManager` and `SpriteBatch` members of the `Game` class:
 
 ```csharp
-GameObject ground;
-Camera gameCamera;
+private GraphicsDeviceManager graphics;
+private GameObject ground;
+private Camera gameCamera;
 ```
 
-In the existing `Initalize` method, initialize both game objects (using their default constructors) by adding the following code:
+Now, replace the existing constructor to make use of the properties above (since the default MonoGame template uses different names):
 
 ```csharp
-// Initialize the Game objects
-ground = new GameObject();
-gameCamera = new Camera();
+public FuelCellGame()
+{
+    graphics = new GraphicsDeviceManager(this);
+    Content.RootDirectory = "Content";
+}
+```
+
+Update the existing `Initalize` method to initialize both game objects (using their default constructors) with the following code:
+
+```csharp
+protected override void Initialize()
+{
+    // Initialize the Game objects
+    ground = new GameObject();
+    gameCamera = new Camera();
+
+    base.Initialize();
+}
 ```
 
-Next, add the following code to the existing `LoadContent` method:
+Next, update the existing `LoadContent` method to the following:
 
 ```csharp
-ground.Model = Content.Load<Model>("Models/ground");
+protected override void LoadContent()
+{
+    ground.Model = Content.Load<Model>("Models/ground");
+}
 ```
 
 You have added code declaring and initializing your camera class and the terrain model. To see all this work on the screen, you must update the existing `Draw` method to render the terrain. This is also a good time to add code that updates, during each frame, the camera's position and orientation. Currently, this update code does nothing because the fuel carrier (the user-controlled avatar vehicle) is not in the game yet. However, when the vehicle is added in a later step, the camera automatically updates, chasing the vehicle around as the player tries to find hidden fuel cells.
@@ -246,7 +265,7 @@ Updating the camera occurs in the aptly named `Update` method. At this time, the
 
 This modification is very simple because you already implemented the `Camera.Update` method (In the `Camera.cs` class). Now, you just need to call it at the proper time and pass some valid values.
 
-Add the following code to the `Update` method of the `Game1.cs` file:
+Add the following code to the `Update` method of the `FuelCellGame.cs` file:
 
 ```csharp
 float rotation = 0.0f;
@@ -254,12 +273,17 @@ Vector3 position = Vector3.Zero;
 gameCamera.Update(rotation, position, graphics.GraphicsDevice.Viewport.AspectRatio);
 ```
 
-The final step modifies the existing `Draw` method, modify the body of the `Draw` method of the `FuelCellGame.cs` file to match the following:
+The final step modifies the existing `Draw` method, replace the `Draw` method of the `FuelCellGame.cs` file to match the following:
 
 ```csharp
-graphics.GraphicsDevice.Clear(Color.Black);
+protected override void Draw(GameTime gameTime)
+{
+    GraphicsDevice.Clear(Color.Black);
+
+    DrawTerrain(ground.Model);
 
-DrawTerrain(ground.Model);
+    base.Draw(gameTime);
+}
 ```
 
 This code calls a non-existent `DrawTerrain` method, that will use the approach detailed in [How To: Render a Model]() to render the terrain. Let us add that method now.

+ 10 - 6
FuelCell/Documentation/3-FuelCell-Casting-call.md

@@ -25,7 +25,7 @@ The fuel cell model (`fuelcellmodel.x`) is a simple canister-like object with a
 - Click `Add -> New Existing Item....`
 - Download and then add the following files:
   - [fuelcellmodel.x](../FuelCell.Core/Content/Models/fuelcellmodel.x) and [fuelcell.png](../FuelCell.Core/Content/Models/fuelcell.png)
-  - [fuelcarrier.x](../FuelCell.Core/Content/Models/fuelcarrier.x) and [carriertextures.png](../FuelCell.Core/Content/Models/carriertextures.png)
+  - [fuelcarrier.fbx](../FuelCell.Core/Content/Models/fuelcarrier.fbx) and [ShipDiffuse.tga](../FuelCell.Core/Content/Models/ShipDiffuse.tga)
   - [cube10uR.x](../FuelCell.Core/Content/Models/cube10uR.x), [cylinder10uR.x](../FuelCell.Core/Content/Models/cylinder10uR.x), and [pyramid10uR.x](../FuelCell.Core/Content/Models/pyramid10uR.x)
   - [BarrierBlue.png](../FuelCell.Core/Content/Models/BarrierBlue.png), [BarrierPurple.png](../FuelCell.Core/Content/Models/BarrierPurple.png), and [BarrierRed.png](../FuelCell.Core/Content/Models/BarrierRed.png)
 
@@ -186,10 +186,11 @@ Firstly, to support some new "defaults" for the `FuelCarrier`, add the following
 public const float Velocity = 0.75f;
 public const float TurnSpeed = 0.025f;
 public const int MaxRange = 98;
+public const float HeightOffset = 2;
 ```
 
 > [!NOTE]
-> We scale the fuel carrier model by selecting it in the MGCB Content Project and setting the `Scale` property to `.1`, located on the property page of the model asset. The `Scale` property is found by expanding the Processor field in the window in the lower left-hand corner of the screen.
+> We scale the fuel carrier model by selecting it in the MGCB Content Project and setting the `Scale` property to **`0.003`**, located on the property page of the model asset. The `Scale` property is found by expanding the Processor field in the window in the lower left-hand corner of the screen.
 
 Next, create a new class file called `FuelCarrier.cs`, add replace its contents with the following:
 
@@ -207,11 +208,13 @@ namespace FuelCell
     {
         public float ForwardDirection { get; set; }
         public int MaxRange { get; set; }
+        private Vector3 startPosition = new Vector3(0, GameConstants.HeightOffset, 0);
 
         public FuelCarrier()
             : base()
         {
             ForwardDirection = 0.0f;
+            Position = startPosition;
             MaxRange = GameConstants.MaxRange;
         }
 
@@ -227,6 +230,7 @@ As usual, the Fuel Carrier data members are specific to the class. In this case,
 
 - A `ForwardDirection` property that stores the current direction (in [radians](https://en.wikipedia.org/wiki/Radian)) that the fuel carrier is facing. This property is also used by the `Camera` class to orientate along the same vector.
 - The `MaxRange` member is used later to prevent the fuel carrier from driving off the playing field. This is something that would completely break the gameplay illusion.
+- The `startPosition` property simply sets the height at which the FuelCarrier model from the ground, this will change based on which model you use for your player character.
 
 As mentioned earlier, the methods are similar to the implementation code for the fuel cell and barrier classes. However, in the next part, you will add code that allows the player to drive the fuel carrier around the playing field. In fact, the fuel carrier has the singular honor of being the only moving part in the game!
 
@@ -272,12 +276,12 @@ In `FuelCellGame.cs`, after the declaration of the `Camera` and `Ground` variabl
 
 ```csharp
 // Game objects
-FuelCarrier fuelCarrier;
-FuelCell[] fuelCells;
-Barrier[] barriers;
+private FuelCarrier fuelCarrier;
+private FuelCell[] fuelCells;
+private Barrier[] barriers;
 ```
 
-Then in the `LoadContent` method, add the following code:
+Then in the `LoadContent` method, add the following code after loading the `ground` model:
 
 ```csharp
 // Initialize and place fuel cell

+ 9 - 9
FuelCell/Documentation/4-FuelCell-What-is-my-motivation.md

@@ -21,13 +21,13 @@ In order to control the `FuelCarrier`, you need input from a `keyboard` or `game
 - Single-state
 - Two-state.
 
-### single-state approach
+### Single-state approach
 
 In a single-state approach, input is determined from a single snapshot of the controller, taken during the execution of the `Update` method. Any actions that need to be taken by the game are initiated, thus enabling game play to move forward. This approach is demonstrated by [How To: Detect Whether a Controller Button Is Pressed]().
 
 However, when discrete input is required, the single-state approach does not solve the problem. For instance, suppose a game is designed to fire one bullet for every press of a key or button. If you use the single-state approach, multiple bullets are fired per key or button press. This happens because human reflexes are slower than the standard update cycle of the game. Even a very quick player is going to have a key or button pressed for at least a few update cycles (unless the game uses a fixed-step approach). In order to fire a single bullet every time a key or button is pressed, you must look for a current state where a specific key or button is released and a previous state where that same key or button was pressed. This condition is only satisfied at the instant when the key or button transitions from pressed to released.
 
-### two-state approach
+### Two-state approach
 
 By using the two-state approach, we track both the current state of the controller and the previous state. This allows the game to determine single occurrences of player action, such as a key or button press. With this approach, it does not matter how slow (or fast) the player's reflexes are. The input is only valid at that moment when the previous and current input states match the criteria determined by the input code. This approach is demonstrated by [How To: Detect Whether a Controller Button Has Been Pressed]() This Frame and [How To: Detect Whether a Key Is Pressed]().
 
@@ -40,17 +40,17 @@ It turns out that if you do any amount of MonoGame game development, you often r
 
 This code is an example of "future-proofing." If you were to add the capability to blow up a barrier with a missile, you would already have the necessary code to use the two-state approach.
 
-Implementation begins in the `FuelCellGame.cs` file. Add the following code after the declaration of the `graphics` data member:
+Implementation begins in the `FuelCellGame.cs` file. Add the following code after the declaration of the `barriers` data member that we added in the last chapter:
 
 ```csharp
 // States to store input values
-KeyboardState lastKeyboardState = new KeyboardState();
-KeyboardState currentKeyboardState = new KeyboardState();
-GamePadState lastGamePadState = new GamePadState();
-GamePadState currentGamePadState = new GamePadState();
+private KeyboardState lastKeyboardState = new KeyboardState();
+private KeyboardState currentKeyboardState = new KeyboardState();
+private GamePadState lastGamePadState = new GamePadState();
+private GamePadState currentGamePadState = new GamePadState();
 ```
 
-Now, in the existing `Update` method, initialize the variables at the beginning of the method:
+Now, in the existing `Update` method, initialize the variables at the beginning of the method, after the call to `Exit` the game:
 
 ```csharp
 // Update input from sources, Keyboard and GamePad
@@ -177,7 +177,7 @@ if (currentKeyboardState.IsKeyDown(Keys.Escape) || currentGamePadState.Buttons.B
 }
 ```
 
-The game now checks for both keyboard (`ESC` key) and gamepad input (`Back` button) when the player wishes to exit the game.
+The game now checks for both keyboard (`ESC` key) and gamepad input (`Back` button) when the player wishes to exit the game using he new state data we are polling in `Update`.
 
 After the usual drill of rebuilding the project and running it, drive the fuel carrier freely around the map. Test out the boundary code by driving to the edge of the playing field. You will notice that you stop moving until you choose a new direction. The control schema implementation was pretty easy but, coming up, the game really starts to come together... which requires a lot of coding!
 

+ 3 - 3
FuelCell/Documentation/5-FuelCell-What-is-my-line.md

@@ -44,10 +44,10 @@ The solution used by `FuelCell` is to randomly assign positive and negative valu
 
 Since we are going to randomly populate the playing field with game objects, an obvious first step is to set up a [random number generator](https://learn.microsoft.com/en-us/dotnet/api/system.random?view=net-8.0). Let us keep it simple and declare a file-level random variable (in `FuelCellGame.cs`) that can be accessed by any `FuelCellGame` method.
 
-After the gamepad state declarations, add the following:
+After the `input` state declarations, add the following:
 
 ```csharp
-Random random;
+private Random random;
 ```
 
 Initialize the random number generator in the FuelCellGame `constructor`:
@@ -263,7 +263,7 @@ Modify the `Draw` method to match the following:
 ```csharp
 protected override void Draw(GameTime gameTime)
 {
-    graphics.GraphicsDevice.Clear(Color.Black);
+    GraphicsDevice.Clear(Color.Black);
 
     // Draw the ground terrain model
     DrawTerrain(ground.Model);

+ 5 - 5
FuelCell/Documentation/6-FuelCell-Ships-passing-in-the-night.md

@@ -43,10 +43,10 @@ To use this technique, you need to add and initialize a spherical model with a r
 2. In `FuelCellGame.cs`, declare a member variable (called `boundingSphere`) of type `GameObject`, after the declaration of the game camera.
 
     ```csharp
-    GameObject boundingSphere;
+    private GameObject boundingSphere;
     ```
 
-3. In the existing `Initialize` method, initialize the new variable after initializing the game camera:
+3. In the existing `Initialize` method, initialize the new variable after initializing the `gameCamera` property:
 
     ```csharp
     boundingSphere = new GameObject();
@@ -69,7 +69,7 @@ Do you remember the member variable you added previously to the `GameObject` cla
 
 The helper function `CalculateBoundingSphere` approximates the bounding sphere of a model and then returns a new bounding sphere that envelops the model. The result is stored in the `BoundingSphere` variable. The `Y-coordinate` is set to `0` (ground). This causes the upper half of the bounding sphere to project out of the playing field. Since the widest part of the sphere is at the playing field level, it provides a good approximation when testing collision between fuel cells and the fuel carrier.
 
-Open the `GameObject` class and add the following helper method after any existing code:
+Open the `GameObject` class and add the following helper method after any of the existing code:
 
 ```csharp
 protected BoundingSphere CalculateBoundingSphere()
@@ -134,7 +134,7 @@ BoundingSphere = CalculateBoundingSphere();
 
 This gives us the bounding sphere for the `FuelCell` GameObject that we can then use in the rest of our project.
 
-Switching over to the `FuelCellGame.cs` class, we can start updating how we draw the FuelCells, including the new BoundingSphere functionality we just added (although, that is not their real purpose).  In the `Draw` function, replace the existing `foreach` loop that draws the fuel cells with the following:
+Switching back over to the `FuelCellGame.cs` class, we can start updating how we draw the FuelCells, including the new BoundingSphere functionality we just added (although, that is not their real purpose).  In the `Draw` function, replace the existing `foreach` loop that draws the fuel cells with the following:
 
 ```csharp
 foreach (FuelCell fuelCell in fuelCells)
@@ -349,7 +349,7 @@ The implementation requires scaling factors for each object type. A good place f
 
 ```csharp
 //bounding sphere scaling factors
-public const float FuelCarrierBoundingSphereFactor = .8f;
+public const float FuelCarrierBoundingSphereFactor = .7f;
 public const float FuelCellBoundingSphereFactor = .5f;
 public const float BarrierBoundingSphereFactor = .7f;
 ```

+ 16 - 8
FuelCell/Documentation/7-FuelCell-Finishing Touches.md

@@ -60,14 +60,14 @@ To create a default for how long a round should last, we will define a new Const
 public static readonly TimeSpan RoundTime = TimeSpan.FromSeconds(30.25);
 ```
 
-In `FuelCellGame.cs`, we also declare three variables (of type [TimeSpan](https://msdn.microsoft.com/en-us/library/system.timespan.aspx)) for the various times to be tracked, you will also need a variable for tracking the number of retrieved fuel cells (of type `int`).
+In `FuelCellGame.cs`, we also declare three variables (of type [TimeSpan](https://msdn.microsoft.com/en-us/library/system.timespan.aspx)) for the various times to be tracked, you will also need a variable for tracking the number of retrieved fuel cells (of type `int`), place these after the input state variables.
 
 ```csharp
-int retrievedFuelCells = 0;
-TimeSpan startTime, roundTimer, roundTime;
+private int retrievedFuelCells = 0;
+private TimeSpan startTime, roundTimer, roundTime;
 ```
 
-In the `FuelCellGame`, in the constructor, add the following initialization code for the starting and round times. This code sets the start and game time variables to 0. Zero indicates the game has not started using the constant we defined earlier.
+In the `FuelCellGame.cs` constructor, add the following initialization code for the round timer using the constant we defined earlier for 30 second rounds.
 
 ```csharp
 roundTime = GameConstants.RoundTime;
@@ -127,8 +127,8 @@ These strings are used in various screens to display information on how to play,
 > The default MonoGame project template includes `GraphicsDeviceManager` and `SpriteBatch` properties by default.
 
 ```csharp
-SpriteBatch spriteBatch;
-SpriteFont statsFont;
+private SpriteBatch spriteBatch;
+private SpriteFont statsFont;
 ```
 
 In the `LoadContent` method, initialize the `spritebatch` object, and load the new `spritefont` with the following code:
@@ -178,7 +178,15 @@ There is a fair bit of code here so let us walk through it.
 - The next part composes the strings with the current game info, and then draws them on the gameplay screen. However, the last bit of code deserves more examination.
 - At the end of the method, you must reset certain properties of the graphics device whenever you combine sprite drawing with 3D rendering, as FuelCell does. These properties (in the code below), relate to alpha blending and the depth buffer, which are set to different values when a sprite batch is used. If the properties are not reset to the default settings, weird rendering issues could suddenly appear in your game. That is why the final code modifies some RenderState and SampleStates properties of the graphics device.
 
-As the resetting of the `render state` is something we need to do after drawing any text, the code needed was extracted into its own method rather than repeating ourselves all the time (a good practice to maintain, try to never repeat yourself in code if you can), so let us add the `ResetRenderStates` method after the `DrawStats` method:
+As for the resetting of the `render state`, this is something we need to do after drawing **any** text, the code needed was refactored into its own method rather than repeating ourselves all the time (a good practice to maintain, try to never repeat yourself in code if you can), so let us add the `ResetRenderStates` method after the `DrawStats` method:
+
+> [!TIP]
+> When you draw with a `SpriteBatch`, it changes the render state of the graphics device to a mode that is optimum for drawing text.  However, if you do not reset or change the render state after drawing text you will get some potentially unexpected results.
+>
+> Try it by not using this method, it is very weird (or desired?).
+>
+> For more information on this, check `XNA GOD` [Shawn Hargreaves's article on Render States](https://github.com/SimonDarksideJ/XNAGameStudio/wiki/State-objects-in-XNA-Game-Studio-4.0) and their use:
+> [State objects in XNA Game Studio 4.0](https://github.com/SimonDarksideJ/XNAGameStudio/wiki/State-objects-in-XNA-Game-Studio-4.0)
 
 ```csharp
 private void ResetRenderStates()
@@ -191,7 +199,7 @@ private void ResetRenderStates()
 }
 ```
 
-To finish this section, you will need to call the `DrawStats` method to the existing `Draw` method. Add the following code after the call to `FuelCarrier.Draw()`. (before the `base.Draw(gameTime);` call)
+To finish this section, you will need to call the `DrawStats` method from the existing `Draw` method. Add the following code after the call to `FuelCarrier.Draw()`. (before the `base.Draw(gameTime);` call)
 
 ```csharp
 DrawStats();

BIN
FuelCell/Documentation/Images/03-02-status.png


BIN
FuelCell/Documentation/Images/04-01-final.gif


BIN
FuelCell/Documentation/Images/05-01-final.gif


BIN
FuelCell/Documentation/Images/06-01-checkpoint.png


BIN
FuelCell/Documentation/Images/06-02-mid-checkpoint.png


BIN
FuelCell/Documentation/Images/06-03-final.png


BIN
FuelCell/Documentation/Images/07-01-DrawText.png


BIN
FuelCell/Documentation/Images/07-02-GamePlay.png


+ 17 - 17
FuelCell/FuelCell.Core/Content/FuelCell.mgcb

@@ -74,18 +74,6 @@
 /processorParam:TextureFormat=Color
 /build:Models/BarrierRed.png
 
-#begin Models/carriertextures.png
-/importer:TextureImporter
-/processor:TextureProcessor
-/processorParam:ColorKeyColor=255,0,255,255
-/processorParam:ColorKeyEnabled=True
-/processorParam:GenerateMipmaps=False
-/processorParam:PremultiplyAlpha=True
-/processorParam:ResizeToPowerOfTwo=False
-/processorParam:MakeSquare=False
-/processorParam:TextureFormat=Color
-/build:Models/carriertextures.png
-
 #begin Models/cube10uR.x
 /importer:XImporter
 /processor:ModelProcessor
@@ -124,8 +112,8 @@
 /processorParam:TextureFormat=Compressed
 /build:Models/cylinder10uR.x
 
-#begin Models/fuelcarrier.x
-/importer:XImporter
+#begin Models/fuelcarrier.fbx
+/importer:FbxImporter
 /processor:ModelProcessor
 /processorParam:ColorKeyColor=0,0,0,0
 /processorParam:ColorKeyEnabled=True
@@ -136,12 +124,12 @@
 /processorParam:PremultiplyVertexColors=True
 /processorParam:ResizeTexturesToPowerOfTwo=False
 /processorParam:RotationX=0
-/processorParam:RotationY=0
+/processorParam:RotationY=180
 /processorParam:RotationZ=0
-/processorParam:Scale=0.1
+/processorParam:Scale=0.003
 /processorParam:SwapWindingOrder=False
 /processorParam:TextureFormat=Compressed
-/build:Models/fuelcarrier.x
+/build:Models/fuelcarrier.fbx
 
 #begin Models/fuelcell.png
 /importer:TextureImporter
@@ -224,6 +212,18 @@
 /processorParam:TextureFormat=Compressed
 /build:Models/pyramid10uR.x
 
+#begin Models/ShipDiffuse.tga
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:Models/ShipDiffuse.tga
+
 #begin Models/sphere1uR.x
 /importer:XImporter
 /processor:ModelProcessor

BIN
FuelCell/FuelCell.Core/Content/Models/ShipDiffuse.tga


BIN
FuelCell/FuelCell.Core/Content/Models/fuelcarrier.fbx


+ 13 - 12
FuelCell/FuelCell.Core/FuelCellGame.cs

@@ -29,29 +29,30 @@ namespace FuelCell
     {
         // Resources for drawing.
         private GraphicsDeviceManager graphics;
-        SpriteBatch spriteBatch;
-        SpriteFont statsFont;
+        private SpriteBatch spriteBatch;
+        private SpriteFont statsFont;
         private GameObject ground;
         private Camera gameCamera;
-        Random random;
-        GameState currentGameState = GameState.Loading;
+        private Random random;
+        private GameState currentGameState = GameState.Loading;
 
         // Game objects
-        FuelCarrier fuelCarrier;
-        FuelCell[] fuelCells;
-        Barrier[] barriers;
+        private FuelCarrier fuelCarrier;
+        private FuelCell[] fuelCells;
+        private Barrier[] barriers;
 
-        GameObject boundingSphere;
+        private GameObject boundingSphere;
 
-        int retrievedFuelCells = 0;
-        TimeSpan startTime, roundTimer, roundTime;
-        float aspectRatio;
+        private int retrievedFuelCells = 0;
+        private TimeSpan startTime, roundTimer, roundTime;
+        private float aspectRatio;
         private IInputState inputState;
         private Song backgroundMusic;
 
         public FuelCellGame()
         {
             graphics = new GraphicsDeviceManager(this);
+            Content.RootDirectory = "Content";
             random = new Random();
             roundTime = GameConstants.RoundTime;
             graphics.PreferredBackBufferWidth = 853;
@@ -202,7 +203,7 @@ namespace FuelCell
         /// <param name="gameTime">Provides a snapshot of timing values.</param>
         protected override void Draw(GameTime gameTime)
         {
-            graphics.GraphicsDevice.Clear(Color.Black);
+            GraphicsDevice.Clear(Color.Black);
 
             switch (currentGameState)
             {

+ 3 - 1
FuelCell/FuelCell.Core/Game/FuelCarrier.cs

@@ -11,12 +11,14 @@ namespace FuelCell
     {
         public float ForwardDirection { get; set; }
         public int MaxRange { get; set; }
+        private Vector3 startPosition = new Vector3(0, GameConstants.HeightOffset, 0);
         private SoundEffect engineRumble;
 
         public FuelCarrier()
             : base()
         {
             ForwardDirection = 0.0f;
+            Position = startPosition;
             MaxRange = GameConstants.MaxRange;
         }
 
@@ -35,7 +37,7 @@ namespace FuelCell
 
         internal void Reset()
         {
-            Position = Vector3.Zero;
+            Position = startPosition;
             ForwardDirection = 0f;
         }
 

+ 2 - 1
FuelCell/FuelCell.Core/Game/GameConstants.cs

@@ -13,6 +13,7 @@ namespace FuelCell
         public const float Velocity = 0.75f;
         public const float TurnSpeed = 0.025f;
         public const int MaxRange = 98;
+        public const float HeightOffset = 2;
 
         // Game board setup
         public const int MaxRangeTerrain = 98;
@@ -22,7 +23,7 @@ namespace FuelCell
         public const int MaxDistance = 90;
 
         //bounding sphere scaling factors
-        public const float FuelCarrierBoundingSphereFactor = .8f;
+        public const float FuelCarrierBoundingSphereFactor = .7f;
         public const float FuelCellBoundingSphereFactor = .5f;
         public const float BarrierBoundingSphereFactor = .7f;
 

BIN
Images/FuelCell-Sample.gif


+ 1 - 1
README.md

@@ -30,7 +30,7 @@ A new template sample is also available which guides through the building of a M
 | [FuelCell Sample](FuelCell/README.md) | [Coming Soon]() |
 |-|-|
 | Supported on all platforms | Platforms |
-| [![Fuel Sample](Images/FuelCell-Sample.jpg)](FuelCell/README.md) | ![MonoGame Sample](Images/MonoGame-Sample.png) |
+| [![Fuel Sample](Images/FuelCell-Sample.gif)](FuelCell/README.md) | ![MonoGame Sample](Images/MonoGame-Sample.png) |
 | A [full featured 3D project](FuelCell/README.md) with full documentation from start to finish for building a 3D style game. | More samples coming soon |
 |||