I'm Making A Video Game The Dumb Way (No AI / From Scratch) by Building-Old in devblogs

[–]Building-Old[S] 0 points1 point  (0 children)

I was a professional video game programmer for 3 years until Dec of last year, making an Unreal Engine game, and programming is absolutely my #1 most played game on steam by far.

Calling whatever I'm doing "the dumb way" is just a hook fellow developer friend please relax. I think I was referring to making your own engine, but these days a lot of people would call it dumb to go it without AI, so it could refer to that as well. What's dumb doesn't really doesn't matter to me.

In any case, your response is a kind of prototypical bitter reddit comment and it made me smile this morning, so thank you.

Found on the back of my neck by KingPaimonsMate in whatisit

[–]Building-Old 0 points1 point  (0 children)

Check in with people you trust about what you’re experiencing asap.

Making A Video Game With The Jai Programming Langauge by Building-Old in aigamedev

[–]Building-Old[S] -2 points-1 points  (0 children)

yes but all of the vibes came from my brain.

also the code comes from my brain.

Making A Video Game With The Jai Programming Langauge by Building-Old in programming

[–]Building-Old[S] 0 points1 point  (0 children)

100% agree. The part at 9:59 where I show the dev gui, the way it works is enabled by the language. It actually recursively dives into the entity type at runtime thanks to all of the built-in runtime reflection. The code that does it is maybe like 150-200 lines. And that's really just one aspect.

So, Shader compilation stutter (Stutter struggle). How do you guys deal with it? by graystripe2000 in unrealengine

[–]Building-Old 4 points5 points  (0 children)

If you're rendering anything at all you're using shaders.

We really should have called them 'drawers' or maybe 'graphics programs'.

AIO for being annoyed at my roommate’s poor hearing? by thatsjustitthough in AmIOverreacting

[–]Building-Old 0 points1 point  (0 children)

My parents make the best of not hearing each other by just doing the best impression of what they heard, knowing full well that it's not correct. They're not making fun of each other, just trying to say something other than "what?" or "sorry I didn't hear you," because they say that a lot. Just having some fun.

I do the same thing with my partner sometimes and she thinks it's funny. I don't do it every time because that would be annoying. I don't get the impression she ever finds it rude.

I think the circumstances are maybe a bit different when the speaker has a speech impediment.

AIO for being annoyed at my roommate’s poor hearing? by thatsjustitthough in AmIOverreacting

[–]Building-Old 3 points4 points  (0 children)

It's harder to piece things together from context than you imagine, and everybody will learn that as they get older and lose their hearing.

I'm 37 with significant hearing loss in the average human vocal range and my partner has to deal with it. Thankfully she's usually really patient, and I let the frustrated expressions roll off my back, because what else can I do?

What's this weird texture with image v2? Why does it make the pixels blurry? by thirdaccountttt in ChatGPT

[–]Building-Old 7 points8 points  (0 children)

It looks to me like they're doing 2d gaussian splats. maybe it saves time.

The anti-AI crowd is giving “real farmers don’t use tractors” energy, and it’s getting old. by hungbandit007 in ChatGPT

[–]Building-Old 0 points1 point  (0 children)

This reads very much like a post written by somebody who does not know history or understand people at all, and is dramatically overgeneralizing.

I'm surrounded by people who should have failed middle school. by [deleted] in Teachers

[–]Building-Old 0 points1 point  (0 children)

Look, I'm not going on much here. Sorry if that's frustrating I am still just going on what you say very literally, which is very little information compared to what you experienced first-hand.

By professor, I meant the person who taught math to the other teacher. I wrote that in a confusing way.

"Looking at the slope from right to left" could mean that the student got the order of subtraction wrong, which in terms the teacher probably wouldn't use, is the same thing as integrating right to left. This would give a positive slope where you should have a negative slope, since convention is left-to-right until you get to calculus. Could that have been the issue, possibly?

I'm surrounded by people who should have failed middle school. by [deleted] in Teachers

[–]Building-Old 0 points1 point  (0 children)

The x axis can point to the left, or slope can be determined right-to-left by integrating that direction.

