Friday, October 10, 2014

Ideas are Cheap

    Almost daily, I am regaling Rebecca with some weird thought or idea that could be turned into a product or solve some perceived problem.  Some of these ideas are useful for future applications to be created, but others are just too big for our little shop to tackle.  Thats ok.  Ideas are cheap for the most part.  Just tell all your friends and family that you can create software products for their phone or pad, and then wait for all the great ideas they will feed to you.  Everyone has some ideas that they would like to see come to fruition.  Most of us just don't have the time or skills to bring those ideas to life.   Again, that is ok.  Creating ideas can be invigorating and can really keep a conversation alive, especially over a few beers.   After some discussion, I decided that even if I do not have the time to create a product, I can certainly blog about the idea.  Originally, I was worried about someone taking the idea and creating a product on their own.  Now I am of the mind that if something was created off one of my ideas, it would be cool to see the product in the real world.  If your never going to use the idea, might as well make it available to everyone.  Who knows what could happen?
    One of the ideas that has been banging around in my head for a while is a game using 'glyphs'.  Each glyph would show a different symbol and represent a different power or ability.  Add lines or symbols to the glyph to enhance or alter the power.  Hopefully, by looking at the glyph you could quickly determine what the power is and how the glyph performs.  In my mind, the glyphs are more Chinese or Japanese, but you could use Celtic or even make up your own language.  The trick is to make the glyphs recognizable and fairly unique.
    Once you have the glyphs designed, you can make all kinds of games using these symbols.  One of these I could see is a game that makes you protect your 'mother ship' or 'king symbol' from destruction.  The king gets it's own unique symbol and if you lose that piece, you lose the game.  Simple enough right?  Every round a new wave of enemies attacks the king's group to try and destroy it.  Survive the round and get some bonuses or enhancements.  After each round, you can buy more stuff for your group before moving on to the next level.
    Now each glyph would be placed on a circle or shape that represents a drone-like device.  The drone is pretty simple.  It could hover in place, maybe attack other drones that get too close, or protect nearby drones using it's unique power.  Maybe after each round, you can enhance the glyph drone or add another drone to the protecting group.  Add in some colors for the competing abilities and to make the drones easier to recognize.  The drones will circle or hover around and protect the king drone.  
    In my mind, this is a top-down looking game.  Probably a 2D game that has the group moving through a map and getting attacked every so many minutes.  Think of the old 'Spy Hunter' game to visualize the group moving across the the background scrolling map.   You would move your drones around your kings group formation by just touching and 'picking up' the piece and moving it to another location.  Once your finger gets to the new location, pick it up and the piece starts operating in the new area.
    Anyway, you probably get the idea by now.  It could be a fun game or it could be a bust.  The neat thing about ideas are that they are always perfect until they are implemented.   Once you implement the idea, it might not be all that you expected or better than your imagination.  Who knows?
   I do know one thing, ideas make great blog fodder when you are looking for a topic.

Thursday, September 25, 2014

The Unexpected Bug

    If you have programmed, you have seen bugs.  The only bug-free code is no code at all.  Everything can break, it just depends on the conditions.   There are a few other programmer clich├ęs, but they slip my mind at the moment.  All of these canards speak to one fundamental fact, you will find bugs in your code.  You may even grow to rely on errors or exceptions to handle your debugging and logic design.  I would not recommend this, but it illustrates that every programmer has their bug 'tolerance level'.   Once that level or alarm goes off, then that bug has to be fixed or scheduled for a fix before you go mad (or your boss sees it in action. During a demo. To the Client.)  
    Of course all bugs are not the same.  Some are irritating, slow down or hamper performance, or just do something wrong that only you, the developer, can notice.  All of these may trigger a hunt for the culprit, but usually can be cataloged, recorded, and ignored when initially found*.
    The bug that always gets the attention is the one that you did not see coming.  You are working your way through some test cases or running the code to see how your latest changes perform and POOF!  You app drops out and your debugger really has no clue why.  Well, some clues, but not enough to find the exact spot of the problem.  After your initial shock that the tools have failed you, you start wondering what caused the crash?  Can I recreate this crash?  Luckily, apps are not huge software programs, so getting back to where it crashed is usually pretty simple.  If it crashes again, great!  You have now found the problem area and are much closer to finding the root cause.  If it doesn't crash, you now wonder if you recreated it right or have a more subtle problem in your code.  (My C developer hat is shouting, "Check your pointers!")
    Now the catalog process begins.  If you can recreate it, chances are you can find the problem area and fix it on the spot.  If it is too big to fix, it can be logged as a TODO for the future.  Now you have to try to avoid doing that crash sequence until the fix is in, but sometimes it can wait.  Most of the times, it can't wait because it could be the symptom of something more serious in the your code.  Either way, it will take time to uncover, document, and fix.  This is the programmer's 'padding' when trying to estimate a how long a program will take to write.  If you mess up too much or don't get the design right initially, you can blow up your timeline pretty quickly.  The padding in your estimate allows smaller delays and bugs to be fixed without the stress of a missed deadline.  Of course, if you do finish early, then you can add some extra features.   Win/Win!
    On the other hand, a little extra testing might be a better way to use up that extra time.  You never know what might happen.

* Now that last statement depends on who found it.  My friends that perform testing on software will often disagree on the priority with the programmer.  They are usually right, as they are closer to a customer than the programmer, but priorities are sometimes tricky.

Tuesday, September 23, 2014

The Power of Boredom

I love the Wolverine look  of this selfie.

    When working on any project, there are points or days when nothing seems to get done.  Maybe some tweaks here or there, but nothing substantial.  For me, this is usually when I am planning an undertaking that will require extra thinking or effort to complete.  I form the original plan or concept and start my mind thinking about the various ways and variables that will be involved in completing the task(s).  This week it is more of the A.I. logic for the computer opponent, but other weeks it could be something else.  The point is that the tasks are going to require some effort and when you sit down to do the work, your mind just shies away from concentrating on the task.
    In my case, this is usually a few mental or physical non-related tasks that can distract from the actual work.  Maybe a bit of news reading, a study of a new programming constructs or language, or some household chores that need to be done.  We all have our ways of getting out of work, even when you work for yourself.   "If I catch up on this, I will be free to work on that", my thinking runs.  Sometimes it works, but most times, it just took you away from the required job.  This can lead to more inertia building up for the task and mentally making it harder to tackle later on.  Weird, but it feels like this at times.
    Setting an actual time to start work for the day or scheduling work periods, helps a lot avoid this procrastination.  Other times, you sit at your work area and just feel bored or uninspired.  It is easy to be bored with something that you do all the time, like programming, writing, or even driving a truck. It is pretty hard to avoid boredom in most jobs.  In my case, I find that embracing my boredom instead of trying to alleviate it helps break the cycle.  Recognizing that I am bored, especially when I have a tough task ahead, is the first step.  Once I catch on what my brain is trying to pull, it is usually better to just sit there and start reviewing the task at hand.  Maybe looking over previous notes or just throwing a few designs on a white board related to the problem will start overcoming the boredom and start the work moving forward.  After a bit of review or some 'blue-sky' ideas,  I find my interest starting to pick up and the old familiar feeling of fixing or solving a problem starts to show up.  Once I am programming and seeing the problem getting solved, then time flies and the boredom is just a memory.
    In short, if I recognize I am procrastinating or pushing the task down the road, it helps to pick at the problem edges until something triggers that old enthusiasm for the job.  Everyone loves doing something and hopefully it is something they do in their work.  In my case, it is design and programming.  I just need to get bored sometimes to get the work done.

Tuesday, September 16, 2014

What the heck is the A.I. doing?

