OpenGL Supremacy Edition/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: >>109219142
Just the other day I vibe-coded a small OpenGL rendereron Linux
>>109306504What did it do?
>>109306655It imported and rendered .obj 3D model
How bad of an idea is whipping out DirectX3 SDK or early OpenGL and autistically doing an old school game engine with it?
>>109306961wow how did you do that?
>>109307014Extremely fun and educational for hardcore retro learning/nostalgia, but a terrible practical idea
>>109307014directx bad, opengl good. minecraft was on opengl 1.1 for a long time and thus ran on windows 98
>>109307048>>109307041I’m gonna fucking do it then
>>109307081Dont do it while fucking
>>109307092bet
>>109307014The problem with opengl 1.1 is that there is zero reason to use it over any generic graphics API.Because usually when you have a low level graphics API you gain performance due to being able to control exactly what stays on the GPU ram and what doesn't.In opengl 1.1, you CAN store graphics on the vram, but you are locked into this very simple shader where you only have GL_MODELVIEW and GL_PROJECTION to control how stuff moves.That's fine if you don't need more than that, but I think shaders actually make things easier to understand (except the NDC conversion between the vertex and fragment shader, that's not exposed to the shader so it's a hidden step). Other than that, you can follow the math from the raw buffer/uniforms on the CPU to the pixel on the screen without needing to read a walls of documentation of what's happening in the black box.Also I'm pretty sure that many projects that use fixed function opengl (such as quake3/doom3) actually end up using old ascii assembly shaders (because you need shaders for skinning and bump mapping and dynamic shadows, and effects).You could still write a ascii assembly shader, but I believe this is what modern intel GPU's emulate slowly (still hitting high enough FPS's but using 5x more GPU watts than nvidia/amd), which is unfortunate (the reason why it's slow is because it's being translated into a shader, I think, but nvidia and amd are still printing the exact same silicon asic's for the fixed opengl pipeline which hasn't changed for decades, and the ascii assembly shader is a separate asic processor than what is used in vulkan/glsl/DX shaders, I think).Also note that the fixed pipline isn't good for webgl, since it doesn't exist (I think emscripten has emulation, but I don't know how good it is, raylib has rlgl.h which wraps modern GL into a fixed function GL api in a separate API from raylib).
>>109307031NTA, but there is a widely referenced OpenGL tutorial that teaches you how do exactly that. They start with a simple pipeline, then they progressively teach you how to add the other components to make a traditional pipeline: specular maps, normal maps, transparent textures, z buffers, etc.You can simply copy paste the final renderer and use that as a base, especially since once your pipeline is setup, you don't really have to touch anything.
>>109307014i did something similar earlier this year.i made a simple ray caster and immediate ui lib using only xlib. it's 100% software rendering, and thought me a lot of stuff.
>>109307987software rendering is a beaut. good job
>>109306961I did the same for wgpu. I had the obj format its terrible. Also wgpu is quite comfy.
>>109308563wgpu seems like the latest coolest thing
>>109308765WebGPU is the place to be, man
Notch is making his latest game with WebGPU, therefore it must be a good starting point
fuck off web devs
https://interactive.arm.com/story/the-arm-manga-guide-to-the-mali-gpu/page/1
>>109308830bbut i don't want to make web games
I can vibecode a game in 5min in fableYour devtime is worth nothing
>>109310263do it then
>>109308830wgpu can use WebGPU as a backend.
I'm thinking about returning to my voxel engine. I managed to restore it from half broken state I left it year ago or something.Now, I will have to implement the hard part that made me give up last time. GPU side hashmaps to aggregate rays over voxels.
>>109310769Here is composite image made using python. That's roughly how it is supposed to look. Even chromatic penumbra is clearly visible.
>>109306361Dense multiplayer simulation supremacy
>>109310830MMOs are an outdated game design
>>109310843MMOs couldn't do this before though
>>109310867Depends how complicated the monster logic is
wasm/emscripten is live, you can now play Whiplash in your browser at https://fatal.racing/CUE and BIN files here for the full experience https://archive.org/download/whiplash-2001-variant
>>109310867Did you write a book on your game you haven't even made yet? Lmao
>>109310891That is true for local simulations but not multiplayer, handling the fanout at this scale has not been done before to my knowledge>>109310902I made my game first. Are you asking why my MMO isn't finished? Does an MMO get finished?
>>109310911What's the practical difference between local simulation and multiplayer?
>>109310919O(N^2) because each player is an observer who needs an update100 players * 20 updates/sec * 100 receivers = 200,000 delivered updates/sec500 players * 20 updates/sec * 500 receivers = 5,000,000 delivered updates/sec
>>109310940basically the fanout becomes so large that no amount of cache, hot-loop performance, etc can save you. The solution has to involve reducing the work itself.
>>109310940multiplayer just means you have to deliver the simulation data across the network, the simulation cost is still the same
>>109310988A player has to recieve some updates monsters don't, and that message is going in and out of the simulation which is not free, a monsters logic can exist entirely within the simulation
>>109310892Oh yeh, also hardware accelerated graphics are looking pretty gud now
>>109310902>Did you write a bookI don't think he did. The book looks to be AI slop
>>109310769Looks neat
>>109311988Fuck but here are some screenshots of different cameras
>>109310252Then just electron/tauri it a viola you have a desktop game
My clanker and I are doing some advanced shit. Using VMA’s virtual allocation system along with Vulkan device address commands to do the “No Graphics API” concept stuff. It’s beautiful watching 5000+ VkBuffers get compressed to just 1. Still figuring out how I want to do textures but I’ve been defaulting to no_gfx_api as an implementation guide. ReBar is a hard requirement. I also don’t care for supporting gpus below RDNA3/Ada, I’m going for something bleeding edge.https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/virtual_allocator.htmlhttps://docs.vulkan.org/features/latest/features/proposals/VK_KHR_device_address_commands.htmlhttps://github.com/leotmp/no_gfx_api
>>109312186the real question is, what is your biggest dildo
>>109312214It’s not my fault you don’t know how to use vulkan
>>109312272>my clankerneither do you apparently lmao
>>109310843why is ffxiv and osrs so popular then?
>>109312278My clanker AND I. At no point did I say I was relying on it. No doubt you’ve tried to use a clanker to understand Vulkan, to no avail clearly.
You ever just finish prototyping something, take a step back, and feel shame at how shit your code is?I think I'm marginally better when I'm actually making an implementation though. I hope so at least.
>>109312837it's called a draft
How do you find a group to playtest your game? Friends? Pay someone?
>>109312856Yeah, true. It's a palate of paint in use. It's not supposed to be orderly, but still.Maybe I'm just still shaking off my "Everything must be perfectly formatted and optimized first run, or I'm a bad programmer" phase.
>>109312864I got curious too, and looked it up. r/gamedev has a discord server. I know it's reddit, but the tech side usually isn't that bad.I'm going to give it a try tomorrow.
>>109310135Neat, but why does the boy look like a girl?
>>109312877ive been programming for 30 years and the first implementation of any non-trivial system still never lasts
>>109312909Thanks
>>109312864>>109312909Find a dev tuberJoin their discord Make friends , play their games and ask people to test your game
>all the web dev tutorials be sayin' Michael Abrash butt ugly boomer shooter legacy this quake that doom this 3dfx that>I just wanna WAHOO for God's sakes!
Character designs are coming along
Is there any advantage to using render pass over compute shader if all I'm doing is just drawing full screen rect and doing all rendering in the fragment shader onto the swapchain image?
>>109316050Huh?
>>109316721
>>109316050Uhh I'm gonna guess... yes, I guess.
Would you lads be interested in a game that only uses templated text for its visuals (like in a text adventure), or do I have to suck it up and do graphicsI'm thinking of how low I can go graphically so that I can handle lotsa "deep mechanics" (I'm considering making a retro CRPG that's essentially a TTRPG simulator)
>>109317108You could do what games like Dominions do and have extremely basic art.
>>109306504kill yourself.
>>109316050do both and measure :3in reality... every gpu has it's own thing going on, if you read this:>>109310135you would know that on a tiled gpu (purely mobile), it matters for you to tell the driver that you don't care about the original memory. I don't use compute shaders or vulkan, but I assume in vulkan you can just discard/invalidate/load_op_DONT_CARE the contents of the buffer/texture that's used in the compute shader. If you don't, the tiled GPU is going to load the memory from the RAM (because there is no vram, it's unified memory but with tiles), just like the manga says.On a desktop GPU, you have a lot of utilization metrics that you need to be aware of, on a high level you have vertex/fragment/cpu/memory bottlenecks, at a low level you might look at how much of the % of the GPU-vendor-specific units are being utilized (because 100% GPU usage != 100% GPU compute utilization, it could just be waiting for stuff/not fully occupied).there is a game profiler called optick.nvidia nsight is good for nvidia GPU's (if you have a 30 series Nvidia GPU or better, and a spare GPU/igpu or a spare PC, you could do vulkan shader debugging, renderdoc has the same thing but I think it's not feature complete such as the extensions used for out-of-order transparency like fragment_shader_interlock, BUT I don't know if Nsight supports it either... I assume it does).Overall, it's all super specific to your GPU, so unless you have a real-world benchmark, it's not worth focusing on unless you really need to optimize it. Since you might be optimizing a part of your GPU that isn't actually going to give you a noticable FPS improvement.
This is probably a dumb question.How do I use Cmake to copy library files into the build directory so I can ship a game without requiring a bunch of dependencies? (on Linux)I tried moving over my game to a Steam Deck, but it just shows an error about a missing file libSDL3.so.0. I moved that file into a directory inside my project files, added it to CmakeLists, and ran it again. Then it started giving me errors for a different file.Is there a more automatic or approved way to do this? I've barely used Cmake, so I'm kind of just piecemeal-ing my learning as I go.
I kind of miss times when I used to write my own code, and that even wasnt that long ago.. 2020… 6 years ago
>>109317659The keyword you're looking for is static compilation
>>109317659Not sure how you'd get the info from CMake specifically, but you can run ldd on the binary to see all the libraries it uses (including transitive dependencies), and then copy those to the output directory. Note you'll need to either have a wrapper script that sets $LD_LIBRARY_PATH, or set an RPATH in the binary itself, to get it to search your custom library directory (you can't just put the library next to the binary like on Windows because it doesn't search there by default).One question is whether or not to ship your own libc.so and related files. To see which files are libc-related, build a C or C++ (depending on what your game uses) hello world program and run ldd on it. You should either ship all of these or none of them. If you don't ship them, then your game might only run on systems that have a glibc version >= the version on your build machine. If you do ship them, you need to arrange for your binary to use the ld.so that you ship instead of the one from the system, since the system ld.so will be tied to the system libc.so and won't be compatible with the libc.so that you ship. You can do this with patchelf or with certain linker flags. In this case you'll need a wrapper script to start the binary using the correct ld.so, since you can't use $ORIGIN in INTERP (the path to the ld.so to use) like you can in RPATH.Or, do like the other anon said and statically link as many of your libraries as you can.
I am going to recreate my flappy bird clone Copyright Right Infringement Bird with the knowledge I have gained since the last time I created it.I will use Raylib unless someone suggests a reason to use SDL3 over it.I hope to implement 1 element per day.1. the sprite sheet and initial window.2. background scrolling.3. player4. pipes5. coins with audio6. menus and uiThis timeline will blow out to weeks I am sure.
>>109312327nice cope faggot, post your source so we can see the vibeslop trash for what it is.
Holy shit wgpu + winit 0.30 (native + wasm) is cancer. winit 0.30 can easily compete for the most overengineered redesign since React Router v5.I get why it is like that and it's still impressive they managed to make winit work with literally everything from mobile phones to js canvas, but at this point they could have just made some glue to make it just werk with async that wgpu relies on.
>>109317287optick requires you to link to the library... And you need to manually annotate a lot of stuff.It's mostly for CPU profiling the whole system, but at least it's portable.You may need to use whatever tool that's best for your GPU, but RenderDoc is probably more useful than optick.
what do you guys think about my character creator?
>>109318590Day one complete, I would post this in agdg but my country is range banned for no reason. I din du nuttin.
>>109306361Just use AI bro. Stop coding manually
>>109317683>>109318141I've been trying to search for any necessary information on this on-and-off for a few hours now.I still don't get it.Anyone have a detailed guide on how to use Cmake properly to statically link and compile shared libraries?
>>109319977FI can't code at best it can analyse existing code or search for documentation. Still have to code manually.
>>109320262Skill issue
>>109320273Yes FI has no skill.
>>109319977>he's still coding instead of orchestrating his AI swarmBehind the pack and he believe he's still in...
>>109317286>>109319977
>109319977This guy is a 80IQ Bosnian who is bitter about failing to learn programming. If you see those AI cats or variations on /g/, it's almost always him.
imo the higher iq you have the more retarded you actually aredouble digit IQs are normal
>>109318773Are you referring to thewinit_event_loop.run(move |…| { match the_fattest_enum_youve_seen_in_your_life {}});thing? I ported to it; it's not that bad. And I really appreciate having never dirtied my hands with Rust async code.
winit_event_loop.run(move |…| { match the_fattest_enum_youve_seen_in_your_life {}});
How do I get better in 3d modelling quickly?
>>109321420Prolly watch tutorials?
>>109320250>how to statically link shared libraries?You can't*. You can only statically link against a static library, or dynamically link against a shared/dynamic library. But most distros will ship both static and dynamic versions of every library (on Debian the static version is in the libfoo-dev package, which you need anyway to get headers and .so symlinks).(* It's probably possible with enough hacks, but not well supported)How to request static libraries in cmake specifically, idk, but there's some discussion here: https://stackoverflow.com/questions/16991225/cmake-and-static-linking
>>109321383No. That's old winit. That wasn't a problem. The problem is that new winit is more declarative. It sets things up on its own and you can only create windows and surfaces(for wgpu/gl/vk) after it is done. And it informs you that it is done through a (sync) callback, not unlike other event loop events. This is a problem for few reasons. First, some libraries like wgpu are async and require awaits while creation. Meaning after winit finishes initialization, you need to spawn an async task that will create wgpu and then all other objects that require graphical api to be up. And spawning async task means something different in native and wasm because in wasm you can just use javascript's event loop as async runtime, while on native you don't have any and need to block on it(because why would you try to cram tokio or something there)And this causes second problem, since the App is what implements the event handler (ApplicationHandler), it needs a special state to describe itself after it is created but before graphical apis are initialized, meaning Options<> on everything graphical related and ifs/matches every time you use them.Pic related is a triangle example for wasm + native + winit 0.30 + wgpu 30.0 https://pastebin.com/hR0WPHbbI think I will just make some sort of adapter/harness that will only hold minimal init related data, implement ApplicationHandler on it, and I will create actual Application struct only after the harness successfully creates the window and initializes wgpu. Just to I can have this invariant that if Application exist, it already can do all the graphical and windowing stuff it is supposed to support after initialization. I wish there was a library exactly for this purpose.
I’d tinker some today. Do you guys consider yourself artists? You create, that’s artists job
>>109307041Engine development is a terrible 'practical' idea, either way, unless you're working with a team of specialists who have other areas of game development covered.It's all a hobby/ learning experience in the end.
>>109323395>Do you guys consider yourself artists? You create, that’s artists jobWhen a painter mixes pigments and takes care of his brushes, he ain't doing any art. But the moment the audience gets lots in his painting he becomes an artist. Same for gamedev.
>>109320250Cmake is a glorified string concatenator, you have to look at the compiler's and linker's options and how they differ for a static build. As other anon alluded you want to _link_ statically, since alternative could lead you astray into building your game as a library.Off the top of my head libjxl can optionally use libpng statically. grep for BUNDLE_LIBPNG.
>>109317659The problem with linux is that nobody uses it, and the people that do, truly don't mind using proton, because linux somehow introduces a lot more issues with packaging.The first issue is glibc, unlike windows UCRT/visual C++, you must use an older version of glibc for your program to link to older glibc versions. So someone who has not updated linux might not be able to boot due to glibc issues.That's usually handled by running cmake inside a docker with with an old ubuntu version.This is also how appimage works (the problem is that you don't have easy access to the internal files, since it's like a zip archive).A overkill solution might be to statically link musl, but I think you need special instructions for building your libraries, and I wouldn't be surprised if it wouldn't work for SDL since it links to so many other libraries, which glibc/musl mismatching may cause issues.If you are not using appimage, you need to use .tar to preserve the execute bit.Second problem is that linux won't load .so files that are in the same folder by default.If you want .so files, you need to set the rpath origin, when you build a binary, cmake will add a rpath to every .so that you link to (which matters if the .so is not globally installed), but this path gets stripped out when you install.If you want static libraries. That depends on if your package manager ships static binaries, I am leaning towards no. SO you need to build from source. Which is a very complicated rabbithole with little benefit, but you might learn a lot by attempting it, since you are just reading cmake files half of the time.If you just want it to just work, you can use vcpkg, by default the linux triplet is static (if you set it to x64-linux-dynamic, .so will work, and the .so files will be copied to the build and install directory by vcpkg, as well as in windows).Then your project probably has files that are not .so, and that's where you have install() instructions in your cmake file.
>>109317659>(on Linux)Ignore Linux and tell them to install a real OS or use Wine/Proton/whatever if they want to play your game.
>>109323395We are all made in the image of the God of creationIf you are not creating you are neglecting your humanity
>>109324534*and I also copy the files (and DLL's on windows) into the build folder using something like:add_custom_command( cmake -E copy_if_different ${CMAKE_COMMAND} ${insert_files_here} ${insert_destination_here})THE ABOVE DOES NOT WORK, it's missing the target and "post_build" and how to get the path to the source directory, and the path to the build/target directory, I honestly don't know what the universal correct incantation to actually copy the files are.And it's probably something new in cmake 4... (i'm still using cmake 3)Let an AI write it for you, or follow a tutorial, or do both and pick what you think is the best option since there are more than just 1 way (and some ways are less incorrect). Maybe putting it into a function might help. I don't know.Also when it comes to the install() there is a lot of nuance, you could put the files into /bin which makes sense if you have libraries with /include and /lib. I don't have libraries yet I still put everything into /bin even though it's just an extra folder in my install path... Maybe I shouldn't...
ECS or OOP, brothers
>>109324696YOLO
>>109324696Neither, I just do free functions on POD structs
>>109324696Neither. I do Unity style components.Entity is concrete class with just basic essentials like id, position, components and queue of components to be added next cycle/tick.Components are type erased, either by deriving from one base class or by implementing a trait/concept. They expose some common interface that provides stuff like component id, to-be-deleted flag and a method to downcast to concrete type.Reference to entity is just its id, reference to a component is (entity_id, component_id).(components are not expected to live outside of entity or move between them).Ids are just generated from an atomic u64.Do you need more?
>>109324788That's just ECS
>>109324809no it isn't
>>109325007ESC is all about having systems(free functions) operating on components(PODs).
>>109324696ECS but don't get dragged into the retardation of overcomplicating it. If you don't need it, don't add it.
>>109324534>cmake will add a rpath to every .so that you link to (which matters if the .so is not globally installed), but this path gets stripped out when you install[X] DoubtDefault is usually to not set any rpath at all and instead rely on the system search path. And removing the rpath from an existing binary requires nontrivial edits to the elf file, which cmake certainly isn't doing itself (patchelf can do it, but I just checked on Debian and cmake doesn't have a patchelf dependency). Especially not during the install step, which is typically just supposed to copy files into place rather than do any actual build steps.>If you want static libraries. That depends on if your package manager ships static binaries, I am leaning towards no.Debian and Ubuntu both ship static versions of basically every library. It's in the -dev package rather than the main library package, but you need the -dev anyway to get the headers and the .so symlinks (such as libfoo.so -> libfoo.so.1.2.3). I think most distros offer this in some form.
I fucking love memcpy and memset bros
>>109326100Why are you posting ahegao on a blue board?
>>109320938You are trans
>>109326100Wait until you learn about memccpy.
>>109326100you know you can just use pointers instead of relying on crutches, right?
Came here to blogpost but I need some tips, so I spent April trying to set up my own little game framework with no actual gamedev experience, using sokol and SDL3, but I quickly got bored because, one, I wasn't actually making a game, and two, I got a little bored and I didn't actually know what to do.For context, I only had a sokol clear screen and the SDL window correctly setup to atleast hook to sokols opengl backend (valuable minutiae knowledge that is not actually gamedev), and I started to lose interest when I was whinging a resource system and how cgltf was supposed to fit in into it (I read a little about WADs and Valve's vpks but I only had a system that just read from a simple directory and never wrote the packed game resources files aka the actual WAD clone).So I'm going to fallback to raylib so I get more experience on how a "proper" framework is supposed to work, basically reading the source code of everything I end up using from it to have a reference later when I try doing my own again.I know raylib doesn't have a "WAD/vpk" system either so I'm still going to have to do my own, my problem is that I can't find a good blogpost on serializing data in the context of a WAD/vpk, so I might end up crutching and use something like CBOR, idk.My other issue is that a lot of people shit on raylib's rlgl.h and it's OpenGL implementation, and that's why I was trying to start from something like sokol.Apparently it gets really bad with 3D games and I remember some guy drawing about 5-10 Zelda gltf models and his framerate was tanking, was that a skill issue or is the rlgl implementation that shit, I know there's an example with instancing so I do see ways to have better 3D rendering with raylib... Thoughts on this retarded experience? And yes I prefer to use C projects, I looked at the codebase of bgfx, which is using "Orthodox C++", and I still didn't like it.
>>109325931>[X] DoubtI build my own code because I want to test if the library works in address sanitizer, and I use CMAKE_PREFIX_PATH to link to them outside of the global path.If you already have the library installed as a system library, cmake will override the CMAKE_PREFIX_PATH with system libraries, unless you disable it using a flag NO_CMAKE_SYSTEM_PATH (I don't use this flag, because I don't use system libraries if I don't need to).>Debian and Ubuntu both ship static versions of basically every libraryYou are right, ubuntu has a static .a in the dev package. Arch doesn't.
>>109326673Do whatever seems the most fun, my dude. If the performance eventually becomes a problem, you can always rip it out and redo it later. Just make sure you're using semi-modern OpenGL style with shaders and vertex buffers, not the old fixed function and glBegin/glEnd shit
when people use chunked arena allocators and they have to pop, do they just iterator through all of the chunks between the end and the pop location and add them to a freelist? I feel like I'm forced to do that because the chunks are varying size to accommodate big allocations larger than the normal chunk size but I really wanted to keep this thing O(1). by freelist in this case, I mean a collection of freelists for each different chunk sizefuck I miss just using a slab of virtual memory but now that I'm adding threads in I feel like I have to go this route. I supposed I could just put a 8mb cap on allocation size or something if I really had to. what do you guys do?
>>109327187we had a discussion about this earlier, you can use VirtualAlloc to just reserve a really large address space so you can fit everything in one chunk
>>109327380I already know that. I already do that and it's fine for tooling but that isn't a great solution for a game because you can run out of memory. I switched to chunks because I have a bunch of threads that need to share from the same single block of memory.
>>109327431>you can run out of memoryyou can reserve 128 terabytesreserving isnt the same as allocating
>>109327187if you are just recreating malloc, you can just use malloc.if you use malloc for allocations larger than 64kb, at least something like that, the malloc will just allocate memory directly using VirtualAlloc / mmap.That's a problem because when you free, it will then decommit the memory, which has a cost.But I think depending on your platform you could probably let malloc manage more than the 64kb limit, and you can benchmark if that helps or not. Or replace malloc with a different implementation.
>>109327465you're not listeningI understand the difference between reserving and commiting but that is not a good model for a game. I want all the memory committed upfront so that it can't fail and time never needs to be taken to page in memory. All the threads have to share memory from the same slab and I don't know how much each will need, so they need to allocate in chunks.>>109327466I'm not recreating malloc. I'm talking about reusing arena chunks. It's an arena, it frees like a stack.
>>109327499>I want all the memory committed upfront so that it can't failthat's a really stupid requirement you've invented for yourself, games will allocate memory at runtime >All the threads have to share memorywhy?
>>109327509>that's a really stupid requirementIt's not, it's a constraint that will make the game robust and remove an entire class of errors. Preallocation is also faster because I don't need to depend on syscalls to allocate more memory. It only happens once at start up.>why?Because I'm not going to keep calling mmap/VirtualAlloc over and over again.Jesus Christ, I was wrong to assume I could ask a simple fucking question without being bombarded with basic bitch peak mt. stupid bullshit. "erm, just use virtual memory" Really, faggot? I thought this general wasn't going to be as braindead a /dpt/ or /v/ gamedev threads but I was wrong. Fuck you.
>>109327499>I'm not recreating malloc. I'm talking about reusing arena chunks. It's an arena, it frees like a stack.malloc is just an allocator that tried to implement a O(1) freelist, at least that's what I want to believe. It just chops up allocations into a list of fixed sizes, and it uses the size that wastes the least space.Obviously O(1) notation is stupid, and reality is harsher. Malloc has too many layers and complexities so it's not very fast if you are measuring in the scope of microseconds with many small allocations.With big allocations, the costs of malloc don't matter anymore. Because the majority of the cost in a big allocation is using the memory (Plus, malloc uses the fast path for 64kb or higher, VirtualAlloc/MMap, it doesn't get faster than this, small allocations need to go through the complex data structure used in malloc).You probably already know this, but the more memory you allocate, the longer it takes to allocate, this cost is delayed with mmap as you slowly commit the memory as you write to it, but this cost is instant with VirtualAlloc Reserve+Commit.
>>109327558peak mt. stupid is attempting to allocate all your memory upfront, literally no game does this and you're being a schizoif you want to do it how everyone else does it, have one arena per thread, prealloc a resonable amount upfront and grow it at runtime if neccessary
attempt #2 to try to make a bike racing game after failing a few months agoits so hard to get the AI to actually follow each other closely and not look total jank, theres like 50 sliders to tweak, so annoying
>>109319968looking forward to your future progress postings.
>>109327567>peak mt. stupid is attempting to allocate all your memory upfront, literally no game does thisminecraft does, kys retard
>>109319977you can use AI all you want, but so can I retard.do not log on to four channel dot org to brag to me about how you got robot daddy to make you an engine that can show the utah teapot. nigger.
>>109327792no it doesn't lolMinecraft can use a huge amount of memory, it's definitely not allocating all of that up front
>>109327509>>109327567my games allocate all memory up frontit's such terminally-never-finishing-a-game brain to think that you can't just pick a fixed scope and budget for everything in your game and not have to allocate dynamically at runtime
>>109327956terminally-never-finishing-a-game brain is thinking you need to statically allocate things because no real games actually do this
>>109327963i'm gonna guess you define "real games" as some subset of all games because I can list hundreds of games which do no dynamic memory allocation
>>109327994>I can list hundreds of games which do no dynamic memory allocationNo you can't unless you want to go back to the 80s or somethingThere's no advantage to this
>>109327883>what is jvm -xms -xmxfeel free to cope "akshually its not technically allocating everything up front@!" but practically it is exactly that.
>>109328011>>what is jvm -xms -xmxI dunno, you tell me I'm not a Java programmerMy Minecraft isn't allocating 15gb every time I start the game
>malloc schizo made /dpt/ unhabitable so he picked /gedg/ as his next victim
>>109328023it's literally how the jvm works. -xms starts the program with the specified amount of memory allocated and can grow to -xmx if needed. all games, and software for that matter, written in java allocate memory upfront.
>>109328054I have seen Minecraft use over 10 gb of memoryMinecraft does not use 10 gb of memory when I start it, I can test this right nowYou are wrong
>>109328062>akshully it doesnt technically allocating upfronteven if you dont see 10gb being used, it is reserved by the jvm. the definition of allocating memory.
>>109328077the discussion is about committing upfront
>>109328077that's exactly what i was suggesting he do you fucking imbecile, read the discussion before you reply
>>109327558>Jesus Christ, I was wrong to assume I could ask a simple fucking questionSeems like it's not such a simple question since you keep bringing up extra constraints that weren't mentioned anywhere in your initial post. Needs to be fully preallocated, fully precommitted, you can calculate the total size up front but still need to dynamically subdivide it with an arena allocator for some reason, something something threads, etc. If it's something like, I know the total upper bound but different levels may have different ratios of guys vs bullets vs map tiles or what have you, keep an atomic end pointer and have all your threads synchronize on a barrier in between levels and deallocate only at that point—now you don't need separate chunks at all. If you can compute an upper bound separately for every thread then you can just give each one its own independent allocator. Idk dude, if you say what you actually want instead of leaving people to guess then maybe someone can come up with an idea for you
Mental illness and memory allocation go hand-in-hand
>>109318590As anticipated my timeline is blowing out.I was planing on using the original resolution for the game screen but there is not enough pixels to create slow smooth scrolling. Sub pixel movement or moving every second or third frame looks like shit.I am going to have to scale up my tile map and game screen.
>>109328062This might help you understand.https://stackoverflow.com/questions/49333416/unmanaged-memory-not-showing-up-in-task-managerThis applies to C/C++/Java.Note that in task manager, it's in the DETAILS section, not the normal section, and you need to right click any header, click "select column", then show "Commit Size". It's a super unintuitive set of steps, and you should probably download a better tool like process explorer for graphics (I assume).
>>109328495we're talking about memory that's actually in use not reserved memory
>>109328511No, Commit Size is commited memory, AKA malloc.Active Working Set memory is memory that is being used, AKA memory that isn't a zero page So Commit Size is the true memory that is being used by MEM_RESERVE+MEM_COMMIT, AKA reserved to be guaranteed to have physical backing IF you use it.If you want to see the virtual reserved size, you must use another tool, task manager can't show it.If you used something like address sanitizer, it would show that the application is using 16 terabytes of memory, but it doesn't appear in task manager, and it wouldn't be useful either to know that.
>>109328550This isn't relevant
>>109328561Can you explain?
>>109328751Read the conversation
>>109328755What is your definition of reserved memory.
>>109328764It doesn't matter
mfw i have a software rendered 3d mahjong game using fully statically allocated arrays in 5000 lines of C
>>109328766Anon, I really hope you at least learned that task manager is not actually telling you how much memory is being committed and "USED" by your process. The stat shown in task manager is useful for performance and finding the app that is lagging the PC, but that's it.But if your issue is out-of-memory errors / failing to start up, the committed memory is "IN-USE" in the idea that it's the memory that the OS promises to contain memory, and the OS can't exceed a certain limit.Reserved memory in my opinion is MEM_RESERVE from VirtualAlloc. This can be many terabytes large of memory. But you can't actually use it, not even for reading 0's, you must call MEM_COMMIT on that range or else you get a fatal access error which is slow.
>>109328869What you're talking about has literally nothing to do with the original topic
>>109328877What is the original Topic?I just said that minecraft is using 10gb, and it will cause issues if you don't actually need 10gb.
>>109328879It helps to read conversation threads before you reply to them
>>109328885This is the topic that I am talking about:>>109328062Why are you like this?
>>109328891That is not the original topic, that is a reply to a conversation thread of ANOTHER guy who didn't read the conversation thread and said something dumb
>>109328895Ok so to me it just seems like you don't know how to read and you are replying for someone else with just wrong info?>>109328511Can you just STOP replying or just say sorry my bad?
>>109328904I am reading you say things that aren't relevant to the conversation thread because you didn't read itNot saying you're wrong it's just not relevant
>>109324534>>109324546I'm using Linux as my home OS That's why I want to make a proper Linux build.
>>109328992same
>>109328895nigger you dont even know how to read task manager properly. dont call others dumb when this entire thread youve been acting like a retard. you dont even know how the jvm works yet you authoritatively state how games written in it handle memory.
>>109328090-xms is committed upfront and -xmx is reserved. you don't understand the conversation you are trying to have.
>>109329158We're not talking about the task manager or how games written in Java handle memory
>>109329177no, the discussion is about committing everything upfront, so you just have one static slab of memory that never growscommitting some memory upfront and then committing more later is not what's being talked about
Despite the delay stage 2: background scrolling has been completed.
Been doing some stuff with BabylonJS.I like how lightweight the workflow is, just type some shit in vscode and bam its there
>>109329374Removed a ton of excess code and made my sprite sheet even tighter.
I'm having trouble getting people to try my game, let alone leave feedback. Maybe I've gotta record some webms or something to hook players. I'd appreciate anyone here giving it a spin: https://heavenspillar.com/
>>109331475you should make a trailer
will steam allow games that have jew hides as crafting ingredients?
>>109331485You're probably right, in my head this playtest was separate from the marketing phase. The plan was to use whatever data the playtest gave me to inform how I presented the game, but it's clear that people are increasingly less likely to try a game on a lark.
>>109331846yeah im not gonna play a game if i cant see a video of it
>>109331475>2-playerthere's your issue
>>109331862Co-op is optional tho. You're saying leading with 2-player is turning people away? That makes sense.
Why do all of you faggot only ever talk about some rendering bullshit? When are you going to do the game design and assets?
>>109332004I do not care about game design or assets.
>>109332004My game design is Yume Nikki and the assets will wait for my rendering to be done since I will be using a novel approach.
>>109312294Those games are decade+ old. No one designs a popular mmo nowadays
>>109332004Rendering is the most interesting part
>>109331846working on a sdl2 mode7 inspod visual novel, any tips on making seamless grass textures? video rel https://litter.catbox.moe/ix731pxw6oa9dnbv.mp4
Post webms of your games. I am not interested in discussion, just post vids so I can see your games.
>>109333356k
terracotta army
>>109328992There is nothing wrong with making a linux build, especially if you use linux.But you are asking to package / distribute a linux binary. That's 2 different things, you don't need to distribute a linux binary just because you are using linux.Windows binaries are just more portable than linux binaries. You will save yourself some headaches when it comes to dealing with distro specifics.But I already said everything you need to know in my previous post to get linux releases working.And it does suck to debug the binary in wine/proton if you are not able to reproduce it on a linux debug build. In this case, the best option is to just boot into windows and use a real windows debugger. If you never used wine/proton, you would have never known there was a problem with the windows build.But... then it's not impossible for you to have an error that only occurs on wine/proton, but not windows... But that's why winedbg exists.For booting into windows without restarting your PC, you can use a gpu-passthrough + "looking glass" if you have either a IGPU+dgpu (NOTE this requires linux to use the IGPU and you need to reboot into your bios to switch it) or spare GPU. OR you are already using an intel igpu/dgpu (intel supports virtualizing part of the IGPU to a VM, so both the host and the VM guest share the same GPU). And if you already have a dual-boot PC, you can install the VM drivers onto window, and directly boot into your windows disk with your VM (but this isn't worth it, I had issues with audio and latency, and bluescreens, and online games may have VM checks).
>>109333293Seamless anything is done one of 2 ways:You make the edges nondescript (like a flat color). That works best for man made materials that have a logical edge, like bricks, stones or wood. Seamless natural forms like grass are a bit trickier, but the fundamental piece is hiding the fact there's an edge. You can accomplish this by making the left and right side line up perfectly. When you draw it, take 2 tiles lined up next to each other, then draw the transition over it and use those edge pieces to make the new, final, tile.I suppose it's also possible to do it in 2 planes, a flat color and noise layer, then a detail layer, but that's kind of labor intensive for a mode 7 thing. Your sheep thing is cute btw.
>>109332560more like its the most accessable part bwcause you're just following tutorials
>>109333356>>109331475Recorded a few of these since images aren't doing the trick
>>109318590Stage 3: We have flappage.
>>109333740that’s nice, very 90s
>>109333740you could make a nice rendering software out of it, like Bryce3D but modern
>>109332116riot mmo is very highly anticipated. you are just wrong, its okay to be wrong.
>>109338810traditional MMOs are dead, everyone learnt this in the 2010seven a Riot MMO probably isn't gonna be big
>>109338841>traditional MMOs*wow clones