Week 5 Update

Screenshots

This abomination is when we used the player model as our trees and ground in order to simulate generating random trees on a plane.

Individual Reports

Shane

What were your concrete goals for the week?

Integration, saving clients, having multiple clients

What goals were you able to accomplish?

I know I said I was going to be able to get this done for the past 3 weeks, but this week, we actually have struct passing fully working. For reals this time. Not only that, everything is async now. Third time’s the charm 🙂

We also finished partial full integration. But Shane, isn’t that an oxymoron ?? Well… we finally managed to get both client and server to be able to send and receive structs. As of right now (4/28 10:18 PM), our server is able to successfully process “W” key events and update the client. The client is able to successfully receive updates from the server and move the player camera forward accordingly. However, none of the other keys are implemented and are still handled on the client. Changing the rest would not take long, but I have exams and projects this week I haven’t started on so I will wrap it up probably over the weekend.

After much debugging headache we can finally save the client and server sockets instead of reconnecting now. You would think it should be as simple as having the sockets as instance variables… it is not…

Screamed “Dab on the haters” at least three times this week because of our many breakthroughs. My neighbors now hate me almost as much as Boost

What are your specific goals for the next week?

Saving multiple clients
Full full integration
Rework and rethink all structures regarding how camera should be updated. The code quality for updating the camera from the server’s game state updates right now is similar to what you would expect from an unpaid QA intern.Go one week without cussing out Boost

What did you learn this week, if anything (and did you expect to learn it?)

Question: What does End of File error mean for Boost read calls?
There are no more things to read from the stream/file
NOT There are no more things to read from the stream/file

3… 2… 1… Yup you got it, it indeed doesn’t mean there are no more things to read from the stream/file! 🙂 In fact, it means connection reset by peer 😀 Imagine if the error was called something like… idk, Connection Reset by Peer instead, that would be too easy right??? In all seriousness, this would have saved me an incredible amount of debugging had I known this 3 weeks ago. I want to blame myself for not looking this up, but then again I’m not sure who is actually paranoid enough to ignore the very commonly associated EOF behavior and suspect that it can mean something else. Surely I can’t be the only one…

I also learned that IO Contexts really like dying (they are LITERALLY Mr. Meeseeks), so they must be put at the top level before our main game update loop.

I also learned async and threading.

Side note, if I knew Boost would be filled with mostly inapplicable starter codes, convoluted and obscured debug codes and messages (like EOF), and more “_” and “:” characters in their online examples than the number of times I have been rejected by girls, I would not have chosen this framework. In fact, while talking to Edward during our many 6 hour long debugging sessions, I have had serious thoughts of restarting with WinSock or porting my CSE 123 codes. BTW, did you guys know that Thomas has tried using Boost three different times in the past and gave up all three times because it was too difficult to figure out? When I asked him why he didn’t warn us, he said, “I forgot.” On that note, are there peer evaluations at the end of the quarter? Asking for a friend.

For legal reasons all of the above are jokes and I have no ill will towards Thomas or Boost

What is your individual morale (which might be different from the overall group morale)?

We figured a lot of stuff out this week so I feel pretty good. The thing that I don’t feel so good about is that I feel like I have been working on struct passing and integration for the past three weeks, and everytime I report an update it is only some small superficial change. I think my own unfamiliarity with C++ and my inability to do basic things on Boost has really slowed our progress down. Almost every other group who used Boost seems to be praising how easy it is, so I am not sure if I am just not following the examples correctly or I am doing some really dumb stuff, but it makes me quite sad. Also, I think I have a problem with underestimating the amount of work something needs. In week 2, I thought we could just cast structs to string and send it, which in my mind would take less than an hour to code, but as we know this simple feature has taken three full weeks. Then I thought that we could do everything synchronously, which turned out to be wrong and we had to rewrite our program again. I feel like while the team has made a ton of progress, networking has not. However, I am also not simply slacking off. I think Edward and Aneesh can testify to our debugging process that we can sometimes spend a whole afternoon and not make any progress. To be frank, networking has been quite discouraging, but these types of things make me want to work harder and figure it out more, so I think things are still going fine as of now.