Cookie Walk
    Sorry for the disturbing cookie man walk, but I find it oddly hypnotic and funny.  It does appear to be knowing where it is going in a hurry.  It walks with purpose and fairly smooth if a bit repetitive.  As we all know now, this is just a series of images that are repeated in a loop.  Each 'cycle' of the loop  the program determines the next picture to show.  If you were to add some alternative pictures, like say a jumping action sequence, then Ginger would start to jump occasionally.  The key word here is 'occasionally'.  What determines the occasional hitch in his step?  Picking that decision to walk or hop at certain times is the Artificial Intelligence or AI of the program.  Granted it is pretty simple, but it does give the illusion of decision.
    Why am I explaining this?  Well yesterday, I got the flow lines working correctly.  (Drag to create.  Drag over on them to replace.  Deleting lines TBD)  In order to get this rework done, I had to disable the AI routines.  So its pretty easy to beat the opponent that just sits there.  Now seemed like a good time to revise the AI to stop picking the next square to attack and start using flow lines.  Hmm.  This means I have to change 'Larry' and 'Oscar', my AI routines.  They each attack the board in different ways based on the timestamp or cycle.   Since I need to change these characters to use flow lines instead of attacking squares, it seemed a good day for readdressing the AI problem.
    Today I put some more design into the AI of the flow puzzle/game we are building.  I like what Larry, Oscar, and all their future buddies do at various cycles.  Changing this behavior to work with the flow lines should not be too difficult.  After this, I will need to create a few more characters to join the merry band of AI opponents.  They won't do much or be complicated, but I figure I can add some more variability by switching characters depending on the situation or time.   This sounds like a good game plan for this week to get the game back to playing levels again.
    For example, run the AI as Larry 25% of time, and as Oscar the other 75%.  We can call this new player 'Joe', but his real identity is the percentage of decision time he has allotted to each of this personalities.  Joe is normally acting like Oscar, but occasionally he lets his inner Larry out.
    Joe now is really just a mix, but really, who are we to judge?  Aren't we all a bit mixed up?

Saturday, September 13, 2014

Software Updates - Programmer Edition

    Have you ever had to upgrade the software that you use on a regular basis?   For example a word processing program or browser will get upgraded occasionally to add all the new bells and whistles you didn't know you needed.  Regardless of the selling pattern, we do eventually upgrade our everyday software and hope it goes smoothly.  Usually it does, but other times a document or program that was just fine before the upgrade is now giving you problems.  "Well this is unexpected," you think to yourself and proceed to lose more time to the upgraded software.  The price of doing business on a computer, I suppose.
    As a developer, I usually am trying out the latest and greatest software that deals with my work.  As long as I have the time to spare, that is.  Sometimes,  you have to upgrade to stay current in your programming circles.  Today was one of those days for me as I upgraded my main XCode development environment.  I have been testing it out in the past, but today is the first day of using it as the 'main horse' to ride.  It is pretty nifty and pretty, but also a bit more strict.  Thanks to this, I have new bugs to chase down now, but a quiet weekend to do this.
    It does make you wonder or even pine for the good old days where you just typed everything into a glorified text editor and then told the computer to show you the results of your program.  The upgrade cycle then was pretty rare and in smaller increments of additional functionality.  You actually got pretty attached to your editors and small software utilities you used everyday.  Even today, I can usually stir up old arguments with other programmers by saying VI is the pinnacle of code editors.
    Of course, back then we didn't really have internet lookup of technical specs or development samples.   We would read the books that were available and experiment with the few examples we could find to learn how to do the next trick.  Now more tricks are available using the advanced programming tools, so we adapt and learn to deal with upgrades.  Hey, at least we have the internet to look up any tips or information we desire.  Sigh.
    And tell those kids to get off my lawn with their loud music...

Tuesday, September 9, 2014

Design Decisions

    The 'Flow Line' changes continue on our strategy puzzle.  The lines are used to indicate where you want your colors to flow to attack the squares in a line on the board.  Now that the lines are being created nicely with the drag action, I need to find a way to remove the lines that are being overwritten or deleted.  I have a few choices on how to handle this:

  1. The game board itself could determine if the line is a replacement or needs deletion.  Since the game board is the one displaying the lines and handling the interaction of flows on the screen, this could be handy.  On the other hand, the determination of which lines are replacements or not seems a bit out of the game board's responsibly.
  2. Another method would be to have the Line class itself handle the determination of what is a good line or replacement line.  This moves this logic into the class that has to handle it which seems more appropriate.  Then the game board can just use the Line's methods to determine which lines stays or goes.  This would also handy if I decide to create something other than lines to move colors.  Maybe I want a square type operation in the future.  Who knows?  It would not matter as much to the game board.
    The design could work either way, but I suspect that the game board handling everything would eventually start to feel bloated and resistant to future changes.  In the words of Martin Fowler, who wrote one of the classic programming books on Refactoring, it would start to 'smell'.  That is a nice way of saying you are not happy with how the code is turning out.  
    The funny thing about design, is that it can only take you so far.  First of all, you can't spend too much time on design because invariably the actual coding will expose a problem that you did not conceive of in the design phase.  The design/code cycle needs to be iterative to remain flexible to these challenges.  Once the code is put into place, you might find that you don't like that design after all. 
    And something does not smell right...

Monday, September 8, 2014

Rebecca: Settled into summer?

Since Fall officially starts in less than 2 weeks, I am left wondering what happen to summer.  In June, the kids finished up school, and I dreamed of all I would accomplish during the lazy days of summer. Without the chaotic schedule of school and activities, I planned to dedicate some time and energy to Zenerdgy.
As the family prepared for Back to School, I stood in disbelief about how little I accomplished for our young company.  I am not sure if I should feel guilty or not.  We had a great summer.  We had several great camping trips, hosted several visitors, and we enjoyed the sights in the beautiful NW.  It was a summer full of family and close friends.  Honestly, I do not feel guilty; but I wonder about how to give Zenerdgy the time and energy it needs.
Should I try to blog?  What should I be doing for social media?  Marketing research?  Sales? How many downloads?  When I start thinking about all the TO DOs, I become overwhelmed and want to return to the blissful days of summer.
As the saying goes, "one step at a time."  Today, I will post a blog.  Today,  I will dust off the TO DO list and update it.  Tomorrow...

Friday, September 5, 2014

Office Hours

  Well this was the first week of School for our kids and the quiet has been appreciated.  I finally got the attack flow lines working correctly on the screen.  Colors flow down the line attacking the next square as requested by the user.  Sounds simple, but once I switched from the previous (single touch attack) method, I realized I had a bit more redesign to get it working the new way.  Of course, the stuff I ripped out was running the A.I. opponent moves, so those have to be reworked.  The A.I. opponent engine needs lots more smarts anyway, so this work was expected.  On the plus side, it is really easy to kill the A.I. for the user...
    Although this was a short week, I did find a lot of good design/discovery/coding was accomplished in the 4-6 hour window of time when I had the house to myself.  Sometimes your brain just needs a bit of uninterrupted time to properly analyze a problem and find a solution.  This week has given me a few of those periods to really dig into the code and refactor* the problem parts.   Sometimes when you are looking at multiple files and parts of the code you find yourself 'code juggling'.  This juggling of ideas and things to do can keep you from getting the work done.  Its distracting.  You either get serious tunnel vision to fix an issue or eventually drop the balls and go do something else entirely.  You usually need to fix one issue to reduce the number of items juggled.   I find that if I can get a few hours on my own, I can juggle a few more balls and get stuff fixed.
    Where am I going with this?  I guess I am thankful to get back to work on a more consistent basis and grateful for those occasional distraction-free periods.  It is good to "be back".  Now onto those A.I. flow lines...

   * In programmer language, we call this revamping of the code as "refactoring".  I use the term a bit generally, because true refactoring is a series of steps to clean up poorly designed or maintained code.  You start by setting up some tests to prove the code works the proper way.  Then, you redesign the code to shrink the problem areas and hopefully make the area more clean and understandable for the next programmer.  Lastly, you run the original tests to insure you did not wreck the original purpose of the code.

