[My Dev Journals main page]

Page 1 2 3 4 5 6 7 8 9

 

April 28, 2016

Time For Some Project Management And Adding The Primary Goal

In yesterday’s log I mentioned that I was considering returning my normal practice of identifying a list of objectives for each week. Thinking about it more I have decided I will do this. Instead of making the list in OpenOffice Writer or on a sheet of notebook paper as I normally do I will also write my weekly lists on my website in my logs. Perhaps someone will find some value in this besides just me.

Alright, time to do some thinking which will make these dev sessions more productive going forward.

I’ve done experiments with the enemies and implementing the behaviors I want should be easy enough. However, at this point, my WIP (Work In Progress) doesn’t have any real purpose.

So, I think I should focus on giving it a purpose. Based on the game concept and design the primary objective of the player is to find materials that can be used to repair the crashed ship. This is the most important thing to add at this point. Just some “things” the player can find and collect. And to add a little pressure I think there should be a time limit for accomplishing this. Makes perfect sense. With the ships power source being damaged it is reasonable that it is only a matter of time before either the ship is completely powerless and unable to sustain life or perhaps the power source will blow up destroying the ship and all inside.

Okay, now I will just break this down into tasks as follows:

  1. Create some simple 3D objects for the repair materials.
  2. Set up the RepairParts in the Unity Editor. The way I am doing this basically serves as both object pooling and and positioning in most cases. Obviously, for these it will only serve for pooling such I will be randomly positioning them.
  3. Place the objects in the level. However, I don’t want these to be at the same position each time so instead I will define a few different positions for each object and programmatically position the objects randomly at one of the predefined locations.
  4. Add a CollectibleType enumeration to my Enums code file. Be sure it has RepairParts in it.
  5. Update my CollectibleObject to have a new property CollectibleType eType.
  6. Update my WorldQueryManager adding a new method to locate and build a list containing all RepairObject collectibles.
  7. Update my CollectibleManager to Initialize the RepairItem collectibles including randomly selecting 3 of them to activate.
  8. Figure out which way to collect the collectibles. I can either have the PlayerManager handle the player collecting things or I can have the CollectibleManager handle the player collecting things. Either way is fine really but I need to choose one or the other. For efficiency sake, I will implement this in the PlayerManager. Why is this more efficient? Because instead of having the CollectibleManager perform a cast or overlap test for each and every collectible to determine if the player has collected it I can have the PlayerManager perform a single cast or overlap test to determine if the player has collected anything.

That’s basically all there is to it. I have a solid list of objectives to work on during my next development sessions. 🙂

Now, I’ll take a break from this and return later.

Came back and knocked out a repair item. And here it is sitting in a corridor in all of its green glory:

I also set up the GameObject container “RepairItems” in the Unity project and added 7 of these Repair Items as children beneath it. All I need is one model for now to move forward. Another time I will knock out a couple more shapes. Then I positioned the items in the level (with none actually sitting in corridors… they are hidden around the map).

This is how it will work. For this level only 3 of these repair items will be needed. The CollectibleManager in the initialize phase will randomly select 3 of these to activate. The rest will remain inactive and not come into play. As you can see this is a variation of my original plan of designing 2 to 3 positions for each repair item; yet it accomplishes the same basic purpose in a pretty straightforward manner.

Then I added the CollectibleType enumeration (not sure if I already showed the Collectible state enum but I included it in the screenshot too):

Next, I updated the CollectibleObject container class adding CollectibleType eType

Okay, that’s 5/8 of my tasks completed already. Seems like a great time to take a break. I’ll probably return later. If not, then I will return tomorrow.

…tick tock…

Okay, just updated the WorldQueryManager and CollectiblesManager. That makes 7/8 of the tasks complete.

That’s all for tonight.

 

April 29, 2016

My workweek has ended. Hip Hurrah! 🙂

Updated the CollectibleObject, EnemyObject, etc to have a new public property TransformID which holds the value returned by an object’s transform.GetInstanceID(). I was just getting this via object transform.GetInstance() but as much as it is needed (being in essence the primary ID of an object in Unity) it just makes sense to me to get this ID during initialization and store it so it is always readily available.

Then I updated my ScanResultInfo class adding TargetTransformID. Not sure if I ever mentioned this. All of the various scanning methods inside my WorldScanningManager populate and return a ScanResultInfo object. These are actually included inside the WorldScanningManager class at the top:

Updated my CollectibleType enumeration adding None = -1. This is something I commonly do but I hadn’t done it yet up til now.

Updated my CollectibleManager adding public CollectibleType PlayerCollectsItem(int TransformID) that searches the list of collectibles for a match of the passed in TransformID. If found, and if the collectible is WaitingToBeCollected… the collectible is deactivated and the type of the collectible is returned.

Updated my PlayerManager adding a new CollectItems method that uses the WorldScanningManager.ScanForCollectible method I added last night.

Putting all of this together and now collectibles are implemented as far as initialization, being active in the game world, being collected and the type identified so they can be added to the player’s inventory. At this point, there is no inventory but there will be in time.

Look… a Repair Part was hidden over yonder:

My list of objectives are complete. I will need to make a new list if I decide to do more work later tonight. 🙂

 

Page 1 2 3 4 5 6 7 8 9