Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module 4 Assignment #102

Closed
21 of 22 tasks
jaakop opened this issue Nov 19, 2023 · 5 comments
Closed
21 of 22 tasks

Module 4 Assignment #102

jaakop opened this issue Nov 19, 2023 · 5 comments
Assignees

Comments

@jaakop
Copy link
Contributor

jaakop commented Nov 19, 2023

Assigntment
Write group and individual rertospectives

  • Group retrospective

Individual

Emil retrospective

  • What did you do? (in detail)
  • How does it relate to the OOP principles and your learning goals?
  • What went right and what went wrong?
  • What was difficult / fun?
  • What did you learn

Leevi retrospective

  • What did you do? (in detail)
  • How does it relate to the OOP principles and your learning goals?
  • What went right and what went wrong?
  • What was difficult / fun?
  • What did you learn

Aleksandar retrospective

  • What did you do? (in detail)
  • How does it relate to the OOP principles and your learning goals?
  • What went right and what went wrong?
  • What was difficult / fun?
  • What did you learn

Jaakko retrospective

  • What did you do? (in detail)
  • How does it relate to the OOP principles and your learning goals?
  • What went right and what went wrong?
  • What was difficult / fun?
  • What did you learn

Extra

  • Any feedback
@jaakop jaakop added this to the Module 4 milestone Nov 19, 2023
@jaakop jaakop removed this from the Module 4 milestone Nov 28, 2023
@Emiliontti
Copy link
Contributor

2.3.1 What did you do? (in detail)

Exit Game (home scene) & Return to Main Menu (game scene)
I created and imported a new font for our game to use, the “Chewy” -font from Google Fonts. With that I created the Exit button in the bottom-left corner of the home screen.
I also created input for the ESC-button to go back to main menu from the game scene:
image
image

Lock mouse on Minigame Start & make release logic
I created logic for when the player is in the game scene, the cursor would be locked (as the minigame mouse movement might disorient players), and unlocked when in the home scene:
image

Fix hook collision with ocean bottom and environment
To fix the issue with the hook going through the bottom of the ocean floor (yikes) and also not colliding with the environment, I added the following methods in the HookScript.
image

These methods cast a ray from the hook downwards and see if the ray hits an object down below. Then it checks if the objects have the tag of objTag (“GroundPlane” in the tagmanager). If it does, the hook will then calculate, that if the distance of ray is smaller than the wanted distance where the hook should stop, it will call the StopHook method from the PlayerController, to make the hook stop in its tracks.

Animation when Bobber hits Water (water splash)
I made the splash particle effect for the bobber hitting the water plane. In this, I utilized the Unity’s own particle system to do the actual effect. I made logic to have it trigger when the bobber hits the water plane and also to have a timer to destroy the particles after a certain amount of time.
image
image

Revamp environment, Terrain-system
This was one of the most difficult, but also most engaging and complex system so far, I’ve done.
image
image

image

  • Terrain-plane in the Hierarchy, that has the TerrainController attached to it.

  • TerrainController makes sure it puts the GameObjects it generates to holder-object. It gets the needed components and generates the terrain. Then it randomizes the prefabs (foliage, bones, rocks) and places them accordingly to generated terrain.
    image

  • The terrain uses 3 different methods to generate the mesh, generate the heightmap for the mesh, and to calculate the heightmap by utilizing PerlinNoise-randomization. This part uses some premade mathematical calculations, which I didn’t do myself, but I needed to understand in order to make the terrain work they way I wanted to, and also to be able to place the terrain objects.
    image

  • After the terrain has been properly generated, I randomize the prefabs from the weighted prefab-list by CalculateTotalWeight-method. I make sure that the objects have bias towards spawning closer to the camera with the WeightedSpawningTowardsCam-method. And also check that they’re in the view of the camera (you know, for optimization)
    image

  • After this I raycast towards the ground, to get the specific Y-axis where to spawn the object, check that it’s actually ground and choose random prefab (taking the weight of that prefab into account) and instantiating it in that spot.
    image

