Thursday, 28 March 2019

Magnum foundation's two games + Priotity troubles

Hello there!
I've made some progress towards the two games although they are somewhat minor. In this post I'll also be revealing the two games. Without further ado...

Preface

Just before I reveal the two games though, progress has been a bit slow with them due to me not knowing which features to priorities. It's a bit of a mess at the moment, but I'll get to that later on in this post, now I'll reveal the two games.

The reveal

One of the games I'm working on is "Bounty Hunter III" which I plan to release in late November of next year (2020), I intend this to be the final installment to the Bounty Hunter series. This motivation came from wanting to finish what I've started so I can move on to something different, and Bounty Hunter is no exception. Should I decide to make a follow up, it will be with different characters and continuity, whilst retaining core gameplay mechanics and some enemies like the yellow snakes.

The other game is called Othermind, a sequel to a game called "Pipe Dreamer" which I released in summer 2017. I thought that a sequel could do the first game justice since I've improved my programming skills, there were more than enough features I could think up to do this sequel justice. I plan to release this in December of this year, a little tight, but hopefully manageable.

Exclusive features

In terms of Bounty Hunter III, the game has a half-functional combat system which I've started to garner more attention to. I have been working more on trying to facilitate the existing features and test out certain scenarios like shops and cutscenes, as well as creating new collision types. The most interesting feature I can mention here is an ally character who helps the main character in his quest. Though I won't reveal who they are, I will mention that you can have them on three modes:
Automatic: The character follows you and fights any nearby enemies. I have not implemented the latter yet).

Semi- Automatic: The character follows walks to wherever you click in the order of where you clicked first - this can be useful if you want the character to attack certain enemies, press certain switches and so fourth, much like this. In terms of targeting certain enemies, let alone the aggressive AI, I have not implemented that yet.

Manual: The full control is transferred from the player to this character, this is probably the feature I may scrap at some point, because you can accomplish a lot of what you can do in the Semi-Automatic mode. Maybe I'll change my mind but for now, this mode will probably not make it far.
I know... the graphics look rubbish here.

I did try adding in an ally into Bounty Hunter II, but it did not fit in with the game's story so I scrapped it. There were also a lot of considerations I had to make like whether or not the ally was vulnerable or not, as well as trying to make them be able to transverse through the map without issues. This time, the ally is much more involved with the story so it would be more likely to be a feature I take further. I've also realized that I can design maps that are tailored to what the AI is capable of, since I'm not planning them to appear in all parts of the game (a hero always needs moments to himself, doesn't he?). This would save valuable time since I need not stress about thinking "What if this situation happens?" all the time. I could just make the AI capable of several specific things and leave the rest to scripted events.

In terms of the combat, I've made the main character have a melee attack (something that was not present in the predecessors) which is pretty much like shooting a bullet except it doesn't move and appears for only a split second. This may seem simple on the outside but I'll explain the problems I've been having with this in a later section.

Moving on to Othermind, the possessing mechanic makes a return where you shoot a beam at a character and you take control of it. This one does still retain elements of the first game, for example there is no combat or a solid story. The difference between this one and the first game is that it is not set in a dream world, but rather a strange island.

There are some returning creatures as well as a palethora of new ones, some of which are hostile towards the player and will knock the player out for a bit when in contact, or in the case of the Player possessing a creature, they will be de-possessed. I was originally going to add hostile creatures into the original but I didn't know how to implement them in, questions like "What if the player is possessed? How will they know that a certain possessed creature is the player?" or "If the player de-possesses the hostile creature won't they be knocked out upon de-possession".

Fortunately, I managed to answer both of these questions with this installment: The manipulated hostile creature will be knocked out upon de-possession, this will allow the player to escape (if the creature is hostile) and not get knocked out. But being knocked-out is more of an annoyance rather than a way of a threat very much like Wario Land 3.

Changes to the level editor

There were a few changes I've made towards the level editor, for example I've categorized brushes depending on which layer is selected. The reason you select layers is so that you can place certain objects into them via brush. This makes life a lot easier since the game saves levels into chunks of layers like tiles, triggers, entities, decoration tiles, etc. For example it wouldn't even save a trigger if it was on a tile layer, it needs to be in a trigger layer or else precious time creating the events that pertain to the trigger would go to waste.

The game also has a specific way of loading each layer from the JSON files (the format of the game's save files), so that is also important to keep in mind.

Previously, I've had to be careful of which object and layer I had to select to make sure it does not create a million copies of itself on the same spot. An example of this is putting a trigger into a tile layer, since it is not classified as a tile and the extra code, that checks if an object (in the layer) at the position of the cursor exists, wouldn't even pick on the object.

Now when I select, for example the tile layer, the brush menu shows all of the tiles so I know which blocks I can use on which layer.

Another change is implementing level sizes, this may sound silly at first, but I didn't implement a level size. The reason this could be a problem is that if I wanted to implement something like a flood fill (so that I don't have to hover my mouse everywhere just to fill a certain area), the algorithm wouldn't know when to end so it would keep filling everything until Unity crashes. I haven't fully implemented a flood fill yet, but I am doing so as I'm writing this post, but I have the theory that this tool will do me good later on.

