MyI@FarNiche

Building an XNA Game Studio XBox360 Indie Game.

[page 0056] ~ When In Doubt:

Updates – .

The theme is still NEON.

When in doubt, read the instructions.  And so, off to where it all began, kinda sorta, for me at least, something more like the near of doing Xbox C# stuff in the past and not so much as the far off of the c++ past, and definitely not the really way back BASIC past, for the most part, I think.

Well, the Unity Project: Roll-a-Ball reminds me of the MSDN FuelCell Example Game which uses the MicroSoft XNA Game Studio 2010.  I also found this, Unity Third Person Control: Camera Follow – Tutorial 7, which is a multi-part tutorial that runs a character around using an XBox 360 Joystick Controller, my favorite means of game input.  Currently I’m using the afore mentioned controller that is connected via the USB Wireless version to my PC.  Using this, the PC can take up to four controller inputs simultaneously.  The wireless models let the XBox 360 connect up to four controllers concurrently, if the game is built for that type of allowance.

And so, not only is this game going to be focused on neon, but also on getting a camera to follow the game character around the game, correctly.  This simple game, FuelCell, uses the XBLIG Vector3 class to define its usage much like the Unity Vector3 class.  Both of these game platforms with, XBLIG FuelCell and Unity Roll-a-Ball, use the class GameObject as a binding structure to consolidate its game pieces and be able to reference them, by a named tag, as a component from within the contents heap of the game.  The FuelCell game builds the GameObject as a simple class to hold the 3D models, load content and bounding sphere, its draw transforms and lighting effects, input and movement routines, collision detection and camera placement in relation to the Avatar, seen as multiple classes all within the same code page,  with name spaces, using statements, class constructors, definitions and declarations, methods and functions, accessors and mutators for public and private properties, etc., all written in C# code in text.  Unity uses GameObject in much the same way except for the fact that the game engine adds the protocol and code “Under the Hood” behind the API in a black box fashion as Components, with a single click of a button, where the public access of its variable contents are seen in the Inspector tab and where extensions that connect the objects and variables can be implemented through a scripting language.  What I will be dealing with here as I move through both of my XNA Game Studio and Unity games will be an old school new school thing.  It’s kinda like what XNA was to DirectX back in the day, a wrapper that simplified the coding of broiler plate templates to initiate the start of getting something to begin to become what was intended to be needed, for the actual task, required, to get ready to …  Well let’s just say it was a long hard road to go from a computers system space to go to a games name space.  But the concepts are all much the same although the simplicity of implementation has grown in complexity to encompass what is now seen as the Unity Game Engine, XNA is pretty much the same thing but without the walls.  Sometimes walls can be nice, and a roof, and some plumbing, and … but it is good to know how it all came to be, fits together and why.

So every GameObject has a Transform, in either case, so each piece exists at a specific location in the game.  Now to take a look at how the XNA FuelCell is put together and try to compare it to the Unity Roll-a-Ball so my game, Neonlithic, can get done and submitted.  The XNA Camera uses an offset from the target to position the camera back and up from the target to look back down at an angle.  These values are given to the View Matrix and Projection Matrix which are in turn given to the World Matrix which is drawn to a 2D screen space.  Back in Unity I need the offset to remain constant in relation to any rotations that are given to the target, i.e. the Avatar.  OK, MonoDevelop has a “find all references” to see where and how all of the variables are placed and used, that’s nice.  What I need to do is get the Avatar to rotate in a direction and then give it some forward velocity to make it move, in that direction.  The camera also needs to have the same direction and velocity, and then to find how something else works so that it moves more like a chase camera.  Something like having the camera placed behind and up to become an offset with the cameras’ LookAt point being the Avatar.

