Thursday, August 8, 2013

Actual device testing

Well, it took me long enough, but I've finally managed to unlock my phone for developing and deploy the game to it (How hard can it be, you ask? pretty damn hard. It involves about 17 different websites each telling you to do something completely irrelevant to what the other sites have to say. It's a good opportunity to say thank you to a friend who helped a lot with it, so Amir - thanks). I guess that anyone who ever developed for smartphones could have told me this some time ago, the user experience on the actual device is completely different from the one you get on the simulator.
After messing around with it for about half hour here are my conclusions about what needs to be fixed ASAP and what is good to go:

  • The arrows are two small and uncomfortable. They must go! Instead I'm going to treat each touch (except for a touch on the game object) as a direction. Meaning - each touch on the screen to the right of the player will be a command to move right.
  • The up/jump arrow is too far away and is uncomfortable. To the trash bin, as well! The replacement will be a vertical swipe gesture from the bottom up.
  • The sliding panels are cool.
  • The world size is too small, even for a tutorial stage. An average player will complete it in less than a minute.
Having said that, it seems that the only positive thing I already have is the sliding panels. And it's a good thing too, because I've added another sliding panel for the more "general" actions such as: pause, resume, restart and exit.
So far I've implemented the restart and the exit methods and that's what it looks like:
The general action panel is a top priority

Similar to the weapon selection, this panel will pause the game until it is hidden or an action button is touched. This panel, however, has a higher priority so if it is open at the same time as the weapon selection panel, the player will not be able to switch weapons until he hides the "general" action panel.

For the next time, I hope to fix all the mentioned above features and set a parameter that will activate the general actions panel by touching the "back" button. 
I can't say how long it's going to be since the time I have to work on the game is minimal, but mark my words, a day will come and this game will find its way to some game store.

Friday, August 2, 2013

Weapons and refactoring

Game play

Weapons! Every game needs a couple of these.
Having said this, here's the problem - where the hell am I suppose to put them?
If we are talking about a PC platform, or better yet, console platform - there's no problem. Lots of screen space and multiple controls make it easy to display all existing weapons and select one for the divine task of killing some creature\character\object as part of a task or just because you can.
That is most definitely not the case when it comes to smartphone games. With very little screen space and most limited control options, there is no convenient way to display the weapons to the player without blocking some of the game view. So, what do we do now? Well, after some research i decided to go with one of the most common solutions to this kind of problems: sliding panel.
So, now the game have a weapon selection system (the technical part will follow) with an ugly looking sliding panel.
Weapon selection sliding panel
as you can see in the image above, the player (still only a green square) now have 2 weapons he can select from by simply sliding his finger from the top of the screen (in the horizontal position) a bit down and taping the weapon of his choice. He can also slide the panel back up, in case he changed his mind.
It's important to say that currently, I've decided that the weapon selection will pause the game. I'll decide whether to keep it this way or let the game continue later on (when I'll have a nice stage to practice).
Another point worth mentioning is that the shotgun in the image is only a placeholder and will not take place in the game.

Refactoring

According to Wiki, refactoring is "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior". What it doesn't said is that it's a great deal of messing around, deleting code, removing code from one place and adding it to some other class while praying to the great Flying Spaghetti Monster that this change won't ruin everything.
And why am I putting the refactoring and weapons in the same post? Because that's what I had to do in order to make the weapon selection system.
In the beginning, it seems like a good and logical idea for the player to hold all of his weapons (that he collected during the game). However, in order to implement the selection system as an independent being, the weapons had to go somewhere else (unless I wanted to pass the player object around pretty much everything and set his weapon collection as public field for everyone to use).
To make a long story short, I'll just say that it's a good idea to spend an extra day or two on creating a good design document - it can save you a ton of time later on.
The panel itself was easy enough to implement (on the technical view). In fact, it was so easy that I think I'll make the game controllers (pause, resume, exit and start over) in a similar way. (Only with the panel on the left)

More weapons

Back to the weapons. Two more questions remain open on this subject:
a. How and when does the player get a weapon?
b. What weapons should I make and how they'll affect the game objects?

Answering the first question is quite easy. What I had in mind is that the player will receive weapons upon an ending of specific stages or quests. For example, let say that the player has to convince an alien (the ones from outer space, not from another country) to join his cause. If he succeeds, he'll get an anti-gravity gun or something like that.
The second question is much more difficult. What I had in mind so far is: Axe, Anti-gravity gun (to lift up some of the blocking objects), Crossbow (because it's one of the coolest weapons ever) and a frying pan. (If he kills a cow with it, he'll get more health point because the meat will be tastier).
If you have any ideas, feel free to comment on the post and suggest them.
I'll also had a couple of "power ups" in mind such as Anti-depression pills (will lower the guilt) and a "Crazy pills" (don't have a better name yet) that will allow him to kill everything without guilt for some time, but then he'll feel more guilty for each action.

Tuesday, July 30, 2013

Let's hit the road

Let the game begin

Some time ago, I've decided to develop a simple game and one of the first things I've been advised to do was to open a development blog for the game. Since I trust the judgment of the advisor - here it is.
In this blog I'll try to describe the game, the developing process, add a couple of screenshots and try to figure out what to do next.

Lets give it a try

The game's name is 'Pita'. Why? I'll get there soon, but first, some technical details:
The game is going to be run on a smartphone. A Windows 8 phone, to be more precise. Why Windows phone? Well, because it's the 3rd (and constantly growing) most popular OS for smartphones, because it's easy enough to develop to, since I have some experience with XNA and because I have a Windows phone.

The mechanics

The core machanics of the game are basically Super Mario-ish, easy to understand and control, old school mechanics. (there are some twists, but we'll get to that).
You can move around in 2D world, jump and attack things. All (or at least vast majority of the) game objects can be "activated" (still looking for a better word for it). a touch on the object should pop up a menu of things you can do to it. One of the options will always be 'Attack'. The result of this action depends on the weapon in hand at that moment.
The player has 3 major qualities that most of the time collide (if you get +1 to some quality, you'll most likely to get -1 to some other quality) and it's your job to maximize them. (remember the twists I mentioned? that's one of them)

The storyline

The player is a PETA(hence the name. I know it's spelled with an E, but I don't want to get a law suit)\Green Peace\WWF(the animals - not the wrestling)\Choose-Your-Green-Organization activist. His whole life purpose is to organize demonstrations, that's why one of his major qualities is persuasion. He can be more persuasive if he has some good old wooden demonstration signs. Since he starts the game with an axe (makes perfect sense), he can chop down some trees (choosing 'Attack' from the menu). Unfortunately, this causes him some heavy guilt (another major quality). It's important to know that once he's overwhelmed with guilt - he commits suicide.
The third major quality is health. How do you increase health? By eating some delicious meat (gained by killing some cows, pigs etc.).  Unfortunately, this also causes him some heavy guilt. So how can he ease his guilt? Simply by doing what he does the best - hugging some trees and animals. However, once a tree or animal is hugged, he cannot kill\chop it.

The development

This is what i have so far:
Fig. 1

Fig. 2
In Fig. 1 we can see the placeholder for the player (PD square in the middle), the control buttons(right, left and up arrows in the corners of the screen), a list of available weapons (the big axe on the left), the selected weapon (the small axe near the player), a tree and the bars representing the major qualities.
In Fig. 2,, we can see pretty much the same (with different tree) and the open popup menu, displaying the available options.

on the engineering side of the game I have the control system and the stage management system. (and some interfaces with a cool visitor pattern)

TODO
for the next post, I want to add a weapon management system and on the UI side - a sliding deck with the weapons

Hope to see you soon