Building an XNA Game Studio XBox360 Indie Game.

[page 0031] ~ Can I Really:

 I think I can, I think I can.

It doesn’t seem that I can build a class and then have an ArrayList of those classes be accessed in this game, in this JavaScript immediate compilation mode.  Currently I am stupefied.  But I did get a bunch of crud muckin’ up the works.  Starting from an array of type class as class[] it will not let me build new of that type, i.e. myclass[maxindex].  I must be thinking in terms of c++.  I’m also getting a little home sick and am finding that C#, for all its nuances, is very entrenched in provisioning game code simplicity.  Days to go, can’t go back, can’t go forward and holding down the fort only ticks the time and lessens the larder. Big big hm.  Well it’s time to sweep up the goop and figure out if a user class can be declared in the namespace and instantiated in setup to be accessed in the draw method, all without hanging the loop.  This little red blood cell is definitely putting me to the ropes, yeowch.  I might need those smelling salts pretty soon.  As It would seem, building an array of that kind in the draw method is possible but if I’m going to do that I might as well just build another big Harry and let that suffice, more research.  And as I should have guessed, primitive datatypes seem to be the only array value holders that I can get to work as a declared array to use from namespace, that being “canvas-space”, to initialization to declaration to update/draw usage, yep, time for the big Harry Rag.  Or, bang goes that idea and let’s just run with another KISSing session.

Tinker … Tailor … Soldier … Sailor …

It looks like I’ll need to build some simple data strings and just hard-code this part.  But before anything like that gets done I need to fill in some more of the back story, just for fun.  Our adventurous little red blood cell, lets just say “Red”, knows the routine.  The pressure is either on when near the Heart or in the extremities, but in either case the mainstay of the ride is either in the Arteries or in the Veins.  It seems Red is somewhat more of a free-lance scamp than previously thought.  But to keep things simple, Red will be bound to those two confines, for now.  For convenience let’s just say that that’s home sweet home for our little Red.  Actually Red can be notoriously RogueLike, squeeging about semi-permeable membranes, but there is precious little time left to gamify those points.

Finally, a Beginning.

Streamonsters has a splash screen and so my game has a beginning.  All I need to do now is polish up the middle and figure out how it will present its end.  Then voila, presto change-o ala ka-zam and I have Februarys OGAM offering.  Notable note Java update: 7 – 15 just came about for an install, painless.  You know, it would do me well to add even a short label to my test displays when I am trying to see how the variables are updating in the canvas, boolean true or false, integer incre/decre-mentation, float precision and the like.  It would definitely help me to remember where in the code I should look so I can jump back into the game, no pun intended.  I need something for Red to do.  And transport of Oxygen is the mainstay and livelihood of Red.  With that in mind, Red needs a meter to gauge the capacity and transference of the Oxygen.  Bumping into or past the vein/artery system wall will release some and if too much is released Red will be thrown to the Bladder by order of the Holy Kidney, so be it.  This silly little game is actually a lot of fun to build, somewhat taxing, but fun and informative all the same.  Hm, control+z in Processing doesn’t take me back to the position of the undo so I’m unsure of what is undid. It does move the text page up and down, but not to the degree I have been accustomed to.  I guess I’ll need to work smaller.  Also the number of undo’s is unknown to me.  But it does build for the canvas and helps me do so, there is joy.  And more joy, the Big Harry works, in rehearsal.  I had to hard code the integer arrays, so far for the head, which lets my little blood cell move incrementally, and there was much rejoicing. Yaaaeee!  Now off to the two arms and legs, then that’s done.  Alright, what makes the Arteries change to Veins, really I should know this one.  What I need to do is use the BodyPart variable, which is the count of the array entries, and use that to split the journey in half because that is where, for all practical purposes, the arteries turn into veins.  Simple.  Now where is it?  Dividing an array counter isn’t a really good idea, but … yes it works and it isn’t halved as a counter but as an ‘if’ flag to denote when the halfway point of the little red blood cells journey is half way over.  What ever.  Back to figuring out the last of the body parts.  Oh boy is this great, I’d like ten thousand marbles please!  Ok, I just figured out how to use half as many arrays to get the same job done.  It was kinda scary, deleting half of the code to do the … , but it works just as well.  It seems that that halfway trick is only needed for the head.  Nope, I lied.  I am using that terminus trick for all the extremities.  Done, a head, two arms and two legs.  The color red for the arteries switches to blue for veins at the terminus, being where the arteries become veins.  More to come.

The Menu System.

Wow, I didn’t really know how to start building a menu, so like any good gamer I played others games and when they looked like they were understandable they became understood.  Seeing a menu and building a menu are two very different things.  But I’m just about done, I think I like to think that cause that’s what I was thinking earlier this afternoon, go figure.  The thing is its not just building the menu, its getting everything that the menu does, or is suppose to do, to do what it does.  KISS can only take it so far and then its up to … well, I’ve got two days left.  I’m not going to do an exhaustive hand-check on this game but I could try to do a logic flow and follow the booleans around.  Build it first, then worry about it.  OK.  Will do dad.  Do Dad? That’s a thing-a-ma-bob.  Yep, still remember that old chestnut.  And I can also get to understand just what all these variables do from where they are located in the program to be built into this wondrous menu system.  There really aren’t untold numbers of values that need to be zeroed out or reset, but there are more or less enough to think that there are.

Finish, Gloat, Tweet, Sleep.

Order is important.  My February game , Streamonsters, is done and the snow outside is deep.  The snow banks are even deeper. And with that,

Ding! – Thanks for Playin’. – (Charles Petzold).  Hero.



February 27, 2013 - Posted by | 2013 [0019] to [00??], The Process

No comments yet.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s