[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 532.jpg (236 KB, 1024x536)
236 KB JPG
OpenGL Multiplayer Game Edition

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

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

previous: >>109522598
>>
File: dxball.jpg (65 KB, 616x353)
65 KB JPG
>>109662695
time flies away, remember times when you could've made a DX-BALL 2 type game and you'd earn a lot of money for that?
>>
File: tel-aviv.png (81 KB, 498x374)
81 KB PNG
>>109662695
so which library do you use for networking?
>>
>>109662695
opinions on defold?
>>
>>109663012
we don't use premade engines here, we make our own
>>
>>109663177
thanks but no
>>
File: SR-npc-Idolaf_Battle-Born.jpg (509 KB, 1080x1080)
509 KB JPG
Jolt or Box3D?
>>
>>109663419
Havok
>>
>>109663419
box3D is looking good
>>
im out of video game ideas
>>
File: midroot-egress.webm (2.22 MB, 1920x1080)
2.22 MB
2.22 MB WEBM
>>109662695
>OpenGL Multiplayer Game Edition
Of course

>>109662804
A custom binary protocol
>>
>>109662804
SDL_net
>>
>>109662804
Boost.ASIO. but for now I use it only to connect debugger to the scripting engine.
>>
I am making a game engine in SDL3 and C++.
>>
>>109665647
as god intended. welcome home, white man.
>>
File: 1762612711861032.jpg (31 KB, 456x320)
31 KB JPG
>work SWE job all day
>don't want to work on game after
>>
>>109665701
>work SWE job all day
are you really?
>>
>>109665647
Same, but it’s 2D
>>
>>109665647
I'm simply making a game in SDL3 and C++, engines are bloat.
>>
>>109663419
It should be self explanatory which one you should use
>>
I’ve been using Visual Studio for years but I never actually contemplated how it worked. Today I learned you can have multiple projects in a solution. And you can declare if a project is an exe, static lib, or dynamic lib. And you can link projects together. SDL3 ships with its own vs project file that you can one click link. You don’t have to go through the whole manual build and include process.
>>
>>109665701
its better to play games than to work on games
if you really want to work on games then look into modding. remember counter strike the #1 game on steam is basically a half life mod.
>>
>>109667627
this advice would go hard in 2009
>>
>>109662804
gssComms
>>
>>109667616
The part about using it for years blew me away but given all that you should also check out the concepts of

>whats the execution proj and how to switch
>different compiles and how and why (nativeAOT for example)
>setting up release and debugging workflows with these tools
>potential of buildscripts
>weaving (fody etc)
>get familiar with VS configuration tools because those are so damn powerful
>genuinely try to learn the usage of the debugger, its VS' best feature and can do some fkd up shit
>>
>>109667172
You're right.
I start building an engine thinking it will make things easier but I just end up wasting hours.
>>
>>109667759
Using it for years is technically true but the more accurate description is I’ve been loosely fucking around every once in a while over the course of a few years. Now I’m actually sinking my teeth into c++ development and trying to grasp build systems, dependency management, etc. so I can become a proper developer. This past week I spent reorganizing my project structure so now my Vulkan RHI is extractable from my game and ready for cmake setup, although I want to do everything I can with the visual studio suite before migrating my project to that. I even looked into clang-tidy to help with cpp core guideline enforcement. Although unfortunately the module driven nature of my project has created some small but manageable obstacles. I also used the profiler very recently which you can have copilot analyze and got like a 15% performance improvement from fixing my awful frustum culling implementation which was the most expensive function. There’s still so much more to learn and do.
>>
Should I use NVRHI?
>>
>>109668168
Frankly the question is why shouldn’t you use it. Rolling your own RHI is a pain in the anss unless you deliberately want to learn Vulkan/dx12 which will take up a good portion of your engine devving.
>>
>>109664805
based
>>
Is SDL3 actually good? I see a lot of people using SDL2 still
>>
Is the Khronos Vulkan tutorial finally useable? Or is vkguide still go-to tutorial?
>>
>>109665942
Well, 9 to 5.
>>109667627
>its better to play games than to work on games
But I enjoy working on games more.
>>
>>109662804
shit i wrote on top of wsock2
>>
>>109667627
>>109667712
I want to mod Quake 3 so bad bros
>>
>>109668985
I'd use SDL3 for new projects, and keep using SDL2 for stuff that's already using SDL2.
>>
File: rage.png (349 KB, 603x686)
349 KB PNG
I'm looking for a lightweight development ecosystem. AI is recommending me to make a game in a fucking browser, but I doubt it will be lightweight, and I'm on 2016 PC. I can't use latest Unity and honestly I don't want to use Unity at all.

What do?

Do my own engine?
>>
>>109669461
What kind of game do you want to make?
>>
>>109669514
Multiplayer 2D Shooter
>>
>>109669518
Love2D or Godot, if you want a ready made engine.
SDL or raylib if you want to manage your own main loop.
>>
>>109669566
thanks I think I will go with SDL3
>>
>>109669461
GameMaker
>>
>>109669748
I've already slopped up a platformer with AI in SDL3, now I just need to tweak it and make it multiplayer
>>
>>109665647
Same here, but C99 instead of C++
>>
File: just slop it up.png (31 KB, 1428x927)
31 KB PNG
>>109669870
>>
>>109665647
>SDL3
Bloat
>>
If AI can produce software, doesnt it make software worthless? It’s like we’re witnessing the death of software
>>
>>109671125
ai can produce software in the same way cripples can compete in the olympics
>>
>>109671125
AI has been long around enough at this point that if that were the case it would already have happened. reality is AI is a slop machine but even then the average person *still* doesn't have what it takes to take something from start to finish
>>
>>109669461
It actually doesn't get any more lightweight than JS.
>>109669518
Stick to making a single player game.
you are falling into the same trap that many losers fall into, which is working 10 years on a shitty idea when you could have been shitting out new projects every month, then maybe after making dozens of games (cool stuff that shows progress), you can consider tacking a multiplayer game.
don't let your brain rot with retarded ideas when you know your own skill level + AI's skill level is dogshit.
>>
>>109669060
Vkguide is long forgotten. The Khronos tutorial is good but they use the raii header which I think is retarded because nobody uses it in a real setting. There’s also howtovulkan.com which is probably my goto recommendation.
>>
>>109671125
>If AI can produce software, doesnt it make software worthless? It’s like we’re witnessing the death of software
Yeah just like how people stopped painting when photography was invented
>>
>>109669060
>>109673052
All the tutorials kinda suck to be honest. Most of them are just not really intended for a production ready game rendered, and Vkguide has weird ways of doing things.

Get to the point where you draw a triangle, then keep going on your own.
>>
>>109665647
I am now just making a game in SDL3 as it pretty much already is a game engine.
I will however write any helper code/systems in a dependency free modular fashion so I can reuse it in the future.

I am using C++ because I want to try using vectors and classes(ONLY for entities).
>>
>>109662695
I've officially given up 3D gamedev after many attempts. I've been creating 3D art and animations for like 16 years but I just don't have the drive to create a whole 3D game since I always burn out with all the assets I have to create. I have the skills but the willpower just isn't there. If I'm ever going to finish something it's gonna have to be 2D I'm afraid.
>>
>>109676443
3D is bloat.
>>
File: output.mp4 (3.68 MB, 682x384)
3.68 MB
3.68 MB MP4
day/night cycle and prototype map for my open world sandbox game I'm working on. The anime gril was put there for scale and has nothing to do with the actual game but things have been going surprisingly well with the project so far so fingers crossed this pace continues right until the end.
>>
>>109676748
Nice progress
>>
>>109676748
kino sun
>>
>>109676748
nice
>>
Has anyone here tried using this multithreading approach in a game engine before?
>https://www.dgtlgrove.com/p/multi-core-by-default
>>
>>109679312
it's a meme
>>
>>109679312
Yeah I've been doing it for my engine. It makes things harder but the payoff is huge. Having to change mindset from the single threaded standard you learn while programming isn't always easy, and it's easy to cheap out and just jump into a narrow context "just for this function".
>>
>>109679855
I suggest you use a regular multithreading model
>>
>>109679312
highly likely whatever you are doing will not benefit from it
>>
>>109679898
>>109679855
>>109679916
>>109679312
>>109679630
Hello anons.
I'd like to start a new debate about how to do multithreading in game engines.
Which way is the best?
>>
>>109679924
Depends on the structure of your game, how much effort you want to put in, how much latency you're willing to tolerate
Would recommend against Ryan Fleury's half-baked idea as it's just something that sounds cool and simple but is very inflexible
>>
File: BD2.png (1011 KB, 1024x474)
1011 KB PNG
Another cross-post has hit the thread.
Proggys.

Posting with pic of most recently finished level, as most of the progress lately has been tedious background stuff.
-Added a new item type: enchanted oil. Loading your lamp with this stuff makes it give you benefits while the lamp is lit, like lower/higher encounter rate, invis to bigger monsters, faster travel rate.
-Added new item types: botanical, geological, arcane treasures. Very rare, and only found by those with guild training, extremely valuable. Can be sold for extra money, or donated to the guild for big progress and display in the shiny shit museum.
-Adjusted a bunch of materials to be less reactant to level lighting, making them far more visible during low light and less big color swings.
-Wrote out the logic for tracking what nodes and minibosses have been completed in a level, which causes them to not respawn for a week or two (actual period not final)
-Finishing up work on save system, should be implemented fully soon.
-A bunch of tedious work on transferring anims to the new playable races: Specters and Zombies. They should have the full suite of completed anims and montages now.
-Added a bunch of new sfx for various footsteps on terrain, adjusted the extant ones to be less obnoxious.

Pre-alpha build is stable and running well, next up is debugging all the stuff and making sure systems are working as intended.
>>
>>109668985
>Is SDL3 actually good?
Yes
>I see a lot of people using SDL2 still
The jump from 1 to 2 was huge for both technical reasons and practical/legal ones. Complete rewrite, much cleaner design, license changed from LGPL to permissive. Migrating from 1 to 2 was a lot of work but was worth it, and anyone starting a new project on SDL1 would have been making a big mistake.

The jump from 2 to 3 is much smaller. 3 is better, but if you have an existing project on 2 and you don't specifically need something from 3 then there isn't much incentive to move. You shouldn't start a new project with 2, but it's also not a disaster if you do as you can upgrade to 3 later easily enough.
(the one huge addition in 3 is SDLGPU. It's an RHI, a bit like bgfx or sokol_gfx. It's good but probably only relevant to a small subset of the people using SDL.)
>>
>>109679924
>Which way is the best?
Refuse to do it at all.
Single threading was good enough for GTA San Andreas and Splinter Cell Chaos Theory.
(You)r game is not more advanced than GTASA or SCCT so you don't need the complexity of a multithreaded engine.

Couple exceptions.
First, you probably want an audio thread with special priority settings BUT that should be handled internally by whichever audio library you're using.
Second, you might want one extra thread for background loading. Depends on the kind of game you're making and whether you want smooth loading screens.
Third, if you're using a third-party library (physics etc) that can use many threads then by all means indulge it, but ONLY if the work required on your part is near-trivial and ONLY if all of those threads have finished their work before your own main thread moves on.
>>
>>109681574
>(You)r game is not more advanced than GTASA or SCCT so you don't need the complexity of a multithreaded engine.
Likely they put a lot of effort into optimizing their games, which increases complexity as well. If you just throw everything in a task scheduler then I can see things turning out simpler.
>>
>>109681607
It takes a lot of effort to multithread a game aswell
>>
>>109681613
parallel_for goes a very long way in my experience
>>
>>109681607
Any processor that someone might run your game on will have at least 50x, often more like 100x the single core performance of the original xbox.
>>
>>109681758
as someone who's been making games for that long, that's complete bs, effective single core CPU speed hasn't increased much
>>
>>109681828
there's way more than just clock rate dumbass. much higher IPC, branch predictors are way better, caches are huge, better of out order execution, blablabla. All of these compound.
>>
>>109681845
thats why I said "effective"
clock rate is still pretty much it despite all those things
maybe CPUs are 10 times faster now
50 or 100? absolutely no way
>>
>>109681854
i agree it's not 100x. it's more like 20x
>>
>>109681828
Here's another synthetic benchmark
https://browser.geekbench.com/processor-benchmarks
Press single-core.
>Snapdragon X2 Elite: 3272
>Intel Atom x7-E3950: 224
So that's 14x already, and that Atom is some industrial thing from 2014 so already drastically faster than the Pentium 3 in the OG xbox.

I appreciate synthetic benchmarks aren't real world, but come on. We're not even accounting for audio being on a different thread and for there being a shitton for spare cores for OS stuff.
>>
>>109681758
one of things is that resolution has also changed, its very different load and asset pile to aim and draw to 320x200 with 1byte palette 256 colors vs 4k HDR 30-bit colors. So assets by themselves take more now, but go ahead, make game with VGA specs for modern hardware and i can guarantee it goes really fast.
So yes, CPUS are fuckton faster now and then there are clueless retards running different load on them and yelling that they arent.
>>
>>109681918
We're talking about CPU perf, right? I assume you're not writing a software rasterizer. Your dense mesh data and massive textures are in GPU memory and ready to be drawn with a handful of draw calls. How are multiple threads necessary or helpful?

If you're making GTA7 and have a whole city block to simulate and draw then fine. But nobody ITT is making that.
>>
>>109681906
>14x
the claim was 50-100
>>
>>109681968
that's an intel atom from 12 years ago
>>
>>109681968
14x since 2014. That geekbench benchmark doesn't go back further than that.
Passmark does go back to the Pentium 3 (og xbox) and is where I got 50-100x from >>109681758
>>
>>109681968
see >>109681758
retard
>>
>>109681977
well I still have the same codebase from 12 years ago and I can tell you effective single core speed has definitely not increased 14x
>>
>>109681992
are you literally retarded? it's 14x from OG xbox to 2014. not 14x from 2014 to now, that would by 196x. it just needs to be like 3-4x more efficient from back then.
>>
>>109682011
im reading your posts not your links
>>
also kinda related: https://www.youtube.com/watch?v=XyEILrjuZJI
>tldw
>All modern nvidia gpus have software task scheduler that caused extra CPU bottle neck if using nvidia card and higher the fps, worse it is.
so all CPU performance testing should be done with DX11 software renderer (WARP device) or similar.
>>
>>109682023
ok sorry for calling you retarded
>>
>>109682025
>so all CPU performance testing should be done with DX11 software renderer
CPU perfomrance testing should be done without and rendering involved at all
>>
>>109682025 (me)
or amd card (amd has hardware scheduler and doesn't have this problem)
>>
>>109681958
>you don't need to use multithreading unless you make GTA7
What the fuxk am I reading?
>>
>>109679312
I like the idea but the entire mindset causes an over reliance on barriers to keep all the threads constantly in lockstep, which is just objectively the slowest form of synchronization. a game’s structure and what it’s doing at any given point doesn’t really benefit from the shrinking/growing lanes thing, in a game it’s probably better to permanently assign threads to specific tasks and sleep them when they’re not in use. the paradigm is better suited to tasks with more threadable steps that are all serially dependent, like a compiler where you might say “ok, all the threads are going to lex these files, then they’ll barrier and we’ll move them all on to step 2 and we won’t need synchronization for the token data accumulated on the previous step”. but a game trying to run a render step and an update step in a loop as fast as possible on loop forever? nah
>>
>>109682177
It may be a slight exaggeration but I think anyone writing an engine for the purpose of making a game solo or in a very small team should stop and think carefully about threading.
It adds considerable complexity and is a huge source of bugs.
Try searching the Godot codebase for "deadlock": https://github.com/search?q=repo%3Agodotengine%2Fgodot+deadlock&type=issues
Hell, if you have access to the Unreal codebase then look for relevant commits there: https://github.com/search?q=repo%3AEpicGames%2FUnrealEngine+deadlock&type=commits
Those projects have dozens of highly skilled people contributing to them, and they still fuck it up sometimes. (You) will fuck it up too and you won't have the benefit of a big team to help you.

Then consider that many of the best games ever made didn't have or need threading at all. Is (You)r game bigger and more complex than those? Are you going to be issuing so many draw commands that you'll be bottlenecked trying to record them on one command buffer on one thread? Are you sure you can't use instancing and indirect rendering to cut that down drastically?
>>
>>109682495
>Then consider that many of the best games ever made didn't have or need threading at all. Is (You)r game bigger and more complex than those?
my game has a completely different set of constraints that make threading necessary
>>
>>109682495
>Those projects have dozens of highly skilled people contributing to them
that’s probably the reason why. it’s way easier to reason about a system you personally wrote than it is to try to understand someone else’s. solodevs actually have the advantage in this case
>>
>>109679898
Sorry anon but no, I won't. I very much enjoy this threading model. Also what >>109682517 said, my game is uniquely suited for this model.
>>
>>109676443
same
>>
>>109682632
Nothing is uniquely suited to this model, it's a half-baked noob trap
>>
>>109682495
Nobody needs multithreading for rendering because submitting GPU calls takes barely time at all
You want multithreading for simulation, physics and AI updates
Which you probably won't even need as you say, but it's simple to add a small amount of multithreading like some parallel fors for highly parallelizable code without complexity bloat
>>
>>109679312
I'm reading this and either it's silly or I simply don't get it. It sounds like a Big Idea for a New Paradigm, but what he describes is very standard and just like the job systems he eschews at the start of it.
>let me write the most complicated example of parallel_for to sum an array. see how bad it is?
If your code is more complicated than
const Integrator = struct {
bodies: []Body,
dt: f32,
fn step(self: *Integrator, range: Range, context: Context) void {
_ = context;
for (range.begin..range.end) |i| {
const body = &self.bodies[i];
const velocity = add(body.velocity, mul(dt, body.acceleration));
body.velocity = velocity;
body.position = add(body.position, mul(dt, velocity));
}
}
};

// later
var work: Integrator = .{ .bodies = bodies, .dt = dt };
scheduler.run(Integrator.step, "integrate bodies", &work, .{ .count = bodies.len, .min_grain = 256 });
you're probably doing something wrong.
there can then be one main thread that continually fans out these "bursts" and is otherwise serial. context contains a worker ID if you're running over a colored graph or something.

A bigger problem that seems unaddressed is latency-bound tasks. If you "go narrow" and block that's a wasted compute worker for however long it takes. a barrier at the end makes the frame stall.
>>
>>109683117
It's a silly idea, the author is one of those narcissistic loudmouth programmers
>>
>>109676443
Why does it have to be 3d gamedev? Create 3d art because you enjoy it. You also don't need to complete games, you can create small demos/experiences.
>>
>>109683372
>you can create small demos/experiences.
lame
>>
File: 1505669899513.jpg (56 KB, 613x584)
56 KB JPG
>>109683380
Not my problem
>>
>>109676443
It's hard because you're trying to do something too laborious for a single dev.
>>
>>109682908
>it's a half-baked noob trap
how
>>
>>109683480
What does it offer over a regular job system?
>>
>>109683491
A ton of barriers pausing all your threads, constantly.
>>
File: sd.png (392 KB, 598x426)
392 KB PNG
>you need le marketing to sell your game bro
>>
>>109684764
Whatever "engagement" you get on X/Twitter: divide it by 10 because it's infested with bots, then multiply it by 1% of the total amount of real people who will stop doomscrolling and check out your product.
>>
>>109684826
>832/10*1%=6k peak concurrent players (easily 5 digits copies)
nice math bro
>>
>>109684905
First one's free ;)
>>
did we ever find out if the malloc schizo was threat interactive? I remember he was on a roll with spamming on here and got btfo'd so hard that he stopped posting everywhere for a while and I was kind of thinking they were the same guy
>>
>>109686463
Wouldn't surprise me.

Did he ever manage to scam enough tech illiterates from /v/ to hit 900k?
>>
>find a bug in SDL2
>it's fixed in SDL3
fuck, I wasn't planning on switching yet. it's so tiresome.
>>
>>109686463
I don't know, but I am glad he's gone.
>>
>>109686925
dw there are bugs on sdl3 not on sdl2. i spent hours yesterday trying to figure out why resizing is so laggy on wayland before realizing it's a known issue.



[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.