MyI@FarNiche

Building an XNA Game Studio XBox360 Indie Game.

[page 0052] ~ Back to the Beginning:

Updates – .

DownLoads – Unity Web Player for Windows v4.3.4.0,  and free Unity 4.3.4, just for the fun of it.

The theme this month is LOOPS.

After updating my website by adding another calendar year, 2014, section of pages, and after installing Unity as my next API (application programming interface) for video game construction, I have begun to go through the Unity help files, tutorials and starter programs on their website.  As I watch the videos explain how things need to come together in order to build the given starter games, I realize, from all of my previous Xbox 360 programming that I have done, I can see all of the classes and variables behind the UI (user interface) drop-downs, check and text boxes in my minds eye, bully for me.  So far this is making some good sense and I hope that the scripting language for this game engine, one of which uses C# (see-sharp), can expand the out-of-the-box freedom of experimentation that I have become accustomed to with my previous Xbox programming.  One bonus is that the Xbox uses .NET4.0 and a dedicated subset of gaming declarations known as XNA.  Some circles of people seem to enjoy the fact that Microsoft hasn’t changed the protocols for the Xbox in some time, and thereby have come to the conclusion that XNA is dead.  But in all actuality I really don’t see why they should feel a need to.  The big push, lately, has been for the touch screen market of non-keyboard pad readers and smart phones.  That really has nothing to do with base units or consoles so why put any self gloating in the direction of something that has actually become stable within the world of computing?  What ever.  In any case Unity uses C# to run its scripts and the Xbox uses C# exclusively seeing that it has no UI, Xbox game creation has no skin, it is all code pages of classes and a compiler that is very good at barking at your every mistake.  It seems that I will be championing XNA, C#, the XBOX and now Unity as this year progresses, so be it.

Another thing that Unity has consolidated and has made more easy to use is shaders and the implementation of them.  Previously, in Xbox programming, shaders needed to be given within the draw method, possibly via a preprocessor, while using the projection, view and world matrix transforms of the object that had the lighting focus.  In Unity, that has been simplified into the check boxes and drop-down text boxes that set the type and amount the selected object will use.  Thus far, in the SpaceShooter game, it seems that all of the assets have a static position in concern to the light source position, maybe later on dynamic positioning will come into play through the use of their scripting language.  But so far the use of shaders and their incorporation into the games lighting system looks to have been simplified.

Ok, now the Unity tutorial, SpaceShooter, is talking about classes in the C# scripting language.  And for me, that is a good thing because back when I was using Processing to build my first web games, although everything was written in code in one page, there wasn’t any easy way, for me, to build classes that would consolidate sets of variables into discrete and reusable blocks of code.  This looks promising, but when using classes serialization is the vehicle that affords to Unity the ability to have its variables and their values viewable in the Inspector panel, and that is a subject more attune to higher or possibly lower level programming, when looked upon from differing points of view, and not one to be reckoned with in this beginning tutorial.  But as it turns out the utilization for serialization is given in respect to the API although not the specifics of what serialization actually is, which is understandable.

The tutorial is beginning to talk about how to add the laser bolts that are shot from the ships cannons.  It uses textures and materials that remind me of what I had been using in SoftImage when building 3D assets to use in my Xbox games.  After going back into Softimage, the texture coordinates and projections that are needed for the materials with their fx files that transpose a picture onto a mesh of vertices formed from an object that produces a representation of anything from a biped to a ship to a laser bolt, yikes, in a flood it all rushes back into my head, OK, whatever.  I hope Unity makes all of that easier to do.

More Unity study.  Having worked a little with XMLSpy by Altova which I have used to build some search and storage systems using hierarchical and SQL database structures and have noticed that while they are building and placing the different parts together in Unity’s SpaceShooter tutorial training, the techniques are similar.  The gist of the tutorial is how to figure out what they intended that makes the consolidation of resources work together and thus become a Game Engine.  I haven’t gotten to the point where I have added any resources myself so I don’t know what that entails, so back to the show.