Tuesday, September 2, 2014

The Lost Summer

    Wow.  Finally another blog post.  Today is the first day of school for our children in Washington and also the time to get back to a normal work schedule.  Our very busy Summer left little uninterrupted time for programming.  Most of the last 8 weeks have had some form of interruption involving the kids, family or camping.  Not a bad problem to have, but not much work has been accomplished.  I found myself doing more small bug fixes and experimenting with designs for the current puzzle game and other future projects.  This meant more white board and less actual code time.
   Today the whole family got back to work/school and hopefully the current project will start showing more progress and less inertia on my part.  This blog post is meant to be one of the steps that will help be accomplish this goal.  If you write it, it will come.  Or something like that.
    Our latest project, the Flow War / Puzzle game has had a few setbacks lately.  I did not like the single touch system used for moving flows from one 'square' to another.  I changed this system into more of a drag arrows to indicate flow instead of touching a lot of squares in sequential order.  In order to do this, I had to build the new flow arrows to work with the drag behavior and also disable the old system of single touches.  So now I have a game board that accepts arrows being drawn on the board, but have not implemented the replacement for the 'touch flows'.  This means the board shows the computer opponent filling it's squares just fine, but the human can only draw pretty arrows with no flows.  I would say that the user will expect more from a game.
    I did also put together a nice screen for selecting the level to play.  It uses the swipes to pull the desired level to the forefront like turning pages.  To get that working consistently, I had to add in some rudimentary file saves to allow the user to keep the level selected.  It looks nice and helps me in trying out the various A.I. opponent programs that I have come up with for testing.  
   I also still have to add in the Player components to the game.  This is the part of the game that keeps track of the various players, their levels and achievements completed, and other progress items.  Since this is pretty common for most games, I am trying to design this as one 'drop-in' module so that future games can just plug and play to get this functionality.  I am hoping to get this all wrapped up in the coming week, but we will see.
   It was a great summer, but it is good to be back coding.

Wednesday, June 18, 2014

The Beautiful Game

    I normally try to keep my personal life out of this blog unless it is related to Zenerdgy or the current project.  When Rebecca and I started this blog, we decided that I would concentrate more on the company progress and she would fill in the more human elements of running a company and family.  I truly believe she got the better end of the deal.  The family life is way more interesting.  
    With all of this said (or typed), I have to confess a more personal and non-work related event that has been diverting my attention for the past month.  Whats my confession? I am am and have been a San Antonio Spurs NBA fan for as long as I can remember.  Born and raised in Texas it was pretty natural that I would latch onto the Spurs as my basketball team.   Over the years, this passion has only grown.  There are many things that have kept this passion alive in my life.  David Robinson was drafted from the U.S. Navy while I was first starting out in the U. S. Air Force, which coincidently trains recruits in San Antonio, TX.  Today, he remains one of my all time favorite players and human beings.  Great guy on a great team.  Then they drafted Tim Duncan, and the rest is history.  
    Over the years the Spurs have managed to play some excellent basketball.   Also during this time they have evolved into a team that seems to really value the players and the fans as well as the concept of good team basketball.  Sharing the ball and insisting that the players put the team before themselves has really been one of the Spurs benchmarks for as long as I can remember.  As their couch, Greg Popovich, would often say, “We look for players who have gotten over themselves.”  This dedication to the game and the team concept is probably the main reason I have remained an ardent Spurs fan over the years.  Yes, I have the jerseys and various Spurs keepsakes from over the years of admiring this team. 
    This last Sunday, they Spurs won their 5th NBA championship.  Needless to say, I have been distracted and elated this past few weeks.  Work was taking a hit because I found myself drawn to the various forums and news articles about how the team was doing and what to expect in the next game.  I have spent an awful lot of time reading and commenting about the Spurs in my life, but this past week during the NBA finals was probably the worst.  Well, the worst except for last year.  Last year the Spurs lost in the NBA championship in a thrilling game 7 against the Miami Heat.  It was soul crushing to experience to this fan.  I got over it mostly thanks to having a great family to distract me from silly things like a game of basketball.  This year, they redeemed themselves by getting back to the Finals and crushing the Heat in 5 games.  Yay!

   As a basketball fan, I truly do appreciate the art of passing the ball and using ball movement to create the perfect shot.  It also helps when you have some of the best players on the planet to implement this movement.  Great individual talent is always exciting to experience, but when you have the whole team playing for each other, this is when the real Mojo kicks in.  Last year, the Spurs showed the world that playing team basketball can challenge even the best of superstar athletes.  Unfortunately, last year it was not enough and they lost that series.  This year, the Spurs kept the team together and doubled-down on playing great team basketball.  Good ball movement and crisp passing on offense.  Tenacious and intelligent teamwork on defense.  It was a joy to behold for this fan.  This year, the Spurs put together their masterpiece of basketball and put it on display during the 2014 Finals.  

    Even if you are not a big NBA fan, you have to appreciate the concept of good teamwork.  We all need it in our lives at different times.  Some of the best times I can remember in my life are when I worked with a great team to accomplish something together.  This team concept probably started with basketball and then solidified while I was serving in the Air Force.   Since then, I have strived to improve the team I work with as well as myself.  It makes the end result that much sweeter.
   If you do like basketball, then I will leave you with a homage to great team basketball.  I love this video that some fan put together on the Spurs playing The Beautiful Game.  It really moves me every time I see it.
    Damn onions...

Sunday, June 8, 2014

Rebecca: A great week

Wowzer! May was a hectic month.  I was out of town more than usual, and we (the family) had a lot happening.  Throw in a visit with the grandparents, a bout of the stomach virus, and a birthday party with adolescent girls, and one begins to wander if life will ever be "normal."

Thankfully, June started wonderfully.  This past week, I did not have any early mornings or late evenings for work.  It was a productive week with no crises demanding immediate attention.

This week, the family shared several dinners at the kitchen table (you know, the piece of furniture covered with mail, homework, permission slips, and take-out menus).  We shared what happened during the day; and the kiddos dreamed about summer vacation, which starts on June 19th.

I even had an evening when I released my inner carnie.  My son's school held its annual carnival, and I operated one of the games.  It was so so fun!  I loved encouraging the children, big and small, to knock the runners off my "Bases Loaded" game.

Finally, we had sun in Seattle.  It seems that we wait patiently and hopefully for sun...usually the sun arrives after 4th of July.  Having grown up in VA, I struggle mentally with the the cool, rainy Washington Springs.  This year, I have no complaints.  We just had 5+ days of over 70.

I am ashamed to admit...but on most Sunday evenings, I am grumpy about the start of the work week.     I usually feel guilt for not working on Zenerdgy, for the household chores that did not get finished, and for not enjoying my family time.  It starts an endless cycle of "woe is me".  Today, I am thankful for a great week, thankful for the beautiful Seattle sunshine, thankful to spend a no-agenda day with the family at the park, and thankful that most of the laundry is washed, folded, and put away (that never happens).  Tomorrow, I will worry about Monday.  For the few remaining hours in Sunday, I will bask in the glow!

Wednesday, June 4, 2014

Rebecca: Potential employee??

A few weeks ago, our 9 year old son asked me about jobs.  He wondered if his future job would pay enough for a house and a car.  How much money did he need to earn to make a living?  I responded that he should find a career that he enjoys.  I explained that if he worked hard and liked his job, then he would probably earn enough to pay his bills.  I know my advice was not necessarily sound, but he did seem relieved.  He ended the conversation by asking if he may work with his Dad.  He declared he liked games and wanted to create games with his Dad.  How sweet?  A future employee for Zenerdgy.