And that is where I will be going next, Chase Camera.  I already have the XNA Game Studio installed and loaded up.  I also have the Chase Camera downloaded, unzipped and running.  Chase Camera is one of the code samples that I used to build HUD-On and will hopefully become of help again with Neonlithic.  Well it looks like, for this game anyways, I’ll get the direction that my Avatar will move towards from an ol’ quick and dirty trigonometric function.  Using the left and right buttons of the mouse, I’ll get an input register from the FixedUpdate() to count at an increment and decrement for either button.  This will give me a positive or negative number which I’ll give to a Quaternion.Euler to build a new transform.rotation from my target. After that I’ll take the .y of the transform and change it from radians to degrees.  Giving this number to both the sine and cosine functions I’ll multiply it with the forward velocity and give it back to “movement” which is the force added to the rigidbody component of my Avatar. Eeek, but it makes enough sense to move my game piece around the board so the controls seem to do what is intended.  Now I need to get that camera to follow suit and follow my Avatar.

That’s interesting, the Debug, DrawLine and DrawRay act almost the same when the second Vector3 argument of Line has its value of the character position added to the direction, without it, the DrawLine function does some really weird curly-Q stuff on the screen.  Another thing is that the Ray points directly out horizontally while the Draw has its second vector pointed towards the ground, one more line and it would become a triangle, but for now its just an angle. Debug.Draw and .Ray are really good features for testing and research. But I need to get this chase camera thing hooked up to my Avatar.

Or, I could go back to what I usually do and add some text to the screen, although I have some text running in the Debug Console now.  And the text will be a compass with the direction in degrees that the Avatar is facing.  Simple, but how do I add text to the Unity screen.  “7. Displaying text” from the Roll-a-Ball tutorial gives me enough insight into and direction for me to get my faux-magnetism of this games rather flat terrain displayed as a number between 0 and 360, where 360 becomes 0 again.  One thing that I find very strange is that little deadened “ding-bonk” is missing for all the mistakes that I make when the Unity scripting compiler, which gives me my error messages, finds an error.  I’m having some phantom error message sound beleaguerment going on in my head.  So guess what I’m working on right now, that isn’t doing exactly what I think should be happening, with many scripting errors.  I need to get the camera hooked onto the end of where the Ray is positioned, but I can’t figure out how to get one variable from one script in the Player object into the Camera class to be used by that script, “ding-bonk” (Red Stop Sign Exclamation Point) error message, “ding-bonk” (Red Stop Sign Exclamation Point) error message, “ding-bonk” (Red Stop Sign Exclamation Point) error message, hmm.  Well, at least there is some constructive and safe feedback and not a blank stare of Oh-No, where I’d be lost in lah-lah land with the blue screen of death and a hopefully successful reboot, without a loss of data.

With a little bit of searching I have found “20. GetComponent” that explains well enough, for now, how to get properties from a script to another.  And there is another somewhat odd feature in Unity, where, when scrolling the mouse all the way across the screen while holding the mouse button down to change a variable, the mouse will reappear on the other side of the screen and continue to scroll the variable, rather handy, indeed.  Hmm, it seems that Unity has no Vector Line Drawing capacities or anything that I was used to doing in Processing.js, which was a whole lot of vector drawing, or something like it.

I think that I’m starting to figure out the way that their textbox drag and drop stuff works.  It seems that what it is doing is making a reference to an object and therefore its properties.  The other option is that it is that it is copying it by value, to then be worked on further, which seems unlikely.  When accessing an object “By Reference” what is happening is that the memory space allocated to that object has a residence starting at some memory value and continues to fill that memory space until the end of the objects length.  Many things can access that object by reference and if it is changed, then all forthcoming requests for that objects properties or actions are also changed.  “By Value” is when a completely new copy of that object is made, and subsequently uses up another objects worth of memory space, so twice the space is used but the are two separate objects that will perform differently.  But how does this help me.  I just deleted the Main Camera and placed it in the Avatar object to see if that would make accessing the rotation any easier.  What I’m trying to do is take my sin and cos values I get from the mouse buttons and change them back into a rotation for the camera.