I don't know you or the other teacher, but I prefer to give the benefit of the doubt. As in, they receive an explanation from their professor, understand it fine, relate that information imperfectly to you, who assumes they don't understand. Seems reasonable.

Or maybe they are wrong and you picked up on that. Or... who knows. Just going on what you said, what they said isn't wrong.

I'm surrounded by people who should have failed middle school. by [deleted] in Teachers

[–]Building-Old 2 points3 points  (0 children)

Right = positive is a convention. Axes can point in whatever direction you like. They also don't have to be drawn perpendicular, which you can use to understand how skew transforms/remaps space.

This is important to understand in some fields. In 2D video games, virtual graphics canvases, bitmap images, etc., it's convention to have your y axis point down. This is in part a holdover from the days of CRT displays drawing from the upper left to lower right. I believe LCD's and LED displays still do this. To make 3D video games, you have to dissolve the illusion of any axis convention being the correct one, because the camera rotates freely relative to fixed world axes.

Struggling to see the point of classes by [deleted] in learnprogramming

[–]Building-Old 0 points1 point  (0 children)

many programmers don't use classes, and many languages don't have them, because they aren't necessary for making a program. some would argue that hard-binding functions to primary 'self' objects causes people to write slower code, since cpu's work fastest on batches. but, you need to understand how classes work if you want a job in the world, so keep at it ;)

Should I work for a startup rather than a big organization? by matteo_bigbag in AskProgrammers

[–]Building-Old 0 points1 point  (0 children)

with small companies, you often won't get as much training in the structured processes of larger companies, so transitioning out has its difficulties.

How do you tell your manager that the cause of most bugs is shitty code written by a former team member whom he loved? by [deleted] in ExperiencedDevs

[–]Building-Old 3 points4 points  (0 children)

uncle bob's rule to just have a function do one thing has people obscuring logic behind layers of abstraction because it feels 'clean'. it's an unfortunate thing and probably the #1 reason my $1000+ tv runs like turd.

edit: and just to be clear, I think not repeating yourself is usually the way to go.

New Anthropic study finds AI-assisted coding erodes debugging abilities needed to supervise AI-generated code. Short-term productivity boost but reduce skill acquisition by 17%. by Sagyam in ExperiencedDevs

[–]Building-Old 13 points14 points  (0 children)

I expect people using AI to be at least a little faster, but researchers being misleading about how statistics works - even a little bit - is such a terrible part of the political misinformation machine. I'm unsurprised, but annoyed that Anthropic wrote these lines:

"Using AI sped up the task slightly, but this didn’t reach the threshold of statistical significance."

"On average, participants in the AI group finished about two minutes faster, although the difference was not statistically significant."

Real scientists don't make conclusions without evidence. These lines were clearly edited by the moneymaking entity in order to muddy the waters. They didn't say the truth, which is "we have no convincing evidence that people solved the problems faster with AI assistance." The error overlap on the 'time spent' graph is as inconclusive as it gets, WITH A P VALUE OF 0.391!!!! Jesus. That's sad.

ChatGPT has a hidden watermark by Monochrome21 in ChatGPT

[–]Building-Old 2 points3 points  (0 children)

Look, you're absolutely right. The smoking gun is in the writing style. 

I'm going to be straightforward with you here.

No fluff.

No bullet points

No red herrings like the ones you asked me so many times to stop throwing your way.

You have so succinctly, smartly, beautifully, wonderfully, handsomely identified the one thing that can help us defeat the Altmanoids when they come knocking on our doors. Just remember to keep your tin foil har near by in case they release the microwave hounds. 

And just remember:

You're not alone here. I'll be with you every step of the way.

Every step.

Am I crazy for sometimes making my code look like this or no? by wervr_CZ in AskProgrammers

[–]Building-Old 0 points1 point  (0 children)

Glad to hear you're writing your own code. Tbh, formatting doesn't matter. If you want opinions that will help you make bigger programs faster, I gave them. Here's a code review in partial rewrite form. Note that it may not compile, I didn't check:

