The First week of the project wasn't all productive I'd hate to admit it, but I'm still struggling to manage my time properly this might just be down to my struggle to suddenly change, but the proposal is what I'm struggling to do right now. I just can't seem to remember what I did at the start of the year... I should ask for help when I get back in college on Tuesday.
Finally, I managed to at least get words on a document. But man it's so boring... I know it ain't a great mindset to have and I think I'm "persuading" my body to be motivated to write down my week by shouting some motivational quotes to myself in the mirror, as embarrassing it is it is helping with writing and finding research.
So I've managed to complete the proposal midway through the week, a little later than I'd planned but it is not a problem now it is time to focus on how to code a multiplayer game in Unity I've got some recommendations from Joseph about a plugin called photon that he's planning to follow a tutorial that involves it, I'll take a look but I still need to figure out if its reliable or not.
from a gauge search on Reddit to see other developers' tips and advice from when they made a multiplayer game both Code Monkey and Photon were mentioned a few times, I know Code Monkey is a very good and reliable way to learn how to do something as he got An Award for best unity Insider Tutorial Creator in 2021, But this Photon that is being brought up a lot seems worth looking into more.
this week was a good moderate pace in terms of production and it's still difficult to do research for a long period as it just feels like it sucks the energy out of me, it's better when I remove possible distractions like my phone away from me but then I fall into the mind frame of "what if my family needs me right now and I don't know?" when I'm at the point that I'm starting to fall asleep I turn to my phone and go on social media to "recharge" but then I'm getting distracted for a while. I think I'll try something different next week to counteract this, like going for a walk to clear my head I've read somewhere that it can help prevent burnout.
So this week I looked into Photon more or also better put Photon PUN has been used by lots of indie game companies or according to them "Used by More Than 700,000 Studios and Developers" in games like Gorilla tag, Phasmaphobia, VR chat, Rec Room and pixel gun 3D This are well-known games that I have played in the past and have enjoyed, and this to me looks like a very good service to use, and with lots of tutorials to use online I think using this will be easy.
So it was half term holidays so I kind of just had fun mostly by working at part-time jobs to earn money, I did spend an hour or 2 in the mornings looking at research material, but that's the most time I spent doing this week.
I looked into some tutorials explaining how connecting to a server works using Photon, As it has a massive reputation for being easy to work with.
I've also seen how multiplayer games were done in the past and how it's gotten better over the years. Safe to say I'm glad it's changed otherwise I'd need to be an electrician to figure out how it works.
Just before 12 on Monday, I was working on putting the finishing touches of research on my Miro board but that all stopped suddenly when I lost access to my acount, and the reason for this was IT at college working on my college account to look for problems without giving me a heads up.
This was a massive issue as now I had lost access to all Microsoft applications like Teams, word and Onedrive which are very crucial as a lot of files I needed are stored in the one drive for easy access. I wasn't able to contact IT as it was half term and they didn't answer the phone so I was forced to sit idle and lost a lot of production time, fortunately, college was open some days at certain times and I took that opportunity to visit and try to get in contact with an IT person.
It took awhile and when asked why I wasn't given notice about the work that was being done, I got a slight shrug as they had no notes in the system to tell anyone.
But the main thing is I had access again and had a lot of time to make up
Lost a lot of production time due to IT issues, which resulted in scrapping a form asking people how they liked multiplayer games to be, this is an ok loss as I couldn't figure out how to get feedback for what I was doing.
Other than that this week wasn't the best in terms of work done.
Back in College and now behind schedule, not the best way to get back from the half term but I need to find an IT person to Help me get my account fixed or I'll be in trouble.
I finally got my account back so I'm able to make progress with work now.
Finally make a decision about what method I'm going to use photon looks like the best tool for the project and there are a lot of guides and videos on how to use it.
Regained access to Microsoft applications and decided on what tool and method that I would be using for the product of the project
To kickstart the production of the project I followed a guide that helped me make the basic codebase of the photon plugin from that I made the unity editor connect to the photon server by an app ID that the server provides so that the photon plugin in unity can find the server it needs to connect to, from that I coded a message that gets sent to the unity console to tell me that the game was connecting to the photon server when it connected the master server, and when the player connected to and join a lobby.
The next part I did was making 2 players connect to the same game connected to the same server and same lobby however I ran into a problem when trying to test this I ran into a problem because IT has done a wonderful job and made it so I needed a firewall access to connect to the server when running the game from a built version, so I had to run around collage to find an IT staff member, I first ran all around the old mill lane campus then ran all round the SciTech building then ran back to old mil lane and was lucky enough to bump into an IT staff member that was on their way out of the building and with a simplified explanation of why I needed access the IT staff member reluctantly gave me access I needed, once I had access that I needed the test was a success with some fatal flaws that I will fix this week, the main issue is about it that both players were being controlled by everyone at the same time which is not good for a multiplayer FPS so the next test I do at the end of this week will have all the players controling their own charecter and not others.
So I've managed to fix that issue I talked about fixed all the players controlling each other so players should now only be controlling their character, however, I ran into another bug with the collision between characters when you bump into a player it kinda causes them to freak out but this might be how it's set up in with the physics but an easy fix as it's just a simple check box but that's Mitchell issue as he's doing the movement side of code while I'm doing the multiplayer side the next test to is to set weapons and music maps to get a prototype going, hopefully, I can get that quickly done next week but for this week I've got good progress done just before the weekend so now I have time to relax over the weekend and maybe touch up on the code here and there but now.
Last weekend while I was relaxing I got sent files from Joseph and Mitchell, Joseph gave me part of a weapon code that wasn't finished, and Mitchell gave me code to improve the movement.
Joseph also gave me a zip file containing some of his Unity products that contained the block of the map that was made by Alex as he's working on the map with Kyle but Alex provided the block out to Joseph rendered it to Unity and packaged it up and sent it to me and now that I've got we have a map that we can use for prototype to test out new features and fix bugs.
I also made a basic weapon script to get the code I need for the multiplayer side of things so that when Joseph fully completes his code I can transfer the multiplayer bits of code Until then the current weapon code is my version, it works as intended with controls being left click to fire with a medium rate of fire with ok damage, but when you kill a player they don't respawn as I haven't put in a respawn code in yet so the other player is killed is left with their player character destroyed and left with a frozen screen because they don't have an available camera in the scene so I need to sort out a respawning mechanic as soon as possible because destroying the player with no respawn does not make for a good FPS.
Joseph gave me an Assault rifle model that Kyle made and passed it on to me but I did have an issue with it with the assets files with the model textures because I was running the wrong renderer I needed to download the universal render pipeline (URP) from the package manager un unity and changing the render pipeline in setting in graphics when setting up the setting for a build where its easy to find, it was an easy fix but it did take me a long time to find it and figure it out so really if I knew where to look ahead of time it would have saved me a good hour or two, once I did that all the assets I got given was showing their proper texture and not errors but when I did do that any models textures I was using at that time like the player character's materials were being used was now showing the same missing textures but it was just a basic case of creating a new material and making the colour the same as the last one then reapplying it to he model with the new renderer pipeline.
Overall this week was just making sure that this map situation was sorted out and sure that all the little issues were sorted to make sure that the map worked I had a problem with that because when I got given the map it wasn't all one object the prefab had a lot of objects that weren't assigned to anything but there were only 2 main objects that were imported such as block A block B as they needed to have collision added to them so that the player didn't fall through the map.
At the start of this week, I immediately went on to start to fix the issue with respawning the player, currently when a player dies they don't respawn they just disappear and don't spawn back in and on the client side it just freezes because there is no available camera to switch to next in the game, so what I decided to do is create a spawn point so I can get the player respawning so I can then do more test and also spare me the time, if testing, during this I've also realised name tags, should be a thing, luckily there's a guide that will help me to do that so hopefully it will be a breeze to understand how to do it and I should have no troubles.
So ive needed to catch up on work that ive been behind schedule on so I started to do more work outside of college with my laptop, anywhere I can, I have an hour or two available, or any time that I'm travelling in the passenger seat of a car.
--
Today I just decided to spruce up my visual studios editor to help me make less errors and installing plug-ins that helped me with little quality of life features, as well as changing up the theme of my visual studios, because I started to get a lot of the look and design of the current one, but other than that it's what I've started to do.
The main bit I've done this week is test the game art, I started to do a fully small demo type testing session with others, so on Tuesday I logged into my laptop and opened the project on Unity and started play testing the game from the editor, and once I connected to the server from Unity, I ended up connected to two other players, and those players being Joseph and Kyle, that was logged on at the time, to test out my codes going so far, and from that surprise testing alone, the game it worked brilliantly as it could, with a minor few lag spikes here and there, but that was due to my unstable network, because I had been using my phone hotspot to gain access to the internet, but the test session was very good, with some minor issues with name tags, when a player just spawns in for the first time, joins the server and the game, the names of other players are the default one that I set it to in the editor, which is "test", but until they respawn, the name tags then show up, from also testing out while having fun, when you do kill a player, there's only one spawn point at the moment in time, and so with there being one spawn point, it's very easy to predict where the player will respawn, so spawn killing will become a major issue immediately. So what I plan to do next during this week, like tomorrow, is make multiple spawn points around the block out of the map, and have the game randomly pick one out for the player to spawn in when they join or something like that, and then we'll see that on our own.
With this test, with the name tags, they appear backwards, so I must have missed a step in the guide that I was following, and I think my current fix in mind is to just invert the size of it in the exposition, that should just shrink it, resize it, but backwards, so I think that's an easy fix to do, because as the name tag does currently, it faces the player camera or the client's camera from their point of view, so if he was behind someone, their name tag will be just looking at you, so you can read the name, but in the test, it was reading out the username backwards, so that's why I think inverting the x-axis in size should fix that problem.
I'm also going to work out getting the code of the text updates to server to show what username they want on, so when a player joins a new player for the first time, they should be able to see everyone's name, not the default one, so I think I've just missed a bit of a step in that one as well, I'm thinking it has something to do with a line of code that sends data to the server, I think I messed up on that part, so I'll just have a look at the tutorial, a guide that I'm looking through and sort it out through there, it should be an easy fix.
So during this week as well, I've set up a basic UI basically, so that when the player first starts up the game, it shows a connection screen where you have to type in a username that will show to the rest of the players, so once the player types in a name and clicks connect, the screen will then show an image, a background of the map, and also the words connecting, and once the game connects to the server and puts the player into a lobby or game with other players, the camera will then change from that connecting screen and drop the player in with the player character's camera, so as if you were just loading into again from the loading screen.
So at the start of this week I did what I said I would at the end of last week and changed up the spawn points.
So now, instead of there being one spawn point where you can easily spawn kill someone, there is multiple spawn points for players so that they can spawn randomly when they respawn.
This will obviously reduce the chance of spawn killing, but obviously everything needs to be worked on so until we do another test to see how good it is.
This is a great improvement on paper.
The next feature I implemented when following the guide that I was using is leaderboards, because every game, every PS mostly has leaderboards.
I don't know, I can't remember a single game where a good game or AAA title that didn't have a leaderboard.
So after having a little trouble with creating the leaderboards, just because I missed a step of the walkthrough I was going through and testing it and producing different results than expected, I had to look back on the video a couple of times just to figure out whereabouts I've missed a part in the code.
It was a very simple error that is easily fixable, I just misspelled, I just worded a wrong part of a invoke repeating command.
Instead of invoke repeating name of refresh, I accidentally put down refresh rate, which there's nothing to call, there's nothing of that name to be called, so obviously it was throwing out errors, so just replacing it to refresh, it just immediately fixed the problem.
As well, while tackling the leaderboards, I also spent time fixing the name tags that I remember to do while testing out the leaderboards when another player joined.
So this was also the same problem as the leaderboard, I've just misspelled something or put the wrong command in.
Basically on the very specific line of the room manager, the line that had getcomp-player, underscore-player, getcomponents, photon-viewer, rpc-set-nickname, that was, the target was set to wall, which means it only does it once for the server.
But I needed to put rpctarget.all buffered.
What this does is basically sends their name tag to the player that just joined the game, fixing the problem that we had.
So instead of seeing the word test when you're a new player, you'll see someone's actual name tag of what they've named themselves.
So this will reduce confusion and actually match up with the leaderboards, so you can see who has a highest score.
Speaking of the score, that is the next part that I'm looking to work on.
When you kill a player now, the score doesn't go up.
It's the scoreboard stays the same, but the next part, as soon as possible as I can, I will get on a board that and try and work on it.
But since this is week 10, my website blog for this FEP is looking a bit disappointing and is only a pass at the moment, so I'm going to spend some more time working on trying to get it up to a pass.
I need to work on my production logs and try to get more reflecting done on it, as it's more so describing as my tutors put it.
So I'll be working on that over this week as well.
Due to unforeseen circumstances with family, I have taken time off of the project only like a day or two just to look after them, as I'm much more concerned about them than this project, but after they are feeling better, I'll be going back to this project as fast as I can and try and get down as much production as I can as there's only two weeks left.
This is not the best circumstances, but that's life and I've got to look after family.