A few obstacles

At this point I've encountered a lot of difficult obstacles, for example the collision system, I've been encountering a lot of issues with the characters sticking in the walls and not managing to get out. There are also the issues of the different types of collisions conflicting each other. I'm in the process of rewriting this system and replacing it with a much simpler one (resembling Temple of Chamber's collision system) because as far as these two games are concerned, there probably won't be any kind of advanced geometric collisions or advanced physics systems.

This might sound a bit lazy, but I'm trying to save time so that I can reduce the amount of workload I need to do (which is still a good amount). Maybe I might make the collision system more advanced as Bounty Hunter III goes along in development. In terms of Othermind, I'll most probably keep it the same.

Earlier I mentioned that I had issues with melee attacking, I'll tell you exactly what I mean. When the main character attacks once, a single invisible "bullet" should appear directly in front of when the player attacks. Much like a bullet, when it touches an enemy target, it detects the enemy and damages it accordingly. Where the problem lies is exactly how long the bullet should stay for. Because if the enemy has 20 health and the attack does 1 damage, if the attack lasts for one second and detects the enemy every single frame, it would die immediately.

The solution to this issue would just have the attack appear and disappear after one frame. This way it deals one damage every time it is summoned out. That may seem fine, until you get into attacks where one character charges. The attack hitbox should be on at all times or else it would be a bit silly if the offender passes through the offended without the latter taking damage, however if the hitbox was there at all times then all the enemies on the path would die due to the immense amount of "On hit" functions being called every frame.
A potential solution would be to put an invincibility timer on the characters. The player/Ally? Fair enough. The enemies? Well, it wouldn't be fun having to wait for them to become vulnerable after waiting a few seconds. A solution to this could be reducing the timer on the enemies, but even then, if several bullets (i.e. a shotgun) hit them at the same time - once one hits the enemy becomes invincible allowing the other bullets to pass through.
As you can see, it's quite hard deciding things like this - I've had this same problem in Bounty Hunter II and sadly it was never really fixed, although I made the shotgun's bullets penetrate the enemies on impact.

I'm also not sure which feature I should put on a top priority or when I should start creating maps, hopefully it should all come together soon though.

Conclusion

At the moment, it does seem like development is a bit on the slow side as priorities keep changing from time to time. But I'm trying my best to prioritize which features are the most important to develop. It does help to simplify some features which seem quite unnescacary at the moment (i.e. geometry based wall collisions), so I can focus on the features that matter more.

That's all from me!

Saturday, 23 March 2019

Forest of the uncanny

Disclaimer: This story may have some grotesque themes and graphic imagery, so do not read this if you are sensitive to somewhat graphic imagery.


The sun was shining fiercely on to the emerald grass, the grass was evenly cut and showed a consisting pattern of this throughout the land. The distance saw lines of trees separating the land from other bits of land. One of these areas of lands, had a small isolated cottage with a stable in the back which lived a euphoric farmer and an equally happy Mule. The former was named "Neil", the latter was named "Eli". It was lunchtime and Neil sat on a brown wooden bench and munched on a carrot. He held out his left hand, where another carrot was, to Eli - he rushed with a boisterous gallop. He quickly bit the carrot and proceeded to gnawed it down. Neil took another carrot out of the metal bucket next to him and held it out to Eli, and that too was bitten and eaten.
"Eli, do you want to have a walk in the forest today?" Neil asked looking at the sky, "The weather's pretty nice, no?"
Eli nodded ardently as he was chomping down another carrot.

As Neil finished his carrot, he jumped onto Eli's back and off they went from the muddy pathway that connected the small field leading into the gravel road. As they followed the trail, there appeared a series of trees adjacent to them, there was an opening in the forest with a muddy path. Neil got off and took Eli with him and walked into the forest. There were many pathways leading into many different areas, some of the trees had small brown mushrooms growing on them. Some of these mushrooms were alone in the dirt. Flowers of varied warm colours were disseminated through the forest in different shapes and sizes. Eli put his head down and started sniffing the flowers, but he quickly wrenched his head around rapidly in response to the strange and strong smell.

"Let's follow the trail with the colourful flowers" said Neil. Eli and Neil followed the trail of the flowers. As they walked through the muddy path, they saw a few other people around. They seem to really like the place... although a little bit too much. They saw one young girl hugging a tree and treating it like it was a real person and another of an old man kissing his wife. Eli and Neil proceeded anyway, in fact they rather enjoyed the happy nature of the forest.