The instantiation also has a random multiplier, which takes the prefabs that don’t got the “no effects” ticked in the inspector, and gives them a random size and rotation, to make the environment have a bit more variance.
The old world generation system, that had preset places for the objects (the amount was generally kept at 4 objects per scene), got revamped while I did this. But I did some changes to keep the old system in place, by reducing the number of spots it can spawn prefabs to 2, and only make it spawn on the left and right, and having prefabs, that the environment system doesn’t spawn (big rocks!).
image
image

In the picture you can see the gizmos where the prefabs spawn. And in the 2nd picture what it looks like in game when one side spawns a rock, and one side doesn’t.
Also, something to on notice is, that the terrain gets randomized every time the player enters the game scene, so it makes the game have even more flavour in terms of map generation.

2.3.2 How does it relate to the OOP principles and your learning goals?

My learning goals were to learn to do scripts and implement them into our game project to make things do stuff. My goal was also to get the grasp of OOP principles and try to utilize them in my code. I think I met those goals pretty well. Encapsulation was presented in the form of using private and public variables and knowing when to use which. I fiddled with the protected variables when making the fish catch the hook as well. In terms of inheritance, I used that in the LineRenderer (making fishing line from rod > bobber and bobber > hook), as the line creating logic for both are the same, but the getting of the variables differ. I tried out Scriptable Objects while creating the minigame movement pattern, where I got more familiar with polymorphism. I needed to implement the behaviour from the “FishBehaviour” scriptable object but override the base method (virtual) with the values that correspond to that fish in the editor. While this isn’t technically the same thing, it uses the same principle as polymorphism. Overall, there was a lot of new things and a lot to learn.

2.3.3 What went right and what went wrong?

I think the biggest thing we got right, was that we actually got a somewhat decent product in the end, with working functionalities and some flavour added into it. I think in terms of my own work, I could’ve focused more on seeing the bigger picture of the game. It would’ve most likely helped with using things like inheritance for example. The code that I made mostly focused on getting stuff to work. In retrospective, I now know, that things could’ve been done differently and cleaner. This is something I learned and will focus on more in the future.

2.3.4 What was difficult / fun?

I think making a proper, organized, structure for the scripts and the game was awfully difficult. Doing the scripts themselves and seeing things moving, interacting, and the game coming together was really rewarding and fun. Also, diving into specific areas of code, like e.g., how referencing works, was really interesting. With not a lot of previous experience, everything was new, therefore the workload was pretty big which was an obstacle in its own.

2.3.5 What did you learn?

Like I mentioned, I learned the basics of programming with C# and Unity. I got to work in a group, and experience what kind of problems and solutions might arise from that. I also learned a lot about different game elements, mainly the new Input system in unity, and how that behaves, collision, working with the UI, the Terrain system, different game objects and components. In terms of programming, I learned different syntaxes and logic, and how things should be placed or referenced. I utilized encapsulation and realized what kind of uses it might bring. I also learned about inheritance, and abstraction, from reading others code, though I didn’t widely utilize them in my own code with a few exceptions.

3 Retrospective (GROUP)

Emil: I think there was a lot of good things but also some things that I think we should really try to improve on. The good things were, that everyone participated in doing the project. We had mostly the same vision of the game and we continued to work on it throughout the given time of the assignment. I think we all learned a lot along the way, technical stuff but also about group work, assignments and so forth. The things I think we should improve on is, that in the future we need to concept the product better and think more of the gameplay. Also, there was some pretty big issues with doing things in time: documentation, tasks assigned to people etc. There were also issues, that the code wasn’t tested properly before implemented, which led into some weird gameplay situations that were discovered later in development.

4 Extra feedback

Emil: I think everything was said and done, that could be.

@jaakop
Copy link
Contributor Author

jaakop commented Dec 2, 2023

What did you do

In this module I made the scene transition and dialogue.

Scene transition

When user is moved from the home scene in to the game scene and vise versa, a scene transition animation is played masking the switching of the scene.
This is done with simple ui image, that is animated in and out on command.

Dialog

See comments in #95
Pasted image 20231127165323

How does it relate to OOP principles and your learning goals

Through out the project I used oop priciples. The best example of these would be the fishes. There is the base class fish, that is encapsulated, only revealing publicly information that is needed to be public. There are subclasses to the fish class that inherit and extend the fish movement and actions. Even though these fishes might move with different logic is some cases all of them are controller by the fish controller scirpt with polymorphism, where all the sub classes of the fish class can be expected to behave similiarly. For abstraction there even is the detecting fish, which is an abstract class of a fish class that can detect other things.