That makes no sense, why would a rotation transform for an axis not be used to move that object in the direction that it is facing.  The camera rotates in a direction to “look” in that rotation but how does the forward velocity become altered so that the LookAt direction is the new forward and therefore taking on the roll of forward velocity.
OK, I have something that moves the Avatar forward and backward while pressing the w and s keys and then comes to a halt when the keys are no longer held down, that is my forward velocity.  Now I need to have that velocity distributed throughout a Vector3 so the forward velocity is relative to the rotation of the objects transform.  OK, so I need a Vector3 force influenced by the transforms rotation of the y axis, possibly a torque value.  And, per usual, what is observed as obvious becomes the complete antithesis of what is needed and provided.  It’s as simple as the Kata in Karate, first you look in that direction, then you strike, block or evade using that side of the body that you moved your attention to.  So my Avatar must look in the direction that it will be going, then it will take that as the new forward and move in that direction.

Well, I’ve got a camera that pivots around the Avatar even while it moves forward, which is the only direction that it can go, for now.  I’m getting there.  Instead I need the camera to always point forward as the Avatar changes its position on the playing field.  Hmm, just a lot of flailing about with EulerAngles, LookAt and other Quaternion things.  But what I haven’t been doing lately is making script Back Ups so when I get to a place in time that things are working correctly I’ll be able to paste the back up back into the script and start over with a stable working model.  The only draw back is that there may be more objects that have been added to the game engine that are dependent on some of the variables in the previous script that wasn’t working all that well, but that bridge will need to be crossed when I come to it and if it is ever reached.  Until then, it’s time for a back up save of this C# script.

Blah de-Blah, I have a rotation in the y axis.  I need an x and a z value for my Avatar rigidbody.AddForce so it has an argument value being a Vector3 made up of (x, y, z) where y = 0.0f, no voluntary jumping, and the x and z are comparative to width and depth of the game board, no need for the y axis because this Avatar is stuck to the ground.  When I go forward, my y rotation in degrees is 0.0 and, Hey Hey, it works!  Time for another save.  Hmm, but after moving around for a short bit, like about ten seconds the screen starts to shake and then the screen begins to spin in a perpetual loop, until the stop debug button is pressed.  So what am I missing here.  That fixes it, in Rigidbody/Constraints/Freeze Rotation, I needed to check all three X, Y, and Z boxes.  No shutter or recursion spin.  Now to tidy up and off to #1GAM.

And that is that.  Not the best game in the world, but it is a slightly better or at least a more Neonie version of Roll-a-Ball with a hint of FuelCell.

NeonLithic:
Your Avatar must collect the eight neon stones that have been thrown about the map, as they sparkle their neon shower.  They will soon disappear but don’t run your Avatar so fast as to fall of the edge of the world.

Controls :

A-W-S-D keys and Up-Down-Left-Right arrows move the Avatar in those directions.

Play NeonLithic Here.

G’day.

Advertisements

April 2, 2014 Posted by | 2014 [0050] to [00??], The Process | , , | Leave a comment

[page 0055] ~ Neon Designs:

Updates – QuickTime 7.7.5 and Windows ShutDown Updates.

The theme this month, is NEON.

And Unity4 has grown to become Unity5.  But the task at hand is that I get an MVP from my SOB where the book this month is, Unity 4.x Game AI Programming , to wit, obtain my Minimum Viable Product from Safari Online Books to produce a neon kind of game in Unity.

So I read on from my various sources and continue to view tutorial videos.  This brings me to the conclusion that what I need for this months game is to start out with a Particle System.  This is a component that is created through the dropdown of the Hierarchy tab within the Unity Game Engine.  This particle system produces what initially looks like a cascading fountain of fuzzy light gray sprite fluff balls.  This component also reminds me of the XBLIG samples, Particles and Particles 3D and the banter in XBox LIVE, for example, in the Community Forums.  With Unity, one thing I have noticed is that the “free” version has been given to use as a base model, in comparison to the Pro Unity version which is full featured.  But this free version gives me an opportunity to get an understanding of what this Game Engine is all about and what it can do.  Then, because of my previous experience with the Xbox LIVE Indie Games Developer site I have a better understanding of the code that builds up particle systems and further, what makes this Unity Game Engine a game engine.  Now with Unity taking care of the technical aspects of the implementation and usage of, for now, the particle system, I can work on differing aspects which will include building the Materials.  This then will also take me into the wonderful world of Shaders, free up some time to dig deeper into ZBrush and continue on with the many other parts of game building.