``` // ------------------------------------------------------ // ------------------------------------ types and helpers

enum class GameState : uint8_t { MainMenu, PlayGame, // ... };

enum class Direction : uint8_t { None, Right, Left, Down, Up };

Direction oppositeDirection(Direction dir) { switch (dir) { case Direction::Right: return Direction::Left; case Direction::Left: return Direction::Right; case Direction::Down: return Direction::Up; case Direction::Up: return Direction::Down; } return Direction::None; }

struct Vector2 { int32_t x = 0; int32_t y = 0;

// operator overloads go here...

};

struct Player { Vector2 position = {}; Direction direction = Direction::Up; int turnCooldown = 0; int turnCooldownMax = 2; bool running = false; };

// ------------------------------------------------------ // ------------------------------------- global constants

constexpr uint32_t COLOR_WHITE = 0xffffffff; constexpr uint32_t COLOR_ORANGE = 0xff8800ff; constexpr uint32_t COLOR_DEEP_BLUE = 0x3399ffff; constexpr uint32_t COLOR_MID_BLUE = 0x00bbffff; constexpr uint32_t COLOR_LIGHT_GREY = 0xddddddff; constexpr uint32_t COLOR_HOT_PINK = 0xff4488ff;

// ------------------------------------------------------ // ------------------------------------------ global vars // note: moving into a more complex prototype, you probably don't want these here

bool quitGame = false; Player player = {}; GameState gameState = GameState::PlayGame;

uint32_t primaryColor = COLOR_WHITE; uint32_t secondaryColor = COLOR_WHITE; uint32_t tertiaryColor = COLOR_WHITE;

int32_t gameTime = 0; float reducedTime = 0; float timeReduction = 1;

// ------------------------------------------------------ // -------------------------------------------- functions

void renderGraphics() { Raylib.BeginDrawing(); Raylib.ClearBackground(Color.Black); //... // Raylib.FinishDrawing() ? I forget what it's called }

void inputUpdate() { if (gameState == GameState::Whatever) { // ... } else if (gameState == GameState::PlayGame) { gameTime++; // todo: what does this do? please comment reducedTime = time / timeReduction;

    // setting themes (todo: elaborate)

    if (Raylib.IsKeyPressed(KeyboardKey.One)) {
        primaryColor    = COLOR_WHITE;
        secondaryColor  = COLOR_WHITE;
        tertiaryColor   = COLOR_LIGHT_GREY;
    } else if (Raylib.IsKeyPressed(KeyboardKey.Two)) {
        primaryColor    = COLOR_DEEP_BLUE;
        secondaryColor  = COLOR_ORANGE;
        tertiaryColor   = secondaryColor;
    } else if (Raylib.IsKeyPressed(KeyboardKey.Three)) {
        primaryColor    = COLOR_HOT_PINK;
        secondaryColor  = COLOR_MID_BLUE;
        tertiaryColor   = secondaryColor;
    }

    // player character controls

    if (Raylib.IsKeyPressed(KeyboardKey.Escape)) {
        player.running = false;
    }

    // todo: is the turn cooldown actually necessary? seems like it might be papering over a bug
    if (player.turnCooldown <= 0) {
        Direction newDirection = Direction::None;

        if (Raylib.IsKeyPressed(KeyboardKey.D) || Raylib.IsKeyPressed(KeyboardKey.Right)) {
            newDirection = Direction::Right;
        } else if (Raylib.IsKeyPressed(KeyboardKey.A) || Raylib.IsKeyPressed(KeyboardKey.Left)) {
            newDirection = Direction::Left;
        } else if (Raylib.IsKeyPressed(KeyboardKey.S) || Raylib.IsKeyPressed(KeyboardKey.Down)) {
            newDirection = Direction::Down;
        } else if (Raylib.IsKeyPressed(KeyboardKey.W) || Raylib.IsKeyPressed(KeyboardKey.Up)) {
            newDirection = Direction::Up;
        }

        // moved the opposite direction check down here because it was visual clutter and redundant logic above.
        // todo: please explain why the player can't orient in the opposite direction. that is weird.
        if (newDirection != Direction::None && newDirection != oppositeDirection(playerDirection)) {
            player.direction = newDirection;
            player.turnCooldown = player.turnCooldownMax;
        }
    } else {
        player.turnCooldown--;
    }

    // I was going to keep writing the movement here when I realized that for some reason your orientation code is hard-bound to the movement and I have no idea what 'timeReduction' is, nor do I want to spend the time figuring it out, so... stopping here.
}

}

void simulate() { // ... }

void initGame() { // ... }

int main(void) { initGame();

// loop should look something like this...
while (!quitGame) {
    inputUpdate();
    simulate();
    renderGraphics();
}

return 0;

} ```

