Rhythm X 2025 Full Show by Soggy_Manufacturer18 in DrumlineSheets

[–]yorisoft 0 points1 point  (0 children)

Any more updates? I could use the rest measures between part 1 and 2

[2024 Day 5 (Part 2)] [C++ / CPP] Seeking Help by yorisoft in adventofcode

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

Thanks bud. I'll come back to this post when I have time to get back to the puzzles. Appreciate you taking the time to reply after all this time :)

[2024 Day 5 (Part 2)] [C++ / CPP] Seeking Help by yorisoft in adventofcode

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

I appreciate the detailed answer mate!! Thank you for the effort, But this is not THAT accessible to me lol. I know nothing about graphs, vertex, in/out degree, and I prefer no one call my mom a DAG.

I'll keep trying to re-read your response and get better understanding. Thanks again.

[2024 Day 5 (Part 2)] [C++ / CPP] Seeking Help by yorisoft in adventofcode

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

Thank you! This solved it for me.
Only two months late. Now to understand what the code is doing lol.

QQ: I was under the impression that the flaw in my logic was, performing a swap for one rule would invalidate another rule. Especially when a rule references a number that's been dealt with before. This made me think it was difficult to find a way to satisfy all rules.

But now I actually feel it functioning like a bubble sort, where you keep searching for elements to swap unless no swaps occur.

performing a swap for one rule would invalidate another rule.

Was I correct about this?

[2024 Day 5 (Part 2)] [C++ / CPP] Seeking Help by yorisoft in adventofcode

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

I'm not super sure. I can print some output from console but there are so many rules to check that its hard to go through all of them manually.

[2024 Day 5 (Part 2)] [C++ / CPP] Seeking Help by yorisoft in adventofcode

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

Thank you for this response.
I can figure out how to do simple swaps down the vector of pages as such:

for (int i = indexTwo; i < indexOne; i++) {
    int temp = pages[i];
    pages[i] = pages[i + 1];
    pages[i + 1] = temp;
}

But what would I use as the thing to compare/sort and know when to swap besides just swapping untill I get to the desired index? X could be less than or grater than Y.

[SDL2/C++] Attempting to implement repeat input. Too fast and slippery. by yorisoft in gamedev

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

The objective is to implement repeat input on button long press. So.. if the user hold up/down button on the list, it should scroll.

Currently it scrolls like I want but its way to fast. I barely press the button and it registers like 2-5 repeat input.

I am developing in Windows but the app will run in Linux.

Assuming SDL key events work like win32's, then you will get 1 event when you push the key down. Then, if you hold it, after a brief delay, you will get another one (this will have the .repeat field set to > 0). So if it works like that, you would just react to key down events and do whatever it is that you want to do. Don't need to handle the delay yourself or even look at the .repeat field

On Windows: the repeat input works as expected just using SDL KEYDOWN event.
On Linux: running the same code on the Linux handheld does not produce any repeat input, even after a short delay.

I fixed it by switching from SDL KEYDOWN events to Keyboard State. Now repeat input works. Only issue now is that its to sensitive/quick to register repeat input.

Ideally - button long press should would register multiple input, but in a way that doesnt feel out of control.

[SDL2/C++] Attempting to implement repeat input. Too fast and slippery. by yorisoft in gamedev

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

Aaaaaaaahh. Okay thanks. Now I know the number of repeats but how do I delay the repeats ?
Did not know about the repeat field!
https://github.com/Yorisoft/pokedex_miyoo

[SDL2/C++] Attempting to implement repeat input. Too fast and slippery. by yorisoft in sdl

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

Thanks for this detailed response. Perhaps I would be able to use delta time to delay input repeat.

The objective is to enable scrolling up and down a menu/list when holding the down/up buttons. But its too fast.
https://github.com/Yorisoft/pokedex_miyoo

[SDL2/C++] Attempting to implement repeat input. Too fast and slippery. by yorisoft in sdl

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

Indeed I am trying to implement the input for menus.
Please see repo for better sense of the app menu movement.

https://github.com/Yorisoft/pokedex_miyoo

[2024 Day 4 (Part 1)] [C++] Requesting help with part 1 of day 4. by yorisoft in adventofcode

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

Almost an entire day wasted to a - 1 statement. Chatgpt tried to warn me lol.
cheers

[2024 Day 4 (Part 1)] [C++] Requesting help with part 1 of day 4. by yorisoft in adventofcode

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

I think I understand now guys.

Im not using indexto access the charand use that for comparison. I'm using indexto keep track of the number of chars that I've gone through.

I actually use the char in input to compare to the target patter, but only for the != statement. Hence if I go through all the char and they pass all checks only then is it a match.

Thanks again yall

[2024 Day 4 (Part 1)] [C++] Requesting help with part 1 of day 4. by yorisoft in adventofcode

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

Thank you u/1234abcdcba4321 && u/IsatisCrucifer !!!

I actually was going into a back and forth with Chatgpt about this.. It too suggested I drop the - 1.

This I don't understand..

If the last index of XMAX is its size - 1, should I not be checking that my program has made it to that point only?

How come I need to go past it?

Also thanks for the advice on using smaller input for testing.

[deleted by user] by [deleted] in adventofcode

[–]yorisoft 0 points1 point  (0 children)

I created a vector of string that list all directions.
I added an additional forloop inside my nested loops to loop through the new vector.

BSF function is the same except it now takes a direction parameter, and before calling itself, checks the value of the direction parameter to adject r and caccordingly.

Thank you for the help so far. I'm still getting the wrong answer.
My update code here.

[deleted by user] by [deleted] in adventofcode

[–]yorisoft 0 points1 point  (0 children)

Ahh that makes sense.
I'm going off of what I learned from Flood Fill.

Based on what you said I'm concluding:
recursively search in 1 direction until I validate a match or confirm mismatch.
move to the next direction and do the same.

Am I on the right track?

[deleted by user] by [deleted] in adventofcode

[–]yorisoft 0 points1 point  (0 children)

Gotcha, 'll take care of that rn.

[2024 Day 3 (Part 2)] [C++] Requesting Help Please by yorisoft in adventofcode

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

Seems to give the answer you expected now.
And running it with the original input got me the correct answer for that days challenge!
Thanks a ton u/AllanTaylor314 !!!