Not long after this career conversation, my son asked about college.  During dinner, our son began quizzing us about how college worked, how many years did it take to pass, and what happens if you do not pass the first time.  Ben and I tried to explain that college was different from elementary or high school - varying schedules, credits for courses, and graduating once you meet credit requirements.  He seemed bewildered about the college credits and confused about how you ultimately pass or fail college.  After several minutes of deep contemplation, he declared that his sister would graduate college on her first try, but he would need 2-3 tries before he passed.  I was not sure if I should laugh or cry.  He was so serious when he made the declaration and so sure that he would need multiple attempts to finish college.  I ended the conversation by stating that he need not worry about college today and that he would finish on his first try.

Ben and I decided that our 9 year son has indirectly informed us that he will live with us forever.   He has mentioned that he will live at home during college.  If he does take 2-3 attempts to graduate, then he will still live at home well into his 20s.  Naively, I have already guaranteed future employment at Zenerdgy (please keep in mind Zenerdgy has NO budget for salaries).  Since I advised my son to find a job he likes and not to worry about the money, I think he has decided to work for Zenerdgy from home, OUR HOME.  I hope that Ben is able to leave a legacy through Zenerdgy, but I REALLY hope that legacy does not still live in our basement.

Early Morning Awakenings

    What is it about your mind and body not being in synch in the wee hours of the morning?  "I am tired.  We should be sleeping.", my body mumbles to my mind at 3 AM.  My mind on the other hand has other plans.   Apparently those plans include waking up and focusing on some aspect of our latest project.  No matter how weary I am, for the next 1/2 hour I find myself staring at the ceiling or out the window trying not to think of my code.  I know where that road will end.  If I start, the mind will take that thought and run with it.  In this case, it ends with me working through various permutations of the game board.  Apparently, I am having second thoughts about using squares as the main component of the game board.  Despite the fact that squares have been used for a very long time in many popular board games and puzzles, I had to spend the next hour contemplating different ways of depicting those squares.  Heck, I even named the class as "FlowSquare".  The flows move in cardinal directions (N,S,E,W).  The board is one big square with smaller squares, like a chess board.  I just am not sure that an alternative like circles or triangles would be more visually appealing.  Yet, I find myself wide awake in the early morning trying to visualize how these alternatives would work.
    "Just go to sleep!", murmurs my body to my mind.  No chance.  Now as a programmer I am kind of used to these episodes.  Usually it involves working a lot of time on a particular programming problem and not quite working it out.  My mind it tricky and must need some time 'alone' during sleep to work out a solution.  No distractions and time to process all the things that I take in during the day or previous week.  Although it really messes with my internal clock, it usually leads to a solution to the problem.  I wouldn't say I rely on this mechanism, but I usually figure that the solution will present itself in time.
    A good part of programming is blind faith that a solution to the problem will be found and implemented in the the code.  We start with an idea and slowly turn that idea into a product or program over time.  Often building small modules along the way and fitting them all together to get the desired result.  Its kind of like writing a novel, I assume.   Flesh out the characters, find some interesting plot lines, and add environment to pull it all together.  For me, programming involves a lot of white board drawings, some notes on paper or in a journal, and then experimenting with code to see if the ideas work in an App.   In this scenario, my family and friends are the initial readers of the rough drafts.  The feedback on the work done so far can really help you to rework or refine the parts of the program that don't quite work.
    I am starting to feel that it was this feedback from Rebecca that trigger this particular early morning session.  We often try to schedule a lunch or meeting to go over some of the aspects of the latest project.  I have been throwing prototype versions of our latest game/puzzle at her to see what works and what doesn't.  I guess her sort of visceral reaction to the way the prototype flows work in the game stuck in my mind.  In her defense, this is not her kind of game or puzzle.  Not a strategy person, but that is ok.  Everyone has their favorite genres of games.  I am trying to build a easy to use and visually appealing game.  I also want the visuals and game flow to be dead simple to understand, so that it is easy to pick up and play.  I am now wondering if there is something I am missing to hit this goal.  I think I have to schedule some time with my buddies to get some more feedback.
    As for the waking up too early and not being able to sleep?  Well, I hear that this is something that I will be seeing more of in the future.  I am told that the older you get, the less you sleep through the night.  Makes you wonder why that happens.
   So I have that to look forward to.  Which is nice.

Thursday, May 22, 2014

I Love the Modulus Operator

Warning - Geek Thoughts Ahead!
Proceed at your own caution.  