Thomas

What were your concrete goals for the week?

Rewrite the material system so it supports more than one material per object, because that would have been very difficult to make assets with.

Set up a global renderer to support different types of lights and pass them into shaders.

If possible load an animation and get it moving.

What goals were you able to accomplish?

I finished the first two, we now have a really robust material system that will let us add custom shaders as new material types. Previously everything needed to be textured, and copying around textures took a lot of time. Now we can render materials with just a diffuse color from blender, and it should be easy to add more effects by adding new materials.

I also started work on the global renderer system, which lets us pass in point lights into all the shaders. Right now I only have point lights working, but we’ll want spotlights for our game.

We also integrated the rendering system with our new scene graph, so we can move and scale meshes from the rest of the engine. That’s one step closer to complete integration.

If there were goals you were unable to meet, what were the reasons?

I had my second covid shot, and got pretty sick for two days. Fortunately that’s over, and this is my only class I need to work on this week. Hopefully I can make up some progress.
What are your specific goals for the next week?
This week I want to finish the renderer and add directional lights, then finish animations. I did some research into how assimp loads animations and reviewed 169. I’m expecting that to take a lot of time. Other than that, I’m going to see what the team needs to work with, since we’ll probably want to start building out the rest of the game.

What did you learn this week, if anything (and did you expect to learn it?)

We’re currently using about a gig of memory just to load about 20 models, we might want to keep an eye on it moving forward. I’m pretty sure it’s redundant textures that were loaded multiple times.
What is your individual morale (which might be different from the overall group morale)?
I’m having a good time, it’s nice to see things start coming together. I’m getting a little stressed looking forward, we don’t have too many weeks left. Hopefully now that networking, the scene graph, and the mesh system is coming together we’ll be able to focus on new goals, like gameplay.

Sam

What were your concrete goals for the week?

I wanted to port over the quadtree code to the actual game and get a working simulation of collision happening in the actual game client
I also wanted to start brainstorming all the other classes and data structures that we need in order to achieve other basic functionality in the game, such as a point system, and player character, weapons etc

What goals were you able to accomplish?

I was able to successfully bring the quadtree code into the game client and have it work with two objects colliding. James and I were also able to create very basic collider objects to detect collisions and we were able to create and use two basic colliders of spheres and boxes.

If there were goals you were unable to meet, what were the reasons?

While I haven’t actually started coding on the other classes needed for the games, I don’t believe them to take too much time since it’s mostly the planning of those data structures and classes which will be important. Bringing the quadtree over and actually incorporating it into our existing code base took way too long and I was not able to foresee how much time and how much energy it would take me.
What are your specific goals for the next week?
I want to get other classes written and hopefully have a simple point system working when a collision happens with the flag. I also want to be able to have player models have a health attribute to it and that when it collides with a bullet model it will decrease health through collision.

What did you learn this week, if anything (and did you expect to learn it?)

C++ is very annoying and the compiler sometimes complain about the stupidest things. I also learnt about better coding practices involving super and sub classes.

What is your individual morale (which might be different from the overall group morale)?

Bringing over the quadtree code and having it work feels good but I am aware that we are a little behind schedule. However, I can see that most of the game will eventually come together within the next few weeks as the models now can somewhat interact with one another.

Aneesh

What were your concrete goals for the week?

Work on making struct passing possible across a network connection.

Making multiple clients work with the server.

What goals were you able to accomplish?

I spent some time with Shane in group calls to help figure out issues with struct passing. We made some progress in those but ran into other issues. When those got resolved, we came back to our original issue – “error: read end of file”. We were wondering if the serialization code had issues.

Shane and I worked on this individually. I stumbled on a weird sort of fix that made it so that the struct was being passed initially but subsequent passes might fail to send successfully over the network. However, when I thought I pushed the code, it had actually failed. Therefore, the next day Shane and Edward met and figured switched to asynchronously using boost. When I joined the call, they had an async framework set up but it still had issues with sending structs over – again the same “error: read end of file”.

While reading docs to see examples, I realized that boost relies on its IO Context a lot and that when it does not have any work to do it stops running and that can mess things up with the networking set up. However, I wasn’t able to figure out any points of issue with the client and server code that we had set up which would create such a no work situation.

