Thursday, December 31, 2015

New Minigame for Very Bunny Haha called Plong

This is what I was working on late last night and till about 1:30am this morning. Hey when development flows ya gotta stay the course and create, right!

Ok, so the name might likely change. Though I need something with an Arkanoid, Pong or Breaout kinda feel. For now this name is fine I reckon.

The inspiration for writing this minigame came from playing a lot of Ping Pong with my family this last week. We are looking after a table and it is parked in the garage.... well after cleaning and tidying up a bunch there was enough room to open up the table and we have been playing every day ever since. A lot of fun for sure and it also got me wanting to finish up a minigame design I had for a Pong themed game.

Here it is finished, balanced and done. Today I put in the SFX and also the pink effect you see in the middle of the screen (Ball spawning effect).

Next up is the Use button in the Inventory to move along the development of the game for Tablets. Meanwhile I am working hard on the design for the 'Reputation', which tonight my daughter gave me several good opinions on. I might be ready to move that forwards as well soon.

Good Night, and Happy New Year everyone.

Da Voodoochief

Tuesday, December 29, 2015

Tablet version of VBHH coming along.. and then

The tablet version (touch control) version of Very Bunny Haha has been coming along very nicely of late. I have fixed several bugs and made it so some things are much easier now, such as the last fix to make it so the 'USE' functionality is easier.

So I download to my Kindle last night and start playing the game properly, working my way through the introduction and then getting to the part where I pick up my first quest from the Mayor. This is all going swimmingly. So I head out of his Mansion and into the village so I can introduce myself to a few of the important denizens. this is all part of the introductory Quest line. I make sure the quest is in my Log and also that I have the Quest item, which is a Note for Aaron.

I head off to Aaron and open up my inventory to use his Note on him when I realize...

DOH! I have not written any code to allow me to select the Note in the inventory and Use it with a touch interface. Hahaha, it works with a keyboard or joystick, but not touch (well not yet).

Above you can see the image of the inventory screen:
(A) - This is an Axe, but more importantly you can see that it is the highlighted item. The horizontal highlight along with the individual highlight makes it shine. When an Item is selected this screen also shows other relevant info, such as it's name.
(b) - These arrows on both the left and right sides of the Item lines light up if there are more items to scroll to. Again, this is not currently touch sensitive.
(c) - These are the instructions I display, and as you can tell they are for keyboard only. I am not sure quite what to do here... a small re-design might be in this sections future...

What I need is to be able to highlight Items using touch, and then also allow a touch to Use them.

Looks like I have some more work to do, but then I should be able to play the actual game a lot more.

Laters
Da Voodoochief

Sunday, December 27, 2015

Fixed stuff, broke stuff

BAH!

Been one of those days. I have managed to fix a few bugs, add a few smaller features etc

I crushed a bug that has been haunting me for a little while. A bug that mostly showed up on the tablets. This of course made it harder to find and fix. I ended up getting this same bug (using the scene to scene door would get stuck half way through transit) in my PC game. Once I got it to happen I tried it several more times till I could dupe it every time. This allowed me to find a fix. Which was pretty easy to be honest.

The issue I now have is that my double tap that I recently added to the game to make it so I can use stuff, doorways, quest giver etc on the Tablets. Well Double Tap works great if the screen is not scrolling all over the place. Now I have the continuous touch move in both the 2D game and the 3D game (recent awesome addition), the screen keeps moving every time you tap the screen. This means I now have a real hard time achieving a double tap. GAH!

So I am going to try and fix this is a very small dead zone for touch to move (click to move is the same thing) around the players Rabbit. I cannot make this dead zone too big though otherwise I will lose some minor movement control.

Well better get it solved while I watch the Vikings and Giants battle it out.

G'night
Da Voodoochief

Friday, December 25, 2015

Fixing bugs and Stuff

I am not creating much at the moment for Very Bunny Haha. Like adding content etc.

What I am achieving though is a to stabilize the game in various ways. Solving bugs and finding even more to solve. Pretty cool even if the game is not growing at the moment.

