събота, 1 август 2015 г.

Starting as a game developer - Part 3 (The Release)

It has again been a long time since my previous update. However, this time, I have good news: The game is finally ready and is available on the Google Play Market! So... what happened since the last post? A LOT! First, I lost my motivation for the game and I was really busy with university. Fortunately, my teammate, Teodor, was motivated for both of us. While I wasn't paying attention to the game, he rewrote the entire game in Haxe and Haxeflixel. We also had a talk and changed the design of the game to follow most of the modern puzzle games, without complex graphics, as we didn't have a designer. We changed the name, generated 500 levels and the game was ready for release.

The Release

We weren't expecting much of the game, however, we were enthusiastic about the release. The upload procedure to the Google Play Store is really nice and easy, so I won't spend much time describing actual release settings. We also set up AdMob ads, hoping that we can earn a few dollars on the side.

Now that the game was released, we didn't know what to do. The game was available on the market, but noone knew about it or was expecting it. We quickly told our friends about it and contacted Haxeflixel to include the game in their showcase, which they were happy to do.

Unfortunately, this was not enough. It has been 5 months since the release and the game still has 10 active out of 30-40 downloads, most of which were from our friends. And our AdMob campaign has generated 0$.

The Maintenance

As with every software product, a lot of bugs appear after the release. The same happened to us. After a friend of ours played the game for a while, she found out that a level was impossible to do. We quickly looked at the problem and found out that there was a bug in the level generator script. In 1 hour we fixed the issue and uploaded a fix, as well as some fixes with the performance of the app.

The Conclusion

So what I have learned:

Motivation is one of the most important things when working on a personal project. What went wrong in our project is that we were too busy with other things and there were periods when we didn't spend any time on the game. Not seeing any progress is something that can destroy your motivation. If i was starting this project today, I would definitely dedicate at least 4 hours per week on the game and I would use some kind of issue tracking system, in order to visualize the progress from the beginning. This would have kept my motivation up. Seeing progress and the game evolving, would have pushed me to work on the game even more.

Receiving feedback about this game is really important for us, as we are still learning about the world of game development. Unfortunately, we didn't show the game to anyone before the release and we were not able to get much feedback while we were developing it. I think this is one of our major mistakes. Receiving feedback during the development would have caused us to change our initial idea. It would have improved our game and would have made make it more fun. That is why for our next project, I am planning on finding alpha testers, who will be with us during the development and together we will be able to steer the game in the right direction.

Other mistake with this game is the lack of details. One can easily argue that adding a bit better graphics, some animations and sound would greatly improve the quality of the game and make it more appealing to the players. However, because of the lack of motivation, we didn't spend much time into the details of the game.

Now I am looking forward to my next project and I am going to make sure I am motivated enough about it, before starting working on it.

вторник, 16 септември 2014 г.

Starting as a game developer - Part 2

If you haven't read the first part, have a look at it: Starting as a game developer - Part 1

So here are we again. It wasn't exactly one week from the previous post, but... I hope to start working more regularly in the future. Since the last post, I started the actual development of the game. Also a friend of mine: Teodor Mihov joined me so now we are both going to work on the game. At the end of the post I'll add links to his Github page. And no... he is not my brother, our family names are just the same.

I. The preparation

Before actually starting on writing code, we wanted to get to know Marmalade. It has some really useful tutorials and example projects, which are freely available once you download Marmalade. We ran through the tutorials and we had an idea how to begin. The actual game loop, the input handling techniques, drawing and scene managing techniques were all clearly described both in the examples and in the documentation, which made our lives a lot easier. We also found a few good books on Marmalade, which covered more in-depth topics.

II. The beginning