"Y'know Eli, I think we should live here someday" mentioned Neil, "Wouldn't you think so?"
Eli nodded with a somewhat flustered look on his face, as he contemplated about where else he could have had those nice carrots he had at lunchtime, or even where else he could have had some nice apple pie other than home. However Neil was too enthralled in the forest and Eli was also starting to feel an infatuation for the forest, as his thoughts were starting to wander all over the place.
"You mind if I go to that tree?" asked Neil, "It looks really cool!"
Eli nodded with a look of prudence. Neil ran off into the forest, leaving Eli behind, Eli didn't mind this too much since he was used to Neil running off on to walk on his own or when he hangs out with his other friends. And Eli knew he would always come back. Always. Even in the most dangerous of times.

Eli wandered around in the forest, he looked at a group of children in Victorian clothing. They seemed like they were playing with jubilation. One of them went up to Eli.
"Can I ride on you?" she asked eagerly, jumping about.
Eli nodded happily and stood still so she could go on. Eli walked around with the girl laughing.
"This is fun!" she yelled with incredible joy, "Run faster"
Eli was a bit nervous since she was not annexed very strongly to him. Eli shook his head.
"Come on, you are so boring!" She moaned, banging on the back of Eli.
Eli grunted, and suddenly that girl slapped him hardly in the flank which made Eli panic. Eli ran all over the place and she was really enjoying the ride, the other children chased after him saying 'Can I go on?', 'Let me ride!'

Eli fell over in panic and inadvertently launched the girl onto a tree branch where her head popped off. Her torso and head fell onto the soft grass with brown leaves scattered, oddly enough no blood came out of the head. Eli was shocked and stayed in place to see if his vision was tricking him. He closed his eyes and shook his head violently for good measure. He still saw the torso and head, sticking out still on the ground.
However the torso's hands moved and pushed itself up to stand.
"Now where's my head?" asked the head in the distance.
Eli was even more shocked, he was tempted to run back and look for his owner but he needed to see if she found her head.

Eventually the torso found the head and put it back in place.
"Oh sorry, that happens sometimes.", responded the girl, "What's wrong, why do you look so scared?"
The other children came to look at the horse, one of them said "It's okay, it's safe here, you can play with us forever and ever".
The girl did a very cutesy smile along with the other children, although people would normally be happy about this, Eli was far too scared to even accept such a smile. Eli scrambled away as fast as he could across the forest. He tread across countless pathways, trying to remember where Neil was. The other people were starting to look concerned with Eli's panicked look, and not in the sympathizing or curious kind of way...

Eli finally arrived at the area near the strange tree, which had an opening a bit like a mouth. He saw Neil by the opening.
"Should we get going back?" asked Neil, "The sun's going down - What's with the concerned look?"
Eli couldn't explain what he saw other than the fact he wanted to go back home.
"Oh... I guess you didn't like this place huh?" asked Neil, "Maybe you're a bit homesick..."
The two went back to the way back home as the sun was starting to rise down and everything was starting to become orange. By the time the two arrived back home, the sky was a nice dark naval blue colour, Neil took Eli back to the stable he slept in.
"Well good night little buddy" responded Neil as he went into the house. Eli started to feel sleepy and drowsy and went to slumber.

In the middle of the night Eli could hear some odd voices, they seemed like the Victorian children he met before. Eli was too asleep to be aware of anything, however he heard the voices of Neil and he sprung up rather slowly.

He saw Neil walking with the Victorian children, and he slowly chased after them, though he was quite tired and could barely walk at all. He followed them into the same forest he was frightened of, although all what Eli could think about at the moment was finding Neil. Neil and the Victorian children took notice of him.
"Oh hi there, Eli. You ready for a party? We gonna do some good stuff tonight!" yelled Neil crazily as he took off one of his limbs and his head and juggled them together, "Huh? Where's my head? Oh! Here it is! I found it! I found it!"
Eli screamed in the most hoarsely tone imaginable. Was his owner possessed? Eli shook his head for good measure and even banged it on a nearby tree. His owner was still juggling around his body parts and dancing like a clown.
"Hey Eli what's wrong there?" asked Neil, as Eli ran for his life into the forest. He ran into that strange mouth-shaped tree in fear. Before he could even think, he saw a light inside the tree as well as what seemed like an alluring horse further into the tree. Eli then started to become enamored, to the point where it brought several feelings of confusion, like whether or not he should even be scared at all. Eli chased after her as she ran deeper into the tree's seemingly endless corridor. Eventually she outran him and was out of sight, Eli gave up and decided to head back, however...

