Ok so I can do 3D modeling, at least well enough for most of my own game applications. So while working on a game project I always start with the code and as the code starts to get to a working state, the worry about model design work flow starts to creep in and I get nervous. Usually you have to use some 3D program like Blender, 3D Studio Max, Truespace (think this one is gone now-a-days) or some other modeling program, then even if the program has texture UV wrapping, you usually end up with some additional program that assists in placing the textures properly onto the model for your specific game engine's requirements. Then there is usually an export or import tool that helps you get all your modeling work into the game world and then scales are usually off, need to be adjusted, properties need to be set back in the modeling program to look right in the game so you have to start over with the work flow until you get your notes down and then, finally, you are off to the races.... develop your models for your game and hope you don't miss any of the one hundred and fifty steps it takes to get all the software, scripts, import and export utilities to work properly every time.
Now, Unity 3D has a great interface but it does not have any modeling capabilities, I wasn't really expecting any. Then, today, I ran across a nice little add-on for Unity. GameDraw! GameDraw is an add on from the Unity Asset Store that has a free version and a paid version ($45 at time of writing this), and so far I would say it is worth every penny.
So if you are looking to keep your modeling work flow, easy then check this out!
GameDraw! I kind of like the name of it too because my preferred vector design program for over 20 years now has been CorelDraw! So as I get older and my memory starts to fail me, it will be easier to remember this new little app called GameDraw! woooooo hooooooo! I am off to the drawing board!
So writing a game is always fun. Writing networking functionality is even more fun! Of course I am being sarcastic. In reality, while networking and multiplayer functionality have become easier to code over the years with socket connections now being handled by built in classes and other methods, it is still worthy of more than a few scratches of the head when you try to wrap your own mind around the methods used by each development platform. Ok that was a mouth full.
With Untiy 3D, I am a real noob. So I had to work up a quick network example just so I could see where the calls go and how they show up so that I could have a better understanding of networking within Unity before I start investing serious man hours and money on third party tools.
Here is a simple script I put together that you can attach to any game object in the world. You will need one of the many multliplayer demos or the first hour or two of multiplayer tutorials completed.
Run this in any network game you have compiled, run one copy as a server and run another copy (from another directory) as the client.... then check the logs and look at the output. You will see which game executed which functions and thus have a clearer understanding of just how easy networking is within Unity 3D!
Game Engine: Unity3D Pro 4.0 Code Base: GamerToGameDeveloper.com
Goal: Network Management of Instantiated Prefab with Player Name
Well Today was fun. I worked on expanding Looqmaan Ali's (aka GTGD) Code Base to allow me to track what player name created each construction block in the game. To do this, I had to pass the player name to the Server at the time of creating the blocks then pass the player name over to the actual blocks after they are created.
Since "ConstructionBlockAsksToRemoveItself.cs" is the only script attached to the construction block prefab, add your variable there:
Now, I will continue to work backwards and open "ServerCreatesConstructionBlock.cs", since this is where the prefab gets instantiated as a gameObject. Go to the bottom of the script where the "CreateConstructionBlock" method is located and modify it like this:
Now further up to where the variables are declared add this:
Code:
publicstring blockOwner;
Now let's continue going backwards and open "PlayerAsksServerToPlaceConstructionBlock.cs" and near the bottom of the script modify the AskServerToDropConstBlock call to look like this:
The at the top of the script in the variable declarations area add this:
Code:
publicstring BlockOwner;
Now compile and run. Make sure you run one of the games in the Unity Editor and after you create some construction blocks, look at the instantiated construction blocks in the inspector and notice that they have the Player Name set in the Object Owner field.