Well it looks like, I would guess with this version of Unity, I’m still in the kiddy pool.  With that I will start this game from scratch and see how far I can get, without any training wheels.  As I continue to study how to use all of the programs that are needed to create my game assets, be it 2D art, 3D models, code scripts, story lines, or countless other understandings, tasks and processes, I need to consider how I will be consolidating all of these within the Unity Game Engine as my game, with neon things in it.  And after that brief jaunt I find that that didn’t last long, because for now, starting from scratch will need to become another self modified project from using the base game of Unity Tutorials called Project: Roll-a-Ball.  And the name of my new game will be “Neonlithic”, where neon is an element and lithic is of stone.  This may sound strange for the name of a game but my direction within One Game A Month and my direction for game building because of One Game A Month has also taken a strange turn.  I have realized that there are many parts and varied processes that are involved in the creation of video games.  So my direction needs something lucid but also something solid to build from and upon.  Instead of focusing on a whole game per se, I will go into the different aspects of game parts and make those concepts into mini games that revolve around something that can be used within many games.  In short, what I will be doing with the Theme of the Month for One Game A Month, is to come up with reusable game parts, like a wizards wand blast in this months case.  The game will have nothing to do with a wizard nor the wand, but will focus on the blast, which will be in neon colors.  This will be the game part that comes under scrutiny for this month.  It will then be placed into a game format so a unit test can be performed while it also retains some gamish quality or enough so as to pass for a game of the month.  This way I will get another validated game part into my tool box, I get a finished game to submit for One Game A Month and I’ll get a little more back-story and future reference for the game and the part just built.  But beyond this I’ll become more confident in my own understanding of the different programs that are used to construct the varied assets needed to make a game an interesting and hopefully fun game to play within my own production pipeline.

To this end I will be reviewing the Roll-a-Ball tutorial in full, again.  And then why waste time, as I have already gone through viewing this whole tutorial project video sequence once, just recently, before.  It is time to learn and build, both together, just like math class lectures and home work assignments, learn and fail, just be consistent, test and adjust, remember and pass, it all works out for the best.  One thing I am noticing about using this game engine is that the object names assigned within Unity and MonoDevelop no longer need to be as long winded as I had become accustomed to making them.  I will never see these objects names outside of the game engines’ scripting API and the game engine itself.  So the variable names for the objects and the structures that make up the features of these objects, for all practical purposes, are encapsulated within Unity and Mono.  There is no longer any real need to make variable names any more type specific than that of just knowing what they are or possibly named for what they do in the game.  No longer will they need to incorporate prefixes for the implementation in the code because of, the slightly higher than low-level purpose that the naming conventions would normally provide, like in the c or c++ naming conventions.  Rather amazing, indeed.  But this does not preclude the use of syntax or pragma, so be it, such is life.

While chopping right into the scripting aspect of Unity, I seem to already have a general understanding of how scripts are used to augment the objects behaviors.  The objects in the game are altered by calling properties and methods of the object that then become affected and change the modifiers that create aesthetic appeal, promote a challenge for the player or somehow evolve game play that could not normally be accomplished with static processes.  While previously building games completely through code using XBLIG and Microsoft Visual C# 2010, I began to try to understand how I could add scripting to the games I had already written in C#.  What I really didn’t quite grasp at the time, was that, for all intents and purposes, that was pretty much all of what I was doing already.  My games, although precompiled into an .exe, were one huge mega script that became a homogeneous, part and parcel, game and game engine integral combination.  I would guess that is why, for me, the Unity Game Engine is so intriguing.  Back when writing pure C# games, but of course while also incorporating .obj’s and .bmp’s and the like, I began to run into stumbling blocks that took the form of something that could have been remedied, from what I thought would be some kind of flowchart.  I was trying to come up with some type of schematic that would help me consolidate the “whole lot of everything”.  All of that had need, for me, to come together and become more apparent in structure in that: it would have the capacity to retain orderliness while building, would be seen as rather amorphic until put to use and once again intriguing in facility because of its vast and varied scope of conjointed implementations.  I think I like this Unity Game Engine, even though I am still learning what it does and how it works.