I have added a bit more data saving as well which is always handy, cos ya never quite sure that you have ALL the data saved.

Fixed the player going awol through collision, and stopped the player vibrating against collision edges.

Fixed the player continuously walking off through collision and off scene when a menu such as the Inventory was pulled up.

Fixed some bugs with touch input not quite functioning properly on all buttons. It was a simple improper linking to the wrong functions.

Fixed some detection bugs that were easy to fix in the editor.

Now got to set up more in the South Village to make it more complete. Also going to do some more Quest additions etc. Time to get more stuff into the game after all. Though if I find more bugs, I reckon I shall crush them first.

G'night
Da Voodoochief

Wednesday, December 23, 2015

Vibrating Collision, and falling through collision in Unity

Big title huh! And nope, I have no pictures this time...

Let me describe my problem, or two problems that are very much related. Then I'll tell ya how I solved them.

Player Collision:
In the 3D scenes I move the Rabbit (player) around by altering the Transforms position in the X and Y. I place Physics 2D edge colliders all over the scene to stop the player going through houses and off the edges of the scenes playable area. The way the collisions work is that the edges push back the box that the Rabbit has at the bottom of it's image. Thus preventing the Rabbit from crossing these edges.

1. When moving the player against one of these solid areas you can witness a vibrating of the Rabbit. This is due to you pushing (moving) into the collision wall and the wall pushing back.

2. When pushing along one of these collision edges you can some times fall through them. Occasionally there is a frame rate hiccup and you end up in the middle of the Fountain or House etc... pretty bad as ya canna get out.

My Solution:
I referred to this page in the Unity Docs
http://docs.unity3d.com/Manual/ExecutionOrder.html

That shows not just the execution order in Unity, but also all of the different stages you can plug into. This is important as I have done all my movement code inside the Update() function. I move the Rabbit multiplied by the Tine.deltaTime() and this means that depending on how much time has passed to how much the actual Rabbit moves this frame. This has the effect that you move into the collision by semi-random amounts. If the deltatime is a bit much then you can jump into the edge collision and possibly go far enough in that you get forced to the other side.

Unity has some extra Physics functionality, namely the FixedUpdate() function. So I placed my actual movement code into this function and because of the nature of how it works, I now get pushed back in a more controlled way. This removes the bouncing effect and also with the smaller movement increments it means you cannot jump past the collision. I do the actual button pressed test in the usual Update function, and then I only move in the FixedUpdate function, and all I did was to remove the multiply by delatTime.

Hope this you some ideas on solving this issue if you have it.

Laters
Da Voodoochief

Tuesday, December 22, 2015

Jumping in 2D with Touch Control

Now I have the game working on the Kindle in a much more controllable fashion for the 3D scenes. I started to play the game a bit more to see what's next on the 'need to fix' list.

First up was the fact that the quest buttons were not only too small, but also the click action was not actually set up (it used to be before I moved the GameObject buttons). This was easy enough as I re-hooked them up in a few minutes. Only when testing it I realized just how hard the buttons were to touch on my Kindle. So I enlarged the buttons by doubling the vertical size and now they are much more touchable. YAY!

Second was the more interesting job in several ways. I discovered when trying to play the 2D screens that the control from the 3D scenes just wasn't really very useful. I am using a Click 2 Move in the 3D scenes, so wherever you clicked the game remembers that and moves your Rabbit to that location.
 To fix this I simply made it a live touching control. So it only moves the Rabbit when the screen is being touched. This was a great move and allowed me to play the Gem Cave game scene with some good control.

Next up was the fact that my 2D scenes need you to be able to jump, and jump with some control.

At first I considered doing a double click to make a jump. Only this wasn't working very well and so I went with my second idea. This is denoted in the picture above. I made it so a relative position will control if the player jumps or not. In this case I have drawn arrows to show what happens in the quadrants that the mouse can be in. So once the vertical distance is above the horizontal distance, then you jump, but also only if you are far enough away from the Rabbit to make it work. It was important to have this dead zone for the jumping, as it was a massive jump fest when trying to control the player.

