top of page

Week 3 : Setting Sail for #ProjectPLGB

Updated: Feb 28, 2021

Class 7

It was a misty Sunday, the year 2021, I barely slept last night, was stressed about only God knows what. I started my PC checked my plans for the day and left the home after dressing up. I reached the university about 1 hour early. So I though to go and check out a few necessities at the SAE Institute finance.

I went to the food court and had a cup of cheep but really good tea, something that does fits a gloomy lonesome fellow. I threw myself at the lounge couch, leaned forward there and contemplated over my life and the unseen winds that carries it. I stood up exhaling, walked down the hallway listening to the silence inside my head. I was already 10 min late for class. I mope towards the building, staring at the void beneath the lead sky.


I entered the class, My tutor is doing the setup in his PC to accommodate my class mates for this session. Once that was done. Started that days class by introducing us how to pass in multiple arguments that can be used inside the application such that the application can be booted with the options we want. The first thing we did was making the server takes One more arguments, the Port Number. Inside the application we checks weather the there is a second argument that's passed in using a TryParse() which basically is a parse function were we need to pass a variable of the datatype we need and if the parsing fails the function returns false or else true. I would look something like this

and when it fails we throw a custom Exception and aske the user to enter the valid port number. We did something similar with the client application as well, were we need to pass in 3 arguments in total which are the Server IP, Port number, like this:

We go it working pretty fine then we move on and started working on cleaning up the code. we made two classes one called Server while the other Client. both of them have a constructor which takes care of the initial listening or initial connection depending on the class. Also both of the class have a run function which starts the main application while loop.

He gave us some time and asked us to implement these stuffs and we did. after that the class was about done and he gave us two home work which is to make the console typing system work without any bugs. After class we had a meeting which I was unable to attend were the team had decided to allocate the tasks to each week and per person. Once i got back my team leader Anikith gave me a brief of what I am supposed to do, In short I have to make a gun system for the game. So I started doing the good old coding. Inheritance polymorphism animations etc. made it within a few hours and pushed my stuff to the Git. I did make 2 guns one of pistol kind while other a launcher/cannon. and this was the result.


Class 8

It was a fine Thursday morning. I woke up very late and was feeling a bit dull, dull enough to confuse myself with a block of lead. Started PC and sat after implementing the scoped weapon for the game, which by design is very different from other general class of AL_Gun. Though i will get done with it in a mew minutes, but, it was bigger and more intricate than I thought. the more i try to implement different things the more things that i find that i should include in my planning process to come up with a design that satisfices all the requirements. I tried a few stuffs and finally got it working, I made it semi procedural in nature. So that the gun can be animated which provides a lot of freedom to the artist while also keeping the code controlled aspect so that i get the information and states so that i can add logic and make it functional in the game. I also did some work for the company I work for, were I work as a React-Native developer. Also looked into how to achieve animations and actions using React's built-in component called Animate. later wen the class started at 2 o'clock. I joined in and the tutor was talking about achieving the final part of a functional chat app. which is sending Packets across the network instead of the previously send string -> byte array. for that what we did first was made a new struct called packet. and add 3 variables to it: senderName, senderColor and senderMessage. so the idea is that we make the object first and then pass in the data into the variables. then using the binarry formatter convert it to byte array and send these bytes across the network. The above mentioned call looks something like this.

Then we did make the utility class that contains two static functions one to convert an object => byte array while the other is to convert a byte array => object which we use to convert the received bytes back to the original object. the basic structure of the functions are as follows:




Then we started working on how to display colors for the user console display. I used a system that basically send Anonymous class object that can access both the color name and the color using reflection. when the while loop display it and waits for the user to enter a valid index number corresponding to the color of choice. then we finally implemented the server messaging section were the server notifies other clients when a client enters or exit. for that first we need to map the client name to the socket, the way I went about this is by sending an initial packet right after connection with the server from the client and in the server side doing a while loop to see if the packet was send. if it fails the client will get disconnected while if it passes the client name will be stored into another list, so when we should disconnect and notify other connection we gets the client name using the socket index from the socket list.


We as the project work we worked on the music selection for the game and styles. Also we did make an Audio collaboration request asking for somebody to come and help us with the audio for game. As a passion attempt I worked on implementing Open.Nat library to port forward the and got it working.


Class 9

It was a Saturday, a very busy day. lots of pressure is on me on a project, in short I was very busy. Anyways I joined the class. the class was about Photon Networking Library, which is an SDK available in unity asset store developed by Photon. The library is an easy yo use solution(may be a bit too easy). We began by making an account in Photon. Then imported the SDK into the project. once its in the we pasted in the APP ID we got from the Photon into the app setting. Then we went into the API documentation and look through the API call. Then our tutor made a sample project showing how to connect with the photon and join a room if it exists or of there ain't one then create a room with a name. Then he asked us to make a sample project that gas opting to join a room or create a room and display the list of users. So I made a simple project with good neat UI(as design practice). I added an P/Invoke method and external library "kernel32.dll" and called a beep function that get called when we log a message. I made a function that get called when the application starts to connect with the photon-server. then once the connection is made the application takes you to the page were you have a choice to connect to a room or a create a room.

Recent Posts

See All
Week 13 : El Fin...

Class 39 : We join in the class on Sunday. There's is nothing much to teach from our tutors side. all of us guys are doing our curricular...

 
 
 
Week 12 : Ending it rightly...

Class 36 : It was a Sunday. a busy morning. I showed up for the class, the tutor asked us let him know if we need any support with the...

 
 
 

Comments


  • LinkedIn
  • YouTube

© 2017 by Alwin Joshy. Proudly created with Wix.com.

bottom of page