But this current game is going to be a template for better things to come.  What I’m working on now is getting the Roll-a-Ball ball to move around on a flat surface, but then to also have a third person camera follow that “Avatar” around.  The problem currently is trying to figure out how to have the camera follow behind the Avatar.  I have gotten the camera to pivot 360 degrees horizontally from the offset point, which looks down at the Avatar at an angle.  It is from the tutorial, but it is always attached to the Avatar from the south so the Avatar is completely out of view when looking south.  And as there are four walls that are barriers that help to keep the Avatar on the board, but the Avatar is always hidden when the camera is facing south and blah de-blah de-blah.  Hmm.  And, there is something else that is going wrong here, that is, if while moving the Avatar about the playing field and the camera is spun to look backwards the controls that were N,S,E&W are also backwards and do not work as intended.  The camera turns but the controls do not follow the Avatar and subsequently the camera, well they do but left is right and so on and so forth, it gets backwards, dumb stuff and stupidity, whatever.

Almost done, maybe not, so,

To Be Continued …

G’day.

March 22, 2014 Posted by | 2014 [0050] to [00??], The Process | , , | Leave a comment

[page 0053] ~ The Unity Game Engine:

Updates – Windows shutdown update.

The theme this month is still LOOPS.

I started reading “Unity 4.x Game Development by Example Beginner’s Guide” from Safari Books Online as another way of getting some idea of what to expect while jumping into this new type of game creation environment.  So far, but back in the day, game programming was all line numbers with code pages and auto-Make files, then it turned into classes, sprite sheets, .obj, .fbx and .x files, height-maps with some fairly fancy precompiler things that wouldn’t bark at all even if there were errors, but which, when done running through that pipeline found their way into the main compilers prolific debuggers that would bark at everything if it would work at all, if it got to that point.  Now I’m looking at this Unity Game Engine trying to figure out how it will become of any use.  Although, I really think it may become of some great use because, of the features I have seen so far.  They have made sense and are things that I was looking into building or was more like looking into figuring out how to start building to use for what I was looking to do, which is build video games, and not reinventing another wheel that helps build video games.  I guess this is going to turn into more of that “Its got to work or all of this wouldn’t seem like it should”, kind of deal.  And that is what I have run into already.  In the Unity web documentation and tutorials the C# language protocol is emphasized while in this Safari Unity book the JavaScript language protocol is initially emphasized.  But, as I read along, I find a C# appendix at the end of each chapter that gives a translation so as to not just “dust” the reader and leave them to hunt and peck their way through the differently coded language contents of the books games, good for them, good for me.

Well then, after uploading my .unity3D file and its accompanying .html file, that provides access to my game, and then going to where I thought I would see my first try at something like a game in my browser , I found instead from the built in the given Unity Web Player page, “Failed to download data file”, how special.  So, like most things in life, it was not the end of the world but more Search and Research.  The first thing to do was to paste, “Failed to download data file” into the Unity – Search eyeglass on their website and voila it seems to be a common problem for those who don’t work with the IIS of their website directory that much.  It seems that each server provider has their own specific way of dealing with this problem, being that the file cannot be downloaded from the uploaders site because the file extension type is unknown and therefore inaccessible.  Simple enough, so here it is, Failed to download data file, and that’s the homework.  The other half is, is to read the documentation for the specific server platform from your provider and follow their directions to allow Multipurpose Internet Mail Extensions (MIME) access to the types of files that are to be recognized by putting them in a config-like file on the topmost directory of your websites folder structure.  Here are some other searches, one on Unity’s site Publishing the game, and one on Google, iis add mime type.  Of course it will take a little, “does this work, how about this, hmm, well, and so on and so forth …”, but in the end it does work from the given files of the build from the Unity API when placed in the owners directory to be accessed from the web, beautiful.  And as a bonus, I added a second file type, that for Processing, a .pde file type, then low and behold, that also works from their given .html file and the constructed .pde file on my web directory.  So I have figured out that mystery, thanks Unity, I no longer will need to have my entire running code base accessible from my web page, nice.  I think I might backlog my chess games and let them be accessed by the .pde files, oh well, all that happy logic and code was out there for a time.  Now back to Unity.

