Thread #108641005
HomeIndexCatalogAll ThreadsNew ThreadReply
H
If it works, it works edition

/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_General
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
Graphics Debugger: https://renderdoc.org/

Requesting Help
-Problem Description: Clearly explain your issue, providing context and relevant background information.
-Relevant Code or Content: If applicable, include relevant code, configuration, or content related to your question. Use code tags.

Previous: >>108586519
+Showing all 341 replies.
>>
I've improved my custom memory allocator performance by 30% by removing a subtraction

Turns out CPUs have specialized multiply-add on hardware which fits perfectly with pointer arithmetic
>>
beans
>>
>>108641005
I'm shelving my game engine for now, I have Claude, I have Unity, I'm gonna vibe code some slop for the piggies.
>>
>>108641005
I'm shelving my vibe slop for now, I have a 3 digit IQ, I have Visual Studio, I'm going to make refined games for supreme gentlemen.
>>
>>108641115
Care to elaborate?
>>
>does this game include ai-generated content?
>"no"
>>
>>108643499
no, its ai constructed content. checkmate
>>
>>108643499
It's not really worth denying the fact that you used AI. Nobody who buys video games actually cares except maybe the 12 "people" that bought Condord. If anything, if your game becomes even moderately successful the drama from a bunch of no-game troons having a meltie on pedosky will only serve as free marketing.
>>
>>108643652
>Nobody who buys video games actually cares
this isnt true
>>
>>108643660
Deranged freaks on twitter don't actually buy or even play video games.
>>
>xir gaem doesn't even have an attratc mode
ngmi
>>
File: ideaguy.jpg (35.7 KB)
35.7 KB
35.7 KB JPG
Fightingfrogs
>>
>>108643660
Arc Raiders had a tonne of AI. A couple of trannies complained on the forums at the start and that was it.
>>
>>108643660
Name one (1) game that was going to make it but then failed on account of having used AI.
>>
>m-muh ai
>m-muh markets
you retards need to get yourselves into the mindsets of based indie gamedevs from the c64 and msx era
>>
>>108644615
Boomers had it so much better in the days when you could just program for one specific machine.
>>
>>108644140
I thought it only had AI voices
>>
>>108644703
you can still do that, it's called using a game engine set to compatibility mode
>>
>>108644799
he means when you did stuff by poking hardware registers
>>
>>108644807
that's no different from just using whatever api the game engine provides
you don't have to worry about differences in hardware in an engine like unity unless you're actively trying to adjust the visuals based on hardware levels or form factor or something, just target the lowest common denominator and do a maximum compatibility build
>>
>so what level design tools do you use?
>oh, I, uhhh.... you know, got a custom in-house toolchain...
>>
>>108644902
kek I made a dungeon crawler like that back in the flash days
>>
>>108641005
Progress. Convex solids. Unlike solid lines, convex solids will keep pushing you every frame. When you're cornered by them, the game will shrink you automatically, making it a bit more difficult to get inside geometry.
>>
>>108645192
10 seconds of watching that gave me a boredom-induced migraine thanks a lot
>>
>>108645192
Another thing. The first level is going to take place inside a computer! Do you guys have any cool ideas for components and stuff I could feature in it? This is the technology board after all.

Do you have any good references for drawing machinery in general? Most levels will take place in them.
>>
>>108645203
lol, I think it's relaxing, I never get tired of the zooming out/in camera. It used to give me a migraine from snapping all over the place.
>>
>>108645219
Is he actually scaling down or is it just a graphical effect
>>
>>108645192
uh yeah that's sick, reminds me of like super mario 64 and braid
>>
>>108645219
>Most levels will take place in [machinery]
Your game will be rejected by autists who are angry that the machinery isn't a fully simulated circuit system, and it will also be rejected by normalfags who'll get bored of the aesthetic

Just a possibility
>>
>>108645253
what a retarded post
>>
>>108645236
The scaling inside the layers is "real" in that the geometry is changing. The scaling between the layers is a bit of an illusion. Internally, all layers are the same size, it's just that some are under a scaled down matrix.

>>108645247
Thanks. I was a bit inspired by mario 64's collision system in particular.
>>
File: file.png (106.8 KB)
106.8 KB
106.8 KB PNG
>>108643660
My assertion with AI in games is much like Unity asset slop made from Synty assets, the problem is being having your verisimilitude popped, the problem is if your assets remind people of AI.
>>
>>108644902
Woah, pre-internet ascii art...
>>
It's amazing that TikTok seems to be the only platform where a new content creator can even have their posts show up in the algorithm, Youtube and Instagram don't give any impressions. In fact it seems most platforms are completely hostile to new creators, even Itch.
>>
>>108645326
I get recommended videos with no views on Youtube all the time including from gamedevs
>>
>>108645338
Again, I get 0 impressions on Instagram or Youtube. I get impressions and engagement on Tiktok but only if I post my videos from my phone. The entire ecosystem is fucked.
>>
>>108644902
Basically how all background maps worked through the 16-bit era
>>
>>108645363
people made map editors
>>
>>108645366
Which just shit out big arrays of byte ids
>>
After I finish my game I'm so tempted to make a streamlined 2D game engine designed for scale. Unity is so bad at scale if you're trying to do more than a dozen interactable enemies on screen. All the default Unity behavior is terrible for performance thrashing, it's even faster to just throw your pool objects into the 9999,9999 void instead of deactivating them.
>>
>>108645326
It's not that amazing if you think about it. YouTube prefers 20 - 40 minute uninformative videos because they can run 3 - 4 ads once they have somebody watching, and the videos usually have lots of filler which drives user engagement to press the fast forward button which then triggers another ad to play. TikTok still hasn't IPOed so they haven't gone full enshittification yet, you still have time.
>>
What's the point of learning Vulkan if building your own game engine is pointless?
>>
File: agdg.jpg (443.7 KB)
443.7 KB
443.7 KB JPG
>>108645850
there is none... it's all pointless...
>>
>>108645850
>if building your own game engine is pointless
It isn't. Now what?
>>
>>108644902
why do i see a pair of boobs in this?
>>
>>108646007
all msx games had boobs in them