Now onto the next problem, whatever that is :)

G'night
Da Voodoochief

Monday, December 21, 2015

Touchcount on Unity

I am confused. This seems to be a feature, yet I do not see any caveats listed as to what it does and doesn't do. For example what does it not work on, what are its known bugs etc.

I mentioned in previous posts that I got the game to run on my Kindle Fire. Well I think that the best way to present the game to people would be on a nice tablet. I am even looking around to a good deal on a 10 inch and larger Android tablet, so far I am still looking. This means that I have some immediate work to do... like getting the interface fully functional on the tablets.

As I have already done version 2 of the click to move control, I figured it was time to get the 'USE' functionality working. Using stuff in the game is the second most important function after movement and allows you to interact with Doors and also NPCs (to obtain quests etc). So I want to use a Double Tap method. Sounded easy and I was going to write my own when I realized that literally thousands of games must use this, so the functionality should be standard in Unity 3d.

Well they do have 'Input.touchCount', which doesn't appear to work for me on the PC using the mouse. Why a Mouse click would be different to a touch has me a bit baffled. However I implemented the touchCount code, even though I found many questions about this feature NOT working on Android. Then when I ran the game it simply worked.

if (Input.touchCount == 2) {
  HandleUseTouchingItem();
}

It worked!. Why is there all this info on the Web about this feature not working I wonder?

If you need this functionality I would recommend you try this as it is fast and easy to try before you worry about rolling your own.

Happy Holidays,
Da Voodoochief

Monday, December 14, 2015

Lazy Ranch Hand Character

In this image above you can see one of the newest Characters to join us in Very Bunny Haha land.
He is a Ranch Hand and he has an Ecky Thump hat. An old joke that comes from my youth when I used to watch a comedy program called 'The Goodies'. They did a few skits where they wore these ridiculously over sized flat caps and ran around with large Black puddings to smack people with. Perhaps this whole bit is a bit English hehe!

Back to the image above.... He is wearing a colored hat that is actually Grey, and this allows me to recolor the hat for different Ranch Hands. The last thing about him above is that he is in his basic position. This means the positions we stitch the Rabbits into before animating them. This also tends to be my actual idle for them as well.

As it happens this particular Ranch Hand is being a bit lazy. There is a quest for you to go and find him, and when you do you can see he is taking a quick nap. Hard work Ranching is ya know. So I animated him to make it look like he is snoring. So far this has been my favorite animation.

We are thinking of adding some eye animation (which will make him look more like he is asleep). Then I am thinking of adding a nice 'zzzz z Z Z ZZ' effect floating up from him. I think this dude is an excellent character and When you meet his friends who discuss the silliest stuff, I think you will enjoy them as well.

G'night,
Da Voodoochief

Saturday, December 12, 2015

Credits Menu now in

I am sure this seems ridiculously early in the development of a game to put in the credits screen. However I have a few reasons to do this:-

1. Everyone that works on a game should get credit, and it is too easy to forget someone when ya finally get around to doing credits at the end of the games dev cycle. This way I add them as people work on the game.
2. The menu needed doing as it moves other options around on the Main Menu.
3. I am brain dead... work has dissolved my brain this last week and so I do not have any great technical power left, so working on something obvious and small is good as I am still making progress with the game. Moving it nearer to a complete product.

As you can see there are only currently two main creators attached to this product, yet a week or two ago I put in some minigame music from Kevin Macleod. So BAM! I get to add an extra credit.

Ok, tired again now, going to bed.

G'night
Da Voodoochief

Friday, December 11, 2015

Windows Phone Pub Center

I have recently been getting emails from Microsoft telling me that Pub Center is going away and I should link it to my Dev Center account. Heck I didn't know I had a Dev Center account?!!

Anyway it appears that Microsoft already knew my connections and linked them for me anyway, which was really nice. Well I have not visited the Pub Center site in probably 18 months or more as I am not receiving any money from Ads any more. Well not quite true, I have made 7 cents this year to date.... yeah, you read that right.

