tisdag 20 juni 2017

Game review: Life is Strange

I played Life is Strange on a PlayStation 3. First of all, I should mention that I really think this is a TV-game. Play this on a big HD TV with good audio while sitting on something comfortable. Life is Strange is in its core a visual novel. You get to make decisions that will impact what happens in the game. On the surprising note; it also includes problem solving in the forms of detective work and extremely difficult moral choices. The main character in the game that you get to be is some random girl named Maxiene Claudfield, nicknamed Max. She is born 1995. One day in school she finds out that she can travel in time. She can do big time jumps by staring at photos she has taken with her polaroid camera. (After playing this game, I made sure to have one of those cameras myself, see image.).

Her main superpower throughout the game is time travel. Most often however this only includes short jumps. Big leaps always result in strange events, spoiler warning I guess. Btw, never EVER read comments about this game on YouTube until you’ve finished it. The top comments for videos will reveal the ending of the game in one sentence. I finished it of course before reading comments about it, but beware.

Seemingly, this game looks like it is nothing special. Judging the game by its cover that is. I would perhaps never have played this game, let alone pay for it, if someone I know hadn’t gotten it. Normally I don’t play visual novels either. Sometimes I wonder how this person has the ability to find so many good games. Most likely your intuition has already told you that I think this game is good by now. It’s tricky to review a visual novel without spoiling details that are vital to the story in the game. It’s so much easier to just say, it is good and you should play it. Did I mention the first episode is for free on Steam? No I didn’t, however this game is a TV-game please don’t play it on a computer monitor.




Not that I know what normal is, but Max seems like a very normal person. I think it’s best to describe her like that. 90% of everyone Max meets is all messed up and have lots of problems. Since Max is such a kind person (or is she? You decide.) she tries to help everyone using her superpowers. This results in her what to others seems suspicious in the game, getting deeply involved in dangerous dramas. Every now and then Max has to do a critical moral choice (you get to choose it), which inevitably results in something immediately happening. Something that in an obvious way shows potential hazardous consequences that may happen because of that choice she (you) just made. All these vital choices are binary, you get to choose either A or B. There is no C, D, E or F. Only A and B, both of which are bad. Your job is basically to choose the one you feel like or the one that is the most moral in your eyes. Or you may just choose whichever is the less worse. When a choice is made you see the outcome from it, but you may go back in time and see what happens if you choose the other choice. You can do this, travel back in time and change choice, how many times you want. But after you decide to go with a choice and continue the game, the choice can never be changed unless you replay the whole chapter. It makes sense to call it chapters now that it actually is a visual novel.


All in all: lots of drama, politics, humor, danger, darkness and impossible obscure moral choices equals me like. When the game was new, you could play the game even though it wasn’t finished. So you had to wait approximately 2 months between each episode, and there are like 5 of them. That gave me plenty of time to reflect over how the upcoming chapter would be and the choices I made, whether they were bad or not and how they would affect the “big picture” in the story. I was somewhat disappointed that the choices didn’t really have that big of an influence in the game all in all. Although there was some noticeable impact, I felt that it wasn’t quite enough. The game was still good though. Something I also noticed is that they are going to release a follow up for the game. Though, it is not actually a follow up. It is about what happened before the story in Life is Strange. I didn’t think any follow ups for this game would get my attention but by judging from the trailer for the follow up, my expectations are high.

torsdag 15 juni 2017

Game review: Age of Empires 1

Age of Empires (AoE) was my first favorite PC-game. AoE is a real-time strategy game. You usually start a game with a town center and a few villagers. The villagers are used for constructing new buildings, walls and towers. They can also be used to repair the buildings as well as boats. Villagers also can attack other units, though, that is not advisable since they do insignificant damage and easily die. One of the main reasons you have villagers is to gather resources. Resources are needed for making units, researching technologies and building stuff. When I played this game as a kid I always cheated so I can’t say that I was good at this game. You cannot cheat in the demo version however which I played before the real game.

The game itself is simple. There is a limited set of buildings you can make and very few distinct kinds of units. Furthermore, the game mechanics don’t work that well. If you select a group of units and make them go somewhere you will notice that it is quite buggy. Units move clumsily if at all, and often fail to reach their target altogether. Another simple thing is the game AI. It is stupider than a banana. Of course, you can adjust the difficulty settings in the game, but the AI won’t get any smarter. Most of the time all you must do in order to win a game is to spam war ships and attack anything that’s within the boats reach. If the AI has villagers gathering recourses you can easily attack them with the boats and they will still come back to the same place you attacked them with even more villagers. The AI will also send some military ground units but war ships, at least in the demo, are hands down the strongest unit in the game. Boats have lots of health, can be repaired by villagers, deals lots of damage and move fast. Melee units cannot even reach boats and must instead flee (the AI way of fleeing is to move only one unit, the one being attacked). The AI may be stupid, but somehow that stupidity makes the game fun to play and quite unique. The game can also be very challenging despite the stupid AI. All in which let you come up with strategies that only work for stupid AIs.


What I like about this game is that it lets you be creative when designing “cities” and battling opponents. Even though the number of different army units are few, there are quite a bit of completely different ones. I.e. Axe-men, archers, horsemen, catapults, hoplites and of course the legendary priest famous for ‘wolololoooing’ enemy units to join your side. Or vice versa if the enemy has them. Lots of okayish and fun single-player games exists in “campaign-mode”. I have heard that Microsoft and those who made AoE never though it would become as popular as it did. Thus, noticeably improvements can be seen in the successor, AoE2. Which kind of clearly shows the differences between a properly designed game and a kind of so-so designed game. As a kid, I think I mostly liked AoE over AoE2 but occasionally that could vary. AoE2 just doesn’t feel the same and is kind of slow to play.

måndag 5 juni 2017

Some Progress

I have managed to figure out how to proportionally scale up the world map as well as the player image. Some big challenges that remains are preventing the player from falling when standing on top of a ladder. And the other are positioning maps next to each other, making it possible to seamlessly cross through maps as well as scrolling some kind of game camera when the player moves around on the screen. In the same time, it should not scroll the game camera if the player is by a wall, also known as a dead end. Once I solve these big issues I think the rest will be pretty easy. Apart from creating the AI. Making a smart AI can probably be really difficult. I say probably because to be honest I don’t have too much experience with it. One possibility is to make the AI a finite state machine, but Bob Nystrom warned that that really limits what the AI can do. So I rather find and do the correct way, whatever that is. There are of course many expensive and thick books about game AI that would let me know. I’d prefer to learn it quickly though.


In case you didn’t know, I do have a YouTube channel. I’m called Xfsadsbot047. I don’t have a lot of videos or many good videos. But I’m considering starting to upload some more vids. And perhaps, you even get to hear my voice someday. I could stream some “let’s plays” but then I almost would be forced to using my stationary computer, since my laptop only supports wireless connections. Using wireless internet would at best produce a choppy stream, if any at all, If I am to use a high resolution and frame rate. Wireless internet produces lots of ‘packet’ loss. A packet is a way to embed data using a protocol like IPv4 or IPv6. There are other protocols that are used to send data, but not as common perhaps in the world wide web. In the end, it’s just 1’s and 0’s that are sent. A protocol is a way of making sense of those 1’s and 0’s. If you connect a normal ethernet cable, in contrast to having wireless internet, there is hardly any packet loss at all. Or at least that is what I have been told. Now why is it a problem for me to use the stationary computer? Well I just really don’t like using the stationary PC since it’s so noisy and produces lots of heat. I have solved these issues by moving the PC out of the room when I use it and closing the door. Then I have some extension cords that go from the computer to my room. I use those cords to connect things like the mouse, keyboard etc. I still don’t really like using it though. 

söndag 4 juni 2017

Almost, forgot, posting

Almost forgot to make a post today. I haven’t made a whole lot of progress in regards of programming really. I also guess I may need to loosen a bit on the “one post a day” thingy. I must have like at least some time in the week when I can rest and stuff. I’d also like for people to comment if they read this blog. That would provide me with feedback as well as possibly ideas about things to write about.