Life guards are not on duty.

  I freaking love some of the simpler constructs in programming logic.  The binary operators, the ability to store multiple values in a byte and change it using bit maps, and of course, the modulus function.  Modulus (or % to me and the rest of the programming crowd) is that math method to divide by a (mod) number and you either get a value or 0.   I have used the modulus in quite a few programs in the past, but lately I have found another handy use for it.
  I have been trying to put together a simple Level/Player Artificial Intelligence (A.I.) for the game we are building right now.  (A.I. is kind of awkward to type, let's just call it "HAL", eh?)   Since the game is made up of squares on a board, HAL has to select desired squares on the board as the game progresses.  Anyway, I need HAL to do different or the same thing at various times.  I decided to tie the decisions to the seconds of the clock.  This is where the repetition of using a Modulus operation on the game second clock can give me a consistent repeatable action.  Even better, instead of setting up some custom Timer classes, I can just reference the desired modulus/action combinations in a plain text file.
    Cool, now I can tell HAL to touch the square to his left every 3 seconds by giving him a command like, "Modulus:3 - TouchLeft".   Pass the current game time in seconds to HAL and other players, and we will get the desired player action when it is appropriate.  That aught to slow HAL down a bit...
    Anyway, there are many ways to skin a cat, but this one really appeals to me.   Now I can move on to what exact actions are performed at repeatable times.  Currently, I just have a log message to prove that I put the player calls and the game timer together correctly.  Once I figure out the kinds of moves to make, like "Move Left", then I can assign them keywords and build up a 'script' for HAL to follow.  The more I think about it, moveLeft sounds like a pretty good next step.  HAL is going to be a left-stepping fool before this day is over!
    "HAL, I have some instructions for you..."

Tuesday, May 13, 2014

Snake Bit.

I have been struggling off and on with a pretty simple problem with the puzzle game I am creating.  I had it working pretty well at the beginning of last week.  Touch a square and if there are available nearby flows, then start pushing those flows into the square.  Touch all the squares on the board and get them all filled up and you have completed the puzzle.  Pretty simple concept.  I was really digging the interaction, but about 5 days ago I decided to make some changes to show the 'flows' a little better.  I thought little arrows showing the active flow channels would be handy to the player and also help me to confirm everything is working correctly.  I also thought the arrows would help me explain the concept of flows to my family.  This was my solution to showing how the game works, but it was also the root of my struggles.   I did not realize it until about 10 minutes ago.
  Since the squares are all adjacent to each other, I setup up the squares to notify the main game board when they have been touched.  "Hey, you touched me and I am Square (4,5)!"  The the game board checks the square's neighbors and determines the appropriate actions, etc...    This was working pretty well early last week.  Then about the same time that I decided to move the game board squares onto an actual game board sized widget, the squares started overlapping each other.  Click on square (1,2) and you might get (1,2) or you could get the neighbor (1,3).  "Wait a minute!  This was working before I added the underlying game board graphic!"  The squares looked the same, but seemed confused about which square was touched.  I assumed it was putting everything on the new board graphic and proceeded to debug the heck out of everything associated with that layout.  It was a problem for the better part of the last 5 days for me.  I could not figure out this simple problem and it was frustrating.  After a bit of this, I would switch to another aspect of the game and vow to fix the problem later.    Maybe work on the button layout, flow graphics, and game screens for a bit and then come back to this issue.  No luck.  Frustrated again.
  In the end, it was not the board graphic or repositioning the squares.  It was the darn flow arrows I had added to the square.  They were created, but invisible until needed.  I did not get much chance to really debug them before I discovered this square problem, but I did notice that they were not always positioned inside the square they belonged to.  No problem, I will adjust them later I thought.  Well as you can probably guess, it was the stray arrows that were causing the bad square identification.  Move those arrows back into their respective square or remove them completely, and the squares worked fine.
    I guess the take away for this was that I chewed up a lot of time and thought trying to fix the wrong part of the code.  Heck, I could even see the arrows were not located in the right square when they worked.  As my Dad would say, "If it was a snake it would have bit me."  Moving the squares around before getting the arrows working right bit me real good.  Programming can be a joy, but occasionally, it can also slap you in the face with your own stupidity.  

Tuesday, May 6, 2014

Where the magic happens

Working Desk
    A few days ago a buddy of mine posted a picture of his desk at work on his birthday.  Although it was neat to see the birthday stuff, I was more fascinated by the actual work area and the surrounding environment in the photo.  Developers are normally pretty good people to know and content with their jobs, but we are also jealous creatures when it comes to things like computers and monitors.  I don't know of a developer that has not created his or her own custom environment to suit their programming system.  We are like those car guys that continue to fix up their rides and spend all their time in the garage.  Lots of custom equipment, tools in the proper place and extra equipment arranged for easy access.  (I assume, I am not a car guy, but seen them on TV)  There is always something more that can be added, replaced or modified that can improve your work area.  Since Rebecca and I both share a home office, one of the first things we did was to install a work area in one of the spare rooms.  Our desks are back to back and full of cubbies like any office cubical.  We figured that if we were going to spend a good part of our day in there, it should be done right.  At least this was my argument for convincing Rebecca that we needed to install cubical desks.
    Anyway, I thought a picture of of the area would help to show where we create the Apps and other stuff.  Like most developers, I like multiple monitors to allow me to look at the code, the device emulators, reference documents, and other stuff like 3D design, music play lists, drawing applications and notebooks.  No shown is the rather full bookshelf full of various programming books, Monty Python scripts, toys and the obligatory large white board.   Toys?  Yes, programmers seem to have some kind of kitschy toys, models, or other silly things that we pick up over the years.  Lately, most of mine have come from our kids, but I do have a few favorites that have been around for at least 10 years.  It is all part of the customization of your environment.  Hey, we are nerds at heart and it shows in our native environment.
    I am not sure why a lot of developers are really just big kids in an adult world.  I suspect it is the familiarity of having a mental fallback place where the stresses of a deadline are not important.  We work some crazy hours and really get wrapped up in our minds and code.  Breaking out of this shell occasionally to play around helps to keep your sanity.  Maybe it is also that a lot of programmers start pretty early in life when toys are still relevant.  Maybe it is just that we like gadgets.  I really don't know.  I have worked in offices where rubber band or nerd gun battles are a known hazard.  Maybe a remote control robot will cause you to hop out of the way to get more coffee.   You might have to defend your honor in a spirited game of foosball, darts, or an online multiplayer game.  It is all in good fun and takes your mind off the pressures for the moment.
   Note the Spurs mug placed prominently in the center.  It is the playoffs after all!  Go Spurs!

Sunday, May 4, 2014

Rebecca: Poo happens

On the weekends, I enjoy walking with Ben and Pepper, our flat-coated retriever mix.  We discuss what is going on and, generally, enjoy uninterrupted conversation.  This morning, both Ben and I must have been deep in thought because we did not have much to say.  Honestly, I was thinking about the grocery list, and he was fretting about the Spurs vs. Mavericks game.

When we got home, I decided that I had JUST enough time to go to the grocery store before church.  As I was putting on my shoes (in the garage), I caught the faint order of poo.  I looked on my shoe and did a quick glance around me. I did not find any poo.  The poo aroma had faded away.  As I got into the car, I noticed some dirt on my jeans.  After trying to rub it off with my hands, I smelled my hand.  I had POO ON MY JEANS, and now I had a poo-smelling hand.  When I ran into the house, I was paralyzed by needing to clorox by hand, rip off my jeans, and beat the dog (We do not beat our dog or even hit her.  Folks familiar with retriever breeds warn that they like to roll in poo.  Pepper has this retriever trait, and it makes me want to scream.  So again, I do not kick our dog.  But I do scream.)  Since I was screaming that the dog had poo on her, Ben quickly grabbed the dog, confirmed the presence of poo, and washed her in our make-shift outdoor dog bath (We have a make-shift outdoor bath because that is how often she rolls in poo).

After relative calm was re-established, it was too late to go to the store.  I have needed to post, so I decided to write on the blog.  The subject was NOT poo, but today's original post idea was not flowing.  My frustration level was increasing with the decibels of my children playing/fighting/whining in the next room.  Because it was easier to blame my children than myself for the writer's block, I loudly ordered them to play outside.  And to close the door!!!

Ahhh. Quiet.  The blog still was not flowing.  Since I had no one left to blame for my lack of creativity, I finally gave up and shut down the computer.  It was time for church.  Yes, I was heading to church with a very non-church attitude.

After some time and grace, it was my daughter that helped me to laugh at the morning.  Imagine sitting in church, thinking someone smells like poo...only to discover after service, the stinky person was you.  She reminded me that I had discovered the poo before going out in public and that the situation could have been really embarrassing.  She graciously accepted my apology for yelling at her and for allowing a little poo to ruin my morning.

Poo, it happens.  When it happens, don't kick the dog, don't yell at the kids, don't let it ruin your day.  Fix the problem, laugh at the craziness, and move on.

Friday, May 2, 2014

Everyone gets antsy, especially programmers.

    So I switched gears to work on a simpler project this week.   Although the Tower Defense game is progressing very well, it still requires a lot more graphic art and programming to get it ready for release.  I see at least another couple of months of work to finish it up.  The art work and level programming will tie up the majority of that time, but it also needs player support for saved games, top score achievements, and buying tower upgrades, etc...  In order to keep on track, I try to keep focused on the small goals that will lead to the finished product.  If I think too much about all the tasks to accomplish, I get a bit of 'brain lock'.  It can get overwhelming.
    I admit it, I got a little antsy to push out a product.  I also don't want to get burned out on the TD game before it was finished.  After some talks with Rebecca last weekend, I was inspired to tinker with a new puzzle App.  So on Monday, I cobbled together the skeleton for this game and showed it to the Boss.  She was receptive and offered up some good ideas.   I went ahead and put together another design and after a week of fun, I have a working prototype puzzle game.  I will try it out on the family this weekend and then start adding puzzle levels and polish.
    The game is basically a strategy type game to take over an entire board using simple interaction with the game board.  As the levels advance, the board will introduce 'enemy' colors that will compete for conquest of the whole board.  I have a few ideas for how the enemies will behave, but still need to create a rules engine to get them working.  Hey, whats a little artificial intelligence between friends, eh?  Next week should be interesting.
    Hopefully, I can pull this together and get a release out in the next month.  This will also give us one more product to tell our friends and family about.  Then I can get back to the tower game without worrying too much about the long term schedule.
    So I got antsy, but sometimes you just need to scratch that itch.

Monday, April 21, 2014

It is all about perspective

First Level - Simple Actions

    I thought I would post an update on what our game is looking like so far.  The game only has a first level and a pretty simple one at that.  The Gingerbread Man (GBM) is now walking to different way points on the map and the towers attack any walkers that enter its attack area.  GBM has been a good sport about this and now reflects the damage caused by each tower.  I have been able to use the few models that I have created, like GBM, to try and get the game basics to perform correctly.  I am pretty sure that I will be replacing all the current towers and models with betters ones in the next month.  For now, it is nice to get some of the basics out of the way.
    An interesting thing about building a game is all the little pieces that you have to build in order to have something that works correctly.  Although I sketch out a overall design and game concept early on, I really don't sweat the details at this stage.  If I really do try to capture all the various tasks to get completed, it can get pretty overwhelming.  It is easier to set some goals for the week and month and then plug away until these tasks are done.  It helps to keep my head down and focused on the task at hand as the project slowly comes together.  It is a matter of perspective.  As long as I can accomplish these goals, then the other things will fall in line in time.  
    Last week is a fine example of working on certain goals and ignoring the complexity of the overall project.  I put together the 'Heads Up Display' or HUD panels to allow information to be always available to the user during the game.  This involved some custom widgets and a few more images, like my bad 'ant skull' at the bottom of the screen.  I was happy to get a skull-like model created, but Rebecca pointed out that it really was lacking some skull features, like a nasal cavity.  It is all about perspective.
    I also worked out a solution for the various screens sizes that the game will run on by using a lot more screen percentage based system.  I created an atomic size or unit to use in creating the correct scale for the objects in the game.  This way the walkers, towers, and even bullets will have the proper size.   Rebecca also pointed out my trees were too small compared to the walkers and the towers, which I had not really noticed.  She was right and I modified the maps to reflect this.  The trees should be taller than the walkers and the towers should be at least close to tree height.  It is all about perspective.
    This week will be more of the same, but with more concentration on the game phases and refining how the towers and walkers will interact.  I have a lot of work to do to get some of the firing and dying effects in the game, but will have to tackle one thing at a time.  I can't get too elaborate in the graphics, but want the game to be visually appealing to the user.  A compromise or two will always have to be made, but the getting the project done in a reasonable time necessary.   I want perfection, the user wants excitement and great graphics, and we don't want this project to eat up the entire Summer.
    It is always about perspective.

Thursday, April 17, 2014

Overcoming Inertia

    It has been a while since I posted an entry.  Last week was Spring Break and I also took that time off to wrangle the family and enjoy the excellent weather.  After a long rainy Winter in the North West, the sunny days are pretty hard to resist.  It seems like everyone is out on the trails or working in the yard to soak up that sunshine.  I am as guilty as my kids in looking forward to having a week off from work and getting to enjoy the change.  I could have squeezed in a blog post during all this time off, but I didn't.   It was a pretty good week despite this avoidance of my duties.
    "Yeah, but what about the week before that?", asked the Crow.  I was busy working on the tower defense game, but could have freed up some time to post.  No excuse, but I had been hitting some pretty good internal goals and just wanted to keep plugging away.   Mainly, it was just putting off the posting until I had one more thing done.  After a few days, the inertia began to build up in my brain. Inertia is not really the correct term, but procrastination just does not quite describe the building resistance to posting.  I guess I get a bit of guilt and allow that to push my thoughts to things other than posting, mainly to avoid performing the "mea culpa" that I am doing right now in the post.  My reluctance to admit that I lowered the blogs priority in my schedule.
    The funny thing about taking time off from work is the feeling that you are missing something, especially as the days off increase.  Since I work out of the house, it is easy to run in and tinker with the code or create a new 3D model for future use.  I managed to not do a lot of this, but the anxiety to get some more goals accomplished really started to build up.  Habits and your conscience can be pretty good motivators.  I don't think I could every really just stop working,  I need something to keep the old brain from getting bored.  Work scratches that itch and I can't think of a hobby that can fill this need other than working with computers.  Such is the life of a programmer.

Sunday, April 6, 2014

Rebecca: Not in the moment

Last week, I planned to visit a customer that requires a ferry ride. In Washington state, ferry crossings  are common transportation options.  It is a nice change from the grid-lock traffic that plagues Seattle, and it provides me some time to collect my thoughts.

On the way to the ferry terminal, I missed my turn and had to approach the terminal from a different direction (in WA, the Dept. of Transportation is very serious about tightly controlling ferry traffic).  The terminal seemed different from my previous trip, but I had only visited this customer, via ferry, once before.  And I had approached the terminal from a different direction (as noted above).  I was feeling lucky because they began loading the ferry right away (no wait for the next ferry).  

On the short crossing of about 30 minutes, I went through my voice mails, checked my email, and reviewed information for my upcoming customer visit.  When I drove off the ferry into town, I was surprised because there were several cute coffee shops and bistros that I did not remember from my last trip.  As a coffee addict, I pay attention to coffee shops.  

Slowly...very slowly, my brain began to question my whereabouts.  The departure ferry terminal was not familiar, and this town where I disembarked was very unfamiliar.  About this time, I noticed a "Welcome to Kingston" sign.  Brain was definitely kicking in, and it began screaming that Kingston was NOT my desired destination.  I TOOK THE WRONG FERRY.   I had gone to the wrong departing ferry terminal, and I was now many miles and a Puget Sound away from my customer's office.  Honestly, my first thoughts were I am losing my mind.  I am either suffering from early on-set dementia, or I am having a nervous break down.  Since I was stone-cold sober and had not taken anything stronger than caffeine for days, a mental break-down was the only explanation.  

I parked my car, confirmed I was in the wrong town because I took the wrong ferry, and I tried to pull myself together.  It was a blessing that there were no negative consequences with my customer (it actually worked better for the customer to change the date).  I got back on the ferry, and I moved on my to next appointment. 

I am not convinced that I have not lost my mind, but I realize that my brain and I have been on the hamster wheel.  Instead of focusing on one thing, I have been going through the litany of the "To Do" list - cheerleading sign-ups, blog for Zenerdgy, clean uniform for Tae Kwon Do, expense report for work, book trip to Dallas, ideas for fun, cheap, kid-friendly activities for Spring Break, call Granny, conference call at 7am tomorrow, and on and on and on.  

As Ben reminds me, don't beat yourself up about a mistake, but answer "What have you learned?"  I  am not sure.  But now I know...if you are not paying attention, you may end up many miles from where you want/need to be.   

Thursday, March 27, 2014

Ginger Can Walk...

Gingerbread Man Walk
    ...He just looks a bit goofy doing it.  Hey, give him a break, he is made out of cookie dough.   This is my second attempt in two days to get the animated gingerbread man to walk.  The yesterdays GBM was a bit more stilted due to only having 1 'bone' in each arm and 2 in the leg.  I added more bones this morning to the Ginger this morning, but he still is a bit wobbly in some of the frames.  Check out that head action...   Frame 5 is pretty wacked. The arms look better, but he still needs some work.  Given that he is going to be much smaller in the game, I don't really have to worry about it this week.
    The goal for the week was to get an animated figure to march into the line of fire from one of the towers and take damage.  In order to do this, I needed an animated figure.  Ginger, one of my first 3D models, was good enough to apply for the job.  I rigged some lighting, added the bones, and moved him around through 8 frames of animation.  It was a good learning experience and I feel it will go much faster in the future.    I got him walking in the game, but need to give him some direction now.  He just jogs in place today.  Kind of like above.   He never stops.  He is a machine.  I am jealous of his workout discipline.
   So the last few things to get working this week are:

  1.  Have Ginger walk from designated points on the path until he gets to the end of the line.  
  2. Fix the tower firing range circle to match the isometric map.  I had the a basic circle, like it was a 2D game, but a friend spotted that right away.  (Thanks Jaime.)
  3. Make the tower fire when the walker (Ginger) comes into the firing range circle.
  4. Show the tower firing animation and a particle strike from the tower to the walker (Sorry Ginger)
  5. Make the walker show the effects of the hits, either by dying or taking hits.  Frame 5 looks like he already told a shot to the head, so this may be easier than I thought.  (Really sorry, Ginger).
   Aaannd it is Thursday.  I am a bit behind, but think this still can be done in the next 24-48 hours.  Luckily, I am really having fun with this so I won't mind the extra time this weekend to catch up.  I just have to find out if the family is also cool with Dad disappearing into his cave at odd times.  Ah heck, basketball season is almost over and I need an extra hobby.

Tuesday, March 25, 2014

Rebecca: Watching Grass Grow

As readers of the blog know, Ben has been learning about 3D drawing.  Ben is very excited about the tools that help non-artists create 3D structures and animations.

When I get home, we have show and tell time.  He started with a gingerbread man that strutted like John Travolta in Saturday Night Live.  I think the strut is unintentional, but Ben sold it as "cool" animation that still needs a little work.  I have seen the slow progression of a room...with a table...with a chair...with a window...and finally, shadows.  He has made land maps that require isometric manipulation.  I cannot explain isometric, but I know the land looks funny without it.  Over the last 2 or so weeks, he has proudly shown me cannons, towers, roads, dirt, and grass.

I took for granted the cute, simple graphics in mobile app games. The graphics are not simple. And animations still need to follow the law of physics.  While listening to Ben's show and tell may feel like watching grass grow, I am impressed by what he has learned and what he has created.  The large games have a team of developers and a team of designers.  Because I am still stuck on isometric and shadows, Ben is doing this all on his own!

Friday, March 21, 2014

I Love Grass

Grass - close view
     Wow!  Is it Friday already?  The week has flown by, but every day I am adding something new to the game framework.  This week was tower placement on a map.  I have been designing structures like towers to represent different types of pieces.  For example, the Cannon Tower needs to have a cannon in the tower design.   At the moment, I have just build 4 basic types of tower, War, Mage, Cannon, and Archer.  I am not even sure if these are the categories, but they are close.    Of course, each tower had to show shadows on the ground in a consistent manner to keep up the illusion.  I did manage to hit this weeks goal and now have a nice little selection of different towers in building locations.  
    So that was good, but the map level itself looked like crap.   I tried using some of the nifty effects from GIMP to 'paint' grass, rocks, and other stuff, but it still looked odd.  90% of the reason is my lack of knowledge of the tool and artistic design.  After spending an afternoon playing with different effects and background colors, I still was not happy with the overall look.  In fact, the only parts of the map I liked were the 3D generated artwork that I had stamped all over the map.  What is a frustrated programmer to do?  "Grab a beer and forget about it", said the Crow.  I decided that this map would look better with just a bit more grass covering, but not painted on with GIMP.

Non-Grass backed Map

Geek Side Note

I am sure that I could have used a combination of GIMP filters and tools to simulate the grass very nicely, but decided to stay with the 3D images instead.  Don't judge me!

  Having to create grass in Blender was way above my expertise, but not beyond the Interweb.  I found a nice tutorial on creating grass in Blender and this morning created my very first 3D grass brush.  The tutorial uses the Blender 'hair' particles system to create pretty darn realistic grass.  Mess with the color nodes a bit, and you have a grassy square.  Once scaled and placed in the background layer, the map looked much better.

Tower Selection - On real grass map
Like all tutorials, I had to go through it slowly the first time and then try to recreate the product from scratch using memory.  I am still a bit intimidated by the Color Node Editor in Blender, but forced myself to play with it a bit to get more comfortable.  Once I get over the initial hurdle of trying to use it a few times, the fear factor gets reduced a bunch.  That said, I still am a bull in a china shop in Blender and rely on 'undo' a lot.  A LOT!
    Next week is more map related goals so, this grass work will dove-tail into that work nicely.   Maybe some dirt patches or water effects?  Ah, that is next weeks problem.

Wednesday, March 19, 2014

Art Work is Captivating

Cannon Tower - Plain Tower - Trees
  Lately I have been throwing together a Tower Defense type game for Zenerdgy.  I haven't a name or even a working level yet, but have been enjoying building the parts.  Since I like the look of the 3D look of an isometric game, I have been modeling the game pieces in Blender.  It is forcing me to increase my 3D modeling skills, but also compensates for my lack of artistic drawing ability.   I use the tools ability to simulate the look I want, instead of trying to draw the effect myself.   "Hey, I need some subtle shadows here.  There must be a lighting rig I can setup for this..."  There are definitely good and bad in this approach.   The good is that I get the look that I want without artistic budget or copyright issues.  The bad is that it takes a while to build each piece.   While I am picking up speed with building models, it is still a slow learning process at this point.   Luckily, it is also pretty fun to learn.
   I find myself doing a lot of 3D modeling, importing the rendered image into GIMP for final image clean up, and then importing this into the game project for testing in a simulator.   I jump around between Blender, GIMP, and XCode all day to see if the pieces are looking good in the game.  It is easy to get caught up in any one of the 3 steps to add some extra work or refinement.   Once I have the basic game pieces created, I will switch over to XCode full-time to finish up the game.  Until that point, I am finding myself building a lot of models.
    In order to not get too involved with the artwork, I have been setting a programming schedule each week to make sure the game itself gets equal time.  This usually means setting a goal of what the game should show the family each week.  For example, this week was placing towers on the level map.  It sounds easy, but I had to create the level map, confirm scale, lighting, etc.  Once I have the weekly goal performing correctly, I show off the parts to the family.   I then go back and clean up the code and refactor it to make the project more modular.
    Like anything that you are doing for the first time, it helps to be flexible.  I have been studying as fast as I can, but the overall schedule is pretty loose right now.   This means I really don't know what month I will be targeting for delivery, but am hoping to have something ready in the next 3-5 months.    If I do my job right, I should be able to build additional games of this genre a lot quicker in the future.   We will see.

Tuesday, March 18, 2014

Rebecca: Death and Taxes

When Ben decided to start his own company, we thought he just needed to hang his shingle and start  attracting customers, who purchases goods, that pay the bills...ahh, life is good.  Actually, the very first step is obtaining a business license.  Although it is a relatively simple process in Washington state, it has many implications.  What is the nature of the business (retail, consulting, manufacturing, farming, etc.), how is the business owned (LLC, partnership, corporation, etc.), and many other questions that Ben and I puzzled over.  The answers are important primarily for tax purposes.  In Washington, the business classification determines the tax rate for revenue; and it may affect how you declare your income for federal tax purposes.  The IRS.

A few months after starting the business, we finally contacted a CPA to help us understand taxes.  ADVICE:  Hire an accountant BEFORE starting your business.  The IRS does not like do-overs.  It is a process to change your business classification.

Our CPA helped us to understand the tax implications of different business structures(LLC or sole proprietor, or many other options).  There is no right answer, but it is important to make the choice with some understanding of the tax code.  Honestly, I still find the tax part very confusing and intimidating.  Because of this, the accountant completes our taxes.  She explains what expenses are allowable, what receipts I need to retain, how the business affects our personal tax liability, and how to stay compliant with a voluminous tax code.

While the business is still in the "struggling" phase and revenue is limited, paying a CPA is well worth it.  If one decides to complete their own taxes, I believe it is still valuable to get some professional tax advice before hanging the shingle.  As Benjamin Franklin said, " this world nothing can be said to be certain, except death and taxes."

Tuesday, March 4, 2014

Map Building for Fun and Profit

  Last weekend I decided to spend some time with the excellent GNU Image Manipulation Program (GIMP) program for doing some image manipulation and design work.  Specifically, I needed to create a good map overview for the next game we are planning.  The map is to be used as the background for the levels screen.   The user is progressing from location to location, where each location is a new level.  Now I could have just hand-drawn a map like those in the Tolkien books, but I wanted a more realistic look.  Hey, its the details that can make something interesting.  
  I have known about GIMP for a long time, as it is free alternative to such programs like Adobe Illustrator and Photoshop.   I have used it whenever MS Paint or Art Text could not get the job done.  I don't use it often due to my inexperience with the tool.  Once I strayed off the simple path and started playing with the various options in GIMP, I would get frustrated and shut it down.  It was a matter of getting familiar enough with the tool to make it useful more often.  I used this map project to build up those skills a little more.   I also ran through some of the tutorials at the Cartographer's Guild, which really helped me a lot to understand how GIMP can be used to create nice maps.  

Original Map Drawing

GIMP Designed Map
  I am not 100% happy with the results, but now understand the layers used to create the look a lot better.  The map is also needs additional features like rivers, roads, and cities.  I imagine that a Blender 3D rendered image could make a great backdrop for the mountains and some of the more detailed geography.  Then I could use GIMP to enhance the look, at more shades and colors.  Maybe I will try this out next weekend.  

Tuesday, February 18, 2014

Rebecca: Money to burn

We do not have money to burn.  And it does not grow on trees planted in our yard.  My children, however, act like it is plentiful and renewable.  One reason that I pushed for Family Bank (iPhone app) is to track each child's deposits (earnings from chores or gifts from family) and expenses (toys, candy, iTunes).  

In the past, we had lots of money mishaps.  Sometimes, they handed the money to a "responsible" parent.   I usually placed the money in an envelope, which we never had handy when the child found the perfect toy at the store.  Since Ben and I never remembered the amounts in the envelope, we relied on the child's memory.  They always swore that they had enough money, but that often was not the case (funny, how they forget money spent but not money owed).  

Many times, money was lost.  Not huge amounts, but a dollar or two left at school, lost in their room, or allegedly stolen by a sibling.  When money went missing, if realized, the affected child would share his/her loss with the entire family.  Listening to crying and blaming of thieves made me want to take all their money and burn it.  

With Family Bank, I deposit their earnings and gifts into their virtual accounts (I just add the money to my wallet).  I act as the bank.  When we are at the store, I look on my phone and check their account.  I know if they have enough money for that "must have" toy or candy bar.  If they do, I just deduct the amount from their account (I pay for the items and then deduct from the appropriate account).  

Since my children rarely want to share money with each other, each child has his/her own account.  Attached is a screen shot.

Yes, one of my children received $70 as a gift.  I wanted to charge a handling fee.  How much money does an elementary school kid need?  I think he realized that I was eyeing his money because he immediately spent $70 at the on-line Lego store.  

Disclaimer:  There were a few times that I "borrowed" money from the envelopes to feed my Starbucks habit.  It is not shown on the screen shot, but each transaction has an explanation i.e. -$70.00 at Lego Store.  This feature has kept me honest.  

Mid-Winter Break

    Personal Note - This week is the kids week off for "Mid-Winter" break.  It is not Spring Break.  They still get this time off too.  I swear we did not have so many vacation days when I went to school, but it could just be rosy memories.  It is good to be a kid now a days, but can be hard for working parents to handle the kids at home.   We have the benefit of me being here during the day, but it certainly crimps my style when I want to program.  On the other hand, the kids will never be this age again.  I should embrace the week and enjoy the extra time with my family.  Even better, I get some extra company on the daily dog walks.
    So not much will be accomplished for the company this week, but I am going to try and steal an hour or so daily to experiment with Blender (3D) and Sprite Kit (Game Building).  I just need to pick smaller tasks that can be finished in a partial day.  Otherwise, I will just jot down ideas and thoughts in my notebook to be pursued next week when I have more consistent time to follow up.
    So it is a weird week for programming, but a break in work should be cherished, not despised.   I choose to embrace the weird and enjoy this week with the family.
   You will get your time, Computer.  You just have to wait a bit.

Friday, February 14, 2014

The Heartbeat of Me

  I don't normally like to call out the fact that I have a wonderful, loving, and supportive wife.  If you have read her blog entries, it would probably come to the same conclusion.  I prefer to concentrate on the company and keep the other personal items out of the blog.  Our family life is safely in her domain and I welcome her to it.   I entrusted her with my heart a long time ago and the decision was the best of my life.
   So on this Hallmark day of declaring your love for your significant other, I want to say:
Thank you, Rebecca.  Without you, I would not have accomplished so much or aspired for so much more.  
  I Love You, Rebecca.

Geek Side Note:  Did you see the 3D heart, honey?  I made that for you!

Wednesday, February 12, 2014

Lost in Training

Iced Z
    "I've have lost my mojo."  - Austin Powers

    Lately, this quote runs through my head a lot.  I have been mentally spinning my wheels on the game design for a number of reasons.  One of those reasons is that I have been really cramming a lot of new knowledge into my overstuffed, books lying around, half-done experiments, wizard's attic of a mind.   "Don't mind the crow.  He always sounds hungry."  I like to think of myself as more of an eccentric wizard from an old Excalibur film, but most likely I am more kook than cook when it comes to creating things.  I usually have a ton of different ideas banging around in my head and just pull out a few to start turning them into a product.  This past week it feels like there are too many ideas and ways to implement those ideas to just focus on a few.  Nothing feels right yet and time is running out.
   Adding to this issue, and probably a major contributor, is my extra development training with 3D graphics and the SpriteKit API.   The 3D program, Blender, is very complex and oddly compelling to me.   When I have a spare moment, I like to crack open the program and tinker with a new 3D modeling task.  Usually with a tutorial video playing on the other monitor because I would never figure these things out by experimentation alone.  It helps to have an expert guide you through the process the first few times.  It would also help to have a bit more talent in the graphics area, but we work with what we have sometimes.  "Oh be quiet, Crow.  I am trying to write here."  Anyway, this takes up time and diverts my brain more than I would like.  I can't use the modeling at the moment, but does seem like there is something there...
   Where was I?  Oh yeah.  Distractions.   Along with the 3D modeling, a book about Sprite Kit that I have been waiting to be published finally arrived last week.  IOS Games By Tutorials has been pretty engaging and I have learned a few things and filled in some gaps in others.   The latest chapters have covered physics, level design, and combining actions to make interesting animations, sounds and effects.  It is a good book and I recommend it highly to those of you that just would like to tinker at building games.  I am half-way through the book and still picking up great tips on building a quality game that is fun and maintainable.  Unfortunately, it is easier to just work on one more chapter than to go back to my actual game development.  Given that we are approaching the middle of the February, I really should put the book down and finish the latest game App.
   Which brings me to the crux of my problem.  Every new technique or programming tip could potentially move my game ideas in a new direction.   Usually this is a good direction.  I have discovered better ways to handle level design and the way the game objects behave on the screen.  Other times, it is just reinforcing my knowledge on the subject or verifying something I had discovered through my earlier experiments.  In the end, it brings a lot of extra thoughts to my game idea and starts the wheels spinning again.   "Yes Crow, I was getting to that."  The worse part is, the more I train, the less I produce on my own product.  This adds to the guilty feeling that I am shirking my work.  Even though I have been training and studying a lot lately.
    I probably just need to pull back, look at the big picture, and pick a route to travel for now.  On the other hand, the next few chapters cover Tile Maps which could be really useful for a slightly different game.  
   "Yes, yes Crow.  I am ready to get back to work."


Friday, February 7, 2014

Rebecca: Random Acts of Kindness

It has been a hectic week or so.  I left last Wednesday for a business trip.  While I was away, Ben discovered a wet area in our home office.  After a few days of stress and 2 very nice plumbers, the cause of the wet area was found and fixed.  Over the weekend, we had guests.  Since we live in the  Seattle area, we got the Seahawk fever and cheered for our awesome home team.

As I started a new work week, I was already dragging from water leaks, house guests, and Seahawk mania.  And then...I caught the cold that everyone has been sharing (thanks to my daughter).  I have spent the week wallowing in self-pity, complaining about too little time and energy to do all that needs to be done, and giving myself lots of excuses for being lazy.

Early this morning (5:30am), I reluctantly and grudgingly headed out for a business appointment.  Needing caffeine, I stopped at Starbucks (actually drive-thru).  I got an extra special treat.  The car ahead of me paid for my coffee...a random act of kindness.  Wow, what a wake-up call to stop and be thankful.  Thankful that Starbucks has drive-thru, thankful that Seahawks won, thankful that we had wonderful family visiting over the weekend, thankful that Ben handled the plumbing hiccup, thankful that I was feeling better, and thankful for the kindness of a stranger.