That’s pretty cool.  While watching these Unity YouTube tutorials, I just had a flashback to when I was writing code back at school on the Universities Unix/Linux computers for my C++ classes.  That was a lot of coding back in the day, day after day, where when at home I was using Microsoft C++ to figure out the given assignments while building classes and UDT’s and then afterward connecting to school using Telnet and sending in those finished assignments, done.  The C# scripts shown and used in Unity are comparable to those classes and UDT’s where now, in the end, the whole finished game gets sent to the Web, as something for fun, not a graded assignment, of course.  So that flashback seems kind of “loopy” to me, and maybe even a little recursive.

I’m starting to get the script thing.  It looks like the public variables in the class becomes a label with an accompanying input value textbox that is then added to the IDE of the Unity Engine interface.  That is a really nice thing to have.  It is concise and makes the connection between the art assets and their  mechanics that drive their actions and motions within the game more charted, without an actual flowchart, per se, although I do like flowcharts.

The next thing that I have noticed is that when something is highlighted in the “Hierarchy” tab, the properties fill out the “Inspector” form with the values for that highlighted selection.  That is a nice tidy way of keeping all of the relevant classes together where all of that items capacities are seen without needing to scroll up and down a code pages lines or trying to remember which other tabs contain the code needed for a particular event to occur.  I’m good with that.

Building scripts that are modular and reusable seems to be the trick in keeping the Unity IDE workflow moving along smoothly.  This might be where keeping track of what needs to be done with the objects used in this game and ideas for future games could become problematic but necessary.  Hmm, things that do the same thing but differently elsewhere with open ended tweaking through the inspector interface.  Prefabs seem to be classes of classes that become reusable objects that can be called as a single unit that performs as the original.  But I still don’t get some of the drag and drop stuff that provides access to an objects properties by reference.  It’s my first time through this show, OK, back for more.

Simple is over, they just said something about “co-routines”, not quite ominous nor disconcerting, but it still makes me think, unfamiliar.  It must be a Unity thing.  Ha hah!  Finally, IEnumerator, which makes me think of the name of my Xbox360 Indie Developer name, MyI, pronounced “my-eye” which in its inception was a play on all of the “My” stuff back in the day.  And so the “I” in IEnumerator is the Interface which became my Xbox Gamer tag name MyInterface and of course that came from MyI which is short for my interface.  Yikes, I am such a geek.  So anyway,  IEnumerator in spawning waves is something that will go into the research bin for now.

Another interesting concept in concern to the scripts in Unity is that they seem to be being used like the scripts when building a website.  To get a website to work well, or at least to have it present itself uniformly it needs to have code pages that perform duties that maintain a consistent structure while each page is loaded into the browser.  The CSS script page, known as the Cascading Style Sheet, is what makes the webpage look as it does, that is if the web page accesses a css script page from its header section.  Each portion of a webpage uses little snippets of code so text and images are placed in the positions that the web designer intended.  With Unity the same seems to hold true where little snippets of code are accessible by many game objects to have them perform consistently within the game environment, just a note to self or an FYI thing about this Unity game engine.

With this next tutorial video it sounds like my games will finally get something for the players to listen to, if I can figure out how to use Unity and get something done as this months show case for One Game A Month.

More fun stuff, in the Unity tutorial when getting the game to keep score of the asteroids blown up by the ship.  I can vaguely remember what I needed to do for my Xbox programming when adding game objects and components.  There was some universal game reservoir that held objects that were built as either drawable or just game components.  You would have them built in code as a class then when the game would start they would be instantiated as a class instance and have the variables assigned.  After that, the program would call .add(classInstance) so it would sit inside the draw call loop, and I think there may have been an option to assign a numeric value to that instance so it has the possibility to be called before some other instance in that component storage heap.  Yeah, its been a while since I’ve done any Xbox360 programming but there are still a couple of light bulbs that go on occasionally.

Well, that is one time through the Unity Space Shooter Tutorial, I’m sure it won’t be the last.  After that I found a couple more inspirational videos on the Unity What’s New page.  Hmm, looking around Unity is a little bit like looking around Softimage, but I’m not building 3D art assets I’m looking to put a game together into a package.  Yeah, I’m lost and feel like a noob again, back to the beginning.

G’day.

Advertisements

February 12, 2014 - Posted by | 2014 [0050] to [00??], The Process

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s