He saw a huge wall in the tunnel made out of wood, he halted and headed the other way but that was blocked too. Grotesque images of wasp heads with their compound eyes, glowing eyes in the dark and smiling trees sparked into Eli's head, he panicked and screamed to the top of his lungs. The walls started to constantly change texture with the small barks growing bigger and turning into dust, then turning back into odd flower-like shapes. Eli started to get squashed and clustered as he struggled through the walls. As the odd shapes were starting to engulf him, he caught a glimpse of that female horse's head - which had no pupils and smiled as it got closer to him. The head did not have any body, but Eli's vision was fading...
He felt himself escaping from his own body and completely froze in his own grave.

He now could not feel, see or touch anything.
As he is now a part of this forest.

The forest of the uncanny.

Monday, 11 March 2019

Easy maths: Sin and Cosine

Hello there!

Today's blog is about maths, more specifically - the rather interesting side of it and what I have learned. Keep in mind that I am not an expert in the subject, so any kind of criticism is more than welcome. With that being said, let's get into the maths.

Preface

Sin and Cosine are the concepts you may have first heard when you were being taught how to find a certain side/angle of a triangle. The phrase "SOHCAHTOA" often tends to pop up, and a lot of the questions you were given you just had to use this formula to answer them. As well as explaining what this phrase means, I'll also explain why you use this to find sides ,something your maths teacher probably never explained.

Relations with the Axis

Sine = X and Cosine = Y. I've pretty much told you the answer right there. So, next section....
Actually, I jest.
Look at the triangle below:
It has the hypotenuse, adjacent and opposite side labeled for your convenience, so you don't need to crack open your maths book.

If we want to find, for example the adjacent, we will need to use SOH (Sine, Opposite and Hypotenuse). Why?  Because the adjacent is a horizontal line, and Sine is used for working them out (think: the X axis).
Now, we're not going to do a maths question, so don't panic. I'm just telling you a theoretical example. Anyway, Sine is the thing you would use to work out the horizontal parts of the triangle. As you can imagine you would need Cosine for the Vertical axis (or the opposite in this case), therefore you need to use CAH. I'm not going to talk about TOA because I'm not talking about Tangents in this blog, only Sine and Cosine. But hopefully I've made your maths homework a bit easier. Sin for finding out the horizontal side and Cosine for finding the vertical side.

Okay, at this point in time, you may wonder "Right, I know that Sine is used to work out the horizontal and Cosine for the vertical, but why? What is the relationship between these?"
I'll tell you in the next section.

Angles to Vectors

You may have also encountered angles at some point in your maths career, the things you use a protractor to measure or what you have to figure out in a triangle, on the opposite of the right angle, (using Sine and Cosine). I'll tell you why:
As you can see, in Desmos this is what Sine (Red) and Cosine (Blue) looks like in a graph. It produces quite a wavy pattern, which looks quite nice. This wavy pattern is far more than just a beautiful little pattern, it also shows how Sine and Cosine functions, in the graph, Cosine is a little bit more delayed than Sine in terms of reaching its top and bottom, but by how much exactly, and why?
If you look below at the two diagrams, the top point is 1 and the lowest is -1, the more interesting point is the horizontal point, which is half of PI (3.142...). If you multiply this by 57.672 (to convert radians to degrees), you get a number which is ~90. Sounding familiar?


If you quadruple 90 you get 360, which a full circle is 360 degrees (or 2 PI radians). The relation of this to Sine and Cosine is that the distance that they are apart is equivalent to a quarter of a circle. I'll demonstrate what I mean below:
Make sure the setting is in degrees rather than radians.

As shown, B is 90 and the point on the circle is where 90 degrees would be going, and the number '1' is shown again, much like the previous diagrams. The reason that Sine is used for horizontals and Cosine being used for Verticals is shown in the example, due to the aforementioned separation by half a PI. If we swapped Sine for Cosine, then the point would be on the top rather than the right side and that wouldn't look like 90 degrees. Since these two operate in a wavy pattern where the highest value of Sine and Cosine is 1 and the lowest is -1, they can be a useful way of converting angles into a unit Vector. I hope you are starting to see how Cosine and Sin can be used to be turned into vectors.

This is especially handy if you want to simulate rotations via having degrees rather than vectors. 

Conclusion

This is my first time explaining mathematics to you, and I feel a bit nervous doing so, since I don't really have much of a formal background in the subject beyond GCSE. But as I've stated before I welcome any form of criticism.
Sine and Cosine are quite useful things, probably more than you thought - it can be used for things like converting angles into vectors, rotating matrices (which I know the barebones of), items that bob up and down in Minecraft or even chiptune music (stuff you would hear on old game consoles like the Gameboy).

That's all from me!

Wednesday, 20 February 2019

Announcing the release of "Temple of Chambers"

Hello there!



This is the JavaScript game I mentioned in the last post that I was working on; after 2 months of development, it is finally complete! The game was built from the ground up, that means I used pure JavaScript functions with no 3rd party libraries whatsoever. I have been strongly considering to make another branch of this game into a game engine which I could use to make other games using JavaScript. I think that would be a wonderful idea.