For my learning goals was mostly to get a game made with the team, and I would say we succeeded in that.

What went right and what went wrong

I think we have managed to create a surprising amount of functionalities and content into the game and managed to learn new things along the way. The initial planning could have been better since the different functionalities were changed many times along the way. I think this somewhat slowed us down as we didn't have a clear idea of what to do next when the current issues were done.

What was difficult / fun

As the one in the project management role I think was difficult to assign the right-sized tasks for all, so that they had enough work but so that they didn't feel overwhelmed with the amount or the difficulty. Fun was to get to make systems that challenged my own skills in some ways and learn to code bigger projects that have a longer development time when compared to e.g. a game jam.

What did you learn

Project management and reporting as well as some new tricks with Unity (such as custom editors and Scriptable objects)

@Laffey-chan
Copy link
Contributor

Laffey-chan commented Dec 3, 2023

What did you do

In this module I made shark spawning when the timer it's certain time

Shark spawn

The shark spawn is handled as a unity event that the night timer script invokes in the fish controller script

image

image

How does it relate to OOP principles and your learning goals

Through the project i did you some principles in OOP. But the OOP principles that i used was Encapsulation. for polymorphism i kind a used scriptable object in the fishvalue and then in the custom inspector window, because it kind a uses the principles as polymorphism.

For learning goals was get game done with the team, and learn back unity's coding side, because i only remembered small bit's of the coding side of unity. So for that i would say that it succeeded in the game and i succeeded in the learning back unity's coding side.

What went right and what when wrong

We managed to make a lot of functionalities to the game and content to the game and learned new things along the way. The planning could been done in the first stages better, but we still managed to get stuff done at the end. I think that if the issues would have been made simple/cut down to pieces we would have had more stuff to do when the current issues were done.

What was difficult / Fun

Getting back to unity coding was kind a difficult, because i haven't coded in unity in sometime, but at the end i started to get it back to code in unity. Also it's was fun to kind a use blender to add bones and weight paint to the fishes and learn to weight paint them kind a better and not use automatic that much and to learn better weight paint.

What did you learn

Unity, Reporting, Blender (some aspect of it). With unity i started to learn back the coding side of unity and learned as new scriptable objects and custom inspector coding. As for reporting i learned what to write and documenting the stuff what i have learned / done in the project. For Blender i learned better how to make better bone structure and not use much bones and weight painting for the bones that controls the mesh.

@Aleksandar-Hr
Copy link

What did you do?

I made the win and lose screens by editing the initial home screen. I added 3D text to both and a fish model spawner to the Win Screen that makes the fish rain.
image
image

I added a splash/Pop-up screen That plays when catching a fish. It's an UI element that I enable and hide disable automatically in the minigame script. It gets the mesh of the fish and displays a copy of the one you actually caught.
image
image
image

Basic animations are also added to make it more magestic. v
image

How does it relate to the OOP principles and your learning goals:

My learning goals were to just get a basic understanding of how to program in Unity. I don't think I dabled in extensive OOP this project. Mostly just skiming through others' code and making my implementations work without adding too many new scripts.

What went right and what went wrong?

The fact that we have a solid working and quite fun game at this point means it mostly went well. For my own work I think A lot of things went wrong. i couldn't manage my time well and often would do my parts quite close to our not so strict deadlines. In terms of coding the biggest issue I had was displaying the fish without the fog effect turning them lue which turned out to be a material issue that i had overlooked.

What was difficult/fun?

Truth be told I have very little fun trying to code. Seeing my implementations work is fun but the pain of figuring out the best (for my knowledge) solution to a problem is just time consuming and annoying at times.

What did you learn?

I finnaly figured out how to properly use Unity and github. I had only used windows forms and straight command line c sharp programming. I learned how to actually do scripting which was a foreign concept for me when I just started out. I ain't a programer man I don't really care for coding but now that I understand this better this experience would help me be better at doing my job in future projects.

@jaakop
Copy link
Contributor Author

jaakop commented Dec 10, 2023

The assignment was returned. Closing issue

@jaakop jaakop closed this as completed Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants