Finishing Touches

Finished up the last layout today and after a little fiddling figured out how to change the display name of my app on android devices. I also figured out how to change the app icon, it is similar to how you would change the background but the image files are stored in different folders for different resolutions. Currently all the resolutions are using the same image but it shouldn’t be that difficult to change the size of the images for the different resolutions as it simply wants an image file (currently using a PNG file but I don’t see why other formats wouldn’t work).

The next couple of days I will be working on my website, polishing up old project descriptions and posting my app.

Redesigning the Layout

After reviewing my app with a tester I came to the decision to change the background to a simple black color instead of the changing mana symbol. This allowed me to move some elements around a little and double the size of most of the buttons to allow for easier usage.

Slight problem and temporary solution

I finished up making all the portrait and landscape layouts for normal, large, and extra large screens when I encountered a problem. If when you are running  the app you switch between landscape and portrait the app resets your data to the defaults (each player at 20 life, red background, background and dice buttons hidden). this is unacceptable and until I can find a way around this problem I have locked the app to portrait view.

Layouts

I have the functionality down for my Life counter app. Now I am focusing on the various layouts for different devices. Setting it up is simple you make a new Directory in the Res folder and name it layout-<screensize>-<pixledensity>-<portrait or landscape> and a few other details. When android loads up your app it checks the current settings and loads the closest match in your Res file.

Update on Updating Older Projects

I have gotten Zombie Tag to a point I am happy with and have updated the download link on my website. Additionally I made a small tweak to my Top Down Shooter game and have also put it up. Link to the page: https://justinbret.com/GameProjects.htm

I am now working on some finishing touches to my Magic Life Counter android app. The two things I am working on are making it so that changing between the life counter activity and the dice roller activity does not reset the life counters. And adding some basic graphics to the App (backgrounds mostly).

Reworking Old Projects

Along with reworking the functionality of the Zombie Tag game I am also streamlining the project folder to contain ONLY the Zombie Tag game. Let me explain, originally I created Project Playground as a way for me to experiment with ideas and the A* Pathfinding system. In this project I made a game of tag and dodge ball, then I made zombie tag. Zombie tag is the one I took the farthest but it never got its own unity project folder, now I made a copy of the original and am removing the non-Zombie Tag elements. This also involves revamping the score system and redesigning the main menu.

Polishing Up Old Projects

I have decided to polish up some of my projects so that I can put them up on my web site in a presentable state.  I have started with my Zombie Tag game. What I hoped to do was to change the behavior of the zombies so that they would no longer clip through walls. Originally I was going to use AI Follow replacing AI Path to accomplish this but this had the side effect of making the zombies not reliably collide with the player and the “humans”. I believe I have fixed the problem with the AI Path version of the game and will be looking in to the  differences between AI Path and AI Follow.

Additionally I will be changing the High Score system so that it is based on time survived + points for acquiring drops from the level. the time limit will also be removed so that the zombies will be the only way to lose the level. Finally I am considering spawning in additional zombies beyond the ones created by zombies contacting “Humans”.

I Fixed It!

Not so much fixed as I played with a new script and got what I wanted. I was looking at different scripts trying to find a script for an entirely different problem and found one called AI Follow. The script I had been using for archer movement was AI Path and it had some problems (see previous entries). But AI Follow seems to have none of those problems and does pretty much EXACTLY what I want and even gives me a few new features to play with. Best of all I  don’t need to give the object a rigged body to make it not clip through walls! This means it can stop on a dime and won’t have weird momentum problems when turning a corner.

Equally as important as finding that new script was figuring out how to get the player to look at the mouse pointer. One short internet search and I found exactly what I needed, just had to fiddle with it a bit to get the variable declarations in the right place and it works great. Only problem I see with this is that it gets me no closer to my goal of having both keyboard and mouse controls and controller support. But that is a fairly far off concern for now.

Now that I have three reasonably working enemies my next goals are going to be:

  • procedural level generation
  • projectiles
  • player/enemy health

Stutter Dash Implemented

Archers now follow the player for a predetermined amount of time before holding still for another predetermined time. At first when the archer would be told to stop moving it would drift on the momentum it had gathered. This was simply solved so that when I turned off the AI movement I also set the character’s velocity to Zero.

Adding “Archers” to Dungeons

The idea I was going for was an enemy that followed the player around and periodically shot a projectile. I also wanted the enemy to stop at a specified distance from the player. Unfortunately in my experiments with A* pathfinding I can either have the enemy stop at a specific distance or have the enemy not clip through walls. While I will continue to look for a solution for this problem the short term workaround will be to change the desired behavior to periodically moving before holding stationary and firing.