Professional Documents
Culture Documents
25/04/17:
There is not much I can talk about really. I have to agree that the
production schedule I provided was pretty lacking and I should
improve it but I dont really know how, since all the things that
where pointed out in the video are kind of all being done in the
development of the game.
I dont know how to go about making sketches of my ideas. Im not
really good at drawing and I sure cant make a sketch in Godot.
Maybe I can take some screenshots of the progress or make a short
video showing the stage the game is in. I will have to think about
that.
02/05/17:
03/05/17:
Today we looked at and graded some level 2 media work from last
year. We were put in groups of two and graded a project. We graded
the project as a merit. That is honestly all I have to say. I didnt have
much time to work on the game at school or at home because some
stuff happened that prevented me from doing so.
12/05/17:
What a fun time Ive had since I havent update this journal. Ok, Im
going to go through some of the problems Ive had with the game
and how I fixed them.
First problem: the player wasnt able to pick up any guns. For this
game to work properly, the player needs to have the ability to pick
up and throw weapons. This problem had been bugging me for I
think a week if not more. I posted three threads on two different
websites and I even asked the creator of the tutorials I follow for
help. The first thread gave me little to no help on my issue (Thread in
question: https://forum.unity3d.com/threads/object-reference-not-
set-to-an-instance-of-an-object-error-can-anyone-help.469467/)
People genuinely tried to help me but being a beginner when it
comes to coding I understood almost nothing of what they said to
me. They gave me some code to put in my script and that didnt
work and eventual the thread went silent. The second thread was on
the Unity forums as well but for some reason I cant find that one. It
was basically the same as the other one, it didnt really help. The
third post was on Reddit where I got a ton of good advice that I
followed and that helped me solve my issue. (Post:
https://www.reddit.com/r/Unity2D/comments/6a71dz/beginner_ga
me_developer_in_need_of_help/). The problem was that a string of
code was incorrectly written. This line of code public string name;
was giving me a warning saying 'WeaponPickup.name' hides
inherited member 'UnityEngine.Object.name'. Use the new keyword
if hiding was intended. Apparently the program I use to write my
scripts (Mono Behavior) already has a string variable called name
which my public string name; was hiding. The problem was if I
tried to change it to something else the weapon pickup script
stopped working, so I renamed it back to name and just ignored
the warning and it works. I dont know how that warning doesnt
prevent the script from working but, who cares, it works. I should
rename it though, it is getting quite annoying. The small conversation
I had with the guy who made the tutorials didnt help either. I asked
him about an error I had already solved but I forgot to tell him that.
Now I moved on to creating enemies that the player can knock down
and kill and I finished creating the enemy AI script. The only
problems I still have is that whenever the player attacks, the sprite
kind of moves away from the legs and I dont know how to solve
that. The other problem is that the Raycast I am using to make the
player hit enemies is reaching out to a much bigger distance than
needed . This is how long the Raycast is. What
that does is if the line collides with the collider of an enemy it will
make the enemy change sprites to one of them being on the ground
or dead (if you hit them with a bat or a knife). Now I can hit them
form a distance and it look like the sprite is some sort of Jedi, which
is not good. I fill fix that once I figure out how.
14/05/17:
Yesterday and today I worked on two separate things for the game. I
fixed the Raycast issue I had yesterday, the problem was the distance
of the Raycast was set to 1.2 units and I changed it to 0.2 units. Now
it the enemies get hit only when the player is close to them, which is
what should happen. Also yesterday I created an Enemy AI script.
Now the enemies can move around and on their own and chase the
player when they see him. It didnt come without problems though.
There was this bug happening when the enemy detected the player,
when he would just run back to a certain point on the map and just
stand there and spin around like crazy. It turns out, on the line of
code responsible for the detection of the player I assigned a different
Raycast that had nothing to do with detecting the player. The
Raycast in question was there to make the enemy turn 90 degrees
whenever he hit a wall. I guess that confused the enemy every time
it detected the player and in all of its confusion, decided to become a
windmill. I fixed that and now it works just fine, the enemies chase
the player and when they get knocked down or killed, little changed
in the Enemy Attacked script disable the AI along with the collision
on the enemy sprites. I decided I build a small map as a way to
contain all the enemies from running off into the sun set, because
God knows how many sprites just ran off and I wasnt able to find
them. Good thing there is a reset button. Anyway, this map is
nothing special; its just a bunch of walls. The problem I had with it is
that the bullets and the player could pass through them. The walls
had to be set to kinematic, so they wouldnt get affected by physics.
My player was also kinematic and for some reason it was able to
pass through the walls, same with the bullets. If I were to set the
bullets and player to not be kinematic, then whenever I would shoot,
the bullets would hit players collider and make him move without
me pressing any buttons. The problem was this: I have two empty
objects that are children of the player object, an oneHandSpawn and
twoHandSpawn. They are used as references for where the bullets
should fire from if the weapon was a one handed weapon (pistol, uzi)
or a two handed weapon (shotgun, rifle). These objects were placed
inside the players collider and thus the bullets would hit the collider
and move the player along and the bullets werent able to escape. I
fixed this by moving the objects out of the players collider. Now the
bullets spawn just fine.
17/05/17:
Right now I fill like the game is getting somewhere. I managed to find
a Tile map painter add-on for Unity which allowed me to make this
test map. Its not the best, and the floor is a bit of an eye sore when
walking around the map but its a start.
I also had to resize the player because he was too small. I added
collisions to the walls after I was done making the map because
otherwise the player and the enemy would have been able to walk
straight through the walls.
22/05/17:
It has been a while since I updated this journal. This is what I added
to the game in that time.
I made a very simple main menu for the game, I created elevators
which transport the player to the next part of the level and I tried to
make a level exit elevator.
What the level exit elevator does is when all the enemies are dead
and the player enters its box collider that is set as a trigger, it will
load the main menu scene and thus complete the level.
The reason I said I tried is because I am getting an error that reads
as follows NullReferenceException: Object reference not set to an
instance of an object
LevelEscapeController.OnTriggerEnter2D (UnityEngine.Collider2D
other) (at Assets/Scripts/LevelEscapeController.cs:41). I dont really
know what it means but it has something to do with line 41 in the
script which is this one
MenuScreen menu = GameObject.FindGameObjectWithTag ("Menu").GetComp
onent<MenuScreen> ();
This line is supposed to help load the menu scene but for some
reason the error says that Object reference not set to an instance of
an object which leads me to believe that the MenuScreen
component was not referenced in the script, which it is not, but even
if I did reference it, it still didnt work. Right now I am waiting for a
response from the guy who made the tutorials I follow; I hope he has
a solution for this problem.
Also, this is what the main menu looks like:
Very simple, I will update it when I am finished with the rest of the
things I have to do. The text at the top is the name of the game; its
called Dr.Rocksos Cocaine Heist. Dr.Rockso is a character from an
animated TV Show called Metalocalypse.
This is pretty much it, I am having problems again (they should be
fixed soon), the main menu looks kind of rubbish and time is running
out. I hope I can finish this game in time and dont run into any more
problems along the way.
24/05/17:
Today I created a map in the Hotline Miami 2 level editor just to test
it before I replicate it in the Unity engine.
It looks pretty empty but this was made just for testing porpoises.
This is the first floor of the level, it is made up of many small rooms
and it doesnt have an absurd amount of enemies. I am not very
happy with the enemy placement. I feel like the enemies should be
more spread out and there should be multiple groups of enemies
walking around a large room. I dont really know how I could change
the placement but for now the level plays well, a bit easy I think but
what can you ask from a beginner.
The second floor is where a problem started showing up.
In the first level, that blue arrow is the floor transition. It is supposed
to transport the player to a new floor but for some reason whenever
I went through the floor transition, the player would spawn either
out of the map or too far into the room and would get shot by the
enemies immediately. I dont know what is wrong but I guess I will
find out after a quick Google search.
Now, this floor has fewer rooms than the last one and they are all
bigger. Again, I am not satisfied with the enemy placement so I will
probably fix it but for now I have to fix the transition glitch.
28/05/17:
29/05/17:
30/05/17:
Today I customized the floor texture and made it look like concrete.
01/06/17:
Today I remade the maps from yesterday in the Unity Engine. It was
not the easiest thing to do because the asset I used to make the map
doesnt really like to cooperate sometimes. The asset is called
TileMaster and it is good for making maps that use 2D tiles but if you
have two or more spritesheets in the tileset folder sometimes it
wont change between tilesets. For example, I had the edited tileset
(the one with the concrete floor) and the original one. When I
changed to the edited one and I wanted to paint with the new floor
tiles it decided to paint with the old one, even though I changed
tileset. All I had to do was delete the original one and my problem
was fixed. Now the next step in my journey is to add collision to the
walls. We cant have the enemy and player walk through walls.
02/06/17:
Like with every new addition to this game, a problem has appeared. I
was well into putting in the wall collisions when I got the idea to get
some enemies in the level to see how it works. Guess what, the
enemies couldnt detect the player. Like with every problem so far, I
have gone through the steps I always go through:
1) Look through the script to try to figure out what is wrong.
2) Fail to find the problem and get sidetracked by something else
that is not related to the game.
3) Go to Reddit for help.
Eventually someone responded to my post but as always, it did little
to help with my problem. They were suggesting stuff that I never
even heard of and a quick Google search left me even more baffled
as to what those people were saying since I couldnt understand a
thing. I quickly figured out that I can import a scene in the scene I
was in and steal one of the working enemies from there. The easiest
solution ever. So now I am going to start placing enemies into the
level and I will probably finish it tomorrow because it is quite late.
03/06/17:
05/06/17:
Another day another problem. This one is not as serious as the other
ones I had. Its about the music. You see, when the player dies you
get to restart the level but the music gets reset as well. I want the
music to keep playing even after restarting. I kind of fixed it with a
script I found which takes the game object that houses the music and
keeps it there after restarting. Basically how restarting works is
everything gets destroyed and the same scene gets loaded again.
This script I found doesnt allow the music game object to destroy
and it keeps it in the scene. The problem with that is that even after
loading the main menu or the second level the music will continue
playing. If the next scene that is loaded also has music the script will
destroy that object and keep the one from the first level. I already
posted a thread on Reddit asking for help and so far nobody has
answered my question. I will have to wait.
On another note, today I made a survey and posted it on Reddit as
well. I got 23 responses and now I just have to write about them.
Shouldnt take long.
07/06/17:
Today I got around to putting the music I chose into their respective
levels. I had to figure out a way of making the music play
continuously because every time you restart the level the music gets
reset as well. I might have talked about this at an earlier date but I
dont remember. Anyway, with the help of Reddit I wrote a script
that keeps the music going and turns it off when the player reaches
the end of the level and then it plays the menu music because every
time you finish a level you go back to the main menu. I tried to make
a transition screen but it proved to be a lot harder than I thought so I
just left it as is. I did post on the Unity forums but nobody replied.
I also added those cutscene I talked about yesterday. They are placed
at the beginning of the first level and at the beginning of the final
level. I tried to place the final cutscene at the end of level 5 but for
some reason it would get deleted automatically while I was going
through the level. It is pretty strange, I dont know what is causing it,
but I suspect it might be the fact that so much stuff spawns when
you kill an enemy. It might be causing an overload and the program
might be deleting stuff to keep the game from lagging. I dont really
know how to fix it so I will leave it like this in the final game as well. I
also added a credits scene at the end of level 5; giving credit to
everyone I used assets from. Just thought it might be a nice little
touch.
08/06/17:
Ok, today I exported the final game like 5 times. There were some
problems where some enemies would get stuck on walls and other
stuff around the levels. I fixed those problems in the editor but as
soon as I made another build, the fixes were not applied for some
reason. That leaves me with enemies that get stuck on walls. I will
have to find a solution to that. I also gave the game to one of my
friends to play and give me feedback. In his feedback message I think
he covered all of the things that are good and bad with the game,
and I believe getting more feedback would give me the same result. I
am really debating if I should post the game on Reddit to get the
game to a larger audience but I am sure I will get the same feedback I
got from my friend. I will have to think about it.
09/06/17:
Today I fixed some of the enemies that got stuck on walls. For some
reason, the raycast that fires from the enemy wasnt detecting the
wall if it hit a corner and thus the enemy would get stuck. I fixed that
by adding a square collider to certain corners and now the enemies
dont get stuck anymore. Some enemies however do collide with
each other and get stuck but it rarely happens. And even if it was a
frequent thing I have no idea how I would solve that problem
because if I were to add a small wall collider to the enemies the
raycast would hit it and the enemy would probably start spinning like
crazy, breaking them completely.
On a different note, I managed to add a Back to Menu button to
the pause menu. So in case you want to change the level you can go
back to the main menu and choose another one.