Mixi - A journey through the unknown
Mixi: A journey through the unknown
Hello!, In this devlog I will share a bit about what went through my head before and during the process of making the game, I'll share my thoughts as I was talking to myself, this will be a rollercoaster of thoughts, so.. hop on!.
- Before the storm -
And here I am, just before christmas, I've been in this videogame programming course since October, I have to attend classes in the afternoon while I have to work in the morning, it is very etertaining but I don't have time to myself!. My teacher wants me to join a gamejam, and this is very funny because I had never studied programming before october when the classes started, and never touched anything related to unity either, so here I am, I have almost no programming skill and my teacher is giving me youtube tutorials to learn to make games, and the only games I've made so far are a Pong and a breakout game.
Last week was christmas, and my body was telling me that I was stressed and anxious, although I didn't have to attend classes, I had to work and I also had a lot of homework from the course, so I've been doing homework all the days of the week after having lunch. I've been thinking about what game to do, and also was thinking that with my limited knowledge I should do something easy and short, I didn't want to do another pong or breakout game, I wanted to do something a bit more difficult and unique, with all that I had learned so far.
Next week is the game Jam, and although I don't know the theme yet, I think it is better for me to think about what game I want to do and try to fit as good as I can the theme in it. I'm going to do a puzzle game about colors, and I'm going to do a simple mechanic about adding or mixing colors, It will be a really easy and ugly game, but hey, it will be my game, my first game... (Turned out the game I had in my head was not so easy to make, or at least, not so easy for me).
- Day 1 -
Today is the day, it's Monday, and although the jam started a couple days ago, I didn't have time to start it. I know more or less what I want to do... (yeah, more or less), and I'm heading towards the school to attend classes, the teacher said that he was going to let me some time to make the game in class, so I will start it there. Although I have in mind what I want to do, I'm still not sure about how many maps, how the mechanics will exactly work, I don't know anything about the graphic style or audio or for example, ¿how is the player going to change or select the color?... You know what, this is something I'm SURELY gonna find out along the way, RIGHT??? (nervous thinking).
I open Unity, and start doing my thing, I didn't even had a plan but "whatever". I started doing the basics that day, creating a cicrlce for the character, the main room (named it the lobby), with four walls, rigidbody and collider for character and collider for walls. I made a square room (or rectangle), that was going to serve as starting point. I still don't really know how quaternion works, although I tried to understand it, so I'm going to use the code from a basic game we made with the teacher to have a little dot that moved in the direction of the mouse, and that would represent where the user is shooting, and also added a script to move the character.
A this point, I started to look into if I had to use rb.MovePosition, transform.translate, rb.velocity, rb.addforce or simply using the transform position... What is the difference!??!. Instead of just using whatever, I prefered to learn online about what should I be using, and turned out people recommended AddForce because it is the better way for moving rigid bodies, if there is any collision, it will act correctly using physics. I learned that translate and transform where better for entities without rigidbodies, moveposition was better for kinematics, because it had issues with physics, and velocity should not be modified directly, so I opted for Addforce.
I used Addforce and noticed how I was sliding, so I searched again and learned about the drag, I had to pump up the drag and simultaneously increase the speed, because it was too slow, so after a bit of tweaking, got it as good as I wanted it.
I also added three different doors with colors which I thought would be the three starter colors, green red and blue (although I changed it later), and also created three prefabs of the same colors to use them as the first bullets.
Finally, I made a script where It would recognise the doors by tag with a collider set on trigger, (I created tags of DoorRGB, DoorCMY and DoorRYB, which are the three main maps and where the puzzle takes place), whenever you shot them with the color bullet they were made of, it would unlock that door so you could go through them. Each bullet had also their proper tag (Bluebullet for example), collider and rigidbody, although they were also triggers, and I made a script for the door that recognised with a boolean whenever the user shot them with the same tag and bullet color, and if true, let the player go through them to change scene.
This was not really that difficult and could make it relatively fast in class, so finished it and when the class finished I went back home.
- Day 2 -
Last night I couldn't sleep well, a lot of ideas and mechanics were flowing through my mind and I'm the type of person who thinks too much about everything even if it is something dumb, so I was constantly analysing if the idea of each mechanic would fit, if I would do it in time and more importantly, If I was capable of making it, because one thing is what we are thinking, and another is if you are able to do it.
At this point, I asked my boss about to have a bit of free time in the morning (thank god my boss is my father), because if not, It would be impossible for me to finish it.
Today, I have been busy with a paper and a pencil, I dedicated almost all my free time to make a simple design in paper about all the elements will have my game. Although it looked like a child's drawing, I designed the three main maps and the final map which, at the final day, I took the decision to delete it, because I couldn't find a way in time to make a system to remember the color the user had unlocked and carry them through a scene, so he could paint the three diamonds of the main entrance room colors to reveal the door needed to finish the game, so I decided to use the main room with the three main doors and add the diamonds directly in it, so the player could get directly the colors from the doors, without needing to go through a scene.
I spent all the time thinking about it because it was difficult for me to find the perfect mixing combinations of each model color, given that I had to get as the final color, the primary color of the next main door, I had to find the perfect balance because in this game, you have the option to start with one of three colors, and I wanted to make a loop, so it would be easier for me for developing the game. So this way, if you started with cyan, the first door would give another of the three main colors, and the second room would give the other main color, and so on, and if you had started with, for example, red, it would loop starting with the red color.
I also started making the triangle and circle scripts, the adding mechanic and substract mechanic, although it was almost all thinking about how I would do it rather than dong it.
- Day 3 -
Today I finished all the basic map setup, I made the 4 main scenes (I THOUGHT) I would need, and placed the circles and triangles in a way I liked it, although finally I added more elements to try to make the game a bit more "difficult". I also finished the additive mechanic, basically I had to go through each color model and find out what mixes were possible in each room, and it took me a lot of time just this part, but I finished it. What I did was that I created every possible color bullet that could get the player with all the combinations, created a prefab and added a tag to each of them. The way it works is the script detects if the gameobject material color is Green (for example), and if it is green and it detects a collision with a trigger (bullets), if the bullet has BlueBullet tag, change gameobject material color to yellow (RGB model). I had to do this with every combination possible and, not gonna lie, it was a bit annoying, (CTRL + C, CTRL + V!!), but it worked!!
I remember at first, before starting the game, I intended to use Diamonds for something else, but finally discarded the idea, my mind couldn't handle to much processing at this stage. I also had thought about if I should try to add a slot bar menu so the player could select which color to use, because I wanted the colors to stay in the inventory whenever the player acquired it, or if the player could only use the color once and then should have obtained them again, and If you would like to shoot with substractive or additive mode, you should have to press shift to toggle each mode, but it was too complicated. I tried to look into making the slot bar menu but all I could see were tutorials about how to make slot menus but you had to click the slot to use the item, and I didn't like the idea, because I prefered something easier than having to click each time in the bottom of the screen, so I discarded the idea, and decided I would to something easier, just making three different hotkeys or buttons and each button be a bullet in one of the three modes.
This day I also started looking into the substractive mechanic, but decided to give it a chance another day because I couldn't think a way of how the mechanic would work and how to implement it, so I did the basic mechanic of destroying the bullets gameobject whenever they hit a trigger with a tag (wall, circles, triangles...).
- Day 4 -
I started looking into the obtain color mechanic and finished it, I decided to create an obtain bullet prefab with an obtain bullet tag (yeah, MORE TAGS), and what would happen is that if the bullet would hit something (by triggerenter), and if it wasn't the gameobject with tag "walls", it would access the collision.gameobject render material color, get it's value, and change it's own color to that color, and then, upon colliding with the player, it would destroy itself. Whenever the player collides with the gameobject with tag (obtain bullet), it would get the information of the color of the gameobject and store it in a color variable. If the variable matches any of the materials.color, it would change the prefab of the bullets of the player of the same color, so that, if it collides with green, the green bullet prefab, (and later, the green substract bullet prefab), would replace the actual bullet prefab of the player.
I also had some problems with the combinations, because I realized that some combinations could interfere with the same one in different model colors, so for example, in one model color yellow and red could result in a combination, and in another color model, could result in a different combination, but I programmed only one of the possibilities, so I tried to fix it (Spoiler: I couldn't ): )
I also changed the way the circles and triangles were distributed in each map, because I didn't quite like it. (They seem to have a random placement but they are not!), and also decided that the additive mechanic would only work in circles and substractive mechanic in triangles, so it would be easier to code.
- Day 5 -
Today finished the substractive mechanic (it is a bit weird and didn't code it as would have liked it, but whatever). I had to use a new type of circles with a new tag and script called receiverCircle and the triangles. Whenever the triangle detects it has collided with a substractive bullet, it will set true a certainboolean (I had to code all the combinations I needed), so for example, the triangle would detect that his color is Cyan, and if his color is Cyan and detects a collision with a green substractive bullet (RGB model), it would turn a boolean sendBlue to true. A placed receiver circle would have attached the triangle who gives him the color, in this case, the cyan triangle, and if the boolean of the triangle is true, it would turn the color of the receiver circle to the color of the boolean ( if sendBlue == true, turn the circle to blue color).
I also used an IEnumerator with a type called colors to help in this task, although I had never used IEnumerators before, I found it very useful, because the issue I found was that once a boolean was true, it would keep being true, and it would be adding more and more true booleans, and what I wanted was that if something is true, everything else is false. (If isGreen is true, turn to green and disable the other isColor variable). I know I probably could have handled this issue with something very easy, but I couldn't think about anything in the moment.
At this stage, the very very basic mechanics of the game were finished (that's what I thought, HA!),although I didn't even do the final map and ending, and was missing graphics, audio, and UI (It was far from finished).
I also had to rethink about the starter colors, because at first I thought about being Magenta the primary color of the RGB color model, but decided it would be Cyan, so I could loop the maps (as I commented before), and it would also fit the easter egg I had planned, and made the necessary changes.
- Day 6 -
I finally finished the basic mechanics of the game (deja vu?), but was still missing graphics and audio. I started looking into the different scenes and how they should transition between eachother, and realized I had a major problem. Yes, the game worked, but I didn't think about something very basic, If I have three different starting colors, I had to make different scenes so the player could unlock each next color of the loop. So for example, if you started with Cyan, the next map would be the red color door, and next the green color door, but what if you started with red or green?. The solution was a bit drastic but it worked, I duplicated each scene two times and renamed them in order (GreenStarter, Greenstarter2,3 and 4, RedStarter.... etc). And I had to create new tags and assign them to different scene doors so you would get the correct scene depending of your starter. I finished the game with almost 30 scenes, and initially thought that 4 of them would be enough (how silly of me!).
You know what, I would like to show you how my tags list and inspector of each gameobject looks before... oh god... Basically, I have more than 40 tags, so I have to go to the bottom of the list of the tags and make multiple clicks just to get to the las tag I added, and the inspector... well... I discovered what [SerializeField] was, and I liked it a lot, so I started adding it to EVERYTHING, and now my inspector doesn't look like an inspector, the player gameobjects has so many serialized fields to assign all the bullets that you have to scroll down quite a bit to see other components (yes, I know you can simply click to hide the component), so basically, I saturated every gameobject possible with inspector serialized fields, yeah...
I also discovered and liked the trailrenderer component, so I spent some of my time playing with it, and decided to add a little trail to every shot, using the same color as the bullet.
I also modified a bit the aiming little dot, it was yellow by default, but saw an opportunity and decided that it would take the same color of the bullet, so this way the player could easily see the color of the bullet they have equipped.
- Day 7 -
The last day was a bit hectic. I started looking for sprites that I could use, and after a while, I found one that I liked. I started adding the sprite with a tile palette in the main four scenes, and then decided to copy and paste it to the other ones. I was also looking for sprites for the triangles, player and circles but I didn't find anything that I liked or anything that would fit the game, so I discarded it and decided to just simply go with what I had, and focus in other aspects of the game.
After the sprites, I searched for the music and sound effects I could use. I decided to include a main theme for the entire game, and I found the problem that it would stop and restart after each scene. After looking a bit, I found a script with a DontDestroyOnLoad (I didn't know it existed before, so I learned something), and it worked like a charm. For the door sound effects I found one sound I liked in Open Game At, and for the shooting and the triangle sounds, I just used a webpage to generate 8bit sounds.
Next one was the UI, I implemented a main menu with the possibility of going to the credits, play or exit, the background image was made in photoshop by myself. After clicking play, I made another menu where you could choose one of the three colors to start with, with a button, which would redirect you to the correct scene sequence. I also added a hotkey so you could restart the current map if you needed it, and created a basic image and scene that you would see when you complete the game.
Next, I finished the final phase of the game, because it still wasn't done, so I decided to add some diamonds, and if you colored them with the main colors of the doors, it would show a black circle, and then you could go through the final black door and finish the game. I made all of this in the "Main area", so you could get the colors directly from the doors.
Finally, I fixed some errors I encountered, gave it some finishing touches and... I FINALLY FINISHED IT!!.
I was happy with what I made because, although maybe no one is able to complete it because the mechanics are a bit difficult to understand (because I didn't explain at all, my fault!), I had made "almost" everything I thought of, and I had implemented what I wanted.
- Final thoughts-
This has been a rollercoaster of emotions, my brain was at the limit of almost exploding with all the information going through my head, and although It was sometimes frustrating, I surely learned a lot doing this game, and will use the knowledge I have acquired to keep going forward and make even better and better games, and it was fun!, and that's the important part!!.
I just want to say thank you for joining me through the deeps of my mind, I just wanted to share my thoughts and make it somehow entertaining for anyone reading through the text, and I hope I could help someone with any piece of info I've given (although I'm a total newbie).
I also want to say thank you and appreciate Goedware for the oportunity to take part in this gamejam (my first jam and my first game, that is!).
Thanks!!
Bryan Moragas Ferrera @Niubyx.
Mixi
2D Top Down game about mixing colors to advance to the next door
Status | Released |
Author | Niubyx |
Genre | Puzzle |
Tags | 2D, Physics, Point & Click, Singleplayer |
Leave a comment
Log in with itch.io to leave a comment.