Monday, March 26, 2018

My Java Game Development Learning Process

I've been interested in game development since 2013 yet only now I finally picked it up with a serious note. As a software engineer student, I grasp up game development concept much faster which allows me to progress faster in my learning process. Currently, I am at the very basics where core things to learn are to make an engine. With this blog post, I'll share my perspective on how to learn game development. Keep in mind I am new to this and it may not be a very efficient method to do so.

Start as low as you can

Nowadays there are plenty of tools used to make games: Game Maker Studio, Unity, Unreal Engine to name some. These are considered "high-level of game development" as an engine handles most of the things that looks extremely simple such as rendering, keyboard handling, updating entities and so on. I started out with Game Maker and I never realized how difficult it is to work from scratch and always had a stereotypical idea making games with code is a waste of time. Fear me not, developing only with the code is a way to understand most of the things about game development patterns, design, and logic. It teaches you HOW things work and WHY they are like this. Creating something from scratch may have less of a result output however in the long run it sure will benefit your dopamine system that rewards you for doing great things in your life!

Java Game Development

Learning Java as a first language can benefit non-programmer to think like one as the language is super verbal without any shenanigans for example C++ have with stdin::cout << "Hello world"; With Java mostly everything makes sense as the code statements says what they will do.

Same goes for game development except game design and logic complicates the things. Luckily you don't need to put most effort into language and you can focus on learning game development theory instead of language tricks and tips.

Learning Process

Everyone knows their own way of learning, but I'll share mine. As a software engineer student I did not worry about language specific tutorials though some online tutorials were handy. For beginners I'd recommend starting with Derek Banas Java tutorial playlist. It covers important programming syntax and concepts in a nicely laid out order.

As for game development there are many options. You can jump straight into using a fully-made library such as libGDX yet I'd consider that a mistake as without the knowledge how rendering and simple engine works beforehand, you may end up struggling to work with it. Car engine has its life-cycle and ways to work same applies for game engine so developing one by yourself with the help of tutorials extends your knowledge about game theory at a faster rate than using already made tool. There are 3 main playlist that are recommended to watch after you finish Java tutorial.

  • Ryan van Zeben - 15 Part Playlist explaining basics of how Minicraft engine works
  • CodeNMore - 34 Part Playlist explaining similar engine with additional content
  • TheChernoProject - 126 Part Playlist where same engine is made at its finest with good optimization and rendering algorithms yet may seem slightly complicated if you haven't covered previous playlists.
Finishing these tutorials would prepare you for the real job of game development. Even after finishing CodeNMore playlist assembles your knowledge for a full prototype-ish game. I'd say CodeNMore tutorial is the best out there to learn Java game development which is the one I am working right now and here is my current result:

What's Next?

Once done with pure Java game engine development I believe that is the right time to start using more of a "high level game development framework/library". Now you're all built up with the information how an engine works, how to make one, what happens behind the scene and so on.  Best library to pick up would be libGDX. It is the mainstream library for Java which supports multi-platform and has many other great features


There's always a new thing to learn and a way how to solve an issue in your game. Never stop doing it even if you don't get it. My hidden message behind 3 playlist recommendation is to watch them all, because not getting means you can watch a different tutorial and start all over again with better understanding how things work. 

Thursday, March 22, 2018

Pure hell before bliss

One week has gone away since I posted my first post about homeless life. Then I was mildly sick but boy oh boy I didn't know what sick means. The day after I was super sick, had to move out from R place to K place since some drama in R place that I may cover one day (it is a long story). When I arrived at K, my health was already down, coughing, runny nose, and the throat was killing me. Talking with friends was extremely difficult and even my mind got altered in a bad way where I was able to perceive only negative thoughts, felt my friends are negative towards me due to me being homeless, I was shaming myself a lot since most of my time spent at K place was with myself.

Hell no one should go through