We created our project, linked it to Github (I'll add a link at the end of the post), and everything was ready for us to begin work. Teodor and I wanted both to work concurrently, so we had to split the tasks in a way that there would be no conflicts once we try to merge. I decided to start on the actual game logic, as I had a clearer idea on the basic game rules. He would start on building the architecture that we would later use to display the game and interact with it.

As I couldn't share my sticky notes with Teodor, we decided to find a website or software that would help us. Fortunately, there was a Reddit topic just about that in /r/gamedev: They introduced Trello.com. It is basically a board in which you can create "sticky notes", you can create groups, add checklists, images, labels, etc. We created 4 columns: Ideas, To Do, Doing, Done. And we assigned each other a different coloured label, so we can set flags who is working on what. And here is how it looks:

Then we started actually writing some code. We are trying to keep it as modular as possible and we are commenting everything, keeping the code clean and tidy. We started on our tasks, but we both got stuck, as we didn't have a main topic for the game.

III. The topic

I think the best way of agreeing on a topic for the game is to brainstorm a lot of ideas and then look at each one in details. That way you actually see if you like the idea or if it sounds boring.

We came up with a lot of ideas some of which including: a gardener collecting flowers, a miner collecting minerals, etc. But we both agreed on one topic: A small medieval village gets burned to the ground by a forest fire and the player's task would be to collect resources from the puzzles to rebuild the village. This way we can include a bit of story in our game, which, I guess, will make it more interesting and fun.

IV. The progress so far...

So far we have created a main menu from which you can start the game and play one predefined puzzle. The game looks like this:

We are no good at drawing and design, so hopefully we will find someone to make it beautiful! Behind this we have created all the little bits nice and tidy: resource manager, scene manager, input handler, puzzle game logic, etc. Now the only major thing that needs to be added is the game story. However, to do this there is one major thing to do: Differentiate between the difficulty of the different puzzles. There are some obvious rules like, if it needs more moves and has the same number of solutions, then it's more difficult. But the problem that I want to research is if two different puzzles with the same number of moves and solutions are of different difficulty. I will cover this in the next post.

This is for now. Stay tuned for more soon.

Here is Teodor's Github page: Github

And here is our game's Github page: Github

събота, 26 юли 2014 г.

Starting as a game developer - part 1

I haven't posted anything to my blog for a long time, as I had a really tough time with my exams. However, everything turned out okay and I'll try to keep up with weekly posts.

I have been passionate about game development since I was a little kid. I was also passionate about playing games, but that's another topic. I really wanted to know how games work from the inside and be able to create my own game. And now that I have finished my 2nd year in university, I have more than 2 years industrial experience and a lot more experience messing around with code and small projects, I think I am ready to start creating my own simple game. I have decided to write a series of posts about it, as I plan to release everything I make about this game freely available and also follow the process of development. This may help me find my own mistakes or maybe someone can suggest a better way of doing something.

I. The idea

I first started with the idea. As a normal game developer I have loads of ideas, most of which are probably not able to be developed by a single person in his life span. Instead of making a RTS or a MMO game, I really wanted to start with something simple. A simple puzzle game came to my mind, that I used to play a long time ago somewhere on the internet. I started messing a little bit with the idea and to write some stuff down. The main part of the game is a table with 7x7 elements. Each element can be one of 4 colours: yellow, blue, green, red. The element in the middle of the table is empty and that's where the player starts. On every step, the player has to choose one of the colours and every element that is of the same colour and is visible from the start position(can be reached by moving on empty spaces) is destroyed. The goal of the game is to destroy a specific number of elements in a specified number of moves. Here is a picture that may help you understand the game:

II. The tech

After I had my idea clear in my head, it was time to choose a way of creating the game. What I wanted is to use C++ and make the game available on PC. Also I was thinking about deploying it to Android and iOS, once it is ready and I have time for that. So I started looking at various technologies that may help me with this.

The most flexible and powerful library to use is OpenGL. It is free, cross-platform and almost every other engine or library is built on top of it. However, this was not my choice. As it gives you the ability to do almost anything, it is a bit difficult to use and you have to write everything on your own. As I am a single person with limited free time, it would take me quite some time to create even the simple game I wanted.

Other libraries that I could use are SFML, Alegro, SDL, etc. They are built on top of OpenGL and simplify a lot of the things that you would want to do (for example just opening a window is a lot easier in SFML, than it is in OpenGL). I chose SFML to go into deeper research. I went through a few tutorials, and I can say that it is easy to use, provides you with the possibility of using the full power of OpenGL, while still simplifying a big part of it. I went through a few tutorials and I was ready to start creating my game. However, I wanted to make sure I was making the right decision, so I continued my research.

My third possibility was to use a game engine. I was a little bit sceptical about this, as I didn't want to just "drag and drop" my game and most of these engines provided limited flexibility. I first took a look at Unity. It is great if you want to target multiple platforms at once, as it does all the transformations for you. It has also a really great support, with constant updates, big community and loads of tutorials. However, there are two things that I didn't like about it: you have to use C# and the price for actually using the non-free version is a lot for a student like me.

So I looked at another engine: Unreal Engine 4. It suited everything I wanted: it uses C++ and you can deploy your game to multiple platforms. It is also cheaper than Unity: $20 per month. The best part is, that it is open-source and you can modify it as much as you like. Also you can keep your copy if you cancel your subscription. The support is good. It does not have a lot of tutorials, but it has a lot of example projects, which you can freely download and have a look around. The community is also really helpful. I bought my license and started messing around and trying to create something. If you want to use Blueprints, which are Unreal Engine's "drag and drop programming language", you can start creating your game without a lot of programming knowledge. But I wanted to use my experience and knowledge and use C++. Well... everything looked easy to do on first sight, however, I didn't felt like writing C++ code: there were problems with the Visual Studio auto-complete, as UE4 is quite big and my laptop was struggling with it (and I have quite powerful laptop), the documentation wasn't very complete for 2D game development and most of the tutorials were for 3D FPS games. And I understand this, as Unreal Engine was designed with FPS games in mind. With the newest version 4.3 (at the time I am writing this) there is a beta plugin called Paper2D, which might make it easier to create 2D games, but still I didn't feel like writing clear C++ code and having the whole power and freedom that the language provides. Also, I managed to break the engine quite a few times and mess up the whole project and had to start from the beginning. I tried contacting the staff and community for one of my bugs and they were really helpful.

After deciding not to use Unity and UE4, I was left with just using a library to help me with the simple stuff and re-invent the wheel with the more advanced stuff. However, I remembered of a framework: Microsoft's Marmalade. It provides a graphic library called IwGx, which is basically a simplified OpenGL library. It allows you to do anything and even to use Cocos2dx or similar libraries. You can then deploy your game to iOS, Android, Windows Mobile, Blackberry and Windows 8. It currently offers a free license and some paid ones, which are a bit expensive for a student, but I can use the free version to start developing the game.

I chose to use Marmalade and I hope I didn't make a mistake, but I'll stick to my decision. However, I'll separate the game logic from the rendering and input handling so that I can later change my mind about the technologies I am using.

III. The plan

Basically this is what my initial plan looks like (sorry for the crappy quality... my phone isn't hi-tech... and I had to remove the ads from the notes):

...and I am still following it. As I don't have experience creating games on my own, it was hard for me to make a more detailed plan. But from my experience working on other projects, I know that it is better to have somewhat of a plan, than not having one at all. I tried to separate the game logic as much as I can from the graphics and interaction logics, which would give me the opporrunity to make later changes to the graphical aspect of the game, without a lot of messing around. I then split the development into small tasks , which I could develop for a day or a week so that I can follow my progress. I was also sure that a lot more tasks will appear throughout the develppment, but I needed something like a start point.

I will dedicate the next posts to the development process and the problems that I face during it.

Part 2

събота, 26 април 2014 г.

Purpose of this blog

So I guess it was high time I created my own blog. First maybe it will be nice to introduce myself. I am currently a second year Computer Science/Software Engineering student at the University of Birmingham. In my first year I achieved very high results. I can say that I've been interested in technology my whole life and mostly with programming. When I was young I had the opportunity to have a really good teacher, who taught me the fundamentals of computer science and programming. This is maybe the reason why I am so interested in technology. I've learned and used a lot of programming languages, which include mainstream languages (Java, C, C++, C#), functional languages (Haskell, OCaml, Pascal), web languages (HTML, CSS, JavaScript, PHP, JQuery) and some others that I can't really classify (DTD, XML). During my time in university I've also learned about Software Engineering techniques, have improved my programming skills and have improved my knowledge about the Computer Science fundamentals.

Why am I doing this and why now? I don't know really. I am not really sure if anyone is going to read my blog or I am going to help someone with the information I post. However, I've noticed that blogs can sometimes be really helpful, as people in the IT sphere usually post about problems they have faced and how they solved them. I have benefited from these kind of posts a lot of times. And as I am currently gaining a lot of knowledge and facing a lot of computer science problems, I can post what my "adventures" were and how I overcame them. At the end, I would be happy if I've helped at least one person with this blog.

Also another reason is that I've currently been invited to work on two projects. One of them is a very big project, which is kind of secret and I cannot share a lot of detailed information about it, however I can share technical information, which I learn during the development. It will involve development using Laravel - a web framework, which looks really good on first sight, but is it really that good? The second project is maybe not really a project. It is just a few jobs that I am getting from time to time to work on as a freelancer coming from the same employer. They involve developing in Android and I've just received another task, which I have no idea what it is written in. I guess it is some kind of web framework, but as there are no comments, I cannot guess what it is. So here is my first lesson for you ladies and gentlemen: "WRITE COMMENTS WITH YOUR CODE!". At first it may seem like a waste of time and space, but after writing some comments and keeping your code clean and tidy, you'll see the benefits from it. Also showing your code to someone else will give them a really nice impression of your programming (and social) skills. It is not necessary to comment all your code, but a little bit of description won't hurt you.

I think that's it for today. How am I going to proceed with the blog? I am thinking of posting at least once a week about problems or interesting news/things I've learned during the week. If I have time and there is something interesting happening around me I would probably post more often. The opposite is also true: I'll not post if there is nothing interesting I can write about.

P.S. Maybe someday I'll try to make the blog more beautiful, but not now...