The other things that this tells me is with a nice Graph of my downloads for the last 12 months, and I thought I would share this with you all.

As you can see these games, which I published a number of years ago have managed a poultry couple of hundred downloads in the last year. Now these games are all free to download... so it isn't like I have made any money.. Sad really.

Now back to my regular day job (making successful games), and also Very Bunny Haha, which will change these freelance fortunes.

G'night
Da Voodoochief

Tuesday, December 8, 2015

Minigame Base class

I have already written two minigames for Very Bunny Haha as I have documented in previous Blog posts. Well I knew when writing the first one I would be writing Many many  more. This meant I approached the coding task in a very certain way, always being mindful of where I placed particular parts of the actual minigame code and variables, and trying to keep them separated from what I would call common code.

Common code:
This is code that controls the stuff that all the minigames have in common (duh!). Such as the countdown timer, the Game Over control, the timer and of course the Instructions overlay.

So when I wrote the second Minigame I took the first ones code and changed the actual games code, but leaving he common code the same. Well actually there were a few modifications I had to make but that was expected. Once I had two minigames working I knew the common code was ready to be separated from the games code.

It took me a surprisingly small amount of time to separate the base class from the minigames code. In fact about 40 minutes saw me first do the 'WaterBall Minigame', and about 5 minutes for 'Zoomy the Porcupine' game.

Now writing the next Minigame will go faster smoother and I can easily add more common code and functionality to the system.

I highly recommend this approach,

G'night
Da Voodoochief

Sunday, December 6, 2015

To many in Unity Tags List

This Image shows one of my new scenes, Field Farm, with the new baby cow etc. This is the view form the Scene in the Editor, so the objects in the scene are not currently scaled for the pseudo 3D look. That is all done at runtime in some code.

What this picture also shows on the right is the Unity Tags list. This can be very useful for naming objects and allowing you to test that name in the game for various effects. Now of course they won't be fast as it will be string comparisons.... but I digress.

Since I started using Unity I have tended to use the Tags for all sorts of naming tasks. One of those tasks was to name my 'Doorways' from one Scene to another. Names such as 'Door2NexusFrom Village' is one example. But as the game has gotten bigger and bigger and I have added more and more scenes (currently at 21), I have found that I have created approximately 40 Tags. I will be honest and say that this was bad. In fact I do not recommend this course at all. Experience now tells me that Tags should be used for multiple Objects that could be named differently, but use similar properties or some such.

Having 40 tags showed up a weakness in the Editor as well. Once you go over a certain number of them you have to scroll (clicking a small downward arrow) to get to the next one and so on. There is no hold and see them flash by, nope, you have to click al the way to the one you want. I have now removed the Doorway names from the Tags as the Image above shows. Instead I have simply named my Doors with the old tagged name. This works great and actually removed a step for me to get the doors to work in the game.

So when using tags, be aware what you want them for because if you end up with a large number of them, it is Very likely there is a simpler more easily handled way to do it.

G'night
Da Voodoochief

Friday, December 4, 2015

Skyline, or not?

Here is an image of the Skyline I have been working on. A few days ago when discussing the game with Leilani and figuring out what we need to complete the Chapter #1 section., we came up with several new areas we needed to be able to place characters into.

One of those areas was the extension to our village. the main village we have is full, full of buildings and also full of characters already. However we need a few more Village type professions, such as a Baker. As we cannot fit them into the existing Village area, we decided to come up with another area of the Village for you to explore. We also decided that this extra area should be above or below our existing Village. So now we have the VillageSouth scene. It is of course a work in progress at this point.

Another idea that was discussed for this area was to have a Skyline or Silhouette of the North village area showing up in our VillageSouth. This image above is where we are at currently with it. Personally I do not think it is working... perhaps I need more art expertise. Of course I will do some research this weekend. I think looking at photo's of this same thing should help me make something better than what I have at the moment.

Ok, time for bed... been a tough afternoon after having a filling and my face staying numb for 5 plus hours.

g'night
Da Voodoochief