After reading another chapter or two of the “Unity 4.x Game Development …” book I went back to the Unity 4 website and started to review the Space-Shooter video tutorials.  With a flash of inspiration I thought, “Hey, I’ve already built HUD-On”, so maybe I could see if any of that previous work would fit into the Unity pipeline.  And per usual, it’s an ongoing battle to get things to work by trying to remember how they used to work, or at least how I would like to remember that they actually did work.  And now I have my big terrain in Unity.  Also from all that camera transforms and rendering stuff back from the XBox 360, I could find Unity’s “fog” in their Render Settings.  I gotta tell ya’ that those Unity sliders and input text boxes are a good thing, it beats building a bunch of code lines to capture the variables of object positions, converting all that to some lines of text and then figuring out where on the game screen it would fit so as to not be in the way and still be viewable in a discernable fashion.  I think I like this Unity Game Engine thing, and, I might be able to use it to build games for the XBox 360 for their Indie Games for XBox Live, maybe, but I might be jumpin’ the gun on that one.  So anyway, after getting my terrain in the Unity Game Engine and having the camera along with the fog with its near and far viewing frustum set up well enough I took it a step further and thought, “Sure, what the heck, that Space Shooter game has a free 3D space ship that isn’t doing a whole lot in their 2D game, so, maybe if I imported it into what I’m working on now …”.  Then, after clicking on the Download Assets in the Space Shooter introduction page and following their instructions I now have an all Pink/Fuchsia colored space ship, along with all the other assets from their space shooter game, thank you, again.  But fuchsia isn’t quite the color that I was thinking, for my space ship, at least, and there are some other textures that were downloaded along with that ship, hmm, more research and development.  Wow, now that’s cool.  I now have two ships that look like the ones in their given tutorial that work with, and in, my new 3D Unity game.  This could be HUD-On’s big resurgence, ok, now back to the tutorial videos.

There are going to be some problems in taking this Space Shooter 2D game into a HUD-On 3D game.  The first is when adding a Rigidbody component and not being in Space Shooter space.  This 3D game takes place on the fringes of the atmosphere where there is gravity, and by selecting Use Gravity on the Player ship Rigidbody component, when the game is started, the ship plummets towards the terrain.  And so the gears start turning, “How long before the collision when the ship hits the ground?”, that would be some kind of altimeter gauge for the HUD.  Next, having added a collision detection component to the Player ship model they also request that the Prefab engines are to be added to the ship.  One problem though, this is a 3D game and the thruster light from the burning fuel is positioned to only shoot out of the back of the ships engines when facing one direction as in what is seen in the 2D game.  This could probably be fixed by some kind of script that aligns the engine thrust to the rotation of the ship, somehow, but also another question, where in the HUD is the fuel gauge and where does the ship get refueled for all that thrust. On to the next video.

Alright, this video has to do with the lighting and so it has to do with the API and the models that make up the game.  And, as things tend to make sense through repetition, or at least are realized to be in correlation because of their continuity being in close mental proximity I have found that this Unity game and GeoControl2 both have a similar system of saving parts of the API as a separate file and then that of the game project as another file.  I would guess being able to keep those settings separate helps keep the continuity between differing instances from different game build types while keeping the same feel from the same API settings would prove to be useful.  I’m good with that, makes sense to me.  I’ll just have to remind myself of that when I start digging into ZBrush 4R6, that interface is somewhat, no, more like most intriguing, but that will be later on.

