[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: event template.webm (956 KB, 739x589)
956 KB
956 KB WEBM
Event templates edition

/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_General
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
Render bugs: https://renderdoc.org/
Previous: >>102669668 (Cross-thread)

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.
>>
>>102735790
first for lets figure out a run-time data-oriented design for Frosch that's amenable to dynamic changes (ie gameplay)

I'm really curious how Jolt does things. Its high performance, SIMD-optimized, encourages multi-threaded access of the physics simulator, and organizes every collision layer into separate quad-trees.

That sounds like, whatever they're doing, is a pretty good blueprint for a lot of systems.
>>
>get berated for using AI
Ok fa/g/s, how am I supposed to architect my turn based game? How do I set it up to wait for animations and shit to end and handle different team turns and handle menus and shit?
>>
>>102736016
why dont you ask the AI
>>
>>102736016
I use AI. But I'm not a newbie, I have nearly 15 years of professional software dev experience. So most of the answers I get are pretty fucking awful from Claude, Codestral, GPT4o.

imo only use AI if you have the experience of managing someone and have enough background knowledge to know when they're fucking up
>>
so I'm fashioning my Vulkan game into two main layers.

rendering ( visible world ) and simulation ( invisible world ).

and you should be able to basically easily decouple the rendering and make the simulation visible or invisible on a whim.
>>
I hate building editor UI. Maybe I won't mind it once I have a good system down
>>
making an RTS game from scratch in C but struggling to get the terrain shader to work properly. It should be sampling from different textures based on an ID value but it only wants to bind 1 texture at a time
>>
>>102736290
I know this is work in progress but I really hope you're not actually planning on laying out your component attributes in a big list like that, it's really bad wasteful design
>>
>>102736339
SOVL
>>
>>102736016
stepping though some variant on an a graph such as a state machine
>>
I'm making a casual mobile game, will post webm later, it has taken me a while now 1.5 months of working on it while I guessed it would take 2 weeks. It's made in love2d and the biggest burden was mobile resolutions. I give it 3 days and it's finished. What I'm wondering is if it's worth putting it on the playstore with ads. A license costs 30 euro and if I don't earn that 30 back it has no point. I want to add ads only as an option to continue playing since I have no currency system. What does /gedg/ think, should I pay the 30 euro and implement an Ad system? I'm also thinking about putting it on crazygames. I will also try to get it on f-droid without ads since there's no point having such a simple game closed source (it's love2d anyway so the code always is accesible).
>>
>>102736006
>first for lets figure out a run-time data-oriented design for Frosch that's amenable to dynamic changes (ie gameplay)
kek

>>102735805
But if I want to iterate through components in a particular order, then I'd have to wrap pointers to the entities or components in another data structure. I keep thinking back to the transform tree as an example.

Here are my current thoughts.

Create a "register". You can add a component at runtime and it is associated with an integer. Inside the register, you have a block of memory. Each element of the block contains a Roaring bitmap and a component container. The bitmap performs a component check. If the check passes, you can access the component from the container.

An entity is simply a u32.

The component container contains the components in some format to suit the problem
The container should have associated functions
"insert" and "remove"
"for each" do something for every component. This gives the user control over the order instead of using a dense array.
"get" provide an entity, return a constant pointer to the component
"update" provide an entity, find and modify the component

The burden of the component container is on the user.
The user provides the data structure and the functions (which are stored as function pointers) and the ECS handles the rest.

Once again I'd like to stress that the component container should be chosen to fit the components. But you could generically use an array as a default.
>>
>>102736422
thanks man, fixed the terrain textures
>>
File: image.png (269 KB, 1035x618)
269 KB
269 KB PNG
>>102736900
fixed the mipmap filtering too, that shit was so ugly
>>
>>102735790
Ah shit fucked up the previous thread. Sorry.
Previous: >>102704929
>>
File: 1671959761982970.png (525 KB, 728x900)
525 KB
525 KB PNG
What are you working on /gedg/?
>>
>>102736037
Yeah I probably will, it will give better answers than all of /g/ put together and won't give me any sass about it, unless I ask it to.
>>
>>102736016
It's fine to use AI just don't take it for granted and don't make it write code for you
>>
>>102736067
isn't that how source games work? afaik they basically start a local single player server that runs in BG and you interact with it thru a client. I guess this approach would trivialize adding multiplayer later on
>>
>>102737058
Look into using anisotropy for your ground texture.
max_anisotropy: f32
gl.GetFloatv(gl.MAX_TEXTURE_MAX_ANISOTROPY, &max_anisotropy)
gl.TexParameterf(
gl.TEXTURE_2D,
gl.TEXTURE_MAX_ANISOTROPY,
max_anisotropy,
)

Otherwise great job!
>>
>>102737299
Roof ridge capping. which sound like it should be in >>>/diy/
>>
File: water.webm (2.48 MB, 640x480)
2.48 MB
2.48 MB WEBM
quickly added texture scrolling to the water just because it looked a bit weird being totally static

>>102737489
I want it to be nearest neighbour filtering for the textures and then just blend the mipmaps a but to avoid the noisy output at a distance and I think this already works pretty well. Also is this an odin code snippet?
>>
>>102737806
I don't know what happened mid sentence there
>>
Alright now I've studies archetype version of ECS and I can see why it is preferred.

For now I'm just going to program a "quick and dirty" ECS so I can actually progress on the game.

Each component container will be a sparse set. stored in an array.

With this I should be able to write wrappers for my guile scripts and create new components dynamically.
>>
>>102735790
Gayes idea I have yet conceived
>monopoly+dating sim+RPG
>stats Muscle, Trendiness, Intelect, Charisma
>every space belongs to different girl skills with different stat demands
>when players lands on a space, they will go on a date with the girl of the space
>if player is able to date same girl thrice, they can marry them
>instead of moving player can choose to train one of their skills
>>
>>102737806
nice the scrolling texture is a nice touch. Yes it's an odin snippet. I recommended anisotropy cause it improved the look of my game quite alot.
>>
>>102737924
what happens if I land on your wife tile? Do I cuck you?
>>
Guys, is traditional OOP but with COM-style custom-implemented QueryInterfaces (with each interface being a separate class that doesn't inherit anything, QueryInterface checks if an object derives from said interface and casts it as it, etc) a good idea for a simulation game?
>>
>>102737872
nobody asked but I personally think a lot of ECS implementations are totally overkill, especially if you're making your own instead of using something like FLECS.

I just do the lazy version and don't even bother with sparse data, I just allocate one big entity buffer and iterate over everything like that. Systems in this case are just functions that iterate over the entity array and do stuff with entity data. It isn't really slow nor does it waste that much memory in my specific case at this point.

If I really needed to I could break it down into more composable parts and do more SOA stuff. Even with a lot of concurrent entities of varying types with varying systems running over them it hasn't really caused any issues yet. I'm targeting very low end hardware too, but I'm just waiting to see if it ever does become an issue before I go crazy with the ECS stuff and I think it would be trivial to restructure the entity data to be more composable and contiguous in memory if need be.

>>102738013
I really like odin a lot and way more than all of other competing new compiled languages like zig or rust. It still isn't C however, I still do some stuff in it almost every day just for fun tho and maybe I'll do a serious project with it in future when it's 1.0 or something. Looking forward to playing with this tilde backend stuff whenever that's going to be ready.

>>102738125
I don't know what that means
>>
>>102737872
>guile
you're embedding guile? I was looking to embed a lisp flavor too, why did you chose guile? post code.
>>
>>102738125
yeah, it's good as long as your COM interface operate on an array of objects, not individual objects, or at least in the majority of cases.
>>
>>102738037
yes, the idea is you can cuck other players, but every girl has different loyalty so some more loyal to their husbands
>>
>>102738370
And how do you lose the game? All the girls are married?
>>
What's the best way to encapsulate game objects in a life simulation games?
Traditional OOP? COM? Unity-style gameobjects? ECS? Or just global functions with POD (i.e C style)?
>>
File: pbbg.png (519 KB, 1920x1080)
519 KB
519 KB PNG
Building text-based sci-fi strategy games on web stack (PHP) go brr
>>
>>102737924
Sounds awful. Go for it.
>>
>>102738370
this sounds fucking amazing, I've always wanted to make a similar idea called "bodybuilder simulator". The gameplay would be a lot like stick RPG and the goal would be to get a gf at the end of the game. Girls would find new reasons to reject you and the goal would shift to addressing whatever that new issue was, like you have to take hair growth medication, steroids, wear height boosting shoes etc Just all of the redpill manosphere memes taken to their extreme in vidoegame format
>>
>>102738564
>tfw you are a 666 man yet you still need to pull a bank heist to impress mid post wall roastie
>>
>>102738512
ECS is the better "general" solution and a general solution will pretty much always be worse than one that's optimised for a specific use case

>>102738581
it really do be like that sometimes...
>>
File: 2024-10-08_15:19:38.png (12 KB, 1913x1056)
12 KB
12 KB PNG
>>102738272
>post code
Analysis paralysis made me dump a bunch of it. I don't know why I can't decide on any of this shit. I feel so sick mentally lately and I hate it.

What's left is my game clock. Here's a partial snippet.
(define game-time
(make-game-clock 0 0 0 1 'Jan 1000))

(define game-time->string
(lambda ()
(string-append
(symbol->string (assq-ref game-time 'month))
"/"
(format #f "~2,'0d" (assq-ref game-time 'day))
"/"
(format #f "~4,'0d" (assq-ref game-time 'year))
" "
(format #f "~2,'0d" (assq-ref game-time 'hour))
":"
(format #f "~2,'0d" (assq-ref game-time 'min))
":"
(format #f "~2,'0d" (assq-ref game-time 'sec)))))

(define game-months .. )

(define next-game-month
(lambda (month)
(let loop ((lst game-months))
(cond
((null? lst) #f)
((eq? (car lst) month) (car (cdr lst)))
(else (loop (cdr lst)))))))

(define increase-game-time
(lambda (hours minutes seconds)
(let*
([year (assq-ref game-time 'year)]
[month (assq-ref game-time 'month)]
[day (assq-ref game-time 'day)]
[hour (assq-ref game-time 'hour)]
[min (assq-ref game-time 'min)]
[sec (assq-ref game-time 'sec)]
[tot-seconds (+ seconds sec)]
[final-sec (modulo tot-seconds 60)]
[tot-minutes (+ (+ minutes (quotient tot-seconds 60)) min)]
[final-min (modulo tot-minutes 60)]
[tot-hours (+ (+ hours (quotient tot-minutes 60)) hour)]
[final-hour (modulo tot-hours 24)]
[tot-days (+ (quotient tot-hours 24) day)]
[final-day (if (>= tot-days 31) 1 tot-days)]
[final-month
(if (>= tot-days 31)
(next-game-month month)
month)]
[final-year
(if (and (eq? month 'Dec) (eq? final-month 'Jan))
(+ year 1)
year)])
(make-game-clock final-sec final-min final-hour final-day final-month final-year))))


Script posted the white message. Blue was typed in the console.
>>
>>102738627
Ran out of space in my post. Here is the code that I use to hook Guile up to the console. Blue message is handled on the C++ side by typing in the console. Guile side can print white or red (error) messages. Rather than my typical behavior I didn't make the console from scratch with a graphics API, like my old raylib and Vulkan consoles. I used imgui.

static nbm::console* game_console;

SCM guile_console_print(SCM scm_text)
{
char buffer[1024];
char* text = scm_to_utf8_stringn(scm_text, NULL);
{
SCM game_time = scm_variable_ref(scm_c_lookup("game-time->string"));
SCM result = scm_call_0(game_time);
char* result_cstr = scm_to_utf8_string(result);
snprintf(buffer, sizeof(buffer), "[%s]: %s", result_cstr, text);
free(result_cstr);
}
free(text);

if (game_console != nullptr)
game_console->append(nbm::console::color::None, "%s\n", buffer);
return SCM_UNSPECIFIED;
}

SCM guile_console_error(SCM scm_text)
{
char buffer[1024];
char* text = scm_to_utf8_stringn(scm_text, NULL);
{
SCM game_time = scm_variable_ref(scm_c_lookup("game-time->string"));
SCM result = scm_call_0(game_time);
char* result_cstr = scm_to_utf8_string(result);
snprintf(buffer, sizeof(buffer), "[%s]: %s", result_cstr, text);
free(result_cstr);
}
free(text);

if (game_console != nullptr)
game_console->append(nbm::console::color::Red, "# %s\n", buffer);
return SCM_UNSPECIFIED;
}
>>
>>102738488
yes


>>102738564
that sounds hilarious
>>
v64tng.exe

Repo: https://github.com/mattseabrook/v64tng
Discord Server: https://discord.gg/a2JSfPsfuw

Project Description:

We are re-creating The 7th Guest, from scratch, in C++ 20 using VULKAN (originally written in pure ASM in 1993.)

Why? It's a hobby project, but eventually the baseline code will be forked into new Open Source projects, such as a modern 4K Point-and-Click FMV Game Engine eventually, but first I want to publish a permissive alternative to BINK, and stuff like this that falls under GPL license (Graeme Devine went on to work for iD Software, and wrote most of the Quake 3 code outside of the renderer- the opening video sequence, and the underlying ROQ format, is literally this work from The 7th Guest.)

Completion (baseline code): 85%. Currently finishing the procedural VULKAN implementation rendering loop, and main game loop. All that's left after that for MVP is Input handling.

Completed:
- 8-bit RGB Bitmap decoding
- Delta Bitmap decoding
- LZSS Decompression
- PCM/WAV data
- MIDI playback (XMI converted to MIDI)
- Command-line Tool utilities (switches are provided to work with, and extract, all of the game assets)
- win32 stuff

In Progress:
- VULKAN Shaders for 2D
- Last couple VULKAN functions that actually draw our prepared RGB data to the screen

Next:
- Implement std::thread anywhere it makes sense - LZSS decompression, Delta Bitmap Decoding
- Look at statically embedding Real-ESRGAN NCNN C++ CUDA into the engine for A.I. upscaling the original graphics ( https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan )

Nice-to-have:
- CUDA Implementation (OpenCL sucks) for the Bitmap/Delta Bitmaps, to support large resolutions and frame-rates
- Cross-platform (I prefer #ifdef statements within the same source files.)

Please feel free to jump and take ownership, or do anything you want! I'd love to have help- I'm in my mid-40's and learning new things every day, please feel free to criticize and correct anything I've done here!
>>
first for when is the SDL3 launch
I probably won't wait up and stick with 2 but I do wonder if I have to extensively rewrite my audio thread code
>>
>>102737299
Trying to learn webgpu...
>>
>>102739157
which implementation?
>>
Man, if I could I would reimplement The Sims 1, 2, or 3 in a custom C++ engine but 1 and 2 use a custom convoluted bytecode for object scripting and 3 uses C#/mono for scripting, and I don't feel like having to implement either of those
>>
>>102739273
Sound like nodev excuses to me.
>>
>>102739273
implementing a virtual machine for those bytecode sequences might be fun
you can later do an optimization pass with an offline transpiler
>>
File: water2.webm (2.93 MB, 640x480)
2.93 MB
2.93 MB WEBM
added a bit of a sinewave effect to the water and made it scroll a bit slower, I think it looks way nicer
>>
File: file.png (99 KB, 937x589)
99 KB
99 KB PNG
>>102738627
>>102738687
that looks nice, might try guile after all. I almost picked S7.
>Analysis paralysis made me dump a bunch of it.
that's why a lot of choices can paralyze the brain, it thrives in limits and constraints instead.
there's a reason why most generic game engines die, while things like Adventure Game Studio (AGS), Renpy, and RPG maker get thousands of games even in current year.
>but unity and unreal
if you noticed a certain trend, it's always "I downloaded this 2d platformer controller", or "I used this 3D fps pack" or "I bought this advanced visual novel and dialogue system framework!". those engines are just stores for the real specialised framework anyway.

personally I found great insight by reading source available games, especially triple A studio games like modern Doom and the like. you always get a feeling of "that's it? they chose this approach?"
for example, I thought about implementing rendering as a virtual machine, as in, the game have would output some custom commands, and in the render update I just interpret them to any backend I want, maybe openGl, maybe DirectX, maybe filter them, sort them, drop some of them, hell, make a text version... I assumed this was stupid, well guess what? a AAA modern game did exactly that, that's how they handled multiple consoles and backends, that's how they handled specialised render routines for specific gpus (nvidia vs amd), that's how they had other code paths for specific gpu series (nvidia). They freed the whole game from render shenanigans, they didn't try to build a unified abstractions over multiple backends, they just filled a command buffer, and interpreted them later however they liked, in an isolated part of the project.
Another world, a game from 1991 did exactly that for the whole game itself, making it easy to port in an age where every hardware was custom. and you know the classic "can it run doom".
>>
>>102738914
i'm not sure if /gedg/ is a good place to look for contributors since a lot of anons are laser focused on their projects
and the more parasocial non-developer types that sort of hover around the /agdg/ influenced generals tend to leave when they realize /g/'s programming threads tend to lean towards technical discussion instead of project progress blogposting they can stalk
for like technical help though, sure
the other gamedev threads inherit from /agdg/'s culture of drama and prideful anti-intellectualism

like i'm really not sure why you'd want to taint a vulkan project with CUDA
AMD has ROCm and HIP and intel oneAPI and SYCL so it's less an issue of blocking other vendors and more the principle of the thing
vulkan compute's plenty capable even if you want shit like tensor core access or device driven dispatch
>>
>>102739576
btw, the game in question was Doom 3 with its Intermediate representation command list
https://fabiensanglard.net/doom3/renderer.php
there was also Titanfall (iirc) mentioned in one of their gdc talks.
>>
>>102739576
>I assumed this was stupid, well guess what? a AAA modern game did exactly that
I'm still very unexperienced when it comes to game engines, but when I look into games that have their source code leaked, or just freely available, I have a few moments where I have a similar case similar to that. It would be best described as "Wait they did it like this? That's something my dumbass would do but they still went ahead with it?"
>>
>>102739524
how do you handle object picking anon? the selection is neat
>>
>>102739611

>Taint a VULKAN project with CUDA
Fair. Graphics, GPGPU, and Game Engine are all new to me!

>Most of the people hovering around this website are mentally ill, broke, and anti-social
I know- If I can catch even one person who's IQ is 140+ it was worth it.

I'm new to /g/ , but I will make sure to just post progress updates on the Engine when it's able to be used by other people for their own projects.
>>
>>102739887
realistically vulkan compute+transfer queues give you everything those other GPGPU abstractions do, but finer-grained control and supreme portability
everything else is some kind of shitshow
the Kompute project is cool because it also gives you reusable code that runs on top of vulkan compute shaders similar to what you might get from cuda libs like cufft and cublas
>>
>>102739709
single click it raycasts against the bounding boxes in the scene, click and drag and it checks whether the object position is within the bounds of the selection box
>>
>>102740117
forgot to mention, entities have a "selected" flag which gets toggled so there's no selection buffer or anything like that
>>
god damn everyone and their mother is moving to meshlets
>>
>>102738914
>C++
unfortunate, but I'm watching the repo, it sounds cool.
>>
>>102740233
you vvill use nanite and you vvill enjoy it
>>
Can you fucks stop leaking into /agdg/
>>
File: file.png (2.02 MB, 1280x720)
2.02 MB
2.02 MB PNG
>>102740152
Understandable, not my favorite way however, I've learned when I implemented drag&drop, it's saner to have a dedicated array of indices in order to only loop ever the affected items. Not that it's hard to refactor later if you ever needed it.
I take it that the flag also affects the rendering code of the entities directly?
I'm curious how you'll implement outlines and see-through/see-behind effect for obstructed entities.
>>
>>102740501
honestly baz makes a good case for it even without visbuffer, its just the ideal way to draw arbitrary meshes that are reasonably complex because you get to cull so many tris as opposed to just regular instance culling

but I wonder what exactly that threshold is. I might implement it but the art style I'm enforcing for my game will likely keep models to <3000 verts
>>
>>102740629
rendering is just another "entity system" so if that flag is enabled when you go to draw a given entity there's another code path which renders stuff differently. Also I can iterate through the entire list of entities in like microseconds on a single thread with an old as fuck CPU so it's really no issue, this is C compiled with -O0 and debug symbols on as well
>>
>>102740717
*threshold for mesh complexity is
oops
>>
>>102739228
wgpu currently, I wanted to use dawn but couldn't get my bindings to not leak memory like crazy, and I don't want to use c++ (for which google has an official wrapper)
>>
File: file.png (1.18 MB, 1404x682)
1.18 MB
1.18 MB PNG
>>102740717
https://www.youtube.com/watch?v=M00DGjAP-mU
I don't know, this twink makes a good case against nanite, I didn't expect it to "not" support mipmaps.
It seems that we can do better with good topology and simple LoDs.
We already had massive crowds with simpler techniques
https://youtu.be/Rz2cNWVLncI?t=178
>>
>>102740818
at what timestamp does the twink talk about mipmaps? my initial thought is that the reason they don't support it in nanite is they're using software rasterization in compute shaders to draw with the visbuffer so they lose out on some of the GPU pipeline impacting mipmap access
but you don't need to go for visbuffer + software rasterizer to use meshlets
https://www.youtube.com/watch?v=8gwPw1fySMU
>>
>>102740718
>Also I can iterate through the entire list of entities in like microseconds on a single thread with an old as fuck CPU so it's really no issue
I think people underestimate the raw power of CPUs, you could go through at least multiple thousands units before even hitting any lag, and even then you can just throw the update to some other thread if you ever hit a wall.
>this is C
Based
>>
>>102740910
yeah tens of thousands or even hundreds of thousands of entities is trivial on even the shittiest hardware (wasted memory becomes more of an issue with that kind of scale however), and I'm targeting super low end hardware with opengl so actual drawing becomes the bottleneck well before then.
>>
>>102740477

I know... I know... I was C only from the mid 90's until A.I. came out

It is cleanly above my programming abilities to engineer a VULKAN binding from scratch for C (their documentation warns about this, a lot of people want to use regular C instead of C++) at the same time as trying to learn VULKAN and follow their C++ tutorials.

It was bad enough following their tutorial and having to convert each section from Classes to Procedural... at least the way I'm using C++ isn't bone-headed.

After seeing the Man-Made-Horror-Beyond-Comprehension that is NodeJS-Electron-TypeScript etc etc, I am curious- What language would someone use to create a Game Engine for Windows? (Keyword create, not use libraries or existing game engines)... Seems like C/C++ is the only reasonable choice for performance and distribution (again as someone in their mid-40's, it is Dead Wrong for all of these solutions / Indy software to have 100 to 400 files in the directory that aren't even the game assets, when you could produce a statically linked EXE or use a reasonable amount of DLLs)
>>
Any basics for game design? I have rendering the basic map working fine, but what do I do for the menu? Right now it just goes to an entirely different scene, but I want it to show the menu on top of the existing scene. Ideally it would also not process events for the existing scene, I'd prefer not to have bugs like the duplication glitch from those Pokemon D/P remakes.
>>
>>102741089
>their documentation warns about this, a lot of people want to use regular C instead of C++
are you serious? I wouldn't touch Vulkan then, thanks for the head up.

>I am curious- What language would someone use to create a Game Engine for Windows?
Zig? it's super nice with super easy C bindings, you can straight up import C headers and use them as is, it's worth using for the build system alone even without writing a single line of Zig code.
Maybe Odin? many people praise it and it had a bunch of good stuff going for it.
Nim? I don't like it but people are actively making GBA and NDS games in it, they have extensive frameworks. But it's a minefield for me because I hate macro magic and most libraries can be outdated.

Any language that compiles down to C, or have great interoperability with C, Carbon maybe?
look at this magic
https://duriansoftware.com/joe/the-lost-language-extensions-of-metaware's-high-c-compiler
People built advanced utilities over C since forever, you can use any scripting language to generate code programmatically. I think we should at least be free from header files and the shitty build systems.
Sadly C++ is looking like a cancerous amalgamation of features without showing any signs of stopping. They didn't lie when they said C++ is a test ground for features for other languages.
>>
>>102738146
>ent.ent_cnt > ENT_MAX
>>
>>102739576
>it thrives in limits and constraints instead.
True

>>102740818
Guy is thorough haha
https://youtu.be/QAbEE9bLfBg?si=1WiIWvwWXQ2S0tNu
>>
I think I have devised one of the most stupid things imaginable https://godbolt.org/z/acb337Gj6
>>
>>102741682
full scene depth prepass is kinda nutty
skipping the fragment shader makes it cheaper than a regular color pass but its still a lot of geometry that will probably not even be in the frame
>>
>>102741089
>It is cleanly above my programming abilities to engineer a VULKAN binding from scratch for C (
There's no need to do that, Vulkan is a C API. It plays nicely with C++. I wouldn't even bother writing C++ class abstractions around it but if you want there's Vulkan HPP. Its gay though.
>>
>>102741777
>the most stupid things imaginable
https://github.com/godotengine/godot/blob/master/core/object/object.h#L170
g*dot already got you covered on that front lucky get senpai
>>
>>102741912
No you don't understand, the engine is general purpose so everything HAS to be basically a giant dict of every data type imaginable
>>
>>102741653
>implying
>>
>>102741821

I gotta get some better VULKAN documentation, but I honestly want to move on to other aspects of the project, and other projects. Basically what happened was, the tutorial on their site was Class OOP C++ draw a triangle, so converting that to procedural C++ 20 and the fact our use case is just 2D rendering 8-bit RGB data to the window- the code was able to go from 1000 to 600 lines or so.

I want to save this as a procedural VULKAN boilerplate for future use, but you all definitely have me thinking of C over C++ (there are some really cool C23 books dropping this month and next month from Manning and No Starch.)

All this implementation will ever do is render 8-bit RGB data to the window, at specific frame-rates to achieve "pre-rendered sequences" - This type of stuff is all learning and new for me (which is why I'm doing it!) so forgive me!
>>
>>102741089
C++ is still the best choice to make a game engine
>>
>>102741821
What don't you like about the C++ headers?
>>
>>102742231
I don't have any "reasonable" complaints, but coming from mostly a C background they just amount to RAII wrappers for vulkan data and desu you don't really need that because vulkan "objects" have a very well-defined lifetime. The only thing you might "delete" and regenerate is the swapchain at runtime. You can just use a deletion queue (vkguide has a good example) or deletion stack to deinit your objects at application teardown or renderer teardown/restart.

But I do everything in snake_case so ymmv
>>
>>102738514
Kino. What's your architecture?
>>
>>102742362
>RAII wrappers for vulkan data
Wrong.
>>
anyone tried to reimplement sasha sannikov's radiance cascades in 3d?
i did the 2d version but can't quite get the 3d version of merging, i get massive artifacts around the cascade boundaries
>>
My favorite part of programming is doing everything so shittily at first, then once the brilliant abstractions hit you - going through it and implementing all of them.
>>
I have an idea of how to make characters talk in a video game when you feed them sound files. You can use the intensity of the waveform to make their mouth open or closed based on that. Does anybody know how "A E I O U"-style lipsyncing is done? For all those virtual games where the character has more organic lip movements when they speak? How would you go about discerning those different mouthshape syllables from a sound file?
>>
>>102742535
Laravel + Livewire
>>
I have tried a hubdred times to make a roguelike or 2d platformer and each time I give up.
>>
>>102745800
Why?
>>
>>102745811
Because it gets too hard. Doing artwork, music, design, programming, all that shit at the same time. Progress is so fucking slow
>>
This will probably be a waste of time but I want to try SDL's new GPU stuff, the wiki seems to have decent documentation
>>
>>102745800
randy detected
>>
>>102745845
>Because it gets too hard. Doing artwork, music, design, programming, all that shit at the same time.
That's part of the fun of gamedev. The difficult.

>Progress is so fucking slow
That's life, embrace it.
>>
where do you guys find creatives to work with, I don't want to think about neither story nor level design, I just want to implement stuff to learn UE
is there a board on 4chan where I'll find them? /lit/?
>>
>>102746898
You're going to have to narrow that down from "creative" to an actual skill like art or music or writing
I don't suggest trying to work with amateur designers
>>
>>102746936
>You're going to have to narrow that down
don't people usually do everything on their own, art, music, writing and implementation?
>I don't suggest trying to work with amateur designers
why not? I just wanna learn UE on the side for fun, I do have pretty good work ethics and almost always finish my side projects
I just started working with some default assets and quickly found myself after implementing some base mechanics. I'm simply not interested in artsy stuff myself. I'd do it if I were passionate about video games but I pretty much just want to learn a new tool.
>>
>>102746985
>quickly found myself
quickly found myself stuck*
>>
>>102746985
If you're not passionate about video games why do you want to work on a video game? I was going to suggest you joint someone elses project if you only want to do programming but if you don't have experience or interest that kind of limits your options
>>
>>102747003
>why do you want to work on a video game?
I mean I enjoy games I just don't have a vision for them, that's what it would take for a one man project. Otherwise solving problems using tools is fun? I mean that's the whole essence of programming, it tickles my brain.
>if you don't have experience
I'm a robotician so 3d stuff is fine with me, I've got a bunch of C++ exp as well. I've even written raw CUDA to accelerate some algos before.
>joint someone elses project
yeah that's exactly what I thought too, where do I find someone who wants to do everything but the implementation.
>>
>>102747046
You might try asking on /agdg/ where is where the more creative game developers hang out but tools like Unity mean they kind of don't need people to do the programming for them anymore
You could try porting or remaking existing games
>>
Where can I find tutorial or videos that introduce new multiplayer functions introduced in Unity 6?
>>
>>102736339
cute
>>
>>102747071
>You could try porting or remaking existing games
actually a great idea, I might do something dumb like try to remake portal in UE
>>
File: Capture.png (49 KB, 209x260)
49 KB
49 KB PNG
>>102747111
>>
>>102747468
Yes that's who made the post now answer the Sirs question
>>
>>102746736
KEK
>>
>>102747482
sorry, I just thought that guy's face was hilarious.

>>102747111
unironically ask copilot
>>
fixed my coordinate system today in my Vulkan engine.

X+ was progressing from right to left.

Remember, if you're using Vulkan, make your Up vector be -1.0 in the Y. -Y is up in Vulkan.
>>
>>102736050
nta but as someone with 25 years of experience "nearly 15 years" is laughable. You think you've come so far, but you know nothing.
>>
>>102748267
nta but as someone with 35 years of experience "25 years" is laughable. You think you've come so far, but you know nothing.
>>
>>102748267
I have 2 years of experience and I feel like I already know everything
>>
>>102748275
I believe you. I'm not looking forward for 10 more years of suffering, but I am looking forward to looking back and thinking I had it great now.
>>
>>102736339
whats the rendering code?
fragment shader code?
youd better use a texture array or 3d texture instead of just binding textures, as if i recall correctly every machine has got a limit on how many textures you can bind to a shader program
>>
File: renderdoc-debug.png (47 KB, 658x739)
47 KB
47 KB PNG
Here is an article Vulkan users may find interesting, Some of you may not know about labels. Normally when using Renderdoc, it will just dump a list of the command buffer API calls, and it gets messy. So it makes sense to be able to group the calls for the sake of your own sanity!

https://wunkolo.github.io/post/2024/09/gpu-debug-scopes/

vulkan-tutorial.com, a common tutorial for learning Vulkan, goes through using the debug extension, but only to print debug information. This is obviously important, but there are other things you can do with the extension.
>>
https://vkguide.dev/docs/extra-chapter/graphics_analysis_metafor/
>>
when I move in the X+ , I notice my Z is also changing. This is some problem with the movement code right? It isn't supposed to change, right?
>>
>>102748482
If it's changing by 0.000001 it's just float things
>>
>>102748513
no it changes by a whole full number. Like more than 1.0.
>>
>>102748482
This is the type of question you really shouldn't be asking
>>
>>102748482
Nobody can help you unless you provide the code. Yes, something is very wrong. Imagine you told someone to go north and they also went west.
>>
>>102748644
yes, I have been hacking away at an engine without taking the time to take a week off to study math. now what
>>
>>102748695
Yeah, I know that it is wrong. Guess a better question is, why is it like this? I know it is wrong.

My movement code is basically from LearnOpenGL.

Here is my mouse_look code, I suspect maybe something with changing the direction.


void mouse_look(double x, double y, float delta_time){

if(first_mouse){

last_x = x;
last_y = y;
first_mouse = 0;

}


double x_offset = x - last_x;
double y_offset = y - last_y;

x_offset *= -1.0f;
y_offset *= -1.0f;

last_x = x;
last_y = y;


float sensitivity = 0.1f;
x_offset *= sensitivity;
y_offset *= sensitivity;


yaw += x_offset;
pitch += y_offset;


/*
float sensitivity = 0.1f;
x = x * sensitivity;
y = y * sensitivity;

yaw += x;
pitch += y;
*/

if(pitch > 89.0f){
pitch = 89.0f;
}
if(pitch < -89.0f){
pitch = -89.0f;
}

vec3 direction;
direction[0] = cos(glm_rad(yaw)) * cos(glm_rad(pitch));
direction[1] = sin(glm_rad(pitch));
direction[2] = sin(glm_rad(yaw)) * cos(glm_rad(pitch));

glm_vec3_normalize_to(direction,camera.forward);

// Build new right direction from new forward direction
glm_vec3_cross(camera.up,camera.forward,camera.right);
glm_vec3_normalize(camera.right);

// Recalculate Up vector to ensure orthogonality
glm_vec3_cross(camera.right, camera.forward, camera.up);
glm_vec3_normalize(camera.up);

vec3 cam_target;

glm_vec3_add(camera.position,camera.forward,cam_target);
glm_lookat(camera.position, cam_target, camera.up, vk_context.view);

vk_write_to_device(&vk_context.device, &vk_context.transform_ssbo_memory, &vk_context.view, 0,
sizeof(mat4),0);

}
>>
>>102748712
It would behoove you to learn about linear algebra and spatial transformations. There should be some resources in the compendium from which you can learn. The linear transformations (matrix transforms) are hard for people when they first start learning.

>>102748748
On /g/ you can put your code in a codeblock like so
[spoiler][/spoiler]
but replace "spoiler" with "code". It will make your stuff easier to read.

This is a third-person camera. The context of your question has changed then, I think. What do you mean when you say you are "moving in the +X". Are you talking about the target of the third person camera?
>>
>>102748482
>>102748841

I get it now, and ignore what I said about the third-person camera earlier. I wasn't reading your code properly.

Don't mix up the mouse's y and x with the world space x, y, and z. By x and y you just mean the yaw and pitch?

Changing the yaw means sweeping an angle in the xz plane in your coordinate system. Your world space Y is the world up, so that should only change when you modify the pitch.

The way you phrased your question earlier made it seem like you were translating something and didn't translate properly. Its natural to assume you were talking about world space.
>>
>>102748841
Yea I intend to go through this:

https://gamemath.com/

I just haven't got around to it, keep just coding.


>>102749091
I'll just look back on LearnOpenGL. I'm confused about how to really respond to your post. It's my fault, I'm sure. I need to recluse again.
Thank you for responding.
>>
File: board.png (759 KB, 2507x2507)
759 KB
759 KB PNG
>>102737924
Here is the board.
The idea is that player will decide the direction of their movement before they roll.

Center of the board is designed for career success/failure, middle ring for improving primary attributes, and outer ring for improving bedroom skill (which is post-date minigame).

Pink spaces are for dating, each space responds the specific girl.

Just can't figure out what I should do with grey spaces, maybe some global events?
>>
is metahuman creator only free for commercial use with unreal? I kinda wanna generate some characters and then texture paint their faces onto shitty lowpoly models like in the 90s
>>
>>102749486
this isnt monopoly wtf
>>
>>102749821
Wait a minute... This isn't monopoly...
This is anal sex!
>>
I don't get it, could I get the AI to help me understand a few things?
>>
Is there an alternative to https://github.com/andyborrell/imgui_tex_inspect/ that's been updated recently and works with the latest imgui?
>>
>>102749863
Yes, just make sure to use copilot so it can give you references that you can use to verify it's not hallucinating. Retar/g/s will tell you to read a 3000 page book or something.
>>
>>102750070
There's nothing more retarded than having to use an AI assistant because you don't know how to program
>>
>>102750108
>hey AI, tell me how <x> works
>>NOOOOO YOU NEED TO READ A BOOK INSTEAD!!!
That's how you sound you fucking ludite.
>>
>>102750180
It's less reliable Google
>>
>>102750108
because you don't know how to read*
>>
I feel like I should just ask the Ai where to start and go read the actual book
>>
>>102750194
If you ask it for stupid shit maybe. If you keep a fresh chat and ask for general concepts it's fine (copilot is at least, I don't know about bots that don't give references to their shit).
>>
File: lowwitcher.png (804 KB, 1345x691)
804 KB
804 KB PNG
this is aesthetic is high tier
>>
>>102750269
If you ask Google for general concepts, it will give you correct results
If you ask an AI, it might give you correct results
>>
alright, so here is my code.
I may need to use quaternions because this is basically directly from LearnOpenGL and the camera works well, it is just that the camera position keeps updating Z when I'm moving in X.

And this only happens after I move my mouse, so the mouse_look function is responsible.

I hear Quaternions can allow me to arbitrarily rotate about a particular axis, so perhaps that's the solution here?


void mouse_look(double x, double y, float delta_time){

if(first_mouse){

last_x = x;
last_y = y;
first_mouse = 0;

}


double x_offset = x - last_x;
double y_offset = y - last_y;

x_offset *= -1.0f;
y_offset *= -1.0f;

last_x = x;
last_y = y;


float sensitivity = 0.1f;
x_offset *= sensitivity;
y_offset *= sensitivity;


yaw += x_offset;
pitch += y_offset;


/*
float sensitivity = 0.1f;
x = x * sensitivity;
y = y * sensitivity;

yaw += x;
pitch += y;
*/

if(pitch > 89.0f){
pitch = 89.0f;
}
if(pitch < -89.0f){
pitch = -89.0f;
}

vec3 direction;
direction[0] = cos(glm_rad(yaw)) * cos(glm_rad(pitch));
direction[1] = sin(glm_rad(pitch));
direction[2] = sin(glm_rad(yaw)) * cos(glm_rad(pitch));

glm_vec3_normalize_to(direction,camera.forward);

// Build new right direction from new forward direction
glm_vec3_cross(camera.up,camera.forward,camera.right);
glm_vec3_normalize(camera.right);

vec3 cam_target;

glm_vec3_add(camera.position,camera.forward,cam_target);
glm_lookat(camera.position, cam_target, camera.up, vk_context.view);


vk_write_to_device(&vk_context.device, &vk_context.transform_ssbo_memory, &vk_context.view, 0,
sizeof(mat4),0);

}
>>
>>102750306
If you ask google for general concepts you will get 30 SEO-optimized AI spam sites that try to bait you into paying for a subscription.
>>
>>102750322
and btw. It updates both X and Z. That's the problem, X should only be moving if I am moving right.
>>
>>102749821
it is a bit expanded
>>
>>102750275
Would be kino with a pixel art shader.
>>
>>102750326
No you won't, you'll get high quality correct resources telling you exactly what you need to know
Have you never actually Googled a programming question before? lmao
>>
>>102750342
Only if the camera is looking straight forward
>>
>>102740818
Nanite was designed for scenes with 1+b tris. The twink tests it on 5m tris scene. Stopped watching right there. He has no idea what he is talking about. All his definitions are incorrect.
>>
>>102750322
needs the cglm library
#include <cglm/cglm.h>

void mouse_look(double x, double y, float delta_time) {
if (first_mouse) {
last_x = x;
last_y = y;
first_mouse = 0;
}

double x_offset = x - last_x;
double y_offset = y - last_y;

last_x = x;
last_y = y;

float sensitivity = 0.1f;
x_offset *= sensitivity;
y_offset *= sensitivity;

yaw += x_offset;
pitch += y_offset;

if (pitch > 89.0f) {
pitch = 89.0f;
}
if (pitch < -89.0f) {
pitch = -89.0f;
}

// Create quaternion from Euler angles
versor q_pitch, q_yaw, q_roll, q;
glm_quatv(q_pitch, glm_rad(pitch), (vec3){1.0f, 0.0f, 0.0f});
glm_quatv(q_yaw, glm_rad(yaw), (vec3){0.0f, 1.0f, 0.0f});
glm_quatv(q_roll, glm_rad(0.0f), (vec3){0.0f, 0.0f, 1.0f});

glm_quat_mul(q_yaw, q_pitch, q);
glm_quat_mul(q, q_roll, q);

// Rotate the forward vector by the quaternion
vec3 direction = {0.0f, 0.0f, -1.0f};
glm_quat_rotatev(q, direction, direction);
glm_vec3_normalize_to(direction, camera.forward);

// Build new right direction from new forward direction
glm_vec3_cross(camera.up, camera.forward, camera.right);
glm_vec3_normalize(camera.right);

vec3 cam_target;
glm_vec3_add(camera.position, camera.forward, cam_target);
glm_lookat(camera.position, cam_target, camera.up, vk_context.view);

vk_write_to_device(&vk_context.device, &vk_context.transform_ssbo_memory, &vk_context.view, 0, sizeof(mat4), 0);
}
>>
>>102750365
So nanite is trash for anything anyone here would be doing
>>
>>102750361
the Z is increasing too drastically for it to be due to a slight angle difference. It's like going up beyond 1.0 in its increments.
>>
>>102750369
Lol this is a code snippet, I have that included already.
>>
File: Capture.png (45 KB, 712x464)
45 KB
45 KB PNG
>>102750346
ok
>>
>>102750399
it's more intuitive to ask AI than comb through stack over flow conversations.
>>
>>102750399
I'm intetrested to see what AI would tell you in response to that nonsense question
>>
I want to make my game be portable (i.e easy to port to multiple platforms) but only have one graphics API. The primary choices are: Legacy OpenGL, Modern OpenGL, or a custom software rasterizer. I am actually considering the first choice (legacy opengl) because it really opens up the pool of potential platforms to port to a lot, and allows me to do stupid shit like port to the dreamcast or wii (which only support GL 1.x). Software rasterizer is a close second but I worry if it will be a performance bottleneck, even on my PC (I plan to mainly target desktop computers; porting to random platforms would just be for fun to be honest) which is pretty beefy (i7-8700k, 32GB ram, RTX 3060 12GB).
>>
>>102750413
you mean you lack the ability to reason or understand things so you get the computer to do it for you
>>
>>102750445
No, it actually is not good at problem solving and when I've tried to use it for that, it feels spectacularly.

I use it like a textbook, pure information on concepts.
>>
>>102750433
The "I want to port my program to every stupid platform under the sun" question is getting very tiring
You will never do this, you project will most likely never run beyond your own system
>>
>>102750399
That's not a programming question, it's babies first 101 to unity question.
>>
>>102750459
>it feels spectacularly
>>
>>102750433
I tried this with my languagedev and it became an absolute pain in the ass trying to compile to windows so much that have yet to have a build and I'll probably will have to write it from scratch for windows and linux gets just wine.
I'll never fall for the portability meme ever again
>>
>>102750433
I was considering this but I looked at the Steam Hardware Survey and realized that most people have a card above the 650 and Vulkan's minimum card is the GTX 650.
>>
>>102750459
If it's not good at solving problems why are you using it?
It's solving basic problems for you, depriving you the opportunity to do it yourself
>>
>>102750502
>absolute pain in the ass trying to compile to windows
Skill issue, it's easy as pie for me to compile a GL1 app on Windows using cmake
>>
>>102750527
For information on concepts.

Do you have to 'discover' all of the concepts you know? No, you read up on it.

It has consistently failed me when I try to get it to solve even very basic problems.
>>
>>102750464
It's just for fun.
>>102750507
And?
They can still run GL1
>>
>>102750433
Target OpenGL 4.1 that way you get the most modern OpenGL api that run on the 3 big OS.
Porting to old system is a pointless endeavour only done for cool boy point on youtube.
>>
>>102750554
Well, I want to use Vulkan.
>>
>>102750549
You're using an inferior tool to do research because you can't be bothered to learn to do research yourself
>>
>>102750372
Yeah, pretty much. Unless you are doing a movie or a (specific) archviz. It's aimed at high-end graphic, not hobbists. It is going to be interesting in a few years with new console gen. Will all AAA studios switch? Seems that's Sweeney's goal. Nanite is still in a discovery phase, though it's already been shipped in Senua, et al.

Although let's see how Epic's Fab for high quality assets will change things. Will it result in more better looking indie slops?
>>
>>102740233
>meshlets
will they ever learn?
>>
>>102750554
Yes we get a hundred people asking about porting their program to their 286 "just for fun" and of course they never do it
It's like the /g/ version of idea guys
>>
>>102750538
lol
lmao
as soon as you start getting outside the lines call me back homie
>>
File: vulkan.png (47 KB, 250x216)
47 KB
47 KB PNG
>>102750586
based
>>
>>102750606
Tim Sweeney seems like he has his head too far up his own ass, Nanite looks interesting but I'm thinking AAA companies will probably write their own version of it instead
>>
>>102750645
>outside the lines
What do you mean by this?
>>
>>102750659
I think Remedy, id, and DICE/Frostbite have probably already surpassed UE5
https://www.remedygames.com/article/how-northlight-makes-alan-wake-2-shine
>>
>>102750637
it's very tiring.
>>
>>102750689
But that looks like shit compared to UE5.
>>
>>102750689
The black bitch in this game was really hot
>>
>>102750365
watch the other frame analysis videos you nigger, unreal is pushing Nanite as the defacto render pipeline, there's no "Nanite was designed for X", Nanite is all you'll have in the future.
>>
>>102750817
compare Silent Hill 2 Remake to Alan Wake 2. They both start out innawoods. The forestry is way more detailed and animated in AW2.
>>
>>102750998
The lighting is also insane. Shame it's wasted on a mediocre game.
>>
>>102750399
>typing full sentance questions into a keyword search engine
clear sign of someone being retarded beyond help
>>
>>102750399
>>
>>102751035
The game has a content problem and I don't understand why Remedy thinks "black shadow man" makes for a spooky enemy roster. Its just lame. They should make an actual horror game sometime with this tech. Its super atmospheric.
>>
"Noooo you can't just use OpenGL 1.x! I want to make my graphics look hyperrealistic! I want to lock myself to shitty shader apis and be subject to the whims of shader-based GPUs!"
Haha FFP go brrr
Kneel before your true masters, the OpenGL1 GODS
>>
>>102751369
OpenGL 1.1 is easy to use but I don't think there's any documentation on it anymore
I learnt to use it from looking at another engine
>>
>>102751401
>I learnt to use it from looking at another engine
What engine?
>>
>>102736339
I'm too used to c++, how would I even organize stuff in C? I like using classes and such.
>>
>>102751431
blitzmax
>>
>>102751369
I don't even know what you mean.
I keep an open mind, if OpenGL1 gives more memory control than Vulkan and can multi-thread then ofc I'd prefer it since you get more compatibility and using old stuff is ofc very cool.

Also this is intriguing, shader-based GPUs versus what? Very interesting.
>>
>>102751369
I don't know why you'd so loudly proclaim "I got filtered" here.
>>
>>102751869
The audacity of you to say this when the likes of YOU have been filtered by GL1.
>>
>>102751909
You're normally supposed to be filtered by Vulkan and then whinge about it on here, but you're just an extra level of sad.
>>
>>102751991
Whining? Who's whining? You are, about OpenGL 1.x. All I'm doing is WINNING.
>whinge
epic spelling mistake, I win
>>
File: Capture.png (20 KB, 649x409)
20 KB
20 KB PNG
>>102752019
delete
>>
>>102752113
Mad
>>
>>102751529
I think anon means in early OpenGL you could do everything in immediate mode, when did not require use of shader programs.
>>
>>102751369
weak shitpost, actual progress posting is better than boosting about stuff you're not even doing
I remember openGL 1 not supporting render textures at all, so you cannot render to any buffers.
>>
>>102752459
So? Ask yourself, do you really need a texture to render to? If no, then I'm right
>>
>>102752499
>do you really need a texture to render to
yes, you can do a lot of stuff with texture targets, including emulating shader effects such as custom texture masking, or abusing the color functions for some cool effects.
in fact you can't do any standard visual novel effect except the fading to transparency or fade to black for example.
inb4
>use case?
>>
Would it be a good idea to decouple each module of my game/engine code into separate DLLs/"shared libraries"? I.e have separate DLLs for:
>renderer/graphics
>ui
>sound
>game logic (this could be split further into even more dlls)
>>
>>102752662
what problem does this solve?
>>
>>102752677
None, I'm just wondering if I can separate game/engine code into separate DLLs is all
>>
>>102738627
It's hilarious, years ago people yelled at me for being stupid for wanting to use scheme/lisp as a scripting language, now people are doing it.
>>
>>102752867
frosch isn't people
>>
>>102751401
The old documentation still exists, just get yourself the reference manual & programming guide.
>>
https://github.com/frida/tinycc/blob/main/libtcc.h
Would this make for a good scripting backend?
>>
>>102752695
with the right API boundary you can, but you're probably leaving at least some performance on the table by forcing the compiler to spit them out as discrete components
>>
>>102738146
>when it's 1.0 or something
I mean gingerbill says the language is basically feature complete, you'd only potentially gain compile time by waiting
>>
>>102752959
>scripting
For what purpose?
>>
>>102753349
NTA but didn't quake have its own C flavor for scripting? other studios also did it. It's just a preference.
>>
>screams internally
https://www.youtube.com/watch?v=RqrkVmj-ntM
>>
>>102753349
Support for scripting behavior is a big part of game engines
>>
>>102753899

you can just raycast into a plane, its like a line of code and for grid texture you do some modulo and that's like a another line of code. no LOD needed and the plane is actually infinite unlike what does does in the video (he lies btw)
>>
>>102754179
he's a sneaky fella
>>
>>102752662
I don't believe so. Maybe an architecture like (Engine/Framework > Editor | Game executable) but you create problems for no reason creating all of those binaries and linking them together like that, plus potentially miss out on some compiler optimizations. A lot of build systems kind of do a similar thing where it creates static objects for like every file and then links them together but I'm really not a fan of that. It's probably out of necessity for these very large complex C++ projects that take ages to compile, so you kind of need a system which tracks which files have been changed and only re-compiles those specific parts but I solve that problem by using C and having extremely minimal dependencies, my entire engine compiles in like 2s and I really don't anticipate it growing that much.
>>
>>102746736
>>102747505
who? zoomzoom
>>
>>102735790
What is the consensus about SDL3 going full retard?
>>
>>102754792
Looks like benefits in there, what are the drawbacks?
>>
>>102754868
>drawback
>draw back
>>
>>102754466
you're not ready for the randy pill anon, you don't want to go down the randy road.


>wake up 6am sharp, it's important to super disciplined like an ancient greek stoic
>drink $8 cold brew coffee in a plastic cup for optimal performance
>write down all the things I want to get done for the day in my new planning app I recently started using because the last 5 novelty planning apps weren't quite doing it for me
>ready for game dev work now
>use new novelty task management app which color codes and and organizes all the tasks I need to do, this one is better than the other ones I was using previously btw
>alright now time to make a mind map of the project in the new mind map software I've recently started using
>it's a 2D sidescroller game I've been working on for like a decade now
>I was thinking it would be cool to have like combat mechanics and like you can craft items?
>write it down in the new project management software I've recently started using
>alright time to work on the game now
>okay this needs to be rewritten completely from scratch for the 100th time, I'll get around to starting that tomorrow
>I only target windows, not because of skill issues or anything but because like people only play 2D sidescrolling games with a mouse and keyboard on a windows gaming PC anyway and it would be a massive waste of time to make a 2D renderer work on any other platform
>>
>>102754792
>>102754868
you are not alowed to overirde my statically linked library. begone
>>
>>102755016
I hate how this describes me minus
>making 2Dslop
>drinking coffee
>waking up at 6am and not like, 1am
>>
How do you plan and start a code project structurally?
I mean like, how should I structure the codebase, what should I implement first, what should I start with in the initial code, etc
>>
>>102754792
ehh if it helps someone like Valve maintain a game long after the dev has disappeared its OK in my books
>>
>>102755090
the only way is to just use your limited skillset and tiny little brain to do what you can in the most disgusting way imaginable and over time after writing the exact same shit in slightly different ways over and over again for years you will eventually figure out how to program properly. Anyone telling you anything else is bullshitting you, there is no possible way that you won't find whatever code you write now absolute cringe 1 year from now and this process never ends, so let go of any notion of perfectionism or standards and get cracking or make the same mistake as most of us programmers and waste a bunch of time and learning this the hard way
>>
>>102755016
>Has more hair under his lip than on his entire dome.
Why would I watch or listen to this faggot?
>>
>>102754792
How do I prevent this, aside from switching libraries or sticking with an older version?
>>
>>102755178
I watch it just to seethe and be a jealous bitch ass hater, it's cathartic in a way. He makes enough patreon money to live in fucking Thailand and larp as a game dev while I live in hell getting raped by the devil everyday

I could be working on my own shit instead of seething about randy online so he wins I guess.
>>
File: game_new.png (3.06 MB, 1911x1084)
3.06 MB
3.06 MB PNG
vros my 2D MMO is almost ready for launch. It supports 500+ AI enemies in world server whom are all networked and coordinate to acomplish goals at commander -> squad -> unit level.
>>
>>102755289
>almost ready for launch
I hate to be that guy, but it doesn't look polished enough for launch, judging from that one screenshot.
>>
>>102755289
sounds dope, look forward to seeing more
>>
File: game_2.png (3.22 MB, 1871x1038)
3.22 MB
3.22 MB PNG
>>102755309
no the game is baller. Theres loot, equips. pvp. No sign up required. I need to get around to making promotional content. i just keep fucking working. there will be even more content and base building in the future. the ai in the game is very good. the commander will mark you and send swarms of mobs at you. you have to capture territory for your faction.
>>
>>102755289
Looks very cool. What do you use to make it? QRD on the architecture, especially for 500+ AI enemies.
>>
>>102755658
Erlang
>>
>>102755274
Baldass
>Has to migrate to a far eastern shit hole to get ching ping pussy, because ching ping has "traditional values".
Yeah when this faggot was looking for a mate, women notice his hair falling out.
>I live in hell getting raped by the devil everyday
Could be worse, you could have no hair on your dome bro.
>seething about randy online
Nah, I'm alright "randy" boy.
>>
>>102755309
What's wrong with releasing early? May as well start releasing as soon as you have a title screen and such.
>>
>>102755724
that's not randy anon
>>
>>102755776
>What's wrong with releasing early?
Ask the Concord team. And CDPR, and whoever made No Man's Sky.
>>
Let's say I'm compiling my game with msys. What toolchain should I use -- mingw64 gcc, ucrt, or clang?
>>
>>102755785
Okay, randy.
>>
>>102755792
Well if you're gonna charge full price and over-promise then that might happen. But if all I promise is $0 and a title screen, no harm.
>>
>>102755792
>whoever made No Man's Sky.
The main problem with No Man's Sky was the lead dev channelled Peter Molyneux and let his excitement for his own game talk about features which weren't done, as if they were already done. So when people forked out $60, they expected to see the features he talked about, like multiplayer. They just weren't there and the game had lots of bugs which didn't justify the price tag.

The MMO dev should share their game with friends and get feedback. The great thing about doing something like a soft launch is that if practically nobody even notices it, you can just launch again.
>>
>>102755090
Just do it one step at a time. Actual work matters more than planning.
>>
>>102755180
Why do you want to prevent it? Who cares if the user does that, just say no support if you're using your own library.
>>
>>102755658
i dont know who the other reply is.

but the backend/world simulation is all erlang. the ai units are all individual processes that are synchronized by higher order processes. commanders make strategic decisions and pass work to the squad leaders who divide work among their units.

i use all the tricks to minimize bandwidth on client side. binary packets, tick delta, interest management, etc.
>>
>>102755792
what the fuck is this reply. i stopped browsing this website yrs ago...its full of crabs. nothing changed. yeah man its just like No Man's Sky, the salaries of 50+ people depend on the financial success of this game. theie children will have no food to eat and they will have to sell their houses if the game flops. I have accepted millions in preorders from fans. I wish. NO. I live in my moms house and I'm jobless by choice. Who cares.
>>
>>102756055
Calm down.
>>
>>102756055
hope you make it for yo mama
>>
File: map_editor.png (2.33 MB, 2314x1106)
2.33 MB
2.33 MB PNG
just use the right tools for the job bro. i swaer bro thats all you need. you know how comfy it is to make the map for this game? its too comfy, you can spend all day doing it. obsessing about every little detail and painting terrain and rocks and cliffs. to live in heaven would be to do it with no other stress
>>
>>102755289
>>102755408
And it's libre too? Right, my friend?
>>
>>102753899
>>
>>102756430
based t b h
>>
>>102741285

This post was DAMN informative. There are a bunch of C23 books dropping before Christmas. Apparently this is the most substantial release since C11 (when I was more in the loop, and in the C is > C++ camp.)

I am really looking forward to digging into C23 over the winter, and hope it's positive release for the community
>>
Suggest a language to use for 3D gamedev.
My notes so far on existing langs:
>C/C++ don't have a single good build system
>C is simple and effective but it's easy to shoot yourself in the foot, yada yada
>C++ has a bunch of good features, but a ton of shit you'll never need, and I feel coding in C++ has resulted in me overengineering shit
>Rust's "community" is a dumpster fire
>Odin and Nim are too pythonic-ish for my tastes
>>
>>102756811
dotnet core
>>
>>102740818
The anti-nanite anti-TAA twink is my favorite up and coming youtuber.
>>
>>102756811
you forgot
>Rust is terrible for rapid prototyping
>just use fucking CMake, basically every project supports it
>C is based just grab stb header-only libs
>>
>>102757187
>>just use fucking CMake, basically every project supports it
Note what I said: "C/C++ don't have a single good build system". No exceptions.
>>
>>102756811
sounds like zig is exactly what you're looking for
>>
>>102744460
Pretty sure some games have done that, but I couldn't name any. It'd involve a Fast Fourrier Transform.
>>
>>102744460
Just find a tool that can detect and timestamp the phenomes (there are a number of them but I don't know any CLI ones for batch processing) and prebake it into a file. Then just use blendshapes to make the character's lips match the phenome being spoken.
>>
>>102750569
Such as? What does OpenGL 4 for has over 3 other than DSA (not in 4.1)?
>>
>>102756811
Just curious, what about Odin stands out to you as pythonic? To me it's very C-like (which makes sense because that's kind of the goal of the language).
>>
>>102757627
People will call literally any language that isn't as shit a C "Pythonic"
>>
>>102753899
I was reading this blog article about grids just yesterday https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8
>>
>>102757627
not that guy but probably not having semi colons and maybe even the declaration syntax
>>
>>102757575
indirect draws, program pipelines
>>
>>102744460
https://developers.meta.com/horizon/documentation/unity/audio-ovrlipsync-unity/ , or
https://jaliresearch.com/

Basically it's ML to match sound to visemes. You define shape key for each viseme.
>>
Are you guys ready for shaders to record commands?
https://www.supergoodcode.com/device-generated-commands/
>>
I just started working on a custom archetypal ECS for my engine (ripping out the flecs dependency). In 30 minutes I already have compile time type safe systems (which is better than flecs). I'm happy I started.
>>
>>102755016
I don't know who this is, but you should:
> prefer to write with pencil, on paper, not with keyboard, in some application...
> add cigs in the mix, might as well beer or some harder drink, but don't get drunk...
> separate first 2 hours and last 2 ours in a day to yourself, without computer...
For example, wake up, make a bed, smoke a cig, drink coffee, read news...
>>
>>102758214
that actually sounds like good advice, I use txt files for all of my notes
>>
started with the math lib, but i dont understand what the lookat matrix should look like, should the axes be stored as rows or columns? rn i'm storing them as rows, should i transpose them before returning or should i leave the caller the choice to either transpose or change the multiplication order? structurally why would a math library have such a domain-specific function as lookat?
>>
>>102758353
I don't think you need to care what's in the matrix. You just call lookat, pass in your vectors, and it fills in the view matrix for you. That function is included because the library is aimed at 3D computer graphics, and view matrices are a major part of that.
>>
i spent all day configuring my editor
>>
>>102758177
This API is a lot nicer than flecs, I think. I don't know why I didn't start doing this earlier. I just made assumptions it would be too annoying/difficult to figure out. On to arbitrary system parameters and parallel execution next.

world.add_system(ScheduleLabel::Commit, []() { printf("Commit\n"); });

world.add_system(ScheduleLabel::PostUpdate, []() {
printf("Post Update\n");
});

world.add_system(ScheduleLabel::PreUpdate, []() {
printf("Pre Update\n");
});

world.add_system([]() { printf("Update\n"); });

world.add_system([](Entity e, const Velocity& velocity, Position& position) {
position.x += velocity.x;
position.y += velocity.y;
printf(
"Entity %u: Position updated to (%f, %f)\n",
e,
position.x,
position.y
);
});


Pre Update
Update
Entity 420: Position updated to (129.000000, 258.000000)
Post Update
Commit
>>
>>102756811
What about Beef?
>>
>>102754792
>SDL3
>virtual tables
that shit was since SDL1 zoomer, people were unable to really compile SDL "statically", they were so adamant about being able to patch statically linked SDL even back them. Whether you like or not is a different matter tho.
You disappointed me, I thought you posted actual news.
>>
>>102735790
anyone using memelangs? How does odin/beef/zig compare performance wise vs c++? Did a simple falling sand game in odin/beef/c++ and c++ is always much faster although it becomes spaghetti if I start using threads and chunks.
>>
>>102755016
Randy is sad
>>
>>102755795
UCRT is the safest
>>
>>102738146
>Looking forward to playing with this tilde backend stuff
please, don't.
Its not a good idea to rely heavily only on one backend, particularly on something like LLVM. So Odin has other backend projects like Tilde and codin but they won't become the primary backend anything soon. Its like a couple of doors are open in case LLVM goes wrong.

>when it's 1.0 or something
no need to wait. You can start right now. The language is stable and its mostly design decisions before reaching 1.0 so you won't be gaining anything from waiting.
>>
>>102759530
>odin
Odin is a good choice. Unlike C++, Zig and Rust, the language's simplicity really saves you a lot of development time.
Almost all benchmarks wrote Odin code as if it were an OOP lang that guarantees poor performance and Odin ended up performing poorly in those benchmarks. I tested Odin myself and it gave C-like performance.
I encourage you to perform some tests yourself as well before drawing to conclusions or seriously committing to it.
>>
>>102755016
FUCK it's over for me....
>>
>>102759602
>Its not a good idea to rely heavily only on one backend, particularly on something like LLVM
You aren't writing software that has to run on millions of different systems for decades, stop larping
>>
>>102759510
Heee? No, SDL1 was released LGPL lolicense it explicitly forbids static linking, sir.
>>
>>102756811
Why do you need a 'build system' what's wrong with a makefile?
>>
>>102759773
that's also a build system
>>
>>102759798
Then there's the good build system.
>>
>>102759819
There is no good build system for C/C++
>>
>>102759833
I just said make was good.
>>
>>102759845
It's not
>>
>>102759854
I think it's pretty good.
>>
>>102759878
Then you should try a build system in a modern language
>>
every programming language is hot garbage
>>
>>102756811
What is wrong with Meson, sir?
>>
>>102736016
>>get berated for using AI
Honestly I don't know why people would use an engine like RPGmaker if you have something like o1-preview with c.
My guess is in 2 months when GPT5 comes out it will be MUCH easier to make a 2d game from scratch than it will be to install rpgmaker
>>
>>102760203
AI is never gonna make a game for you
>>
>>102760258
It literally already has anon https://www.youtube.com/watch?v=T0IrhzrhR40
It's not much more complicated than any 2/2.5d jrpg
>>
>>102760285
that's not a game...
>>
>>102760294
define game
it has a main loop, state that is updated every frame, a frame is rendered and show to the screen. collision detection, player control etc What more does rpgmaker do? Play music?
Engines and level editors aren't necessary anymore. Just tell the AI to make it.
>>
>>102760323
>define game
Something that doesn't take 5 minutes to create
>>
>>102760338
So a wooden table is a game?
>>
>>102760608
Yes? Lots of tabletop rpgs only require a table to play.
>>
>>102760608
is this the level of discourse I should expect from AIfags
>>
>>102760802
The universe is over a billion years old so by that logic everything is a game.
>>
>>102760942
the universe is a game tho
god plays with dice
>>
>>102760942
We're living in some anon simulation game. We're nothing but creatures flopping around for his enjoyment.
>>
>>102735790
wtf my engine is in the op
>>
NEW THREAD
>>102761180
>>102761180
>>102761180

>>102740053
This

>>102739887
Well, you might attract some people. The best thing you can do is keep us posted on your progress, which will garner natural interest in your project. And when you have struggles you can post it here as well. We're all learning in some way, shape, or form. For example, I recently made a post about command labeling for Vulkan (it's handy) and added the article link to the compendium. (I think the article is extra lengthy; you can just go to the Vulkan spec and get what you need in a few lines of code, but I digress.)

If you are new to this general check out the compendium. You might find a resource that you like. If you also recommend something I can add it. Or you can edit the /gedg/ wiki on your own.

>>102761147
Progress is rewarded with celebrity.

>>102739524
Looks good!
Have you looked into using a "sum of sines" or Gerstner waves for the water?
>>
>>102759602
>>102759632
I've seen ginger bill post online a lot and his style is super idiosyncratic, this reads exactly like something he would post

>>102759641
how funny would it be if it's actually ginger bill you're saying this to
>>
>>102759530
odin > zig > rust > c++



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.