I stayed at K place for 1 day and had to move out to M place (K's best friend from home country). There the living conditions were harsh, I was sleeping on the ground, on a mattress (classic way of my lifestyle)  and laid there for 3 days... The room was empty as M only recently moved in, K was visiting me however, he was with some depressive thoughts, I was insanely f***** in my mind and had to talk about even more sad things which almost made me crazy as I always had a realization inside of me that I am a homeless person in Denmark, far away from his parents, home country and friends struggling and fighting for my life in a country where everyone is happy and has no problems comparing to mines. Moving on conditions in M place were horrendous, the kitchen seemed decent, but I was too shy to walk there as it was unclean in the first place and two Polish girls were hanging around there so I didn't want to bother them while being super sick and unable to make a reasonable contact. The second day at M's place my nose started bleeding a little bit, I thought that's nothing bad, I just feel weak and it will go away, but it didn't. It went on and on until it developed so much that I was bleeding properly from the nose. Only at 1 AM I realized how serious the situation is as bleeding did not stop for about 10 hours now (it wasn't crazy bleeding though). I was like s***, am I going to die this way? Absolutely not, so I googled up some things (I hate calling emergency as it wasn't the most emergent situation) and learned my health condition and a natural way to fix it. I held my nose front with my fingers softly closed for 20 minutes and after that stayed up in fixed head position up to 4 AM and went to sleep. It did help block something inside of my nose however the issue was not fixed. The day after I was still bleeding and so I stopped blowing my nose and held both nostrils closed for 3 more days. Approximately I was bleeding for 50 hours.

The blissful comedown from illness

I survived 3 days at M's place and feeling of illness totally vanished except nose was off. I got a message I can come back to R's place where I really liked staying at so I did, packed up everything and went back. It was 10-minute walk yet it was the most difficult walk I ever had. Apparently the amount of blood I lost affected my energy levels and power which I did not realize before. That scared the heck out of me so I started eating vitamins and reading up about diets (my diet plan is completely off with this lifestyle). Two days of vitamins helped me get back to shape and feel much better. I never thought healthy life can feel so good. It helps to fight off depressive thoughts, has more energy and most importantly be a productive person.

The current situation is brighter

R decided to help me and gave me 1 free month at her place. The goal of this month is to get back in shape with finances and acquire a place to live at. I am offered to start living at R place since some people are moving out from here starting on April 1st. Question is will I be able to rack up enough money for the rent. Current status of work life in Denmark is harsh as less and less temporary job offers exist so getting into a contract is a risky decision yet again.

Talking about other things than my life. I am getting back to programming after all of the unstable fiestas in my life. Started following Java 2D Game Development tutorial using JFrame (pure Java). The tutorial is not finished however, it uses Notch Minicraft GitHub example to teach. After all, tutorials finished I could use examples from the repository and implement to my own game. Currently, I am about to start working with Level/Tile system as most of the screen system with colors and spritesheets is done.

That is about it. Another week has passed as a homeless person. Currently, it is day 75th as I am without a place to live at. Still going strong!

Thursday, March 15, 2018

69 Days Homeless

Tomorrow (March 15th) will be my 69th day as a homeless person. I became homeless (left my apartment) on January 7th and living like this up to now. Now take one fact in mind that I wasn't homeless and living on the street, I am still lucky enough to have good friends who accepts me and gives me a chance to survive. There are many topics that come to my life's story of homelessness. I'd like to start from the beginning

How did I end up homeless

All in all, I am a crazy guy and I won't deny that I love adventures, however, this adventure wasn't as fun as I expected. Before January 1st I managed to earn ~7500DKK (1000 EUR) and my contract of the rent was ending (could not renew it and it is a long story why). To get a new rent I needed approximately 1000 EUR for the move-in month (first-month rent + deposit) which I thought would be too risky since January was exam period, so I decided to go homeless for maximum one month.

From "rich-boy" to nobody

 At that moment my thoughts weren't prepared to be homeless for this long. I thought maybe 1 month and that will be it. Sorrowfully I was always feeling my bank account is full of money, yet this was wrong. I went full "rich-boy" and traveled to Lithuania where I spent ~200 euros in 2 weeks which is still reasonably nice, but 2 weeks were wasted to enjoy life and waste money which could've been converted into even more money and stable life. Approximately in January, I spent 400-500 euros. Other money went to give back some loans from friends and faster food in grocery stores (noodles, cheap pizzas, peanuts etc) which could've been a future investment into rice, spaghetti, vegetables. Moving on I came back from Lithuania on February 8th and had way less money than anticipated and from that point, a more serious homeless stage began.

 1st Semester thoughts

Before I cover how did I manage to survive I'd like to cover that I knew something like this may happen. The amount of money I took to Denmark was little compared to others and I was counting every nickel until I got a job in December and my rent contract had no deposit which lasted 4 months September -> January 7th. This is why I had to pay per month ~360 euros. Knowing this fact I networked myself as much as I can and tried to find real true friends who could help me out in this situation and I was successful. Found many contacts which up to this day offers some help which I am super glad and sometimes don't realize how much I depend on people. If I haven't made a choice to network myself between students, there is a high chance I would've dropped out of school by this day.

My way of surviving

Currently, I managed to couchsurf 4 places. I won't mention the names of the people for the storytelling however, I'll use their first name letter. On January 7th I moved into my best friend's K. flat who was going to high school with me in the same class. Sadly he was moving out also, so I was able to stay there for 2 and a half weeks later my friend I. from high school also helped me to survive from the middle of January up to 26th of it. That day I had a ticket to Lithuania and came back to Denmark on February 8th. I moved into the same I. spot for 2 more weeks and then the last station - R. spot on February 28th. During the period of 28th and Mar 14th, I slept few times at K place and that's the whole having a place to live in situation. Coming back to the end of February I started getting worried that I am ruining my life. A lot of time has passed yet I still haven't accomplished much in terms of money + I was behind in studies, so then hardcore studying sessions began. I managed to catch up in ~February 20 and on Feb 22 my birthday happened where I rested too much and because of that skipped two days of school. I know, my fault yet again. This is where a realization came to my mind that I am ruining my life up and it is not fun anymore, grievously enough I didn't go for much of a change and entered a monotonous state of mind where I just study and not look for work that aggressively (I was just making calls to the temp agencies).

Current life situation

4 minutes will pass and I'll successfully enter the 69th day when I am homeless. Not sure if I should be proud that I am alive or sink into despair of how miserable my life got after I moved out from my apartment and did some silly mistakes. Now I have exactly 2016DKK (~270 EUR), tomorrow, on March 15th, I literally won't have a place where to live consistently, thankfully I will have where I can store my items safely and I will not have a consistent place to live for 5 days, so this weekend and next week's start will be hell of a mess. Why I am moving out from R place, I won't go into detail now as it is a long story I believe. I still don't have a job, even from temporary workers agency, I call them almost every day, but nothing happens, I am behind in school, since I am super sick today and tomorrow I am not sure where I will go aaaand the whole story that I told you here is not known by my parents so here's that. This is the amount of pressure I am dealing with. Living by the day at this moment. Hopefully, it will payback in the future if I won't leave this world.

Future plans

Currently, I plan to livestream mostly daily on Twitch and use Twitter as a way to express my life, just writing short messages what I do and how I am doing would satisfy my inner-ego as I love to communicate without giving a f***.  The blog topics will vary from programming to philosophy, psychology and of course my life stories as a homeless guy in Denmark. Hope it wasn't a long and hard read, sorry if it was a boring post, been a long time since I've written something with more post, higher quality will come.