I’ve gotten to the Move Player video and they don’t use the “Y” axis in the video or give it in the “Done” C# script in the downloaded assets either.  It looks like I’ll need to hook all that up myself if I would like to see this ship fly around in my game.  Whoa that is simple, double click on the script to open it up in MonoDev and in less than three seconds, one copy, one paste and two change “x” to “y” for the Min Max values in the script declaration, save and enter Unity and there are the new values with labels and input boxes, way cool, gotta love it, this is goin’ to be good.  But that doesn’t change the fact that adding that PlayerController script makes my ship disappear, now why would that be?  That’s good enough for now, the Player ship moves, but the camera doesn’t chase after the ship or follow it around.

And now it does, but flying a space ship around using a keyboard does not bring any fluidity to the actions that help the player realize, from viewing the game, how to grapple with flying in 3D space.  Joysticks are the best way as they use values from [-1.0, 1.0] decimally to provide an accurate transition through an increasing and decreasing magnitude of input variables.  If I want to move left, just a little, I press left on the joystick just a little and ease back just a little while getting into the line of sight that I would like next.  A keyboard is kind of clunky when it comes down to things like that, but it could be done by using a timer to count off how long the key is pressed.  Using that mode of input would allow the player to always slowly add to the desired turn and while the button is held down longer the rate would increase more quickly.  But what if you would want to make a slow sweeping turn with a constant low rate of input.  On a button configuration, either another button set would need to be used via an alt or ctrl key mix or a new set of assignments to the keyboard map would need to be laid out and constructed.  I can see why there are so many 2D games out there and why so many faux 3D games, games that use 3D assets on a 2D surface (no Y axis) are so prevalent.  But I like my XBox 360 joystick controller and it works with both my PC via wireless receiver and XBox console through its built in wireless receiver.  One thing that this Unity Game Engine does provide is a robust set of C# script programing that can be easily incorporated into a game building methodology.

Or, to move the ship, I could just try something like building a Reticle and by using the mouse to move that reticle around the game screen the ship would then follow the reticle, it might work.  But first I need to figure out how to get this script for the ship to work because I used that same script for the camera to navigate in tandem with the ship as it flies.  The only, well more than only, thing that happens is that, because that script is used to also fire the weapon for the ship that too is incorporated when given to the navigation of the chase view camera within the same script.  So, of course there needed to be some tinkering around with that because the camera threw an error where those laser bolts had no launcher incorporated with that camera.  A camera doesn’t shoot laser bolts.  Now its time to have two separate scripts, but what might be more likely is to have supra script and sub script builds so the overlap of code that is needed and referenced because the ship needs Bounds checking and so does the camera.  But if both scripts try to build a Serializable class of the same name and type there is a conflict where one could possibly overwrite the other, thus the thrown error.  It can’t build the inspector panel because of the error, bark goes the compiler, par for the course.

Slightly familiar my mind says to my brain, in 15.Counting points and displaying the score of the Space Shooter tutorial video.  It was some time ago that I was trying to do the vary thing that they are talking about.  Theirs had to do with a method that was called to do an internal search for an object <type> to get the running in-game instance of a class that would access its runtime variable, change its value and update that what was seemingly disconnected to be seen as a change on the game screen, all quite magically.  But before this little jolt, at the time, way back when, it was a very mysterious and strange way of taking care of business, which may also have seemed to be too much work, as a one man operation, and that may be why I would always opt for the global variable route where everything is accessible from anywhere simply and easily.  Old methods die a slow death from the school of hard knocks.  BASIC, line numbers, 64k of memory and of course global variables, are my version of the good ol’ days.  But this video did spark a vague remembrance of intrigue which is better off left in a haze of twilight just so I can use what this tutorial chapter has made more clear for what needs to be done here within Unity.  Back then is just some dark and spooky stuff, like an old forgotten dungeon that I remember I had walked through from time to time and then when something new that is actually quite old passes by like a specter becomes the thing that is pointing the way out, strange brain, but its mine.  Two more videos to go.

And that’s it, two times through this Space Shooter tutorial with the second time through having an incorporation of one of my old XBox 360 games.  Now for some more reading and then to do this all over again with this month theme LOOPS in mind.  ‘Till then.

G’day.

February 23, 2014 Posted by | 2014 [0050] to [00??], The Process | , , | Leave a comment