it was a better time
>>
>>108646026
so true, we need more boobs in games. at least the based eastern devs are still providing them and in better and better fashion
>>
>>108646026
>>108646112
Uggh, you misogynists are really giving me the ick right now.
>>
>>108646135
half of all western women under the age of 30 have or had an onlyfans
>>
>>108646211
Exactly. Women already have enough competition against other women without men and AI creating even more porn to compete with them.
>>
>>108646135
>>108646249
I do not care about the "problems" faced by women, just as women do not care at all for the problems faced by men.
>>
>>108646135
excuse me, women can appreciate tasteful boobs
>>
I think I'm just gonna use godot
>>
>>108646310
your complimentary estrogen, m'lady
>>
>>108646367
what engine am I supposed to use if I don't want to be a disappointment to my children
>>
>>108645850
In my experience it's only ever brown people who advocate for not knowing how things work and just using off the shelf solutions
>>
filtered by 3 vulkan tutorials and an sdl-gpu tutorial. the common denominator? fucking cmake. sdl-shadercross wanted me to install the lunar vulkan sdk (5gb) for a single dll. wtf man
>>
>>108646564
>cmake
? are you planning on open sourcing your project? are you planning on building it on multiple machines? if not, then just make a fucking bat script or some shit

or just work through the fucking cmake tutorial on their website, that has everything you need to know unless you're planning on making fucking enterprise software
>>
>>108646722
Unironically vibecode the cmake, submodules, automated nightly builds, all that bullshit. Claude loves doing that annoying trash and is good at it.
>>
>>108645850
To become a true chad developer and not a pussy that hails Godot or some other shit
>>
I invented wamons
>>
>>108643745
Sounds like toads that can battle
>>
is it reasonable to build something in C or should I spsnd a couple weeks learning C++ before getting deep into development
>>
>>108646950
Is that Bocchi the Rock Nice
>>
>>108647200
You are a pedophile.
>>
>>108647278
Fygoon chill lol
>>
>>108647290
>Fygoon
Please don't tell me that autistic freak is in here too.
>>
>>108647151
just learn as you go
>>
>>108647151
Depends what you're using. For example with the Direct3D API, although it has a C binding, it was clearly designed for C++ because the C functions are obnoxiously verbose compared to C++ methods (aka member functions). But that's like a 15 minute lesson, it doesn't use other C++ features, the style is like C with classes (but no inheritance).
>>
>>108643499
lies always catch up to you
now when you get caught, your reputation will not just be a solo dev who used ai for some things (some people care, most people don't), you will be known as a liar
just own up to it
and don't do that weird song and dance of "we used ai but we put soooo much work into it it's not slop please believe us!"
>>
>>108647650
>reputation
>not releasing all you games under a different alias
ngmi
>>
>>108647425
I started working my project in C++ with the learn cpp website open on the other monitor when I need to learn something
>>
>>108647861
you're doing it wrong then, any llm is a learncpp website on steroids
>>
>the quick change turned into a week-long refactor
>again
>>
>>108647957
Which one was it this time?
>>
>>108647887
I'm a luddite
>>
any code models that can reasonably be run locally?
>>
>>108648004
I was just going to fix an attachment bug, now I am working on adding optional and exclusionary components to queries on top of the inclusive ones I have now.

Right now I define a query only by what components and tags an archetype must have, but optionals would be very useful, as would exclusionary.
>>
How did dithering in PS1 work? Every article I come across about dithering is a post process on a true color image. That doesn't help since the idea was to have the framebuffer in 16 bits to begin with to save memory. Sure, the textures could be made 16 bit before runtime, but how do you deal with shadows and lighting, and other stuff that needs to be dithered in runtime? A post process on the final buffer doesn't really work since it will mess up edges.
>>
>>108641005
I was using stride the other day and set up a basic first person controller capsule but the scene wouldn't run for some reason. It turned out I deleted a camera controller and the engine was crashing because of that. Has anyone used stride and got the impression that it's super buggy?
>>
>>108648118
There are many ways to approach it depending on your workflow, tooling and final goal
>>
>>108648118
Dithering on the PS1 is done directly during triangle rasterization. It's a simple on/off switch that can be set using a GPU command.
>A post process on the final buffer doesn't really work since it will mess up edges.
Wouldn't the end result be the same? Unless you're dealing with anti-aliasing or transparency, that is.
>>
>>108647002
Last time I checked, they had no such thing on Gamestop, so it's not some oversaturated genre.
>>
I'm gonna start by making the game logic and then build the engine as the need arises as a way to view and interact with the game logic
>>
>>108648118
>Every article I come across about dithering is a post process on a true color image.
It's not, it also shouldn't be. You dither as the last step in the fragment shader before writing to the framebuffer. PS1 did it on hardware with gourad shading and texture mapping, this is easy to emulate.
https://gist.github.com/ruby0x1/a8c80896807632b4226a7c8a595d3bf8
>>
>>108646389
The one you programmed
>>
I only have an hour available for engine dev per day
>>
all these broke neet "vibe coders" are going to be mad when the free models all get paywalled
>>
>>108650525
I'll just vibe with a local model running on an RPi Zero
>>
>>108650525
most of them are paying for it free models are terrible.
>>
>>108650653
Nah, free models can be fine. You can also just use intellisense
>>
>>108648352
>Wouldn't the end result be the same? Unless you're dealing with anti-aliasing or transparency, that is.
post process gives moving objects a screen door effect and there is no other option, with per object dithering you have choices
>>
you people are retarded there is nothing that the ps1 did that you can't recreate in a modern shader
>>
>>108650653
I don't pay, the free models are usually good enough
>>
>>108650947
so what do you use?
>>
>>108645253
>and it will also be rejected by normalfags who'll get bored of the aesthetic
Just make the scaling go all the way to electrons and experience quantum effect so that normies will pog.
>>
>>108650658
>>108650947
Even Claude Opus 4.7 on high/very high effort in Claude Code fucks up simple things all the time, how the hell do you guys make do with free models?
>>
>>108650666
>with per object dithering you have choices
The PS1 doesn't have "choices". It's just a simple ordered dithering effect. Doing it in post gives the same exact result (barring transparency). If you don't like that approach, then do it in a fragment shader. It's not that hard.
>>
a video game where you have an ai companion but it's constantly hallucinating and giving you wrong advice and lectures you when you're racist against the aliens that are trying to kill you
>>
writing config file parsers are such a fucking chore
>support nested sections
>support escaped strings
>support arrays
>support default values, and allowable ranges
>include error handling
might as well write a fucking compiler while im at it
>>
I wake up, I eat my beans, I drink my vodka, then I spend 18 hours working on my game, I go to sleep, I do it again
I've lived like this for 5 years
>>
>>108652246
wow you must have completed a lot of games
>>
>>108652275
>>
File: cmake.png (70.7 KB)
70.7 KB
70.7 KB PNG
>>108646564
>>108646722
>>108646778
cmake bros?? i don't feel so good...
>>
Point & Click Rail Shooter
>>
A game where you mind control the enemy monsters that are insanely overpowered and your goal is to take retarded decisions as the "AI" to let the MC win.
>>
>>108652246
You must have got a shitton of work done, show your game
>>
Can I AI generate voices that sound like the crappy VAs from a late 90s Sega arcade game?
>>
>>108652657
>>
>>108652689
is that irl video for the character?
>>
>>108652689
Is that running on an actual PS1. I wager it's also not yours, am I right.
>>
>>108652752
As an expert on retro console graphics artifacts, I can definitively state that is from the Sega Saturn, not the PSX.
>>
>>108652509
I actually kinda like the zig build system. Is that crazy? It's a really nice way to ensure you have exactly the version of the dependency you want and you can easily statically link so you don't have to ship object files/dlls. Maybe I'm a zigger now.
>>
I use a makefile
>>
msbuild bros... we won by doing nothing
>>
>>108645192
Oh, CLOCK! How silly of me...
>>
File: uewcr4.png (148.9 KB)
148.9 KB
148.9 KB PNG
Added a nifty translucent debug/settings overlay. Will add more to it soon. Toggle with ` key. Also extraction from CD image is integrated now, if no game data is detected it will ask for an image to get it from and do it all within the application. No other software or dosbox installer needed.
>>
Khronos has a game engine tutorial nested inside their Vulkan tutorial. You literally have no excuse now.
>>
>>108653397
Microsoft has an entire DX12 game engine available on their github, MIT licensed.
>>
>>108653445
Yeah but dx12 sucks because it doesn’t have unified image layouts and BDA. Until then I won’t touch it with a ten foot pole.
>>
>>108653457
Take your meds and stop parroting things you don't understand.
>>
>The graphics API used by every AAA game isn't good enough for me
>>
>>108653562
you dont understand thing thing implemented in software in a graphics api is a gamechanger
>>
If p:canAttack() then
local pDmg = math.max(1, p.ATK - m.DEF)

m.HP = math.max(0, m.HP - pDmg)

if m.HP == 0 then
m.Alive = false
end

p.LastAttack = os.time()
emit(p, m, pDmg)
end

-- death check reads the canonical flag
if not m.Alive then
-- process death
return
end
>>
>>108651135
we're not using 20 agentic workflows simultanously to produce some CRUD gargabe for corporate. A lot of use the LLM as a glorified stack overflow thats it
>>
a skateboarding jrpg
>>
>>108645192
>>108645219
just to let you know I really love the TTYD look of this, keep the good stuff going anon
>>
I will now upgrade my DX11 engine to DX12
>>
>>108653787
Tony Hawk's Mystic Quest would've been a billion dollar banger in 1999
>>
anthony hawg's magical adventure
>>
>>108653883
bravo
>>
>>108653787
awful idea, the whole point of a skateboarding game is the skateboarding, you can't make a turn based skateboarding fun
>>
>>108655044
>jrpg
>turn based
You haven't played a JPRG in at least 25 years.
>>
do you need a physics engine for the game or is it enough to have a collision library and hard code everytihng?
>>
>>108655354
Do you mean a generalized physics engine like Havok? No, you absolutely do not need a generalized physics engine.

Just write the damn program to do what you want it to do. That's it. If you need a box to fall down some stairs, add what's needed for that.
>>
>>108655354
most modern game engines check for overlapping pixels on the gpu
>>
>>108655376
lol, not in your life
>>
When you pass the array of Extension, Layer, etc. name to Instance, Device, etc. creation, can I free them after a VK_SUCCESS? Every tutorial uses C++ std::vector, and I have no idea when these little shits free their memory.
>>
>>108653562
Every AAA game uses winslop too. Doesn't mean it's not garbage.
>>
>>108655669
Go try to make a 3d game that just works on every linux configuration and then come back and report on how garbage Windows is.
>>
>>108655655
yes. once a vulkan function returns, it's done with using any plain C structures that were given as arguments and you can immediately free them. it's not so clear in case of vulkan api objects (those made with vkCreate*), sometimes you need to make sure that one outlives another. there's a big section near the start of the spec that deals with object lifetimes IIRC
>>
>>108655610
not him but are you saying a hobbyist would never be able to implment such a shader?
>>
>>108655888
GPU collision detection has to be done in compute and I've never seen a "hobbyist" even fuck with compute shaders.
>>
I did some more work on my game logic and learned about lambdas and move semantics in C++
>>
>>108656236
Can I be the first? I'm new to it but I've been trying to figure out some kind of real time collision for fractals and >>108655376 actually might be exactly what I'm looking for if I want to do something more complex than menger fractals
>>
>>108655376
No.
>>108656554
Just use SDF collision since you can easily get an SDF representation of your fractals. Wtf are you even talking about "check the overlapping pixels", that doesn't even make sense in 3 dimensions
>>
>>108656613
I never said I was smart. But thanks, I will try it
>>
>>108656613
To clarify what I was thinking originally was that I could, from the perspective of the object I'm checking collisions for (I only need one), I could render a sort of low res cubemap and do some funny math to calculate if there's a collision. Would that work? Despite being inefficient
>>
>>108648353
>Last time I checked, they had no such thing on Gamestop
Did you give them a call?
>>
>>108656236
>I've never seen a "hobbyist" even fuck with compute shaders.
Huh? It's literally just doing the same code (with some changes) but in shaders.
>>
File: file.png (6.1 KB)
6.1 KB
6.1 KB PNG
>>108647151
Maybe? You can do anything in nearly any language. It really depends on what you're working. I have a simple online game, C was enough to make the engine and most of the game. If you're planning to work with 3D I would recommend C++ thougheverbeit.
>>
>>108656958
Why do you talk like a pedophile?
>>
>>108656958
I went with building it in C++ and learning the language as I go
>>
>>108641005
>Morrowind is a safe, sterile, harmless
>>
Today the fourth edition of game engine architecture comes out. Hopefully it won’t take long to get on Anna’s archive.
>>
>>108658473
That book is pretty useless, too complex for beginners and experts already know it
>>
>>108653397
>You literally have no excuse now
the tutorial is way too long
>>
>>108658556
>beginners and experts
Sounds great for people who aren't experts or beginners.
>>
>>108660358
I should say that if you don't know the topic, then it doesn't go into enough depth, and if you know the topic then the book is redundant
>>
I spent the last 3 weeks contemplating what it means to be a video game
my conclusion: video + games = video games
>>
>>108660623
but what about visual novels? those are images + text
>>
>>108660890
Are you printing them out? No? Then they're video, dumb ass.
>>
>>108660965
someone played minecraft by printing out the frames. we are blurring the lines of video games
>>
a video game where your monitor goes black and the ai describes what's happening to you
>>
>>108661256
AI jeets reinvented text adventure
>>
>>108658465
He's very obviously talking about all the games Bethesda made after Morrowind, which was the last time Bethesda thought to do something interesting and unique with any of their games. Every game afterwards has been just a rehash of the mediocre formula used in Oblivion, including the non-TES games like Fallout and Starfield.
>>
the slower you go, the farther you'll get
>>
>game is available for free on steam but you have to input a valid google play card in order to unlock the full game
get rekt gaben
>>
>>108662991
Nah, hit escape velocity or go home.
>>
How much progress are y'all making?
>>
>>108663180
space is fake and gay
>>
>>108663252
the moon is in space
is the moon fake?
>>
>>108663581
The moon is in the heavens thoughever
>>
>>108663626
Why do you talk like a pedophile?
>>
>>108663581
the moon is just a sun mirror
>>
>>108652509
Why are radniggers such pathetic lairs? They cannot simply state an obvious talking point we can all agree on. They, past and present employees, always have to chimp out about "muh build times" and how cool they are for figuring out single compilation units. "bbut our anecdote" coming from shite software developers who've been grifting over their pre-AVC/H264 codec since 1999.
>>
>>108663581
spoiler: you're currently in space
>>
>>108652509
ive seen this guys videos twice and i hate everything about him
>>
>>108663226
I've just started over with my engine, for the ~10 (i lost count) time in the last 6 years
>>
>>108652509
>cmake
why would anyone want to use this pile of shit?
makefiles just work, if it's not enough use waf
>>
>>108652509
i don't understand half of what he said but i use shell scripts to build because it's easy and i don't give a shit about whatever imaginary edge cases people bitch about when they see it.
>>
>>108663709
Make is a build system. CMake is a build system for your build system. You use CMake for open source projects so anyone can compile it on any system without having to manually track down every dependency and the required version of the required build tool.

You don't need it for your solo toy project. But you retards who think it's pointless are just so fucking retarded that you should just be over in /agdg/ posting anime trannies and fantasizing about making pong in godot.
>>
>>108663743
I'm not saying it's pointles, I'm saying it has retarded design and it's overbloat
there are other tools that can be used, but in 90% cases you can just use Makefile, other 10% requires config file.
Also recently I'm seeing shitton of cmake-using projects failing to compile because of deprecations in cmake
and cmake fuckery is not even close to vcpkg madness
>>
>"games" with no lose conditions
dei slop
>>
>>108663934
Lose conditions are just gatekeeping.
>>
File: hr2izd.png (398.6 KB)
398.6 KB
398.6 KB PNG
>>108653333
Panned sound effects work now. Also more toggles.
>>
>>108663934
Good thing mine is a PvP game.
>>
>>108664019
>every match is a tie
>everyone is a winner
>>
you play as a spider and you climb up the dev's pants while he's working and bite his peepee
>>
>>108651813
Stealing this and making a halo clone, but it's troonslop
>>
>>108656554
it's like tetsuo but with brocoli
>>
pokemon but it's a card game
>>
>>108664182
recently I remembered the old Pokemon anime and that egg they carried around so I looked it up and apparently the egg hatched into an egg pokemon

I just thought that was really unclimatic
>>
>>108664301
>unclimatic
>>
https://codeberg.org/fbc91/SDL_GPU-Experiment/src/branch/main/main.c

my SDL_GPU triangle. please clap
>>
>>108664321
when you anticlimax you shoot out anticum which annihilates if it touches normal cum

when you unclimax you uncum which means it just goes back inside
>>
>>108664351
I'm clapping so hard rn
>>
I'm... I'm.... CUMPILING!!!!!!
>>
I had a dream once that GTA 4 ran so poorly because the developers didn't know how to make wheels rotate on cars as a mesh, so instead they give the illusion of rotating wheels by uploading rotated UV mappings every frame.
>>
>>108664415
I mean, if it were me, I'd just rotate the UVs in a shader
>>
bros I made insane progress (300 LOC total) and I think I have to refactor the whole project because my approach was gonna force me to start duplicating code
This is an absolute travesty
>>
>>108664014
>>
>>108664485
Reminds me of the PS1
>>
A wise man once said that motivation comes from the foreskin.
>>
>>108653787
like jet set radio future? great game
>>
>>108664542
>>
chatgpt said my architecture is garbage
>>
chatgpt said my architecture is a violation of the community guidelines
>>
>>108664542
Rabi stole all my motivation
>>
>>108664885
you could always find a motivational bro to dock with
>>
maybe I should just use an engine
>>
File: IMG_9723.jpg (256.9 KB)
256.9 KB
256.9 KB JPG
Looking for a c++ book to read front to back and think I’m going to do pic rel
>>
>>108665190
took a skim at it, it teaches OOP slop, including getter and setter garbage
>>
>look at project on github
>its_constantly_switching BetweenStyles
>>
>>108665190
if you know how to program, get latest version of "tour of c++"
if you don't, get bjarne's c++ programming language book
>>
>>108665220
>including getter and setter
if you're just raw dogging data members from outside the object, you were never OOPing from the start, so grats I guess with your weird frankenstein code
>>
>>108665434
it's just my programming style
>>
>>108665434
you dont need to use setters and getters to do OOP
>>
>>108665475
actually yes you do or else you're breaking paradigm and your entire class design and probably program are an abomination
>b-but it still compiles
doesn't mean it's following OOP or is good code
>>
>>108665491
OOP != encapsulation
>>
>>108665516
ok so you're just trolling gotcha
>>
>>108665491
the class functions are they only thing that need to modify the objects member data
if you need the data outside of the object it isn't oop
>>
>>108665521
OOP is grouping data and functionality into an "object" you can have objects with no encapsulation
>>
I don't have the mental fortitude for this
When I realize I've implemented something in a retarded way I instantly want to give up
>>
>>108665522
there are plenty of valid reasons why you would directly get or set data from an object, the point is that it's achieved through message passing and that the usage doesn't rely on the actual implementation of the underlying data

you retards really need to run your retarded statements through chatgpt or something before you embarrass yourselves on an anonymous image board next time
>>
>>108665542
>message passing
thats not what OOP means anymore
>>
>>108665529
>implement thing in retarded way
>realize it
>implement it in a non-retarded way
that's exactly how you learn things and progress
>>
>>108665418
I’m specifically looking for programming paradigms and architecture through the lens of c++
>>
>>108665951
you see the thing is I'm retarded
>>
>>108664351
is sdl gpu producing ready yet? Thinking of switching to it from sokol because sokol is kinda bullshit on shaders
>>
anyone remember dragonruby? There was a thread back when they announced it half a decade ago always found it was a shame that it was paid. Apparently its free now.
https://dragonruby.itch.io/dragonruby-gtk
>>
>>108666561
how is ruby fast as hell
>>
>>108641005
One more week and I should finally be able to draw a triangle.
>>
>>108666904
apperntly they have a custom interpreter. No idea if the unity example is still that bad https://www.youtube.com/watch?v=s2rngApV1WU
>>
>>108667373
ah fuck meant https://www.youtube.com/watch?v=MFR-dvsllA4
>>
>>108667377
that's the most retarded not a real test I've ever seen and he completely (intentionally) fucked up his unity build if it can't display 40k sprites
>>
>>108667377
>20k sprites
>40 FPS
>"fast as hell"
what is wrong with these people?
>>
>>108667377
Raylib is free and does 80k sprites in the basic sprite demo without breaking a sweat. In OpenGL 3.3.
>>
any library or framework that hides the underlying dxgi from you is going to have unsolvable frame pacing issues
>>
>>108667945
what's a frame pacing issue?
>>
>>108667966
ngmi
>>
>>108668006
how is that answer helpful in any way?
>>
>>108668018
ngmi
>>
>>108668027
You haven't made it, whatever "it" is
>>
>>108667966
https://youtu.be/_zpS1p0_L_o

Baby's first introduction to frame pacing that only scratches the surface.
>>
>>108668260
Yeah it's a complex topic but it has barely anything to do with the OS
>>
>>108668281
It has everything to do with the OS. All the tooling to deal with it on Windows is spread between the DXGI API and win32. And nobody cares about gamedev on other platforms anyways.
>>
>>108668296
All the "tooling" you need to deal with it are timers
>>
>>108668302
Stop being an idiot. I'm not really interested in tutoring someone being intentionally retarded. Go do your own homework on the topic instead of spamming /gedg/ with garbage.
>>
>>108668309
uh oh dunning kruger melty
>>
>>108665546
that isn't what it ever meant
>>
>>108668379
The inventor of OOP for Smalltalk said it meant message passing or some shit, but it doesn't matter now because that's not what it means anymore
>>
>just ignore the fact that there are tens of thousands of pages written on the topic by the top experts in the field
>it doesn't matter that your naive present() is just a hint to the operating system
>all you need is a timer
>>
>>108668432
>there are tens of thousands of pages written on the topic by the top experts in the field
There aren't, you just made this up
You've been shitting this thread up with your "I'm a complete beginner yet I'm smarter tahn everyone else" nonsense for a while now
>>
>>108668396
smalltalk didn't invent oop, simula did, and it didn't use message passing
also message passing is (mostly) an abstraction detail that basically means you expose symbol resolution as part of the grammar, making it easy to create "open" sets of symbol tables.
at a low or high enough level, the distinction between procedure calls and message passing basically disappears.
>>
>>108668453
none of which is relevant to our modern conception of OOP
>>
>>108668456
the modern conception of OOP is either Simula or KRL though, it hasn't really changed much beyond what KRL added to the paradigm (the prototype family, and inheritance)
>>
Still don't know how to make debugging an ECS even remotely sane without algebraic effects and a fuckload of tracing infrastructure.
>Just use print debugging
That shit fucking sucks dude.
>Don't use ECS
I'm leaning towards this, but the entire reason I want it is because exposing composition to designers basically necessitates it if you don't want to sacrifice performance.
>>
>I don't know how to debug
ngmi
>>
>>108668514
Why do people keep falling for the "composition = ECS" bullshit just make objects with a bunch of components as fields like a normal human being
>>
>>108668524
Basically, reread this:
>exposing composition to designers basically necessitates it if you don't want to sacrifice performance
If you're making a small game, you can get away with using a dynamic language and just eat the cost of pointer chasing and cache non-locality, yes obviously you can just build non-flat object trees.
>>
>>108668561
Who said you had to use a dynamic language?
The "point chasing and cache non-locality" stuff is complete bullshit, this is how all games were programmed before the ECS meme, and still are for the most part, but I'm sure your game needs to be more performant than an AAA game right
>>
>>108668281
>>108668302
Sleeping/waking is less crisp on Windows than Linux. For ideal pacing on Windows you will want to wake up somewhat early and busy-spin the remaining time, if needed.
>>
>>108668615
whats sleeping and waking
>>
>>108668514
isnt ecs essentially just a database anyway? Just do it like they do.
>>
>>108668574
>Who said you had to use a dynamic language?
I did. Wrangling dynamically composed object trees in sepples past a certain level of granularity is a non-starter. I already did that, it sucked cock and balls. The same reason I abandoned hardcoded animations in favor of a parametric system that gave artists more control.
>The "point chasing and cache non-locality" stuff is complete bullshit
It is until it isn't. In my case, it has fucked me over in the past.
>this is how all games were programmed before the ECS meme
Games in the past were drastically simpler and got away with a lot of shortcuts and half-assed systems that wouldn't fly today, we're also not keen on remaking the past, nor any of the development methodologies used.
>but I'm sure your game needs to be more performant than an AAA game right
Different games have different needs. That being said, yes, my target is locked 60fps on the steam deck at 1080p at the bare minimum.

I'm balancing engine infrastructural complexity, non code team workflows and empowerment, strict performance criteria, and others. That's just the pragmatics. I was already gravitating towards flat, concurrent arrays in previous games. ECS isn't appealing because of some trendy meme status, it's something I was already gravitating towards as a continual refinement of previous gamedev effort.
>>
>>108668687
>I did. Wrangling dynamically composed object trees in sepples past a certain level of granularity is a non-starter. I already did that, it sucked cock and balls.
You did it wrong, probably with the "dynamically" part, you don't need fully dynamic composable entities for your game, hardcode things
>Games in the past were drastically simpler
We're not talking about retro games, ECS only became a meme less than a decade ago, and even then it's not used for the vast majority of games
> In my case, it has fucked me over in the past.
Really interested what kind of game you're making where you got fucked over by this
>non code team workflows
Why would you ever have non-coders write game code
>>
>>108668708
>you don't need fully dynamic composable entities for your game, hardcode things
Nope. The entire stated goal is giving designers more sovereignty and flexibility. I could hardcode yet-another-entity-type, or it could be the responsibility of the designer and artists to do that shit and it's not my problem.
>We're not talking about retro games
I'm not talking about retro games either. I'm thinking in particular of Mercenaries: Playground of Destruction which I was fortunate enough to snag when the leaked source code was still available.
>ECS only became a meme less than a decade ago
I'm aware. And like I say, it's something I naturally re-invented on my own terms. It just turns out there's a convenient word for it.
>Why would you ever have non-coders write game code
They don't write code. That's the point, alongside them not needing to request code be written. They want to do something novel? If you did your job right, they can do it on their own. You give them the tools and an abstract domain-space they can work within.
Of course, there's also the fact that I too can use this shit. It's more efficient to work within a tightly abstracted configuration space than it is to live forever in C++-land.
>>
>>108668829
>tightly abstracted
tight, but general and abstracted*
>>
>>108668829
The domain space you're thinking of abstracting is not something that non-coders should be dealing with
Designers deal with spreadsheets or simple scripts at most
Game code should be written by programmers
Mercenaries I'd consider an old game, basically game programming has not changed significantly since the 2010s, games aren't different and you don't suddenly need ECS where you would not have in the past
I still want to know what you made where this was a performance issue
>>
game engines are a solved problem, why make one
>>
>>108668909
They aren't.
>>
>all the good engine names are taken
I give up
>>
>>108669009
MyEngine
(c) me 2026
Donut steal
>>
>>108668860
>The domain space you're thinking of abstracting is not something that non-coders should be dealing with
What? The domain space is the abstraction, it's not what's being abstracted. It's about representing the mental frameworks the team operates in as an actual thing they can work with inside of tooling. It's not an arbitrary journey into abstraction because abstraction is good, it's the end result of years of analysis, refinement and problem-solving. Taking what's learned and improving on it. It's also literally already done, and to great success. There's not an argument to be made here, there is no point to concede.
>Designers deal with spreadsheets or simple scripts at most
And composition of components is a simpler, and more fool-proof representation of "simple scripts" at the bare minimum, while also allowing variance in the shape of objects without sacrificing structure (we don't use tabular representations of data, "spreadsheets" are for mockups)
>Game code should be written by programmers
Nothing about that changes. Just as giving artists a parametric animation framework and event system didn't drop them into writing "game code".
>>
>>108669103
ECS is for writing game code
Non-programmers should not be writing game code, designers should not be touching the part of a game that ECS deals with
>>
>>108669009
Engina
>>
File: md.png (22.4 KB)
22.4 KB
22.4 KB PNG
I'm going to make a Mega Drive Engine.
>>
>>108669009
Guess you'll have to just call it Prolapse Engine
>>
>>108669009
troons seem to be afraid of the letter X so just pick something with an X in it
>>
>>108669664
NigX Engine(tm)
>>
>>108669009
gondola-engine
Laguna Core
SynchroCore
Fluxchan Engine
>>
>>108669664
They hate it for much the same reason that the kikels do
>>
>>108669481
>ECS replaced with Blast Processing
>>
>>108669664
No need, my engine is already licensed under the +nigger license.
>>
>>108671143
+nigger in some license.txt that nobody will ever click on isn't good enough, the engine must provide a +nigger splash screen that can't be removed
>>
>>108641005
Where should I start if I wanted to make a Mario 64 clone that runs on the browser?
>>
>>108671214
learn to write web assembly
>>
how come game devs in current year are too afraid to even attach their real names to their games
>>
>>108671432
Because in the 70s
>the US was still 90% white and thus was a much higher trust society
>only cool people played video games
>mentally ill freaks were still safely locked away in mental asylums
>no internet so no means for deranged stalkers to doxx you since doing so would require interacting with real people
>>
>>108671432
It's a different story when the internet exists. People didn't put their actual names very often in creations they posted online in the 00's either. Nowadays it's even riskier with the rise of social media and outrage/cancel culture.
>>
>>108669009
Cloaka Engine
>>
the mengine
biological males only
>>
>>108671529
>70s
Shadowforge was released in 1990. In less than 3 years he went from that to DOOM.
>>
Castle Rooseveltenstein
>>
>>108671859
the american equivalent of castle wolfenstein would be something like fort eagleton
>>
I'm boarding the ECS train
>>
>>108671959
*ESL
>>
>>108668302
he isn't wrong, but the problem is that every API will not tell you the refresh rate of the monitor.
then there is the 2nd problem that I don't think the video talks about, which is how do you make the game smooth while running in VRR (aka below the monitors refresh rate). The best solution is to just run the physics at the monitors refresh rate or just limit the fps to a lower FPS.
One way you could try to control VRR (this is me pulling the idea from my butt), is to have a special driver timer that tells you when the frame was displayed on the screen, and then try to aim for a smooth fps that is lower than the real fps "smooth_fps = smooth_fps*0.9 + fps * 0.1" "target_fps = 10% lower smooth_fps" (note this is code that was used for printing an FPS number without changing too much I did not test it, it might need more zeros), so that if a frame stutters, you have extra gpu time to finish that frame without stuttering (but this wont fix 0.1% lows stutter, and the fps will still swing AND if the FPS went from 1 fps to 100fps you would slowly speed up the FPS which is not helpful, so you need to fix the code).
I think every user should should just limit their FPS to the 0.1% lows, which means that you might cut your fps in half, which many people would disagree with (not a good default). And if you did buffer your frames to run a little lower to buffer the fps, it might make the game look like it is not utilizing 100% of the GPU, which might make people think the game has CPU problem (you are intentionally letting the GPU sleep).
I don't use vulkan or directx, I use opengl, so I don't need to think about the swapchain, I just hope it's fifo. But if you had a swapchain, I believe that there are certain fancy things you can do using the info of when the frame is displayed. I don't really understand it however, I think I saw a different con video talk about it.
>>
Jesus christ, you people actually think the solution to frame pacing is "timers"? This is /agdg/ tier ignorance
>>
>>108672017
>I think every user should should just limit their FPS to the 0.1% lows
>>
I'm downloading unreal
>>
>>108672078
if you have a performance overlay, there should always be a 0.1% low value shown (or it's a bad overlay), which would tell you the average fps of the bottom 10% lowest samples (over a second or whatever).
>>
it's called unreal because using it to make a game is unrealistic
>>
>>108672214
okay? I don't get your point
>>
>>108672017
>I think every user should should just limit their FPS to the 0.1% lows
Firstly this needs to be measured on an almost case by case basis. Second, this is only fine if your 0.1% lows are pretty close to your average frametime. If you ask me to limit my 240Hz monitor to 30 because your shitass retro platformer is hitting in the 30s, fuck you I won't play your piece of shit.

In any case, you don't control this and if you ask this of people they'll just go play something else, so your objective is to keep those 0.1% as high as possible.
>>
>>108672289
The actual solution is to just set the frame limit inside you game settings, since you are using the extension to get the display framerate to get the default frame limit timer, then you can set the frame limit timer lower.
But I have no confidence that my frame limiter would be better than the ones provided by rtss or nvidia's control panel, but maybe there is a sample project that implements it perfectly so you have to be brain dead to do it wrong.
>>
The godot source code is a mess.
>>
>>108672452
*And you could even have a heuristic to see if the game is stuttering, and then put a warning that the game is stuttering, and suggest pressing a hotkey to automatically set a frame limit to the current 0.1% low or whatever.
>>
>>108671214
Phaser
>>
>>108671627
Bro the internet was such a different place in the late 90s/early 00s. You could spend years talking to your online buddy coolkid99 and never know his real name. Nowadays websites want you to link your actual real life identity to your online identity and people think it's weird that you want to keep the two separated.
>>
>>108672598
>>
How much higher can a bunnymark go? 32x32 sprites bouncing around the screen here
>>
>>108672664
idk google search how many triangles your gpu can draw
>>
>>108672598
>>108672651
The sudden transition from an ecosystem of discussion boards to social platforms was sad as fuck.
>>
>>108672772
blame cellphones
if the only way to use the internet was to sit down at a desktop computer, everything would still be comfy
>>
There is no "solution" to frame timing, there's many solutions each with their own upsides and downsides
>>
>>108672598
I knew all the real names and home addresses of all my internet buddies from the 2000s
>>
>>108672973
Yeah, you probably had their dick pics too, huh gaylord?
>>
>>108666552
idk i'm a noob, i'd look at spydog's examples on github to see if its something you want to learn. why does sokol suck for shaders?
>>
https://github.com/raysan5/raylib/releases/tag/6.0
>>
>>108672929
can you be more specific?
the only problem I see with my shitty "smooth_fps*0.9 + fps * 0.1" code is that it will take a long time to recover from 1fps back to 100fps, and I don't know how the easing of FPS would affect smoothness.
And you need to find a vulkan / DX example of doing perfect frame limiting using the extension that lets you get the time when a frame is shown (You do not need a perfect frame limit if you are not trying to handle VRR, AKA let the game go slow-mo when you hit a GPU bottleneck, since this is exactly what happens if your physics can't keep up, unless you are interpolating physics which has it's drawback, but instead you are dealing with a GPU bottleneck, and you want your physics to use the correct timing, BUUUt of course if you knew the display timing, you can just spend more time simulating your physics since you have spare CPU time, which is a "solution" in my opinion)
But other than that, it seems perfect.
I bet that I would have issues just trying to recreate the same stutter that the video made, because a lot of games use CPU time for rendering delta's in animation/physics, I bet I would need to overlay the videos ontop of eachother as in the video, and it would be hard to see stutter in 144hz+.
>>
>>108673612
>a lot of games use CPU time for rendering delta's in animation/physics
yes, there's no reason not to do this
>>
>>108673632
You are probably right, I didn't watch the video, but he mentions that this problem would appear and then suddenly go away.
So I assume this is a once in a blue moon cursed windows PC problem.
I should note that I measured my own fps time: win11, at 180fps, release build, in fullscreen, opengl desktop (no debug context), using SDL3 main callbacks, nvidia 1660 ti, that my frametime average is at 5.5ms BUT it jumps to 6ms and a bit lower so like +- 0.5ms (lowest and highest).
I tried Angle GL es + Dx11 and it seems to jump +=1.5 ms (3ms-7ms).
But then Angle DX11 + DirectComposition seems to tighten it back to 0.5 and Angle + Vulkan is also pretty tight.
These are rough numbers, 1 sample, and my PC has full of shit open low ram, and not desktop fullscreen exclusive.
Also I use <chrono> steady_clock lib++. I also tested SDL's QPC timer (pretty much the same result).
Also my swap spikes to 10ms randomly (that's where most of the waiting is spent due to fifo vsync), and I don't see this appear inside of msi afterburner or intel presentmon. This is alarming but like I said my PC is full of shit and no ram so it might go away.
I think it's possible for me to use windowless opengl and draw to a offscreen framebuffer to vulkan using the frame timing thing (but I have lots of questions I need to answer to get this working with SDL... like do I need EGL? will offscreen rendering be slow as shit?)
>>
>>108673958
I don't even know what the fuck you're bikeshedding about
Yes swap spikes randomly but there's not really much you can do about it and it doesn't really cause any problems
>>
>>108673985
wouldn't it be better if I just set the timer to 5.5ms instead of having a +-0.5 error? That's what the extension for measuring present timing should help with (and the once in a blue moon stutter shown in the video).
That's basically it.
I do admit, the swap spike probably won't be fixed by anything vulkan can offer.
and also, msi afterburner has a different way of showing the graph than intel presentmon, but I notice that intel presentmon shows a very flat line, but in my in game timer, I feel like the +-0.5 should be visible, maybe msi afterburner is upscaling the graph, I dunno. I probably need to draw my own frametime graph in my code...
>>
>>108674041
get a timestamp every frame
subtract it from your last timestamp
there's your frame time
>>
>>108674048
that's how my code works.
current_time = timer_now();
delta = current_time - timer_last;
update(delta);
timer_last = current_time;
>>
>>108674059
So what are you babbling about?
>>
>>108674065
the video shows someone with hardware that does not perfectly block the correct time.
so your timer is based on the swap waiting for the frame to finish.
but the swap time could have jitter.
I would hope that if I used vulkan + the extension, my time will look exactly like the graph in intel perfmon, perfectly flat with 5.5ms for every frame.
>>
>>108674110
It's never going to be perfectly flat
>>
>>108674117
what do you mean? The monitor refreshes at a fixed FPS when you reach the max fps.
Every frame should be 5.5ms, as long as I don't drop any frames.
I could fake it just like the video says (just replace delta with 5.5ms), and it would look smooth.
>>
>>108674131
>The monitor refreshes at a fixed FPS
too bad there's an unpredictable OS in the way
>>
>>108674041
*Oh I fixed msi afterburner to match intel presentmon...
I was showing FPS in the OSD graph, when I should be showing frametime.
>>
>>108664485
Another step closer
>>
I've been working as a software engineer for a decade and making an engine is exposing me as a fraud
>>
>mapping settings files to game
>boring and tedious
>offload to claude
>all usage tokens burnt on 3 files
>check logs
>Its 80 subagents deep on a task that required it to read 10 files and implement an associated init and settings file for each
>didn't even finish the task and now the project doesnt build
I just don't understand, it was copy paste task that would've taken a few hours and should've taken the AI 5-10 minutes but now I'm cockblocked between trying to make sense of what it was doing and continuing or waiting for the tokens to reset.
>>
>>108674564
>>mapping settings files to game
>>boring and tedious
this should take you 15 seconds
>>
>>108674564
thanks for playing
>>
>>108674634
>time spent getting to section of game where mapping is relevant - boot, load scene, perform action
>time spent building
>time spent testing
Each file takes 5-15 minutes depending on size and testing. 10 files at 15 minutes is 2.5 hours, or, a few hours.
>>
>>108674801
Load your settings file into a global struct at the start of the game
reference that when neccessary

Reply to Thread #108641005


Supported: JPG, PNG, GIF, WebP, WebM, MP4, MP3 (max 4MB)