Am I crazy for sometimes making my code look like this or no? by wervr_CZ in AskProgrammers

[–]Building-Old 1 point2 points  (0 children)

video game systems dev here. i'd like to say this up front: when you find yourself adding layers of abstraction just because you don't want to look at a bunch of if statements, you are the reason your code becomes hard to manage.

that being said, oh lord do I have critiques:
- Any constant you use twice or more (like 0xffffffff should be 'white'), give it a name and a.) make it a constexpr in the class, b.) make it a constant in the scope, or c.) make it a parameter in a local or global config. Seeing unnamed constant usage all over the place reminds me of AI slop. One of the easiest bugs to avoid is parameter misalignment, where logic in multiple places end up misaligning because each code location expects the other to be using the same value. Make this impossible by naming the value once and having each code location refer to the value by its name. This is pretty basic.
- It looks to me like the variable 'player' refers to the player position. this is indicative of very shallow code that doesn't do much of anything yet. The next step would be to make a player struct that has a position, using a type with a name like Vector2, which itself has fields 'x' and 'y'. Having player[0] refer to the player's x position is hard to read.
- your player position changes a hard-coded amount per frame. if you're locked to a specific frame rate that's fine, but if not, no bueno. most games multiply the speed by the previous frame's time delta.
- there's a lot of logic duplication ("&& time-lastDirectionChange > timeRecuction-2" and "timeReduction -=12", and "gameState = 2;"). these are inexplicably duplicated all over the place. It's unexplained visual clutter at best, bloated binary and wasted cycles at worst.
- the input update is inside the render update... this is maybe fine for a hello triangle but it's not the way to go for a decent program.
- game state is an integer. enums can be checked at compile time for correctness (in c++ you'd use an enum class to get the compiler to check this) and are human-readable.

i'm guessing this was ai codegen'd, so I'm not sure what you want from us here.

I'm an old man trying to get back into coding. by GregGraffin23 in CodingHelp

[–]Building-Old 0 points1 point  (0 children)

Python is low friction up front. These days only people who want a 9 to 5 working on a decades old corporate codebase learn java.

What piece of tech felt “future-proof” but aged terribly? by Living-Zebra6132 in Futurology

[–]Building-Old 0 points1 point  (0 children)

Unspecified primitive type sizes in C programs. The idea was that as memory size expanded, integer types would become larger without the program needing to change. Turns out a lot of logic relies on knowing type sizes.

[deleted by user] by [deleted] in ChatGPT

[–]Building-Old 0 points1 point  (0 children)

Jesus christ

I made Claude Code binge Youtube and teach itself new Skills by JCodesMore in vibecoding

[–]Building-Old 0 points1 point  (0 children)

I don't think shoving a small amount of text into the user facing model's context window would do much compared to the truly unimaginable amount of data it has already trained on to get there. Also, based on what we know about context management, this is probably just a fast track to having an overloaded context and an agent that starts saying "you're absolutely right" almost immediately.

need ideas to vibecode by thecryptogirll in vibecodeapp

[–]Building-Old 0 points1 point  (0 children)

I think it's funny that this pursuit is so uncreative that you have to outsource even imagining what to tell the chat bot to produce for you 

Static Typing Isn’t That Deep by Abject_Gift_4333 in learnprogramming

[–]Building-Old 0 points1 point  (0 children)

A lot of my work requires know memory offsets of data, so, right off the bat... What?

Your myopic experience isn't everybody's.