Enough technical stuff, what is this game about?
You play as a big-nosed wanderer who explores a forest, when suddenly they fall into a hole which lands them into one of many chambers in a temple named the "Temple of Chambers". The wanderer needs to find their way out by solving many puzzles to advance their way through to the exit.

I initially intended this game to less linear, but it proved very tedious and testers needed to backtrack often through long corridors, therefore I decided to make the game more linear in order to prevent the need to back-track.

If you want to play the game, play it here (you don't even need to download it, hooray!)

Saturday, 9 February 2019

How to make pixel-perfect graphics

Hello there!

I have been dabbling around with JavaScript on and off for a year and a half; it was not until mid-December where I decided to start development on a game using the language. I've briefly mentioned about it in my other blog posts but never really went into depth about it; I want to keep it that way until it's release (~20th February), but I will tell you that it is a game much like Prelude of the Chambered (minus the 3d and violence).

The great thing that I've learned from making this game is how to create a custom engine and way of processing logic and rendering images to the screen and the such like. I did all of this without having to use C++; although I'd still love to make a custom engine in that language, I don't think I have the experience to make a fully-fledged game engine in such a language.

What I'll be talking about here is how I've managed to create pixel-perfect graphics within the engine I've created in JavaScript.

Preface

What do I mean by Pixel-perfect graphics?
By that I mean having pixel graphics where every singe pixel is in a consistent order, like a series of tiles, with the same width, height. Usually when it comes to increasing the screen resolution, you need to make the sprites, the world and the graphic user interface bigger so that the player can see more. Many would take the approach of increasing the size everything and increasing the width and height of which the images are drawn. However this approach would produce results like this:

Not too pretty.
You can see here that the pixels of the characters are not in line with each other, there are pixels that partially overlap with other pixels. There is not much depth in that at all, perhaps if this were a game which had less pixel-based graphics like vectors, then that would be completely fine because everything else has vector graphics. But here, the cohesiveness fails miserably. You need not worry though, I have found a solution to this problem.

Drawing with mosaic

I'm pretty sure you may have seen mosaic art before, that art where each tile is placed in a square pattern. Trying to make the world seem bigger would be like trying to put a mosaic art that consist of 3cm tiles into mosaic art that consists of 1cm tiles. This may be fine if the size of the image is being resized for certain effects like this (the map below the 3 characters is being resized to give the illusion of height). However, if you are trying to make the screen resolution larger, trying to resize the images like this would lead to ugly effects like the picture below. 
The character outlines in magenta resemble the size of each pixel.


Rather than trying to force a mosaic image consisting of 3cm tiles on to a pattern of 1cm tiles, how about we shrink the tiles of that image into 1cm tiles and fit it onto the rest of the art. It doesn't have to be 3cm, it could be 7cm or 13cm or even 50cm! It dosen't matter! You can reduce them to 1cm tiles and fit them in.

Real space vs Visual space

Now that I have spent an entire point rambling about mosaic tiles, but now lets put it into practice with pixels. Say we want to put an 32x15 pixel image on to a 150x95 world, but we want to increase the size of the world so the player can see it better.

What I have learned from programming my JavaScript game is that you do not change the world or the objects' real size and position. It's a better idea to keep the two variables constant, I just mentioned the term 'real' size/position - by this I mean that the objects' size relative to the tiny pixels rather than relative to the player's eyes. Instead, you'll need to change the size at which both are being rendered, if you scale the aforementioned object and the world by 3 you will get a 96x75 image. A similar example can be seen below.



Unlike the last image of Bounty Hunter I where the pixel characters look inconsistent when they move, when you move the player in this scenario, all the pixels will be aligned or 'snapped' in place in respect to the real position of the player. The reason this is that, as I said before, despite the render size being changed, the player's real size and position stays the same as if it were if it was a 32x15 pixel image rather than a 96x75. 

With this you can have pixel graphics in a video game where they look all cohesive, much like graphics on a SNES, PS1 or a hand held console, where all pixels are displayed in a consistent manner.

Lower level graphics

If you are making a game where you have control over where the pixels are drawn, that would be even easier because you can just state how large each pixel would be and draw the character in real space and let the engine calculate the character/object's exact pixel size on the screen.

This kind of thing would be useful if you are making a render engine in something like C++, where you do not have to work around any shenanigans that a 3rd party engine may have.

Conclusion

This has been a problem that I've been consistently seeing with pixel games nowadays, and there are rarely any tutorials on these kinds of things. The tutorials I've been seeing on topics like these show things that are way too unnessacarily complicated and conboluted. I'm not sure if this is the completely right way, but I think it works. If that is not the case then please let me know and explain your soloution in the comments.

Through what I have explored here, I would like to help others encountering the same or a similar problem and mention that it does not need to be complicated as it seems. I hope this has been useful to you and will allow you to have pixel graphics that do not look messy and unordered.

That's all from me!






Friday, 25 January 2019

The split of two games + exclusive core features


Hello there!
I've got another update on Magnum Foundation. Today I'll be focusing on the issues of splitting the game into two halves as well as some of the core functionalities I've implemented since the last update.

Preface

There has been quite a large amount of progress since the last relevant post, although since then I have split Magnum foundation into two projects, I'll still call it Magnum foundation until I reveal one of the games it contains (around march).
I've also added in a number of features to both games like options of placing tiles, modifying collision data and teleportation. Splitting the game was quite a hard decision to make since I've had to deal with a number of consequences which I'll get into detail in the next section. 

Splitting Cautions

Which time to split the two projects was a pretty hard decision to make, on one end I could try to split early so I can start to focus on adding new exclusive features to the two games. On the other end I could try to focus on building up the core features that would be present in the games I would be making, then I could go on create the exclusive gameplay mechanics and features on each project after this stage is done. Both have advantages and disadvantages.

The former has the advantage of me building up the core exclusive mechanics faster so I could actually spend more time actually making the maps and programming/designing characters for the game and possibly refractor the game's code much earlier. However there is a disadvantage to this, which is that if there is a feature that is fundamental in both games, I'd have to spend time implementing it from one to the other and it would eventually be quite bothersome having to hop back and fourth between the two projects. And this is despite the fact that the solution could be to just copy and paste the needed code.

The latter has the advantage of me having a core solid foundation to base both games on, thus elevating thus eliminating the need to constantly hop to-and-fro between two projects. However like the last point, this also has its own set of disadvantages. For one thing I would need to refractor the codebase because by "laying a foundation", I mean adding all the features that both need in a very FYS (functional yet shoddy) form.

In this case scenario, I have two options - I could either spend even more time on refactoring the existing codebase or split the code as is and have to do the shift-fixing anyway. If I just planned for the two games whilst working on/polishing the foundation for them, there would not be a guarantee that these plans would be the same, because it is one thing that you plan and another to implement (and test) these features.

Furthermore with building the foundation of the two games, it will never be perfect especially since it is the first time I've made games of such scope (think: A short Zelda game/ Cave story). How could I possibly know what needs to be done on my first go? Yes I've worked on some similar games, but there is always something you don't know about when you have stepped into unexplored territory.

Maybe if I make games of this scope after these, I will be far more certain of what I know I'll need when it comes to such things, thus making the split less of an issue. I know this because back when I made "Red-Blue Adventures", I knew much less about developing RPGs and would often run into many bugs that I wouldn't have even thought about. If I made a game like it now, I would make the codebase far more clean and easier to mess with.

Map transitions and collisions

In terms of teleporters or map transitions, I've had experience with mostly ones that take you to the next area and teleport you to only one place. The teleporters in Magnum Foundation are significantly different, they teleport you to certain positions that a map has in its data. Originally I did want to do something like what they would do in RPG Maker where you can just click on where you want to teleport to on the selected map, but this proved to be far more time consuming and harder to do than I thought. Therefore, I decided it was best that I put objects which names you could link to a teleporter that teleports you to that object.

For example, say that I have map 'X' and it has these linking objects. I could have a teleporter in map 'Y' that links to one of map 'X''s linking objects, perhaps with the name 'FromBuilding'. Once the player touches that map transition in map 'Y', they teleport to Map 'X' to the object with the name 'FromBuilding'.

Collisions are far more customizable, as the collision system was written from scratch (using some help from Sebastian Lague's tutorials). Since this is the case, it became far easier to implement a feature where collision tiles do not apply to a certain type of character, so they could just pass through. This would have been handy for Pipe Dreamer's development where there are certain tiles (i.e. water) that could only have been accessed by certain characters. Using Unity's default Rigidbody 2d in these situations can prove to be very difficult as I'd need to constantly fiddle with workarounds and the such like resulting in a large mess of code.

Although some may argue that this is 'reinventing the wheel', at least you know the wheel you're working on.

Layers and tiles

Another thing I would like to discuss is the level editor, more specifically the layering and tiling system.

My experience with making maps/levels for my games would either be using some 3rd party tiling programs like 'Tiled' or making my own, which would be reading from a pixel image with certain colours, for example, Catwalk or Bounty Hunter II (when it was early in development). More recently with Waterstone Temple, Earl's Order and later on Bounty Hunter II, would have their own custom-built propetary level/map editors.

The first two had their tiles built up as a database of every single tile's position and type. Bounty Hunter II's maps were created in Tiled, then exported as a large PNG file (with separate layers), the rest of the information can be found in an earlier post. Since it can be a bit memory-consuming to have a large PNG file (feel free to correct me if I'm wrong on that), I decided with Magnum foundation to take a more different approach.

I decided that Magnum foundation would have the approach of using Unity's built-in editor... editor. This allows programmers to extend the Editor to make it suitable for their own needs. I did do this to an extent in the 3 games I mentioned before, but Magnum foundation uses it to a much larger scope. I did analyse some code from a Level editor that was related to pokemon and decided to create my own level editor based on it. Unity does have a built-in tilemap, but after some serious consideration I decided to make my own from scratch.

The reason I've decided to make them from scratch was to learn how to make my own tile map editor as well as having more control over it. If it's buggy then I only have myself to blame rather than try to wait for an update, as well as that, I'd need to deal with fitting the tilemap into a format my game can read. As I said before with the collisions, at least I know the wheel I'm dealing with.

Conclusion

Progress has been going pretty well for magnum foundation, I've been working consisntently on it on this past month. I haven't mentioned all the features I've worked on because I don't want to blather and overwhelm you with a big load of changes. I might mention them as this project goes along in the development pipeline, possibly when I've expanded on them.

That's all from me!

Tuesday, 15 January 2019

Why I quit twitter and will most likely never return.

Hello there!
I've decided to change things up a bit and start this year with something that isn't related to game development. This is something I would like to do more often, I like to present my own personal opinions on certain matters.
Anyway, on to the main topic of this post: Why I quit twitter.

The Preface

Despite the title, this post will mainly be about social media in general rather than just about Twitter, the reason I put twitter in the title was that it was the specific social media I quit. Now then, on to my main case.

I'm pretty sure we have all heard about social media at one point or another, we see brands like McDonalds or Pepsi all telling us to follow things like their Twitter or Facebook. We also see many famous people who have at least one form of social media as a way to get them closer to the general public by showing off the ice cream they had last night or that curry that they cooked lately or those god-forsaken selfies and more pictures of their food. There are also lots of people who are not celebrities who use social media in public places like the train or school, they tend to be the people who would consume such content by pressing the 'like' button.

What I am trying to say is that social media is virtually everywhere we see. And I too was hooked on this grand phenomenon at some point. My first opening into this world was when I joined Scratch c. July/August 2011. It was quite a cool way to interact with others and I even met a few people on there that I still see to this day. At the time, most of my family members had a Facebook account - I thought this was a fundamental bit of tech, however I was not old enough at the time and I hoped I would get one in the future. Hold on to this thought. It will be important later.

Twitter's Beguiling Charm

Starting from 2013, I decided to make a twitter account since I was pretty much inspired by the Minecraft creators at the time and I wanted a chance to speak to them, as well as using Twitter as a tool to fuel my own success. I don't completely know the specifics of why I joined Twitter but that may have been why. Regardless, Twitter became a new found hobby to me and my first step into the world of social media. I thought it was relatively harmless (possibly thanks to the kind environment of Scratch), however the reality could not be any further from the truth.

I would find myself often distracted by the people I looked up to i.e. Markuss Perrson, not to mention I also felt increasingly despondent what with all of the people's 'amazing' lives being presented on social media and them getting a lot of attention whereas nobody cared about my posts.
The reason I still used Twitter and did not delete it, was that I thought maybe some day, some day, in the name of some miracle, people would notice my posts. It was this false hope that kept me going, although I my use of Twitter started to wane.

It was not until I saw Dr.Newport's Ted talk on quitting social media, which I truly realized the hot mess Twitter caught me up in. When I first took a glance this video I thought "This video was quite a lot of rubbish, why is he telling me to quit social media".

However when I watched the video fully later on, I started to realize that Newport was on to something here. A lot of what he said struck a cord with me, and brought up thoughts that were in the back of my mind and I realized the reason nobody cared about my posts and why I would start to feel depressed when I looked at other people's positive images of their lives. I started to ready Cal Newport's blog "Study hacks". Through there, I also found out that the 'Like' button was actually a device used to exploit very basic underlying human traits like being accepted. The worst realization of this, was that these social media companies were using these things to make money. This revelation made me delete my Twitter account on April 2018 and I have no regrets over what I have done.
The last of my Twitter before it kicked the bucket. I wasn't born in 1999 by the way.

The Delusions Of Social Media

Since I'm probably the only one out of many people I know who came to this realization, I would obviously get some criticism when I would suggest that they get off social media. Thankfully most of their claims are quite flawed, and this would be a good time to push in some solid counter-arguments:

"You need social media to promote the product you are making"

This argument does seem to make sense since social media is very centralized, which could help you meet people on there easier than making your own domain. However this comes with a 'but', since loads of people use social media and are begging people to see their products, how will you be any different from the next person who uses social media?

 Believe me, some people on social media use some very dirty tactics like "If you like my stuff I will like your stuff" which makes me question the value of the promotions on social media. Plus, since social media is so focused on bringing people constant novel stimuli, how will people even stick around for long enough to understand what your product is, compared to some dumb posts or memes?

I think blogs are a better way of promoting something because they emphasize more on the quality of the content (possibly since it does not have a silly 500 word limit). I'm pretty sure a good blog post would be infinitely better than some tweet that is essentially "BUY OUR STUFF"! A blog post is more like trying to write a good quality book rather than a silly message.

"You need social media to keep up with your friends latest stuff"

This argument is far weaker, for a simple reason too: because I don't care about what my friends are up to.
I don't need to know that they were married or what they ate today - that's their own business not mine. Even I wouldn't share this stuff either, because it's my business not yours. If I want to communicate with my friends, I have things like Email, Discord, and Text message. The middle one is much more privatized than social media a bit like Skype and allows you to establish your own server with your own rules and perks, (as far as I have researched about Discord). These are enough to have me live and communicate with friends.

"Aren't video games the same thing as social media?"

This is an argument does have some truth embedded in it. Especially with mobile games like Candy Crush and the manipulation of the human brain it brings with it. There are games that function a lot like social media with the low effort needed to put in to tasks and trying to seriously hook the player in. However, this is not what video games should be generalized on, I think that video games should be viewed as an engaging hour or two long experience (given it is not in school or work hours) rather than a silly 5 minute distraction.
Social media on contrast is based on constant swiping and tapping on your phone. The amount of people I see tapping away on Snapchat like mindless drones is unbelievable. You can enjoy a video game in the same way as you can enjoy a sport or a book, they are great fun to play with friends or solo. Social media is probably the kind of thing you would do when you have dead air. It is filler to a void that could have been filled with otherwise more productive or enjoyable activities. Think about it, do you think constantly browsing through a feed and refreshing the page is much fun?
I wouldn't think so either.

"You use YouTube right? That's a social media!"

That's true, I use it to listen to music, look at certain tutorials if I'm stuck or a way of learning something new. However, do you know what YouTube has, that Facebook, Twitter, Instagram or Snapchat doesn't have? YouTube is a platform for sharing videos, which is a problem that these other four do not really solve. YouTube has given a way for people to share videos (which are an important form of information) which was very hard for people to do pre-YouTube.
With all that said, there is a catch to YouTube. Since YouTube has grown bigger over time, they introduced a partnership with numerous creators which allowed them to make money from advertising. This does not seem like too much of a bad thing at first, until you find out the fact that YouTube have algorithms that decide what content should be viewed more. Many youtubers criticize the fact that algorithms rather than human beings are doing the work of viewing content. They presume that algorithms are far less superior than human work and therefore causes a problem. However they could not be further from the truth; they need to consider the fact that a human needs sleep, food and hygiene whereas an algorithm does not. I think these algorithms are far more efficient that humans at doing tasks like these, however the main problem is not the algorithms, but what they are being fed. One example of a problem like this can be found here, when content creators are finding a quick 
But I still think there is some value on YouTube relative to most social media, and there is definitely a way to make YouTube an invaluable tool without the negatives it may bring. With most other social media however, there is very little value that is provided by these activities alone, possibly highlighting that these 'tools' may be incredibly overrated.

The over-exposure effect

I mentioned several points ago that I desired to have a Facebook at some point. As you may have figured out, that 'point' never came. I'll tell you why:

I have established that YouTube had something to offer whereas Facebook did not, I learned this lesson from using twitter because that much like Facebook did not have anything new to offer other than create a new 'cult' within the internet - but why are these social medias incredibly popular anyways? 

The answer could be to do with being over-exposed to such things. In my case a lot of who I saw had social media and they were posting a couple of funny and cool tweets, this gave me a reason to sign up for platforms like Twitter. This could have definitely been the reason why my friends and family signed up for these platforms which they would then submit their waking hours to. Although this problem exists far beyond social media, however the effects of it could be arguably much more drastic as social media is based around constant 'news' and 'updates', and then checking them around the clock - in a similar addiction to drugs, tabloid news, smoking and gambling among many other addictive habits. Whatever they are, that glance off your school's friend's public opinion you were just notified about (which you probably did not need to know about in the first place) seem to be making Zuckerberg and Spiegel (not "Spike Spiegel") lots and lots of juicy money. That's quite a business model indeed. 

Conclusion

Don't take this as me forcing you to quit social media, this is ultimately a choice you make. This is mainly a post to project my opinions and growing concern with such social media platforms. No better time than now would be when I post them. With that being said, I don't really care if you use social media or not, if it allows you to link to posts you find interesting or you use a bot to post links to your actual, more valuable content, then more power to you. But you are probably better off using social media for at most an hour or just quitting it entirely.

That's all from me!