Our company is migrating their SharePoint sites to the new (new to us) SharePoint Online. I was nominated by my supervisor to be the site owner for our group. I have been waiting for the testing to begin and have been a little anxious because I have never worked in SharePoint, designed any apps or organized pages. I purchased a ‘For Dummies’ book and after reading half a chapter I signed up for a single license of SharePoint Online. Doing this I will be able to experiment with different site designs and functions before I deploy to the team site. I get to create my own SharePoint site, learn new things and have fun all at the same time. As of last night my thoughts on the additional responsibilities went from anxious to very excited.
Category Archives: Unity
A Lawyer?
That is what I said, Angie sent me a message today that reads ‘We have to come up with the lawyer asap’. My thoughts are: ‘Who the heck is we’ and why. I am going to have nothing to do with her divorce. More to come when I find out more.
Angie called me last night to let me know what the kids wanted for Christmas and the items were reasonably prices. I guess with age come the wisdom regarding the cost of things you ask for… Nice to see them grow up. 🙂
I am doing really well at sticking to just one thing lately, not so go at sticking to my diet and exercise routine, better get that whip out.
Stick to it
There is only one way I can achieve my retirement goals and that is to decided on exactly what I want to do to have the residual income I need and stick to it. When creating entries in my daily journal, called ‘Journey’s’ I have been noticing entries I had made a year ago and more. The last one struck me as a reason I am not getting ahead. The reason/excuse, what ever you want to call it is I don’t follow completely through with things that will eventually make a difference.
I’m not sure if it is because I get bored, find another interest and get side tracked, I’m not really sure. My goal right now is to finish the book I already reviewed and complete the game. So far it is going well but when I run into a difficult area I’m sure that is when my attention wanders and I find another task to do and abandon the items on my plate.
It is time to finish my plate before I take another helping of another project.
Another Car
This will not be to for young eyes. I helped Angie get a car earlier this year. Knowing full well she jumped the gun, did not have it checked out and fell for her crap, “I really want this car and will be really pissed if I don’t get it…” yada yada yada. Well she got it and what a lemon that turned out to be. Now she wants another and expects me to chip in 2000.00 for her loan.
Chip in for her loan, no now she wants me to sign for a loan so she can get a car. No way, I spent the better part of the last 8 years getting out of debt and establishing my credit. The next load I get will be for a house and I don’t want any credit cards/loans tied to me when I do. This will help my retirement as well.
I finished reviewing the book “Mastering Unity 2017 Game Development”. It is a fairly good book provided you are very familiar with Unity, the interface and most of the ins and outs. I think if you are just starting out this book could be quite difficult but for those who are more advanced and know Unity well and have a very good grasp of C# it is a handy book to have.
Looking for those darn bugs
Here is a clip of a small problem I had last week. It seems that when I killed my opponent my health immediately went to zero and I died as well. Here you can see I manually change the health of the opponent, he/she dies and poof so do I. Funny looking but not so funny when I could not find the bug.
Bug hunting is now over. I spent most of the day at work looking for this illusive critter and only after I went home, moved scripts around and segregated most of the code I finally found the problem. As it turned out, if I had taken the time to investigate at work like I had time at home I would not have had to do all the changes I did (but the code is nicer for it). All that had to be done was add the following to the condition of an if statement “&& !enemyController.dead”.
Below is the problem I experienced.
Never Happy
I am recreating the RPG, Diablo style game I have been working on. I decided last week and this weekend that the way I have been creating my scripts or rather the way I have been organizing my scripts was not the best was and that I could do a much better job of organization than I have been. For the most part it has everything to do with not placing as many methods within a single script which in the end, so far seems to be limiting the use of the GetComponent and GameObject.Find. The way I had things organized the use of these methods I felt was over the top. As it stands now, for the most part they are called once in the awake method to initialize the references and rarely again. I’m hoping this will help keep my code from hindering the frame rates. We will see.
On the Unity update front, it seems all is well now and I am not being asked to log in every dang time I start the program, good things on that front. 🙂
Unity Update (Part 2)
I found on the community web site others were having problems, not quite the same but similar and tried their solutions with no success. Deciding to go back to version 5.1.0 I started downloading, paused with the intention of resuming at work. After getting to work all started up just fine. I changed my status to ‘working offline’ and downloaded 5.1.0 to my USB drive just in case I can’t work from home again. I shut down Unity, turned off the network connection and I was again able to open Unity with no problem. I will then try the network side again and see how that goes, Something tells me what has been happening has been a fluke and I will not be able to reproduce. I surly hope this is the case.
Looks like everything is working good now. 🙂
Good new info I learned today. If you make a variable public in C# you can have access to it from other scripts but is also visible on the inspector. I do not like this as the inspector gets to be too cluttered with information I don’t necessarily need to see all the time. I only want to have variables visible in the inspector if I need them to be. My revelation came when I realized you can have a pubic variable (accessible from other scripts) and invisible to the inspector by making them ‘public static’ variables. Best of both worlds, fantastic!
Unity update
Unity came out with a new update and I installed as all my projects currently are just test projects and would not be hurt by an upgrade that may be broken. This update did not seem to be broken when I installed but after shutting down at work and reopening the program at home I was welcomed to a new screen that was checking my licensing and would not continue. What is this since I use the personal edition. I had to uninstall and am now in the process of reinstalling. We will see it that fixes the problem.
Game Mechanics
One item I came across recently was when you should create your stunning graphics for your game and when you should work on the mechanics of your game. The term ‘game’ here is meaning any project your are creating using Unity or any other game engine. It doesn’t necessarily have to be a game it can be an interactive website or architectural walk through. The answer of course is game mechanics first, the art and object can be added later. While you are creating the game mechanics (e.g. scripts) your game object or assets can be anything (cube or sphere etc.) that can represent the physical size/area the actual objects will be. In other words you can make a cube move just as easy as a animated character or camera.
Working through some new videos I found and converting all the scripting to versions that will work with Unity 5. Today I had to set one aside as it just was not working. It all boiled down to the original author created a public Transform variable ‘player’ and then drag and drop the player game object into the inspector.
I wanted to create a private reference variable and assign the value in the awake function, no drag and drop leaving the inspector less cluttered. When I did this I created a private GameObject variable ‘player’ and a private Vector3 variable ‘playerPos’. I would then assign their values in the Awake() function by finding with tag then a GetComponet for the transform.position Vector3. The problem I had was nothing would work when I tried to use the playerPos while I was moving around.
Well duh! When I got home I realize I initialized the playerPos at awake and it did not matter how much I moved around the value of that variable would not change.. 🙂 .
Solution: private Transform variable ‘player’, assign in awake using ‘player = GameObject.FindGameObjectWithTag(“Player”).transform’. When referencing my players position during play just use player.position. Kept the inspector less cluttered and worked like a champ.
Platform fix
No sooner had I posted for Monday, I fixed the parenting of the first/third person controllers to the platform problem. I kept the way the platform obtained each of the positions using individual empties and drawn gizmos for those positions. I then completely changed the way the platform was moved using ‘Vedtor3.MoveTowards’. I also included the check for the ‘Player’ tag prior to parenting. With this in place my platform mover worked like a champ! I will create a video tutorial on this once I get it perfected
What I like about the empty game objects occupying the location of the from and to destinations is that I can move those points anywhere in space (x, y or z) and the platform will track to them without a problem 🙂 .
I have also created a custom package for this ‘Moving Platform’ that I can import to other projects such as the Unity Book project I am working to convert to the new Unity5. This package bundled up everything I did for the fix including the walls keeping the player from walking off the platform while in motion, scripts and the positional empties.
Below is a demonstration of the ‘Moving Platform’ in action in my test project showing how the collider walls prevent the player from walking off the platform then I switch over to my Unity book project where I import the package. There I demonstrate a fly over of the landscape from position one to position two. Lastly I show the extensibility by adding a third position and preform a fly through of two positions (I skip the fly back for time reasons). I will create a full tutorial of this moving platform next week.