/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_GeneralIRC: irc.rizon.net #/g/gedgProgress Day: https://rentry.org/gedg-jams/gedg/ Compendium: https://rentry.org/gedg/agdg/: >>>/vg/agdgGraphics 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: >>107976234
Did some UI stuffNow making a bunch of hats and helmets
accidentally started making a new game. whoops.technically its an old game idea that I dropped.
spent all of yesterday trying to get KTX2 textures working instead of just getting normal textures working with my async io pipeline and decided that it's definitely a job for another day. Will report back with more interesting stuff to look at when I get normal textures working (hopefully really soon)
>broke through tutorial hell for the first time ever when working on a personal project / game>proceed to do multiple all nighters and investing all my free time into working on it >stayed up till 5 45 this morning working on it until my body was crying for bed>wanted to post a demo of it ~3 days ago but withheld due to squishing one glaring bug that snowballed into squatting more bugs, rearranging level layouts, and stuffing in more content into the demo>demo has gotten to a point that Id pay money to play it alone, not a lot of money, but more than for free>first time in years that I actually enjoy doing software in general
>>108065900https://itch.io/jam/v3jam
>>108062496If I'm to write a 3D, potentially resource intensive game for myself, should I spin up an ubuntu (assuming normue linux users are on it) vm with the lowest specs possible and write the game for it?
>>108066034what's your reasoning for doing so?
>>108065389texture stuff is going well...
>>108066046It's to future proof myself from the trap of being okay with a badly performant game. Idk why I chose linux, though. Maybe I don't want to deal with windows?
Okay fiine I'll fess up. I just want an excuse to write a game in assembly.
>>108066103you can make games that perform good on good machines
>trying to make a boomer shooter with hundreds of enemies on the screen>have to make them really low-poly or it runs like ass>have to rewrite navigation and collisions instead of using the built-in Godot stuff>now the problem is skeletal animations
>>108066296how low poly are you talking anon, your GPU shouldn't have a problem with the poly count unless it's old as fuck or the poly count is REALLY high. Godot seems well optimised enough so I'm sure it's gdscript or some memory bound shit like that causing whatever issues
>>108062496how does vs22+UE5.5.4 with geminicli compare to copy pasting snippets from chat.deepseek.com?i only played with the latter & it hit some road blocks very early during animation, failed things like stopping a player position translation being handled by the animation file itself thru c++ & managing it thru code insteadshould I ask this in vst's agdg?
>>108066296I remember one /agdg/ dev using unreal with a similar concept and he was saying he could do 500 enemies.
>>108066437holy shit the power of Unreal Engine(tm) by Epic Games(tm)
>>108066328I have a 3080 Ti.The original model had 7500 triangles, and with 500 enemies the FPS starts dipping below 60 on default graphical settings with real time shadows, which I think is too low with nothing else happening.After decimating it to 2200 triangles, I get 120-150 fps. But that’s with Animation Mixer disabled, enabling it drops it back to 70.There's still some stuff eating CPU, so this is not a perfect benchmark, obviously.>>108066437I’m sure you can optimize it, but at that point I might just use GZDoom or the Quake 1 engine.Unless you can spawn 500 enemies with normal collisions and navmesh pathfinding and it just werks, which I don’t believe.
>>108066296does godot have an update loop like in Unity? depending on your game set up, and if there is an update loop, you can set it up so they only run that every other frame, every four frames, etc. based on distance away from the player, and then update each frame once they're close to youthere's also things called flow fields, so you can have the npc's navigate as a group while far away, then when they get within a certain range they can have their more unique navigation behaviouralso something I do in unity but maybe there's an equivalent in godot, but its called baking animations. you store the rig position for different frames in the animation, and then update it manually, so farther away enemies wont update their animation as fluidly. this helps get rid of cpu overhead in exchange for higher memory usage.i do that to get a stop motion effect, but it does have better performance than using the standard non-baked animations like when directly import from mixamo.just in case you haven't tried doing anything similar to above, just a few ideas that could possibly help you out
>>108067051Is it using instanced drawing or is every enemy a separate draw call?
>>108067079This.I do this in GameMaker, just figure out how many logical iterations you can get per frame in 60fps and subdivide it and allocate it to to different resources.If you can get 240 logical steps out of 60 frames, that means you have 180 steps you can use to offset load and have 60 for logic that is visible to the player.I use a global clock that everything polls from for their turn to iterate. And if that object is outside the render distance their iteration is skipped entirely or sent into an alternate branch of logic that is less resource intense but accomplishes the same thing off camera.
do you guys think weed makes you stupider? I need something to take the edge off from working on my engine but I hate hangovers so alcohol is out of the question. I dont even mean programming while high, just after work as a carrot on a stick type thing
>>108067706>weedGoynip.
>>108066437>>108066602>>108067051>use AActor which has a 1kb overhead out of the box>use USkeletalMeshComponent which has another 1kb overhead as well as a whole virtual machine animation system running on top>"Unreal perf bad"Unreal has genuine perf problems but those aren't related to lazy people using the lowest hanging fruit that was never meant to be used like that. You'd use UObject (or just a struct, or maybe even Mass) and look into mesh render proxies with vertex animation for all but the closest enemies (which would be switched to proper skeletal mesh actors).
>>108067706Without question. It has a wide range of effects on different people, that have a large range of amplitude in each, but in my experience nothing kills motivation and agency like weed. Nothing.does it permanently lower iq, obv not assuming you're grown. but it kills any use for it lmao.not that a snap bowl after work is going to ruin ur life tho.
>>108067706weeds a mixed bag for me. I have a family member who grows their own, and that weed makes me insanely hyper-focused and still able to do math, so I like using that while I'm working.dispensary weed, those vape carts, and edibles from a dispensary all turn me into a complete retard.
>>108067706In small amounts it helps me focus and more thoughtful and improves my reactivity, but too much makes me slower and dumber and unable to think straight.In the right moderation for me its a performance enhancer.
turns out ImGUI is pretty plug and play, thought I'd have to spend way more time getting things to work
>>108068507I was pleasantly surprised I could just plug the vertices it shits out straight into my Vulkan renderer and use those myself, all the online tutorials babble on about hooking into C++ functions and whatnot to have it render for you and I was dreading that.
I've coded some ezpz games using PyGame. I have an idea for a game, but it will be totally next level. Can I get a game engine recommendation? Also, I'm on a laptop, so is my hardware going to actually be a limitation in making my game?
>>108062496I'm completely new to gamedev. I use Godot's NavigationRegion3D node, but enemies get stuck in walls, objects and such. I want to make them navigate properly, find and open doors, look out windows, etc. How do I achieve this?
Grok has yet to let me down except that time it apologized for calling itself Mecha Hitler.
>>108067089even the draw calls for something like that aren't THAT expensive surely. There's something else going on
>>108066296I'd like to try out your little project game anon
>>108069350Godot uses GDScript by default. The syntax will feel familiar to you if you're a python main
why is the gamedev profession seriously underappreciated?not only is it hard and very high-skilled, gamedevs literally create living, interactable, playable worlds. it is literally the hardest and most complex medium of entertainment to makei feel like even game developers themselves don't take enough pride in it.
>>108070333I guess there's 2 reasons:1. It's very few people who even realize the complexity involved in doing realistic interactive 3D worlds2. Most game developers aren't the engine developer John Carmack / Tim Sweeney type anyway, just dragging and dropping assets into an existing engine.
>>108070382>Most game developers aren't the engine developer John Carmack / Tim Sweeney type anyway, just dragging and dropping assets into an existing engine.even still, it's still impressive
>>108070405What exactly do you have in mind? Dragging and dropping assets isn't impressive to me. There's several orders of magnitude complexity difference there
>>108070333Lack of networking outside of gamedev crowd and general lack of social skills. It also differs from other entertainment mediums as developer is far detached from interacting with the audience.Doesn't have the benefit of pretending to be a traditional art. Parents would push you to learn playing piano but not gamedev, even though both might prove to be impractical.It's also harder to consume because it needs full engagement and motor skills, in many cases a very specific taste in genres on top of all that, and can't be spoonfed through the radio and tv.
>>108070333Im employed and pay rent to my parents, and they still think I sit around doing nothing when I'm working on my game. They think that making games is the same as playing games.
>>108066296never used godot but baking animations was the biggest performance boost ive ever gotten in my own project
foinally got async io working with textures
>>108070678surely godot would do gpu skinning or something and it wouldn't perform THAT fucking badly....
thought it would look cooler on video. Hopefully will have the models linking to their own textures automatically now and default fallback assets done by this afternoon.
>>108068507imgui?
>>108068507it's great to get going fast but fuck using code as documentation, using the docking system was not clear at all. Thank god for chatgpt.
Is it doable for a single person to make a copy of Source 2 game engine?
>>108070996no
>>108070996of course, valve has an entire team dedicated to it just for the thrill of wasting money
>>108070996I may not be an expert on the command line, but I think it's rather simple to do something like:$ cp -r source2 source2-copyNote that this command syntax may differ if you're on Windows.
$ cp -r source2 source2-copy
>>108070996Wait for someone at valve to use AI on their codebase then ask it to transcribe it for you without the license.
>>108071300nta but do you mean in that the codebase will be put in the chatbot's training dataset, and someone can hypothetically get the code from the future chatbot just by asking the chatbot for it?...that's genisu
>>108062496How would you guys draw pixel art intended for use with a CRT shader?Just draw the pixel art with a CRT shader on?Just draw digital art and then dither, downscale, reduce the pallette/fix up artifacts with the CRT shader on?I have 0 drawing experience.
>>108071319I mean, what else is it good for other than stealing code?On another note you can secure your codebase from this fate by obfuscating with word "Nigger".
>>108071335My intention is to have something similar in style to pic related.Should I just render out 3D models and apply dithering and reduce the color pallete instead?
real engine
>>108071335Just try both and see what you are comfortable with. It's a mostly forgotten craft so barely anyone does it in the first place.
>>108070996most of the tech source is out there. It's a matter of will and time. Also your engine will need pretty demos and useful examples, that's where it will attract people to use it
>>108062496I am making a game engine but its aim is to have a lot of easy tools for designers and non-coders. Every engine I've used seems like they forget people want flexibility but also ease-of-use
>>108071407try a bunch of approaches until you find one that you like
>>108070996I don't know how culling is done nowadays but I was just recently thinking of implementing source style visleafs.
>>108066296>>have to make them really low-poly or it runs like assNo you don't, polycount hasn't mattered in decades
>>108067706>do you guys think weed makes you stupider?in the long term definitely
>>108070333>why is the gamedev profession seriously underappreciated?Why do you think it is?
>>108066296>>108070797Do you have a bunch of shadowed lights or something, anon? It does sound vertex linked, so maybe it's computing the skeletal animation multiple times for each (passes + shadowCount) * object * frame ? Plus, if you have a depth prepass...This anon >>108067079 has good advice. Not sure if this is possible in Godot, but here's what I did in my vulkan project:- Split your vertex data so position (+normals, depending on the pipeline) can be updated independently- Move animation/skinning/tess into compute, so your graphics hardware queuefamily only has to do a basic vert shader per object; this avoids running the animation math on every render pass (including shadows)- Update animations on a variable basis like the other anons mentioned, and only for the position/"animation sensitive" buffer; all the other vertex data can be shared between all instances of the mesh- make sure you're using instanced rendering- possibly switch to screenspace normals, if Godot is multiplying those for animations too (halves the matrix MULs)If you're still vertex bound, you can calculate the differential moving frame per-bone, then add it in the vertex stage-- it's only a single MADD per bone weight per vertex. A 1st-order Darboux can stretch each animation frame out 2-3x while still looking smooth
>>108071335>How would you guys draw pixel art intended for use with a CRT shader?The same way you draw any pixel art. The whole "pixel art drawn especially for CRT blurriness" is a zoomer myth considering only shitty CRTs were blurry, PC monitors (which were being used to create the graphics) had no blur at allRed Alert 2 isn't pixel art BTW, it's prerendered 3D and voxel vehicles
I'm doing a 2d animation system and starting to wonder if it's not easier to just do it the dumb way and save on performance than show a frame for a mathematically correct amount of time
>>108072741Performance shouldn't be an issue for a 2D animation system
>>108072741always do it the dumb way on a first pass
>>108070891https://github.com/ocornut/imgui
>>108066296You're having "runs like ass" problems because it's in Godot, should've used UE5.7
>>108073766>should have used [notoriously poorly performing engine instead]lol?
>>108073794If you truly believe any modern UE5 game COULD run on any other engine you're absolutely retarded.Imagine trying to run MGS3 Remake on Unity or Godot LMAO. Actually unarguably impossible. These games are cutting edge and graphically intensive, it's not the engine's fault they're jam-packed with 4k textures and demanding tasks.As if SH2 Remake, Street Fighter, Pikmin 4, Lies of P, Tekken, Black Myth Wukong, Tekken 8, Final Fantasy VII, etc...If you want to play modern games own modern hardware, I'm on a 4090 and I've never had any issues.Bunch of poor third-worlders blaming the engine when they try to run modern games on their dogshit potatoes.
>>108073926the fuck we have UE shills on the most dead general on this board now?
>>108073995It's glaringly obvious that you're either a kid or really stupid.You have no rebuttal to the content in my post. You offer nothing to this board, you're too low-IQ.Never forget that when you're struggling in life (you clearly are) it's 1000% your fault. There's no way in hell you have a successful career or purpose. You're a parasite with no meaning.And you never, ever will. Don't forget that.
>>108074060There's like 5 regular posters here anon your shtick is not gonna get 30 (You)s and go viral. You don't need to try so hard.
>>108074074What are you even implying?If some inbred calls Unreal Engine "poorly performing" you're going to be called out for the retard that you are. That's all there is to it. You're so stupid you can't even comprehend the meaning in my posts. Amazing, really.
>>108074092shut the fuck up sweeneycuck
>>108073995>>108074099Sorry he's right, maybe if you weren't so shit you'd realize it.
What's the ultimate way to integrate antialiased sprites into 3d while preserving depth?Alpha to coverage?Sprite-shaped meshes for optimal depth prepass?
Should I use C#, C/C++, or Rust?
>>108074670Are you an indian? Then use C#.Are you homosexual? Then use Rust.
>>108074670>C++ C++ is an awful language headed by people who have no idea what they're doing. However if you apply some common sense to what parts of it you use and how you use it, it's undeniably the one with the best ecosystem and will do anything you need.>RustPutting aside the awful community, Rust will be an immense source of friction when working on a game. >C#Don't.If you have balls of steel and a big brain, nothing beats C or some "C+" like Odin or Jai, if not go with C++ and use your brain.https://10xeditor.com/sane_c++.htm
>>108074773>https://10xeditor.com/sane_c++.htm>watch first episode>i prefer to keep everything explicit thats why I use raw pointers yiiikesss, real sane c++
>>108072945it's not a performance issue but I could do it nicely calculating how many frames an update took, or do it dumb just accumulating time and checking if it's over the frame time in a loop because 90% of the time it won't be
>>108075277>unironically shilling for smart pointersYeah stick to React or something.
Hey anon, I might have a strange question. When making a game, how do you manage to integrate your scenario? How do game developers trick the player into following the story? I was searching for paper in this subject in french but find nothing good enough so if you have anything in english I take it
>>108075360nta but smart pointers have little to no overhead. if you're gonna sperg out over std::shared_ptr, at least implement your own auto_ptr if it's "faster">>108075439????I don't understand your question, baguetteanon
>>108075360What's wrong with smart pointers?
Sorry the first problem I have is that I don't find the right words to explain it; When you creating your game on paper, mostly for games with big story, how do you make sur that the player fall in the story and follow it the right way. Also it seems like there is a big part of game dev that more like psychological trick to make the gamer feel a certain way. And I don't really find doc on this subject.
IMO the easiest way to fake realism in a game is to mimic the low fidelity of old types of media.I.E slap analog video filters on it, or make the game screen look like it was shot from a shitty 00s video camera
>>108075476For pulling player in you are searching for a story hook or immersion.For following it the right way, I guess it's narrative or storytelling?The last would be the tone, but I don't think the term fully covers what you can do in games. Same goes for the others, it's way more complex than those traditionally accounted for because interaction aspect adds lots of scenarios to account for and new possibilities. For example working on narrative might involve completely redesigning your levels and world layout.
>>108075832Zoomers scream in fear as they experience VHS noise
>>108075439either by not making it story focused, or by locking types of upgrades, skills, etc. through the story.I prefer not making story driven games because that's my weakest point. I can write something thats passable, but its not the focus of anything I make.as to tricking the player into following the story, best way to do that is really simple. make the story, world, and/or characters interesting.
should I make youtube tutorials?? It's for a Unity-related topic that has 0 tutorials as far as I'm aware.
>>108074060shilling for tencent products on 4chan isn't a "successful career or purpose," ranjesh
>>108075452>>108075464Smart pointers are just bloat. It's just a pointer to memory, what else do you need?
>>108077901smart pointers automatically delete things which is more concise and less error prone than manual pointersbrainlets who have only written 1000 line programs will never understand that though
>>108077603Go for it
>>108078039there are lots of developers making 120k+ loc projects that are performant enough to put fortune 500s to shame and they don’t touch reference counters for general memory management with a 10 foot pole. that’s pOOP brained.
>>108066057my brother in christ use 4-space tab sizes
>>108078101Why did you switch out "smart pointers" for "reference counters"You'd be hard pressed to find a large C++ project that isn't using smart pointers
why is there no threejs alternative for C/C++? Raylib is too barebones.
>>108078039>smart pointers automatically delete things which is more concise and less error prone than manual pointersAh yes how would we ever write software without it handling memory for us.Quick add a garbage collector!
>>108078122https://github.com/markaren/threepp
>>108078155You gain nothing by doing it yourself
>>108078119because reference counting slop sucks and a big subset of smart pointers is reference counting. regardless RAII also sucksthere are better ways to manage memory
>>108078221>there are better ways to manage memorywell, don't leave us hanging. what are they?
>>108078221>a big subset of smart pointers is reference counting.no a small subset of smart pointers is ref counting, 95% of smart pointers are unique pointers which are a compile time abstractionno idea what you're fucking talking about
>>108078234you already know what I’m going to say
>>108078244i don't though
>>108078244I really don't
>>108078260arenas, dawg
>>108074629SDF/Conemapping; check out valves' paper on SDF font rendering from the 00s so you understand the principle, then a more modern blog article about conemapping specifically (use alpha = "height").>>108078119>tfw using reference counters but not (libstd) smart pointersa single atomic inc/dec is cheap AF, anon.>>108078169Sure you do. If you have to support resource streaming in a lockless architecture that only has indirect control of certain (GPU/OS) objects
>>108078276Arenas don't solve the same problem smart pointers do>>108078282>If you have to support resource streaming in a lockless architecture that only has indirect control of certain (GPU/OS) objectscomplete fucking non-sequitur that has nothing to do with the topic
>>108078169Performance. You know, one of the most important things in the topic at hand.>b-but I don't need more performance than n fps on my x hardwareTwo things:>better performance allows you to do more things, it's not just about squeezing as many FPS out of it as possible>even microstutters that players cannot consciously perceive affect the experience and make players less enthusiastic about playing your game, even if their don't realize why>if you're working on something where there's no way this will every be a problem (e.g. 2D platformer) then why are we even arguing about this stuff? It's not applicable for your case
>>108078342Unique pointers are a compile time abstraction you fucking idiot they don't have a performance cost
>>108078304maybe they don’t but why are you micro managing your memory on an individual object level in the first place? it’s a problem you shouldn’t be having to begin with
>>108078304It does, anon. Don't be a dork. (I'm NTA that was already disagreeing with you)I can't control when the GPU decides to actually destroy an object or when the OS finally decides to read or flush it. Refcounting of a "marked for deletion" object means I can queue up the proper destructors at the right timeThat said, I disagree with the rampant overuse of smart pointers for everything, and use raw pointers for everything except externally-visible handle tracking.
>>108078354>why are you micro managing your memory on an individual object level in the first place?That's the most flexible way to do itArenas can be good where they apply, but they don't apply everywhere
>>108078351We're talking about smart pointers THOUGH
>>108078361Do you have autism? You seem to have trouble following the topic of conversation
>>108078369A unique pointer is a smart pointer. It's the most common type of smart point, by far. Many people don't even use shared pointers at all
it's been years since i last interacted with programmers. reading this thread has quickly reminded me what a psychologically damaged and fragile group this really is. everyone has to be right about everything all the time, and nobody wants to learn anything or even consider the possibility that someone else's way of doing things is also good
>>108078365arenas virtually always apply. stick the fucking object in scratch or an arena that clears every frame. its not hard
>>108078408welcome to programming
>>108078387Ok that doesn't change the fact that we weren't talking about unique pointers. We're talking performance and overhead and you zero in on the one subset of the group being discussed that has none.
>>108078413>arenas virtually always applyOnly when you're writing simple programsMost stuff in a game you can't use an arena forLike all the objects in your game with indeterminate lifetimes
>>108078426The subset of the group is literally what you're talking about when you're talking about smart pointers, shared pointers are the rare kind of smart pointer that you barely even useYou're talking about smart pointers and you don't understand the first thing about them
>>108078419it's like everyone in this field had the exact same specific kind of abusive parent. really wild stuff
>>108078361>That said, I disagree with the rampant overuse of smart pointers for everything, and use raw pointers for everything except externally-visible handle tracking.I do the same. I use raw pointers internally everywhere unless I’m mindfully trying to strip down the size of my structs in which case I use offsets instead. Externally I use offsets wrapped in structs to enforce type safety as a resource handle. But in the case you mentioned I wouldn’t be opposed to reference counting.
>>108078456>no, you weren't talking about that, you were talking about the thing that would make me right
>>108078438>Only when you're writing simple programsno, for literally everything>Like all the objects in your game with indeterminate lifetimesyou can still use an arena for that. you’d just build one extra level of abstraction on top of it, e.g a free list
>>108078486This is like me asking you why you don't own a car and then you say it's because SUVs guzzle too much gas
>>108078498>you’d just build one extra level of abstraction on top of it, e.g a free listCongraduations you fucking idiot you've literally just reimplemented dynamic memory management and you are no longer using arena and gaining any of the benefits from doing so
>>108062496Added Porth programming language to my terminal source code highlighter and PNG renderer...
>>108078511the benefit is it’s the leanest solution for the problem. the lifetimes are still bound by the lifetime of the level. doing the simplest thing is always better than using the big over-abstracted over-generalized thing made to do everything
>>108078546The leanest solution for the problem is not simply using dynamic memory managment (malloc/free) but to implement an arena ontop of this, and then to reimplement dynamic memory management ontop of that? That's the leanest solution?
>>108078282>SDFBut wouldn't manual smoothing fuck up depth buffer information which could cause aliasing or missing pixels on intersecting draws? Could as well draw alpha blended sprites.>conemappingDo you mean cone step mapping? What I meant is drawing actual sprites, preferably order independent for opaque parts, with accurate depth buffer for post processing, and with antialiased edges.
>>108078560>using dynamic memory managment (malloc/free)No, you use mmap/VirtualAlloc, otherwise yes. That is leaner and more fit to solve your own problems than some off the shelf generalized thing.
>>108078596Instead of using the dynamic memory management provided to you (the actual leanest solution), you have implemented an arena ontop of this, then reimplemented dynamic memory management ontop of that. You have gained nothing, you've just made things more complicated. Are you actually capable of critical thought?
>>108062496Ray tracing should be an optional standard for all games following a level of detail circa Y2K because computers should be powerful enough to run it, change my mind.
>>108071435>real engine
>>108078618>you've just made things more complicatedWhen you use someone else’s complexity, it doesn’t magically make the complexity go away just because you’ve abstracted it out of your sight. You are still leveraging that complexity, all you’ve done is swept it under the rug and pretended it didn’t exist, retard.
>>108078683What the fuck are you talking about? Please tell me what you've gained by implementing your own dynamic memory managerIf the answer is "performance", that's wrong, your own system is generally not going to be faster
>>108078705>your tailor made solution to do the bare minimum computational work to solve the problem isn’t faster than stacking bloated generalized systems on top of themselves to do the same thingthat’s simply flat out wrong
this argument isn't about memory management btwit's two deeply insecure people who believe they have to dunk on someone else to have any value as a person, locked in existential combathowever, no matter who wins, you'll both wake up hating yourselves again tomorrow
>>108078742If you actually benchmarked malloc against your own allocator (which I'm sure you haven't) you'd find that the difference is insignificant
>>108078753I'm just mad at dogmatic morons who don't actually think about what they're doing and just do whatever trendy thing they read on a blog
>>108078770you're mad at yourselfdon't be, you're okay
>>108078787No I'm not ok
Time for confessing your game dev sins.I'm reading JSON at runtime in update loop quite a bit, just because it doesn't cost enough to be notable in the profiler.
>>108078842are you using it for like object/component property values or some shitLike, storing object variables in the json
>>108078762malloc can fragment and slow down but its not just about speed. its also about robustness. if you just do a single mmap call at the beginning of the program and divide it up and build systems around hard memory limits, you have basically eliminated out of memory points of failure from your program entirely. this is actually really doable in a game but I’ll consneed if you were writing something like a compiler it would be a lot more annoying of a constraint and less feasible
>>108078866You can build systems around malloc and still use hard memory limits (not that there's any good reason to have hard memory limits in the first place)We've backpedalled so far here it's unreal, this is all just voodoo feel-good shit and not anything based on utility or pragmatism
>>108078917>You can build systems around malloc and still use hard memory limitssure but the requirements of such systems are so low that it’s only a few extra loc to eliminate a dependency on malloc entirely>not anything based on utility or pragmatismit’s based on simplicity, robustness and speed. cope and seethe.
>>108078853No, just configs that I'm sometimes too lazy to cache and it's convenient to query optional fields of different variants with a fallback field.
>>108078966>simplicityYou've made things more complicated>robustness You've made things slightly more robust in a way that doesn't actually matter in the real world at all (and introduces a new constraint to think about)>speedNothing has changed on that frontThis is about you wanting to create your own cute little memory management system, it has nothing to do with what's objectively better or not. Dogmatic programmers are bad programmers
>>108078985>You've made things more complicatedI haven’t. Again, leveraging someone else’s complexity doesn’t make the complexity disappear. The machine still has to do that work.>it has nothing to do with what's objectively better or notThe objectively better thing is the less generalized thing you made for the purpose of solving the problem you’re trying to solve and nothing else. The thing that gives you the correct results in the least steps possible.
>>108079047You've made things more complicated from the pespective of you, the programmer, which is what mattersYou have literally just reimplemented a general purpose memory allocator, you have solved no problems. The least steps possible is just using malloc. Please use your brain
For the c++ Devs here. Just use the boost libraries that can be used when writing orthodox c++ (up to std14 stuff only) and that's it basically.
>>108065900I finally released the demo!Held off on it for several days with performance issues that needed to be addressed. The game runs pretty well. It should take you around 5 minutes to beat it / check it out. DEMO LINK:https://kaicecooler.itch.io/lucid3am-grey-bits-demo
>>108080437>tutorial>jump and put key up there where there are several drawn on the background>i don't understand what that means>but can't jump above them to pick them up>mfw lost at the tutorial level
>>108080582You can pick up the key when its floating right on a platform like in pic. The multiple keys in the background are supposed to tell you that if left alone for long enough it will tick down until it gets sent back to its spawn spot.
>gameboy studio slopbegone loser
>>108080885Yeah, I did that some times. But I dropped it in the air while jumping near those one above. It was floating near the clock and I couldn't jump over it.
>>108080966You're just supposed to use it as a platform to reach the hole to the right, the black key silhouette is representing where you should place the key and background image of the player jumping shows you are jumping on top of or
>>108080996I did got to level 2, but resetted because the box blocking the blinking thing disappeared when it was inaccessible and I wanted to try again. I realized it's pick-up-able like the key, then Ijust went fucking around jumping with the key and soft locked there, failing the tutorial. The way losing seems to be soft locking yourself out of progress is an interesting game choice, but idk if I personally like it (other player's might, not my personal cup of tea) especially because it doesn't look obvious that I can't go back and retry somehow without restarting, and for some technical reason (not your fault) spacebar sometimes would scroll the browser window (floorp on fvwm on nixos, yeah, shitbox installing random shit for testing) instead of sending start button.
>>108081020>soft lock tutorialI dont think thats possible, even in the middle segment we are talking about. The key you use will always return to its spawn point if dropped and left alone for a few seconds, and both ladders in the middle segment can be climbed up and down allowing you to backtrack to the keys spawn point, the key having the reset to spawn function after a period of time when dropped after holding it is what prevents soft locks from happening, as I am aware there are instances when you can place the key in places that you cant reach afterwards. This discussion has been pretty productive though, I see Ill have to lower the tutorials complexity or dice it up to even smaller chunks for the next demo
>>108081084>posts dumb game on 4chan (I believe there was a rule against self promotion itt or was it just the faggots at /agdg/? idc)>have ONE random retard play it>retard so retard he loses in the tutorial because he doesn't realize he can wait two fucking seconds to get the key back>dev decides to dumb down his game even furtherPlz don't.
>>108062496>https://litter.catbox.moe/tpk5nfnql8f7g0x2.mp4progress
wake up,time for work
>>108081149very cool
>>108082674please no, i dont wanna work on my threadpool task graph
>>108082674NOOOOO I DON'T WANT TO WORK ON MY REPLAY SYSTEM
>>108081149What game are you cooking?
>>108068507ImGui is cool.
raylib/c need their own generaldont forget to add sqlite amalgam into your project https://sqlite.org/amalgamation.html
>>108085887using a db for your game is extremely webdev
>>108085887>lets split the general that barely stays
>>108085955alive* even
>>108085955maybe /gedg/ would be more active if you were a little friendlier to transvestites and minorities?
>>108086190What? I love nigger girl cock.
>>108086190This is not the Rust general.
yeah god forbid the general split into a productive branch vs a company flamewar thread
>>108086535where's the company flamewar?
>>108079885usecase for limiting yourself to c++14 only?
Working on ddgi style probes, not doing realtime raytracing but just the visibility part. I like how they prevent a lot of light leaks, but idk how scalable it is. Saw that they are switching to ddgi probes only in overwatch 2 (https://www.youtube.com/watch?v=0PlxPCq-DbQ) so kind of interesting, but skinny walls still cause issues
Can someone finally make a retro engine? Basically an engine that uses old directX5/6/7 featuresIt would be called>soulful engine
>>108086838It's called Raylib
>>108086850raylib is not an engine
>>108086856Why do you need an engine for simple retro games?
i want to kms
>>108086865To make soulful 3D games
>>108086868Me too anon, sometimes I wonder why do I even live, death would be so freeing from this existence but then I remind myself of good things in life like gamedeving, freedom, and traveling
>>108078842I have no sins left! Recently optimized it to not allocate memory on each frame.
>>108070789>>108070835I want to make a game with your engine
>>108080437I played it. Took way longer than 5 mins. Congratulations on being a YESDEV CHAD. Looking forward to your next game, maybe with a better gimmick and smoother more consistent movement.
Some people posted stuff in 2D and I wonder why even bother. I feel like throwing up whenever I see this GameBoy-like shit in 2026.
>>108086926No longer worshiping Malloc
>>108087116I'm not here to shit on other people's efforts, but I'm gonna be honest and same. Nothing against it as a project and practice, God knows I've made some shit nobody would ever want to use for practice, but if I were asked to play any of these fucking Gameboy, retro console, 2D platformers, or Metroidvania clones I'd say no thank you. I can understand PC games of the 90s like Total Annihilation or X-COM, but these extremely simplistic console games like Super Metroid have fucking nothing to offer other than nostalgia for people who can't let go of their childhood, and on top of that I've already played them back then, why would I want to play your, likely inferior, version of something I got bored of at least 20 years ago?
>>108087116And I don't really care for 3D games, they make me actually throw up, give me headaches and all, but I'm not bitching and moaning every single thread about it.
>>108087272>hurr I have some kind of mental health issue that exclusively effects me the entire game industry should cater to my disabilitythis is you
>the problem with this amateur gamedev community where barely anybody posts any games at all is... that the games are not ambitious enoughGood luck with your thread kekI (>>108087067) enjoyed it
The "not using malloc" cult is the gamedev equivalent of using Rust or getting gender reassignment surgery
>>108087295The japanese also have this a lot. They don't like 3D all that much either. Anyway, I really just think 3D can never reach the heights of great 2D. I played a lot of 3D PS2 games in my childhood, I'm not impressed by them anymore. Polygons are ugly compared to sprites.
>>108078438Fixed size indeterminate-lifetime objects should go in a slab.
>>108087326this, people avoided malloc cause 7th gen consoles had like 256mb memory, but now everyone has at least 8gb, no reason to penny pinch over allocations really.
>>108087227>Total Annihilation or X-COMAren't these games horribly slow? Like 30 minute for one round? No one wants to play this other than people who played them in their impressionable years either.
>>108087373>people avoided mallocThey didn't thoughPeople have been using malloc for every game for 30 years and now all of a sudden it's bad
>>108087347>makes up retarded lies so he can feel better about himselfjapan is full of 3d shit go away
>>108087373People hate malloc because it's slow and because of cache coherency, not because of memory usage or fragmentation
>>108087391>Aren't these games horribly slow? Like 30 minute for one round?In what world is that slow>>108087362What's a slab?
>>108087412>it's slowIt's not, this a myth
>>108087413 Imagine wasting half an hour and losing a round and having to redo it. It boggles my mind. Imagine a ping pong game but you have to play it for 20 minutes before deciding who is the winner. How can anyone have time for this and think it is fun?
>>108087431They Are Billions matches last 2 hours and if you die you have to redo the entire mission
>>108080437It's ok.I managed to softlock on one of the rising water levels, and the box no longer spawns at the start. I might have triggered this by touching the buttons erasing boxes.I'm not sure if it's more of a platformer or a puzzle game. The key grabbing and snapping feels like exploiting the systems since you can do it from various ranges.If it's supposed to be a puzzle it should be more grid locked. Grabbing the key is also a no brainer with no decision making involved, so it should have a twist involved that would make you think about when to pick it up.If it's supposed to be a platformer then the key gimmick eventually feels like busy work.Visuals have too much noise and it's often hard to make out where you can pass and climb at a glance.I can see how someone missed the key expiration mechanic. It's barely visible.>>108087227>Super Metroid>simplisticOpinion invalidated.
>>108087405having a tantrum again?
>>108087296I (>>108080582) enjoyed it too, shitposting aside.
>uhhh, japanese people can't play 3d games>>but japan primarily produces 3d games>SHUT UP
>>108087413>What's a slab?An array with some metadata to keep track of empty slots.In Rust there's a library for it that everybody uses, but it's a very simple data structure.There's also advanced versions of it that also keep an id, in rust that's the Slotmap library but they have various names.C++ Colony is basically the same thing, I think.
>>108087472That's functionally no different to malloc/free and often what it's doing behind the scenes
>>108087471FPS and walking simulators tend to underperform there. Games which are basically mechanically 2D are king there. Of course, 3D graphics are used a lot, but 2D is also still pretty strong there. That's mostly gossip I admit, but this status quo is seldom broken when I hear of them.
>okay they make and play 3d games but not the kinds of 3d games that I don't like so my mental illness is now normalized because I say so!jesus christ, he just keeps doubling down
>>108087472So that's what it's called, huh.I made something similar where it allocates objects up to some capacity and when it's full it switches to regular malloc. I can confirm a massive boost to performance.
>>108087520what is this word salad, ok this is the last time I reply, good night
>>108087483Malloc/free has to handle variably sized allocations, and more importantly they have to do a bunch of work so that the same global allocator can be used from different threads. So no, it's definitely not the same.This should be obvious by comparing the size and complexity of a real malloc/free allocator and a simple slab (maybe 50 lines)
>>108087545>Malloc/free has to handle variably sized allocations, and more importantly they have to do a bunch of work so that the same global allocator can be used from different threads.So do you with your custom memory allocator unless you only want it to handle one data type on a single threadHandling different sized allocations doesn't add significant overhead, threading might depending on a lot of things
>>108087491You could've just said you don't like FPS games instead of constructing this elaborate hypothetical disease that you claim exclusively afflicts you and the entire nation of Japan, anon.
>>108087326>>108087373>>108087420You don't have to defend malloc retard, adding mimalloc to your project takes 10 minutes. Even if you don't want to do a bunch of memory shit with arenas etc, you can at least dump in mimalloc and forget about it.
>>108087591The issue is people who think they need to manually structure their memory management with arenas and stuff when they don't
>>108087564I just use the rust library, so it's not an allocator, it's a user-level data structure like a vector. You keep indices, not pointers.Yes, every slab works for a single data type, but you can have multiple, if you want.Nothing stops you from using the slabs from other threads, just like it wouldn't be a problem with a vector.Personally I don't do it because I think I "need" it or that malloc would slow me down beyond repair. I think it's better in general.
>thread about making games>devolves into malloc bike sheddingkek
>>108087636Well Rust doesn't let you manage memory normally so you have to reinvent it as a slab with indices, peak stupidity
>>108087650>reinvent itjust run cargo add slab, boomer
>>108087678I don't use Rust
>>108087686Ask chatgpt to write it or something? It's seriously like 50 lines of code. Well if you get filtered by a slab maybe just find another hobby
>>108087643>thread about making games from a low level>discusses a very important part of making games that don't stutterImagine my shock.
>>108087694I didn't get filtered by a slab, what the fuck are you talking about
>>108087707>>discusses a very important part of making games that don't stutterhahahathis isn't important at all, you've been gaslit into thinking it matters when it doesn't
>>108087718Why are you even here? Just go to agdg and use Godot or whatever.
>>108087726I've actually made a game engine from scratch unlike you people roleplaying so I can tell you with authority that it doesn't matter Focus your attention on something that matters
>>108087731Show it then. If you're gonna bring it up like it gives you authority, show it. Benchmarks too, thanks.
>>108087735Here's a good article everyone bikeshedding about this should read https://www.forrestthewoods.com/blog/benchmarking-malloc-with-doom3/
>>108087738>the article literally says it's quite bad and to just allocate pools because it's so easy Also Doom 3, as the article points out, uses very little memory. Try that when you're actively using a few gigabytes.
>>108087766>>the article literally says it's quite badNo it doesn'tYou can see malloc and you can see other replacement allocatorsYour own memory allocator will be similarThe cost for all of them is fucking miniscule
>>108087783>spikes to 500 microseconds on a game from 2004 that barely consumes any memory100-500 microseconds is not miniscule at all, especially nowadays when people have 144Hz+, often 240Hz or more with newer OLEDs.
>>108087807It spikes to 100 microseconds which is still barely a fraction of your frame budgetthe amount of memory you're using isn't relevantyou're literally arguing that something everyone has been doing for 30 years is too slow, insanity
I just malloc all the memory I need at the start. If you don't have 512mb free, too bad.
>>108088196same but with mmap and a couple gigsits weird that some people are uncomfortable with that style of allocation when they depend on programs with a completely fixed stack size every single day of their lives
Not streaming data in multiple small chunks at the same time to avoid big allocations is dumb and ensures bad performance and slow downs to happen frequently.
>>108088224You don't gain anything by doing it, it's just a cringe larp to make yourself feel like an artisinal programmer
>>108087783>The cost for all of them is fucking minisculethe cost to implement them in the first place is minuscule so there's not really any reason not to do it...>>108088240you gain your program literally never crashing from the system running out of memory. why do you have a hateboner for such a simple thing?
>>108078842>using TCP sockets for client-server.>spend 500B per editor action. Most actions only need <100B and could probably be optimized to ~20B.>Terrain is calculated on the CPU despite originally being glsl.>Changes to mesh rebuild the whole mesh at rate = input polling when dragging mesh elements.I'm going to make an MMO, guys. Believe me.
>>108088273>you gain your program literally never crashing from the system running out of memoryYes and trade it for the bug of your system running out of local memoryWell done brainlet
>>108088303i literally just make my allocators return a blank stub area when they run out of memory that gets cleared every frame. they never "fail" like a malloc call can and when i run out of memory, it's obvious which subsystem hit the limit and I increase it a little bit and then it never runs out of memory again unless I have a leak which is rare but also easy to catchyou can argue I could just wrap malloc and return a stub on failure, and that's true I could but again, allocators are extremely little work to implement compared to other things, so I just don't see any reason not to do it. my shitposting allowance for the day has dried up, I got work to do so you can give me another (you) about how im dumb or wrong for doing something that works extremely well for me but im not gonna reply anymore
niggas will really do anything except make a game
>>108088417Hi Casey, can you complete your game before you die?
>>108088417Oh so they silently fail, that's even better!Fucking idiots reinventing things making them worse instead of making games
All the vertices remain stationary but I warp the grid on which the vertices are placed to make them appear to move. This gives me unimaginable levels of 3d graphics power, with a single CPU core being equal to approximately 438 RTX 5090s.
>>108088927bro just discovered what a view matrix is
>>108078595Sorry anon, could you explain what you mean by "anti-aliased edges"? I thought you were talking anti-aliasing a pixelated/undersized sprite as you draw ithttps://www.shadertoy.com/view/llK3WmThat's the type of result you'd get (sharp lines, the sprite itself is antialiased, but not the render output), but I'm not sure it's applicable anymore... (you're right that I meant "cone step mapping", but the part that matters specifically is the map which stores a vector to the nearest valid pixel and would be used to reconstruct color; alternatively, retrieve it from a lower-res mipmap if you don't mind some color smearing)Basically, draw it like a normal SDF: effectively an alpha-cutoff at the zero-crossing (valid depth info IS written, like any other alpha-cutoff), then choose the nearest color by XY-offset or mipmap sample if your sprite lacks transparent RGB info.If you are trying to anti-alias the output entirely, there's not any magic I know of-- at best, you can do an indexed/instance draw and have a compute queue do the sprite sorting for you.
dummy herebut if i were making a multiplayer card game with lobbies, i would make a card game component with all the card game rules, instance it for each new lobby/game, and then destroy after we verified the results and wrote to the database?
>>108063238IS THAT VSCODE? WHAT ARE THESE FUCKING NORMIES DOING IN MY THEAD.???
>>108089697>I thought you were talking anti-aliasing a pixelated/undersized sprite as you draw itNo, the texture can be anything and can have the smoothed edges alpha baked in from the painting process if needed. It's about not having aliasing from alpha cutoff when trying to not screw up the depth buffer.Cone step mapping reduces edge aliasing indeed, but I think it's within that single sdf drawn baked geometry. Cutting off at 0 without alpha blending would have aliasing and with alpha blending would cause depth artifacts on intersections.>If you are trying to anti-alias the output entirelyThere's always alpha to coverage which works fine but I'm wondering if there are other practices and tricks, since it has lots of overdraw with no acceleration.
Has anyone used SDL3's GPU API?
>>108079885boost is one of the worst set of libraries ive ever seen, sure it may have some good stuff, but it is so disgustingly written that i will never use it
>>108091683Do you use anything from standard library? If so it's written much worse.
>>108085922any game big enough ends up reinventing the database
>>108087420all syscalls are slowall static memory is slow
>>108091838>all syscalls are slowok>all static memory is slowhuh?
>>108091962
>>108092437cool, I need to get procerual generated terrains on my engine too, what noise function are you running?
>>108091702at least the standard library is not macro slop code but actual c++ code
does anyone have suggestions for what I can improve on this general style? I'm trying to go for cross-hatch shading with a bit of break-up on the sobel outlinesand also I'm trying to see how easily configured my shader is, gave my brother the PC and he never used Unity before, but this is his results after around 10 minutes messing with shader propertiesI think its good as in, the shader is easy to use he said, but the results themselves people on /v/ said were bad. Idk, any general advice on how it can improve would be very appreciated. thanks
>>108093404i'd add anti aliasing
damn this looks pretty gud
>>108093463thanks I'll give that a try. idk if it might conflict with the sobel lines since they have a noise on them to give them some break-up
>>108093404feels like theres too much noise, everything is "breathing", especially when there's movement. Not sure if its just a result of .webm compression
>>108093467Bretty cool alright, I like the jagged look
>>108093614oh yeah there's vertex displacement to give it a wobble and since it's triplaner the textures will "swim" a bitI'll disable that + do UV mapping on the meshes to see if that improves it, since the UV version for this shader is much more consistent and stable since textures aren't on world-space projectionthanks
feeling really burnt out for some reason, couldn't bring myself to start working today. Think I'm just gonna ideasguy it for a bit, too much time spent in the weeds of an engine too little time spent actually thinking about what sorta game I wanna do
>>108091838malloc isnt a syscall
>>108094389>he doesnt know what malloc does
>>108094466Not him, but just because something can use a syscall sometimes, it does not mean that itself is a syscall.By your logic, printf is a syscall.
>>108094466malloc defers to a CRT memory allocator which occasionally makes a syscallIt would appear you don't know what malloc does
>>108094854>Just because it can use a syscall, doesn't mean it's a syscallOh, getting -pedantic -Wall -Wextra now, are we?!