Well, losing a hard drive is a the ultimate brick in the wall. I hate to even admit that I lost data due to a drive failure. I have been in the technology world for over 30 years. I knew better. I have no one to blame but myself.
So while I lost everything, I did find the bright side to all of it. I rebuilt the game from scratch and then put it on the shelf while I get some paying work done.
I hope to revive this project again SOON because I have stepped away from it too many times.
Adventures Through Game Development
Monday, September 2, 2013
Wednesday, June 26, 2013
Piece O' Candy! Modeling Just Became Easier!
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!
Tuesday, June 25, 2013
Client and Server in One Script?
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.
Here is the code:
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.
Here is the code:
using UnityEngine;using System.Collections; /* ------------------------------------------------------------ This was the only two debug prints on client side: CLIENT:NetworkExample:OnConnectedToServer() (this server responded in its log here) CLIENT:NetworkExample:RPC:Client_PlayerExampleResponse(Client,1) ------------------------------------------------------------ This was the only debug print on server side: SERVER:NetworkExample:RPC:Server_PlayerExampleRequest(Client,1) */ //-------------------------------------------------------------------------------------------------- // VARIABLES //-------------------------------------------------------------------------------------------------- public bool debugactive = true; public string PlayerName; //----------- This is an example of having the Client send a request to the Server: { } //----------- This is an example of the Server receiving a request from the client and calling the client back. { //networkView.RPC("Client_PlayerExampleResponse",RPCMode.All, playername, view); networkView.RPC("Client_PlayerExampleResponse",view, playername, view); // responding only to the player 'view' that sent the RPC } //----------- This is an example of the Client receiving a call back from the server. { } // Use this for initialization } // Update is called once per frame } }
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!
Monday, June 17, 2013
Passing the Player Name around the World!
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 look further up in the "ServerCreatesConstructionBlock.cs" script and in the update call change this:
to this:
Now further up to where the variables are declared add this:
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:
Now continue back up in "PlayerAsksServerToPlaceConstructionBlock.cs" and change BOTH instances of this line of code:
to look like this:
Then near the top of "PlayerAsksServerToPlaceConstructionBlock.cs" in the Start() function add this:
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.
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:
Code:
//Variables Start_________________________________________________________ public bool iAmHit = false; // This is the variable I added: public string ObjectOwner;
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:
Code:
void CreateConstructionBlock (Vector3 pos, Quaternion rot, string blockNme, string blockOwnr) // add ", string blockOwnr" here { //Assign the unique name to the created block //across all game instances. block.name = blockNme; //Add these two lines below: ConstructionBlockAsksToRemoveItself script = block.transform.GetComponent<ConstructionBlockAsksToRemoveItself>(); script.ObjectOwner = blockOwnr;
Now look further up in the "ServerCreatesConstructionBlock.cs" script and in the update call change this:
Code:
networkView.RPC("CreateConstructionBlock", RPCMode.AllBuffered, dropPosition, dropRotation, blockName);
to this:
Code:
networkView.RPC("CreateConstructionBlock", RPCMode.AllBuffered, dropPosition, dropRotation, blockName, blockOwner);
Now further up to where the variables are declared add this:
Code:
public string 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:
Code:
void AskServerToDropConstBlock (Vector3 pos, Quaternion rot,string BlockOwnr) // added ", string BlockOwnr" { //Find the BlockManager gameObject and assign the position and rotation values //to its script ServerCreatesConstructionBlock. ServerCreatesConstructionBlock script = go.GetComponent<ServerCreatesConstructionBlock>(); script.dropPosition = pos; script.dropRotation = rot; script.dropSignal = true; // add this variable setting here: script.blockOwner = BlockOwnr;
Now continue back up in "PlayerAsksServerToPlaceConstructionBlock.cs" and change BOTH instances of this line of code:
Code:
to look like this:
Code:
Then near the top of "PlayerAsksServerToPlaceConstructionBlock.cs" in the Start() function add this:
Code:
{ // Add this here:
The at the top of the script in the variable declarations area add this:
Code:
public string BlockOwner;
Subscribe to:
Posts (Atom)