torsdag 9 januari 2020

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

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.

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.

söndag 3 december 2017

Game review: Life is Strange: Before the Storm

So, I have been playing Before the Storm deluxe edition on my brand-new Xbox One X. Is it better than the first game “Life is Strange”? I would not say so. Its not as comical for starters and it supposedly only have 3 episodes, not counting the bonus episode that you get from the deluxe version. In this game you play as Chloe Price, who has a new voice actor in this game doing the talking. Even though I prefer Chloe’s old voice, the current one does a superb job as well. Chloe was in the first game, but more as a side-kick to Max, sort of. The first game “Life is Strange” is what happens after “Before the Storm”. In the first game Chloe has blue dyed hair, which has not happened so far in this prequel. She still has brown hair after that I finished episode 2. I wonder how and when she is going to dye it. She will probably do it in the last upcoming episode, 3, or, in the bonus episode. It’s really only a minor detail it would seem. But somehow, I have a keen sense that it will be an important part of the story when she dyes it. Of course, I could be wrong, one of the reasons she dyed it because of reading manga. But then again far from everyone that reads manga dyes their hair blue because of it. Why is this even interesting? I just happen to think so; the important parts of an investigation are the details after all.

This game isn’t that humorous, but, it has an interesting story. It is entertaining, sure. I mean it’s not like there are no jokes and no humor. It’s just that the humor is low level and kind of masked into the gameplay. For instance, assuming you made the choices I made, Chloe gets to perform on a theater stage. While you are preparing for the play in the dressing room you are supposed to read and memorize a script of what Chloe is going to say in the drama. The underlined funny part is that you can smoke weed before you go up on stage. At least I found that funny. In a real-world scenario that may not be so fun, which is understandable. Something else which is noticeable compared to the first game is that most choices seems somewhat meaningless. Most “crucial” choices don’t seem as severe as they do in the first game. However, that may be somewhat good considering that you can’t go back in time to change the stuff you do in this game. You can however if you want, go back to a previous checkpoint in the game in case it hasn’t automatically saved the game before you do so. Counting in all the elements this is a good game, despite my criticism mentioned here. There is a clearly outlined red thread that binds together the story well. And as always, I recommend playing these kinds of story games on a TV. Maybe I happened to recommend that because I’m used to playing computer games on a laptop. Laptops aren’t exactly game friendly by definition.

måndag 16 oktober 2017

Game review: F-Zero

I played this game, and managed to beat it when I was a kid. My bro had a SNES which I could play it on. On those days tube tv’s was still in use and no such thing as flat existed. The first thing you hear when playing this game is the epic main menu 16-bit music theme. Now why is this game great? You get to choose a futuristic racing car and see its stats on a chart. The chart animates the cars top speed as well as acceleration on it. Science on an old-school racing game, wow.


The game itself is fun to play with both varying maps as well as music. Some games even today insist on playing the same melody over and over, but already back then they understood the importance of music in games. The game levels gradually increase in difficulty as you beat them. This provides you with a challenge that you can beat. Personally, I don’t like no-challenge games. If a game is not challenging it is usually not good. Something that the game sort of requires unless you go with the car with the highest top-speed is that you must on a level use a “boost” to fly over an obstacle to beat the track. You only have a certain amount of lives and if they run out you loose and have to re-play everything. This “boost” is not easy to know about and you must discover how to use it yourself unless you are able to have and read a manual, in English, while not being English or maybe not even able to read to begin with. ¯\_()_/¯. Since I didn’t know about the “booster” thingy until some time, I had no option but to beat the game with the only ship that could jump over the super long obstacle without using a boost. However, this pink ship also has a low acceleration speed, but really, the top-speed makes up for that anyways. In my opinion the low acceleration super top-speed pink ship might be the best ship anyways. My first favorite space ship was the yellow one though, maybe because of its many “rockets” on its back. It also has the highest acceleration which is cool.

The levels in the game are well planned and made, the AI is the AI (it works), the game is challenging (many obstacles that can damage you, even bumping into enemy AI can damage you). Different race tracks with in-racing line options while racing (different paths to take). Cool animations and sound effects. I am planning to make a game like F-Zero, maybe not as good music-wise, but, probably good fun-wise.

And if you wonder how a SNES looks like, here it is: 

lördag 7 oktober 2017

Half Robot on MS store

So as I have mentioning in earlier posts, here and here, I have worked on a platformer PC game. Just recently I released it which can be found at the Microsoft store here: https://www.microsoft.com/sv-se/store/p/half-robot/9p93l2bhq7jx

The game is sort of similiar to MegaMan 1. Some differences are that my game is much shorter, has less monsters and much less content in general than the original game. But... it is still worth trying out the game. (You can try it for free for 24 hours). Its worth trying out because its pretty challanging. Its not like the everyday buy to win or spam commercials games. In fact its actually addictive I've been told. So go ahead and download it now if you have windows 10. Microsoft has already made sure that it doesnt contain any viruses.