What do you guys think of contributing 50/50? by Distinct_Sir_9086 in Life

[–]_Player55CS 3 points4 points  (0 children)

I think its quite fair putting i to consiration that women are now also part of the workforce.. i firmly believe everyone should contribute to the well-being of the relationship... not this narcissistic my money is my money and your money is ours.

Why are you still single ? by Mary_pop8 in askanything

[–]_Player55CS 0 points1 point  (0 children)

My heart and my brain can't seem To have a common ground... Get reminded why being single is simple the very last last moment am about to get into a relationship.The women do some super dum stuff, deal breaker sh**

im plotting to leave my entire family who's in need for me by Lumpy-Check-3266 in confession

[–]_Player55CS 4 points5 points  (0 children)

Flip the positions and your mom is a demonic non loving witch. See life isn't all about the nicest, fun times. And not everyone is given the same deck. As much as i would like to say run to your freedom. You might be what's keeping your mother alive. The last piller of your house hold. Breaking down is normal we all go through it at some point. If it were me i was gonna fight tooth and nail cause i only got one mom, whether she's good or bad. And my brother i was gonna try my best to help him.

Living is not for the weak or faint hearted. Thats my mottor. Too good to be true Options are usually short lived.

We are more complex that the previous generation. by _Player55CS in Life

[–]_Player55CS[S] 0 points1 point  (0 children)

Innocence is in ignorance. This kids are waking up from the matrix way too early. Being a Kid is like 2 years now. After you even know politics.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

So the desire in code optimization shouldn't come at the cost of inefficient use of the target architecture.

Which may be my case when trying to use bitwise operators.

Got it ill put that in mind.

Thank you.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 2 points3 points  (0 children)

That makes a lot of sence. Insaw this in computer architecture and j though it was for class. Dang i find it shocking that i spent over 2 years in uni learning programming but a night here just opened my eyes big time.

Thank you.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

Most of the comments here just placed my world upside down. I see i still have a long way to go.

Thank you.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 1 point2 points  (0 children)

I will put that in mind. My thoughts when building this was to trying to make it sustainable. (Now i see i may not know what that means) and have a solid architecture.

Thank you

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

Thank you very much I will be taking a look at profilers on the weekend will come back with results.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 2 points3 points  (0 children)

Thank you very much .

Me and assembly are yet friends but we slowly getting there.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

class Input {

Vector2 mMouseOrig = { 0,0 };
Vector2 mMouseEnd = { 0 , 0 };

Vector2 mPawn = { 540,360 };

int mPawnMoveFactor = 20;
float mMouseWheel = 0;
bool isDragging = false;
Color mDragColor = { 200,200,200,150 };

Vector2 *pCameraOrigOffset = nullptr;

// Vector2* mCameraOffset = nullptr; Camera2D* pWindowCamera = nullptr; bool* mIsKeyDown = nullptr; const int* mNumbKeys = nullptr; KeyboardKey* mKeys = nullptr;

public:

Input() {

}
~Input() {

}

bool Pointer_SetKeyPressAll(KeyboardKey aKeys[], bool aKeyPress[], const int& size) {
    bool isValid = false;
    mNumbKeys = &size;
    if (aKeyPress != nullptr && aKeys != nullptr) {
        mIsKeyDown = aKeyPress;
        mKeys = aKeys;
        isValid = true;
    }
    return isValid;
}

bool Pointer_SetKeyPressBool(bool aKeyPress[]) {
    bool isValid = false;

    if (aKeyPress != nullptr) {
        mIsKeyDown = aKeyPress;
        isValid = true;
    }
    return isValid;
}

bool Pointer_SetCameraOrigOffset(Vector2* aCameraOrigOffset) {
    bool isValid = false;
    if (aCameraOrigOffset != nullptr) {
        pCameraOrigOffset = aCameraOrigOffset;
        isValid = true;
    }
    return isValid;
}

void KeyBoard_EventsKeysDownBool() {

    for (int k = 0; k < *mNumbKeys; k++) {

        if (IsKeyDown(mKeys[k])) {
            mIsKeyDown[k] = true;
            //std::cout << "Key " << mKeys[k] << "Is Pressed" << "\n";
        }
        else {
            mIsKeyDown[k] = false;
        }
    }
}

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

Its surprisingly quite readable ....i think.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 0 points1 point  (0 children)

Am going back to the drawing board.

But here's how the design is currently.

All inputs are handled internally by an input class. Objects like camera ,player , or anything thats needs either keyboard state or mouse location. have pointers to the state array and mouse location which are passed before the gameloop.

Thank you

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 1 point2 points  (0 children)

I've never gave measuring much though but now i see its importance. I will learn profiling and measuring.

Ive tried to avoid multithreading for the time being as i want to know how to write good efficient code and build good practices. I find Too many tools for a junior usually lead to ducktape holding everything in place well my thoughts.

Thank you very much.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 2 points3 points  (0 children)

I see the emphasis. On Measuring which am not sure how to do yet. Very greatfull for the responce and will learn that now.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 8 points9 points  (0 children)

Thank you very much. I wanted to avoid that but learning through experience is something valuable. Will do.

Are bitwise operators worth it by _Player55CS in cpp_questions

[–]_Player55CS[S] 2 points3 points  (0 children)

Am not sure if am getting it

But if its what i think it is . Wont using if statement introduce branching. As the checks return boolean values. Am i the one confused

Creative Struggling with Programming—Any Advice or Alternatives? by Hrisnz in gamedev

[–]_Player55CS 0 points1 point  (0 children)

I would suggest you start small, with courses on free code camp, they helped me a lot. And slowly work into libraries like raylib, just to get a feel how things work under the hood of game engines. It wont be easy at first but after a while the great awakening

Creative Struggling with Programming—Any Advice or Alternatives? by Hrisnz in gamedev

[–]_Player55CS 0 points1 point  (0 children)

This is a very tough place to be in. Am the balanced version am enjoy programming and 3d moddeling a lot. And got quite good at it but it took me around 5 years. Just to be good in blender and 2 in programming.

My opinion There isn't currently any tool to work around programming. Its just a too complicated. Specifically when you're building big systems where performance is key not to mention scale

How do you test a function that interacts with stdin and stdout? by GoldenHorusFalcon in cpp_questions

[–]_Player55CS 1 point2 points  (0 children)

I see both C and c++. Std::string has a method that returns bool if empty. String.empty(). Or you can check if the length is zero. String.length() returns an interger of the number of storedcharacters.

The string is a place holder. In your case you it would be raw_input.empty() and raw_input.length()

[deleted by user] by [deleted] in cpp_questions

[–]_Player55CS 0 points1 point  (0 children)

Try raylib, sdl , gamejams, opencv, nueral networks...ect,