It was later that day or the next when Shane stumbled upon the issue of the context object going out of scope and being destroyed which was the cause of our problems. It was very frustrating but also very informative to know that such a small detail of the framework can cause such problems.

If there were goals you were unable to meet, what were the reasons?

I was unable to set up a system to enable multiple clients to connect to the server. I guess I was focusing more on getting the struct passing to work first. I did do some research about setting up a framework and also watched some Youtube videos on the same. I think I would just need to discuss with the group about the way to store clients and how to identify them and then actually implement it (which I believe should be doable over the weekend).

What are your specific goals for the next week?

Make it possible for multiple clients to connect to the server and pass data simultaneously. To extend this, possibly also receive data from the server.

What did you learn this week, if anything (and did you expect to learn it?)

I learned quite a bit more about boost.
Obviously about how important the IO Context is.

Additionally, I learnt saw a video online about creating a very general networking framework for a client and server using boost. The tutorial used quite some god abstractions but I realized that implementing all those abstractions may be overkill for the scope of our project. I guess I will proceed with a very barebones version of things and if needed, convert it into a framework to be modified and used.What is your individual morale (which might be different from the overall group morale)?
My morale had been “boost”ed (puns intended) from the last week. I was able to give some time to working on the project this past week and was also helpful in writing some good networking code. I think I am also starting to make more sense of the code base we currently have set up and I guess I feel a bit more comfortable working on stuff.

Sheila Pham

What were your concrete goals for the week?

My goal was to at least get a walking animation of the girl after rigging her and adding a weapon to her hand.
What goals were you able to accomplish?
The girl is rigged for her hair, clothes and knife mesh. She can “walk”.
If there were goals you were unable to meet, what were the reasons?
I wasn’t able to help with the scene graph for the floor tile or help load the animation into the game. There was some conflict in schedules, plus I did not know how to download the code or what to do.

What are your specific goals for the next week?

I want to help with the scene graph and get the trees to render on a tile, and have many tiles all lined up. I also want to add more animations for running, and attacking. Need to write out the animation lerp and cycle/cycle-offset
Probably also want to work with lights and maybe flashlight logic if that applies.

What did you learn this week, if anything (and did you expect to learn it?)

I learned how to set up a pre-made rig, rig and parent a character, prop, or a separate mesh. Also learned more on how vertex groups and weight paint can tell where the joints of the rig will affect certain area of the mesh. I also learned a bit on how to keyframe a time-line in blender and who is moved. It was a slow process since for now, every change I made was recorded, or sometimes the changes I made were not recorded.

What is your individual morale (which might be different from the overall group morale)?

I feel a bit useless cause I didn’t write too much code this week, or even help out with any of the logic. I’m a bit frustrated with how wonky the movements look in animation too. I also feel stressed about not knowing or even rigging correctly cause I’m still unsure on how to properly rig or animate, especially the skirt. I have tried to look on many videos and even joined a Blender discord, but some of the solution are far too advanced or not what I’m looking for. I am a worrier.

James

What were your concrete goals for the week?

This week, my goals were having a working scene graph and integrating the movement controls with the Client and Server.
What goals were you able to accomplish?
I was able to successfully get a working Scene graph.
Additionally, Sam and I were able to get started on implementing collisions.

If there were goals you were unable to meet, what were the reasons?

There were some difficulties with getting networking and movement controls working together.

What are your specific goals for the next week?

I hope to get collisions 100% and Sam’s quadtree fully implemented and working.
Then, it would be nice to get working on having a good system on how to generate maps.

What did you learn this week, if anything (and did you expect to learn it?)

This week, I got to refresh my memory on linear projections and different tree structures in order to get collision detection working. I didn’t expect collisions to be so difficult, but I think we have a good idea on how to get collisions working and efficiently too.

What is your individual morale (which might be different from the overall group morale)?

I feel alright about the progress we’ve made this week. I was recently reminded that there are other UI elements and sound elements involved in a video game. So I’m a little concerned about getting it all done (it might just be a silent game).