These videos are some of the best that I have ever seen (YouTube included) about programming and practices. However, it gets awkward that he includes his family members into the videos. He mentions ways to make code more readable and thereby maintainable. He advocates for test driven development. All these tips are useful in some sense, but it's not like one must follow these practices or die, even if the videos give an impression of that. Yes - there is a shiny dagger coming up occasionally. Watching videos has always been a much more effective means for learning to me compared to books. I guess I just can't keep my concentration for very long if the subject is boring or written academically.
måndag 13 januari 2020
Clean Code
There is a book called Clean Code by Robert Martin. I have yet to read this book, even though I bought it. Instead, I have watched half (so far) of the video series related to the book. These videos ought to be available through his website cleancoders.com, but I can watch them for free via my school library, which is what I do.
These videos are some of the best that I have ever seen (YouTube included) about programming and practices. However, it gets awkward that he includes his family members into the videos. He mentions ways to make code more readable and thereby maintainable. He advocates for test driven development. All these tips are useful in some sense, but it's not like one must follow these practices or die, even if the videos give an impression of that. Yes - there is a shiny dagger coming up occasionally. Watching videos has always been a much more effective means for learning to me compared to books. I guess I just can't keep my concentration for very long if the subject is boring or written academically.
These videos are some of the best that I have ever seen (YouTube included) about programming and practices. However, it gets awkward that he includes his family members into the videos. He mentions ways to make code more readable and thereby maintainable. He advocates for test driven development. All these tips are useful in some sense, but it's not like one must follow these practices or die, even if the videos give an impression of that. Yes - there is a shiny dagger coming up occasionally. Watching videos has always been a much more effective means for learning to me compared to books. I guess I just can't keep my concentration for very long if the subject is boring or written academically.
söndag 12 januari 2020
Game review: Thief Deadly Shadows
Thief: Deadly Shadows was a good game. It had challenge, fun & character. You are a thief that prefers not to fight and use stealth to sneak around and steal things. You can use money to buy upgrades, but the upgrades never make you invincible. By avoiding making players unbeatable, the challenge & fun remains throughout the game. That said, I never finished this game, but I'd believe that I made it to the last level. Why was it fun? I don't know exactly, but you had a lot of choices for how you were about to solve the problem of remaining undetected or sneak-attacking nearby guards. There are multiple weapons and tools to choose from. Also, there is the investigation aspect. Based on clues that you find from reading books etc. you should make conclusions about where treasures are hidden. However, for the most part, you are expected to just randomly search premises until you find and steal enough valuables. I like the fact that there is a tracker that tells you in percentage how much you have managed to steal in a level. This makes it clear if there is more stuff to search for or not. If that wasn't in the game, it would get quite arbitrary when estimating how well you have performed. The game may get spookier as you get further into the game, which is something to keep in mind.
torsdag 9 januari 2020
Unity Game idea
I have been considering starting working on a new type of game. I can choose between trying out making everything from scratch with C++ and GLFW, which is totally possible for a Windows game. However, I feel like I really want to speed-run a game. So, since I have quite a bit of experience with Unity from various school projects, I will probably want to use that. Now, I am having a hard time coming up with a game idea. Well, there is no issue with coming up with a "game idea", but I want an idea that I believe will be easy to make and also great. Intuitively, it feels like I am going to have text dialogs if I make a game. Text dialogs that will remind users of Ace Attorney or VA-11 Hall-A. Now, as for the game idea. I want the user to have a lot of freedom in making choices. In short, the game could be like Ace Attorney in that you have to investigate and deal with defending people in court. The main difference is that the player would walk around in 3D when investigating and be a corrupt lawyer that tries to prevent justice by forging evidence and other shady things. I believe it could be fun to let the player play as the bad guy instead of the hero. I suppose I will start out with getting a decent text UI going in Unity as a first step. Then I will create a level where a player can walk around and interact with objects by examining them. Perhaps for certain objects they can be examined by using the right mouse button to click and from there have more options. This is basically how RuneScape usd to handele interaction with game objects.
Advanced Topics Assignment
I had an assignment in school to create curves for a type of graph called Temporal Treemaps. I implemented my solution in a software called Inviwo, this is completely free and open source. I took some shortcuts when it came about to transferring data between so called modules. I did this by storing arrays of values in text files which I saved and loaded.
In short my solution to create graphs worked like the following: I found all points making up lines between sections of data. I used these lines to define one upper and one lower Bezier curve for each set of two triangles. This made it possible to discard unwanted fragments that were on the wrong side of these Bezier curves, in the frament shader. However, if I did this I would end up with white areas. The white areas was filled by drawing everything twice. First I drew everything with scaled triangles to cover up the white areas. Next, I drew normally sized triangles, to cover up for the ruffled cushion effects. My code for this solution is freely available on GitHub here: https://github.com/marcus1337/InviwoTemporalTreeMapsMOD
In short my solution to create graphs worked like the following: I found all points making up lines between sections of data. I used these lines to define one upper and one lower Bezier curve for each set of two triangles. This made it possible to discard unwanted fragments that were on the wrong side of these Bezier curves, in the frament shader. However, if I did this I would end up with white areas. The white areas was filled by drawing everything twice. First I drew everything with scaled triangles to cover up the white areas. Next, I drew normally sized triangles, to cover up for the ruffled cushion effects. My code for this solution is freely available on GitHub here: https://github.com/marcus1337/InviwoTemporalTreeMapsMOD
![]() |
| Before changes |
![]() |
| Removing unwanted fragments |
![]() |
| Scaling up triangles |
![]() |
| Drawing twice to cover scaling |
söndag 15 december 2019
Castle Defence Game - Part 1
I have been considering developing a new game. In order to speed things up I plan on using C# and Unity. The game would be created for normal consumer grade computers. The game will be a 2D single-player since multiplayer requires a steady user-base and fitting business model to go around. In one of my other games that I created, called Half-Robot, I made everything from scratch. This ended up taking a lot of time. I realize now that it is probably wiser to take shortcuts in order to get something done. At the same time, I also feel that quality will be essential to get something that has a chance of being successful. In short, I will need to find a balance between taking shortcuts and coming up with a cool game. This is pretty much the stage where I am at now. That, and coming up with a well-defined idea for the game I want to develop.
I do not have a clear vision yet for exactly what the game will contain. I do however have some vague hints for some fundamental baselines from which I can add new ideas to. By adding more and more ideas in a structured manner, I hope to get a clearer picture in my head about what I want to create.
For starters, I think it will be okay to have a very simple main menu. The only buttons it will contain is "New Game", "Load Game", "Help" and "Exit". "Load Game" will let the user choose between 3 different slots, also used for saving a game. Now that I think about it there should also be an "automatic save" slot, in case the computer crashes. Thus, in total 4 loadable slots and 3 savable slots. Each slot with data could contain the time it was saved as well as some short description of progress, I suppose.
When clicking on "New Game" I think certain base functionalities makes sense to have. First, there are a lot of noobs who find games difficult out in the world. Therefore, I will want to add one "easy" and one "hard" difficulty setting. Maybe this could be achieved with emoji-buttons instead of plain easy/hard text. The emojis would be like one pro-gamer image and some other which could resemble a noob. The reason for having more images and less text makes the game feel like it has more content, than if there was just plain text everywhere. Having images instead of text everywhere could easily get out of hand however and make things harder to understand or navigate.
Next, I would also want to have a rectangle shaped area by which a fantasy game map can be overviewed. This game map would consist of procedurally generated imaginary countries, which together fill up the area of an island. This may sound difficult, but if done sloppily, it really isn't. All you need to do is to start out with an arbitrary "simple polygon" making up the island, perhaps the entire rectangle for simplicity. Each polygon is defined by a set of 2D points, ordered clockwise or anti-clockwise. A random set of lines are then computed which intersect the island. These lines will then split the island into different regions by collecting all the points in which the lines intersect with one another, as well as with the island. Now that I think about it, it may be better to define all polygons with one level of abstraction; as a set of segments, where one segment is made up by two points, instead of a set of pure points. Thus, for each randomly generated new line, all existing segments are checked for intersection with the line. If an intersection is detected, then that existing segment is split into two new segments. As a final step maybe the newly added segment can be split up into new segments as well by saving all intersection points in a list. As a special case, all segments of length 0, or close to 0 would be deleted to account for special cases. Then I would lastly end up with a bunch of segments, so how do I find which segments belongs to the same country? Well, what I end up with, or should end up with is a graph of edges and points. Thus, for each point not associated with a country (because all points will need to be part of at least 1 country), I will need to find the "shortest path" starting from that unassigned point, where the path also ends at the same point. A path-finding algorithm could be used, such as Dijkstra's algorithms if I let all edges have a weight of 1. This way I could easily find all countries in linear time.
The world map would be previewed in the menu and randomized when clicking on a dice-button. The games purpose could be, to make things simple, to take control of all the countries. The player would start out by selecting one country for placing his or her castle. That country would automatically become controlled. All controlled countries can be colored green, reachable countries colored yellow and unreachable countries colored gray. This would be all that is needed for the menu system before starting a new game.
I do not have a clear vision yet for exactly what the game will contain. I do however have some vague hints for some fundamental baselines from which I can add new ideas to. By adding more and more ideas in a structured manner, I hope to get a clearer picture in my head about what I want to create.
For starters, I think it will be okay to have a very simple main menu. The only buttons it will contain is "New Game", "Load Game", "Help" and "Exit". "Load Game" will let the user choose between 3 different slots, also used for saving a game. Now that I think about it there should also be an "automatic save" slot, in case the computer crashes. Thus, in total 4 loadable slots and 3 savable slots. Each slot with data could contain the time it was saved as well as some short description of progress, I suppose.
When clicking on "New Game" I think certain base functionalities makes sense to have. First, there are a lot of noobs who find games difficult out in the world. Therefore, I will want to add one "easy" and one "hard" difficulty setting. Maybe this could be achieved with emoji-buttons instead of plain easy/hard text. The emojis would be like one pro-gamer image and some other which could resemble a noob. The reason for having more images and less text makes the game feel like it has more content, than if there was just plain text everywhere. Having images instead of text everywhere could easily get out of hand however and make things harder to understand or navigate.
Next, I would also want to have a rectangle shaped area by which a fantasy game map can be overviewed. This game map would consist of procedurally generated imaginary countries, which together fill up the area of an island. This may sound difficult, but if done sloppily, it really isn't. All you need to do is to start out with an arbitrary "simple polygon" making up the island, perhaps the entire rectangle for simplicity. Each polygon is defined by a set of 2D points, ordered clockwise or anti-clockwise. A random set of lines are then computed which intersect the island. These lines will then split the island into different regions by collecting all the points in which the lines intersect with one another, as well as with the island. Now that I think about it, it may be better to define all polygons with one level of abstraction; as a set of segments, where one segment is made up by two points, instead of a set of pure points. Thus, for each randomly generated new line, all existing segments are checked for intersection with the line. If an intersection is detected, then that existing segment is split into two new segments. As a final step maybe the newly added segment can be split up into new segments as well by saving all intersection points in a list. As a special case, all segments of length 0, or close to 0 would be deleted to account for special cases. Then I would lastly end up with a bunch of segments, so how do I find which segments belongs to the same country? Well, what I end up with, or should end up with is a graph of edges and points. Thus, for each point not associated with a country (because all points will need to be part of at least 1 country), I will need to find the "shortest path" starting from that unassigned point, where the path also ends at the same point. A path-finding algorithm could be used, such as Dijkstra's algorithms if I let all edges have a weight of 1. This way I could easily find all countries in linear time.
The world map would be previewed in the menu and randomized when clicking on a dice-button. The games purpose could be, to make things simple, to take control of all the countries. The player would start out by selecting one country for placing his or her castle. That country would automatically become controlled. All controlled countries can be colored green, reachable countries colored yellow and unreachable countries colored gray. This would be all that is needed for the menu system before starting a new game.
lördag 18 augusti 2018
Area Shifter 2
I made a brand new version of an Android Game I release earlier. It is Area Shifter 2. Its pretty much the same as the first Area Shifter, except that this one is faster. If you have spare time try downloading it. Area Shifter 2 is faster because it uses smarter algorithms. It could still be improved even more perhaps though. I could add extra levels and functionality quite easily. However, I have not chosen to do so at this time. All you have to do today in order to win the game is beating all of the levels.
söndag 29 april 2018
Game review: Mario Party
So many sequels to this game. The biggest
number for a sequel they’ve used for this game is 10. In other words, there are 10 Mario Party games.
There is also a 3Ds Mario party game which do not have a number to it. I have
not played all the sequels, although a few of them. I have played the game on
N64 and GameCube. It is a great game for multiplayer and it also works for
single player. By multiplayer I mean local multiplayer without internet,
because as far as I have seen there is no internet options for GameCube or N64.
The AI is stupid so playing at the hardest difficulty is really easy for all
mini-games that do not depend on chance. If a mini-game is run by chance an AI
on the hardest difficulty will have a big advantage (suspiciously).
An important part of Mario Party consists of playing so called "mini-games". The minigames can be divided into different gametypes. In
each Mario Party game there are 4 players, each player can either be a human or
an AI. There are “4-playe” games where all players battle against one another. “1-vs-3”
games, where 1 player is playing alone against 3 other player who may or may
not be teaming (most often they are a team). There is a crane game for instance
where the lone player may try to grab one of the other players in order to
steal their money. “2-vs-2” games is another type where two teams play a minigame
against each other. Most often when there’s a “2-vs-2” game the screen is split
up into two sections, one left and one right. If you play in solo-mode, there
may be “1-player” games as well.
During the game instance you roll a dice and walk as many
steps as the dice shows. The dice does not seem to be entirely random, so if
you jump at the right time you may influence what number you roll. There are
various spots you can end up on. Some spots are special, some are bad but most
are entirely “normal”. By normal I mean nothing interesting happens. Normal
spots are blue, another “normal” spot is red, but if you land on it you lose a
little bit of money. Players that end up on a blue spot are assigned the blue
color and players that end up on a red spot, the red color. When a turn ends
the players always play some sort of minigame, and the division of colors among
the players helps decide if the minigame is to be “4-player”, “1-vs-3” or a “2-vs2”
game. The game map is like a board; however, this board may change in-between
turns. Players can buy or in other ways retrieve special items. For example,
traps may be used on the board to sabotage for other players. Other special
items may be special dices or teleporters used for swapping location with other
players.
What I liked the most about this game that it was really fun
to play with other people. It is fun as well to play with just the AIs, but the
best scenario is with other people. The game is interesting throughout the game
and by the end there tends to be some sort of cliffhanger of who will win. The
game intensifies by the end by giving the worst standing player extra bonuses
and adding extra risks and other fun stuffs.
Prenumerera på:
Inlägg (Atom)




