Week 7 – With Intent

There isn’t much I can write about this week, since I got a sudden call this Tuesday. I’ll be taking the ferry back to the mainland tomorrow afternoon, I’ll earn some money from it and the traveling expenses is being paid, I couldn’t really pass up on that now could I?

During the last weekend and into Monday, I’ve been working on the Collision Manager, Unlike the first version of the collision manager that took 2 arguments (position and radius), the new one takes only 1 argument, a sf::Sprite, since sf::Sprite contain the position (as well as means to calculate the center of it, which is the previous position) and the variables needed to calculate the radius to the furthest point in the rectangle (one of the corners). The only exception is the collision with furniture that also has the Furniture as argument. Unlike doors, you can collide with two or more different furnitures at the same time, so they can’t return the object it collided with (it won’t check the collision on the objects after it).

After looking into DoorManager and showing it to our Producer, Henrik ”Stickan” Forsman, asked if the use radius of the doors could be similar to the keys use radius (declining intensity), and after looking into it, I decided that it would be easily done if I just used the same principle as with the key; pre-rendered light using the Light Engine, as shown in the picture below (it’s a little hard to see since the light is still kinda disturbed on Mac)Bild

The rest of the Monday and Tuesday I’ve been working on the GUI (or HUD, we can’t seem to decide what to call it). As you can see in the Picture above, the key up in the right corner is the same colour as the door’s light. As I mentioned in my earlier post, the keys and doors are connected by sharing the same colour, this not only gives a wide variety of keys we can use (16 777 216 different combinations to be exact), but also provide an easy way to connect the colours for the player; a player wouldn’t try to open a door with red glow if he only has a green key.

There is a lot of different distinguishable colours that we can use: Red, Green, Blue, Cyan, Magenta and Yellow, just to name the colours RGB and CMYK use, the former commonly used in technology (where the light is emitted) and the latter for printing (where light is reflected). SFML, as many other libraries, use RGBA (A standing for Alpha, which is opacity). 

1 tanke på “Week 7 – With Intent

  1. stefansomo

    Hi Robin that sounds like a really legit reason, as long as it isn’t hindering your group’s progression nor delaying your own scheduled time, but of course you already knew this and probably acted accordingly. But on to the topic, you wrote clearly about what you did last time, e.g. working on a collision manager that now uses one argument instead of two, and even if you don’t state it directly one can assume you coded it (thus answering the question ”how?”), but unfortunately don’t answer the question ”why?” so much… Why did you only need one argument, and why didn’t you need the radius? It would become easier to understand if you explained it more in detail, and why the position from the ”sf::Sprite” was sufficient. From what I can read you also worked with the light engine and the door manager. Anyway, you seem to show your work to other members to get feedback (in this case to your producer) and then make a smart move based on said feedback, and this shows that you have an eye for making logical decisions.

    Nonetheless, you present the picture in an interesting way as you describe what happens and refer to it more than once in your post. For instance, only green keys can be used on green door otherwise it won’t work, and one thing you do great here is actually explaining the feature of it. You also say that players probably won’t try to open a door with a different key colour than the door’s glow colour. Provided information like this gives your post more value and it’s easier to understand. The light engine is demonstrated in the picture as well albeit disturbed on the Mac, but yet again, try to shortly write down why it gets disturbed. However, you seem to know much about colours and their functions in the code and game! Good luck with your project and I wish you best of luck!

    Svara

Lämna en kommentar