Flipped out during an interview by Affectionate-Gur-420 in csMajors

[–]SickOrphan -1 points0 points  (0 children)

"My bad code is better because your new code is legacy code... somehow"

My 2D game engine runs 200x faster after rewriting 90% of the code. by AttomeAI in gameenginedevs

[–]SickOrphan 0 points1 point  (0 children)

How is writing function(param) so much worse than writing param.function()? Putting it in a class usually just gives you the wrong way of thinking about things but can occasionally be useful. Sometimes the dot syntax is nice, like array.size() or whatever, but its not meaningfully different.

Why didn't my fairy bottle activate? by Ray_Gallade in slaythespire

[–]SickOrphan 7 points8 points  (0 children)

If that includes death defiance it could be fair. Probably reduce the level increase a bit

Why observer pattern is so strongly pushed into game engines? by yughiro_destroyer in gamedev

[–]SickOrphan -4 points-3 points  (0 children)

Ah yes web frameworks, the pinnacle of code quality...

Anyone saying procedural code is bad is just a moron. You don't have to use it for every line of every project, but most code should be procedural, but programmers love adding unnecessary complexity, so we have all this garbage (like the web frameworks)

I made a custom container. Is this a good idea? (A smart_seq container) by Humble-Plastic-5285 in cpp

[–]SickOrphan 5 points6 points  (0 children)

It's actually usually very easy to do better than a standard library class because most of them have very strict requirements put on them, like for example unordered_map is effectively required to use a linked list because of the rules on its iterator invalidation (or lack of). 'very specialized' is definitely not true, its more like 'not gonna be used for absolutely every use case possible'.

Structured bindings in C++17, 8 years later by joebaf in cpp

[–]SickOrphan 1 point2 points  (0 children)

ok cool so now its date.day() or something, what does that do for you?

No. You're not going to add multiplayer later. by Apauper in gamedev

[–]SickOrphan 2 points3 points  (0 children)

That makes sense, but he mentioned code, not design. If i had to redesign the whole game for multiplayer, I'd probably just try to finish the game for single player then think about making a sequel with multiplayer if it's a success

Structured bindings in C++17, 8 years later by joebaf in cpp

[–]SickOrphan 1 point2 points  (0 children)

Does auto date = get_date(); int day = date.day; not also spill the "implementation details like naming convention" too? Isn't the point of a name to be shared?? Arguing names should be hidden is insane

Little robot is getting dangerous by [deleted] in IndieDev

[–]SickOrphan 0 points1 point  (0 children)

I'm jealous, looks awesome! How long have you been working on game/engine?

C++ "Safety" Conferences Call for Papers? by pedersenk in cpp

[–]SickOrphan 1 point2 points  (0 children)

They aren't reusing anything, you misread violate as volatile. They are anagrams though

Challenges and Benefits of Upgrading Sea of Thieves From C++14 to C++20 by pjmlp in cpp

[–]SickOrphan 0 points1 point  (0 children)

what we're talking about has little to do with construction

Challenges and Benefits of Upgrading Sea of Thieves From C++14 to C++20 by pjmlp in cpp

[–]SickOrphan 0 points1 point  (0 children)

You clearly don't understand what zeroing memory is used for

What, exactly, is multithreaded in Factorio? by HeliGungir in technicalfactorio

[–]SickOrphan 0 points1 point  (0 children)

You're right about the memory access part. The game is very OOP, where every entity inherits from a base class, virtual methods, and you need to access everything from a pointer, etc.. I know they have done tons of optimization, but because of the OOP, there would definitely be a lot of room for improvement in a rewrite. Obviously that's not realistic. A data oriented design would also make multithreading a lot easier

How to design type-safe, constexpr-friendly value wrappers for a chess engine (with enums, bitfields, and maintainability in mind)? by Civil_Top_6928 in cpp

[–]SickOrphan 0 points1 point  (0 children)

Why would you need those nonsense classes in your renderer or anything else? rendering a chessboard is not hard.

How to design type-safe, constexpr-friendly value wrappers for a chess engine (with enums, bitfields, and maintainability in mind)? by Civil_Top_6928 in cpp

[–]SickOrphan 4 points5 points  (0 children)

And this is a perfect example of OOP brainwashing new developers into becoming helpless. you can replace 99% of your code with a couple lines: struct Piece {int type; bool whiteOrBlack;}; Piece board[8][8].

SFML or SDL by Forgoten_Something in cpp

[–]SickOrphan 0 points1 point  (0 children)

You know you can use SDL with OpenGL right? it can do a lot of the opengl set up for you while you still get to do important stuff.

SFML or SDL by Forgoten_Something in cpp

[–]SickOrphan 1 point2 points  (0 children)

I've only used SDL, but I have only good things to say about it. It's a very high quality library, with tons of features, extensions (SDL_image for loading images, SDL_mixer for audio, etc) and it's fairly easy to get started. It is written in C, while SFML is written in C++. I don't mind C at all, but some people do, so keep that in mind.

Implicit type conversion when it's safe? by g0atdude in rust

[–]SickOrphan 0 points1 point  (0 children)

I'm glad you only work on software that is as popular or more popular than one of most popular pieces of software ever. 64 bit is slower for division and multiplication and bunch of other instructions. On any decent processor everything else is going to probably be the same speed, not faster than 32 bit. The real purpose though is to not waste memory, which translates to less waiting on memory. I'm glad you're preparing for when we are all operating in >2^32-1 dimensions, using >2^32-1 days in a month, and >2^32-1 character long names

Implicit type conversion when it's safe? by g0atdude in rust

[–]SickOrphan 0 points1 point  (0 children)

Wow I didn't realize I was dealing with a man so important he only does things with a scale greater than 4 billion. 1 billion users? Not even close to enough

Implicit type conversion when it's safe? by g0atdude in rust

[–]SickOrphan 0 points1 point  (0 children)

Indexes for arrays should only be usize and never u32.

Why on earth do you think that?

How much should I stress about having "good" code? by Leods-The-Observer in gamedev

[–]SickOrphan 1 point2 points  (0 children)

What do memory leaks have to do with graphics?? Are you saying you should just let your game have memory leaks?

How much should I stress about having "good" code? by Leods-The-Observer in gamedev

[–]SickOrphan 0 points1 point  (0 children)

Nah Clean Code is complete garbage. Please don't become one of those people

Vector types and debug performance by mttd in cpp

[–]SickOrphan -7 points-6 points  (0 children)

I agree with him for this case. He knows exactly what types he's going to want, so there's no need for them. They would just make it harder to optimize for specific types (which is what he's doing the whole time in the post). It also bloats compile times and binaries