Hmm… What should I write… I like video games… Oh yeah, I used to play a lot of Civilization 3 back in the day. It is a strategy game, which is like a board game but way too advanced to be an actual board game. This game is like the ultimate proof that computers can enable us to create super mega board games that wouldn’t ever be possible to have with a physical cardboard and a pair of dices. You start a normal game in Civilization 3 by just having a settler. You can use the settler to found a city and then your so-called turn is up. This is a turned-based game which means that you and your enemies have a restricted set of possible moves or modifications that you can do during one turn. When you have decided that you are finished you must register that into the game and await the following turn that enables you to continue playing. It could be seen as when playing chess where each player makes one move and then waits for the other to do his move. However, as with another miracle of “computer board games”, is that when playing in multiplayer mode online you can have so called simultaneous turns. Which means that every player (up to 8 in this case) makes their move at the same time! Imagine playing monopoly and having everyone throwing a dice and buying and selling streets at the same time. It gets too messy to even imagine it. I guess that is just one more thing to add to the list that inspires me to program and create games.

To continue with the gameplay; after you found a city you can research technologies. These technologies give you numerous benefits, like stronger army units, enabling building stuff in your cities as well as government types. You can use your city to build army units which are needed to explore the map and defend against barbarians. You can also build more settlers if you have enough citizens or workers to make improvements in the area around your city. And you can build stuff that give various bonuses like barracks, that gives new army units one extra health. Some buildings cost you tax however. And it’s not only buildings that cost money; army units, research and corruption are also things that add up to a pile of money which you will need to find a way to pay for as you play. And you better have all those things if you want to stay competitive with the other players (you don’t want corruption of course, but it will cost you to hold corruption down).

When you have chosen to research something you can start exploring the map, negotiate deals with other civilizations Donald Trump style, build new cities, attack other players etc. There is also a limited amount of both strategic recourses as well as “luxury goods”. The strategic recourses have various importance throughout the game. I.e. iron, oil, aluminium, uranium, horses are such recourses. Iron is important throughout the entire game and if you don’t have it you’d better attack whoever has it like a crazy orangutan as soon as possible or you will be at a major setback. Luxury goods keeps your citizens happy, which prevents riots.

When I first started playing this game I didn’t understand English. I can’t really say that it taught me much English either, but I did enjoy it. I did eventually learn English and then the game started to make much more sense. One thing that I didn’t learn until a long period of time is about the government type that you start with, despotism. It really limits how much your cities can produce in terms of food and money. So, to sum up, get rid of despotism as soon as possible. What I ‘liked’ about despotism was that you can sacrifice citizens to hurry a production in a city. That can be beneficial during wars, but now that I know how much despotisms limits you it is not worth it. Unless you play with a peculiar game style involving spamming as many cities as you can and mass-producing army units.

lördag 3 juni 2017

Challenges

Some issues in the game that I will have to solve are how to make the player unit interact with the game world. In Such a way that he can stand on blocks, climb ladders etc. The world entities aren’t even connected to each other yet. But that’s not the main issue. On one hand I will need to draw the player to the screen by using coordinates somewhere between (0,0) to the corresponding width and height. On the other hand I want the player to interact with the game world by using a separate set of coordinates. Depending on where the player is within the game he will also have to be able to interact with the world, which means that the array grids that now are used as maps also have to know their own coordinates somehow. This has gotten a bit messy quickly. As always when writing code, there is no right way of doing it, only ‘less worse’.

A possible solution for this is to create a class that stores a map, which is an array grid of numbers, and the corresponding drawable texture for it. Besides this, the class should also have its own starting coordinates representing where this map piece is in the world. In other words, it could have a coordinate for its upper-left corner (if anything here sounds stupid it is because I made this up as I wrote it). I already know that a map will always have a width of 20x20 and height of 15x20. To display these maps on the screen I simply scale up the drawable images that I generate for them. By first loading the grids from text-files and then draw to an image in the code 20x20 blocks representing each number of the grid. So anyway, a map coordinate will go from an unknown value, (x,y), to (x+20x20,y+15x20). Likely I will need to initialize a starting position for a map and then write a function that calculates the other connected maps coordinates which are in the same world. The question that comes from this is how I will determine in what map the player is currently in. I should always easily have the players coordinates available by looking in the “entity class” that I have made for the player, but what I fear is that I might have to loop through all map classes for a world in order to find in which of them the player is in. I need a smart way of organizing the map classes in perhaps an array of some sort so that I can always instantly know where the player is at, instead of doing something that takes a linear time, O(n). The big O notation is used to discuss theoretical speeds of algorithms. For instance, if there were a million map classes and the algorithm to find the player was O(n) there is a possibility that the program needs to run one million times all the time as you’d play the game.


I need to know that if I divide the player coordinates x with the map width (20x20=400) and y with the map height (20x15=300), that I always will get the corresponding number for the map inside of a 2D array, containing all the map pieces. If you didn’t know, you don’t get any decimals when dividing two “integers” programmatically.



After I have solved the problems mentioned above, I also will have to correctly draw the player to the screen, possibly by subtracting its current coordinates with its present map coordinates. But then the problem arises, what if the map coordinate is negative? Do I instead add the players coordinates with the maps coordinates? Most likely not.  Also, I will need to draw the map it is currently in on the right location of the screen as well as neighboring maps if certain conditions are met. “The right way” to position a map on the screen may entirely depend on how far to one side the player is. I.e. if he is by the edge of the map I may need to only display half of the map.

fredag 2 juni 2017

More Code

Writing a blog is like sharing a private diary with the entire world, but whatever, here goes. I feel like I did too little progress yesterday. I already had previously made spaghetti code from a bad game engine I was working on earlier. So I re-wrote a little bit in that engine and made it so that it created text files with a 20x15 array grid of numbers. I intend to use these text files for generating the gameplay maps.

If you wonder how a "map" text file look like, here’s a picture:

1 means brick wall.
0 means empty space.
2 means ladder.

This is one example of a map that I now easily can produce with my game engine.
If you wonder what U,D,L,R means, it is like so that I plan to connect these maps to other maps so I can have one big map of maps as one level, the letters will indicate what neighboring map is up (U), down (D), left (L), right (R). I'm not entirely sure how I will decide to implement this in my final solution but this is how it looks like now.

When I have made games in the past, I have mostly used the Model-View-Controller pattern. But after reading a book giving tips of game design patterns by Bob Nystrom I noticed that he didn’t seem to use that pattern. I can attest that MVC simplifies a lot when making many type of games. But as I started to suspect, real game developers don't always use this pattern. In the book I noticed that Bob Nystrom, some guy who has worked with game development for 8 years didn’t mention MVC at all. Contrary, he showed code examples breaking the holy laws of MVC... So now I try to act like the professionals by not entirely using MVC in my game. I’m not sure if this is going to be beneficial in the long run but it already feels quite different. Sometimes for the good and sometimes for the worse.

The rationale behind not using MVC is that the logic in game is much higher coupled to what happens in the view. I guess this ought to be true in some cases. However, I have decided to cheat; I am not going to use MVC in my game, but I will pretend that I am using the pattern as much as possible. Unless I get to cases where I may need to break MVC in order to follow in Bobs footsteps, I will try not to. 

torsdag 1 juni 2017

One Post A Day

Okay, I have realised that if I am to have someone reading this blog I will need to make new posts continuously. So I have decided to try on the idea of writing at least one blog post per day. So make sure to check on to this blog pretty often from now on.

What am I doing now? As Ive said in an earlier post Im working on a platformer game mainly for PC, but I might port it to android if I managed to produce something playable. I think my biggest challange as for the moment is how to create a decent game engine. I plan to divide the game map into squares with the ratio 4:3. These squares will contain 20x20 pixel blocks, 15 from top to bottom and 20 from side to side. The game camera will be able to scroll the map from side to side by letting each "big map square" know which neighbours it has; up, down, left and right by using pointers. A map square will also contain a set of units belonging only to that square. That way I wont have to spend CPU time to process all the units in the game all the time, just those in the current square that the player is in and its neighbouring squares.

The challange however is to make a way to store information about each map square in a text file and to create an engine that will enable me to create fun maps and that lets me easily adjust which the neighboring maps are as well as if its a "dead end", AI unit positions, which the type of units are in the map and most importantly lets me create 20x20 pixel blocks that units can stand on top of, or if they are dangerous (like spikes) get killed by...

So thats it for now.