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


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: pasted-image.png (126 KB, 960x591)
126 KB
126 KB PNG
Simplicity edition. Simple technologies (Hare 20kLoC, QBE also 20kLoC)

Another tsoding banger https://www.youtube.com/watch?v=wRnJgrOcjqg
(10kLoC scripting language with static typing !!)

What are (You) working on, /g/?

/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:
>>107022982
>>
File: 1762361008712.png (129 KB, 647x666)
129 KB
129 KB PNG
When are you porting your game to this, /gedg/?
>>
>>107113471
im not porting my program to nothing, if you can support it, you can support it
not my problem if you cant run it
>>
>>107113471
>porting
No, my game is Windows only. It's Vulkan so I'm sure making it run on Linux (and MacOS) won't be hard but I'm not officially supporting those because I don't want the extra headache of my game being supported on those platforms.

Support forums will already be swamped by AMD users don't need to add people with weird distros to the mix.
>>
Kinda busy with a bunch of other shit right now. But I'm thinking of starting work on my Might and Magic clone again.
>>
>>107113569
This is literally windows 7
>>
>>107113362
I was recommended zstd compression for game data since it has good ratio and is apparently easy to decompress. What do you guys think?
>>
>>107114063
I dont compress data so it loads faster
>>
>>107113362
>pedofile language
so drewfag is trying to ruin the /gedg/ thread too
>>
>>107114245
Are you calling tsoding a pedophile for covering it? kys
>>
I'm working on clustered shading.
I'll surely continue actually making the game after this engine dev detour.
>>
Improved my AABB checks with SIMD. I was inspired a bit by the Titanfall talk, although that shit is way too complex for me.
So I shaved another 1/6th off the time cost getting closer to being 3 times as fast as RTree.
>>
File: 1762369108802.png (419 KB, 979x710)
419 KB
419 KB PNG
I finally managed to compile this thing with emscripten.
To prevent it from crashing every time when lua coroutine yields I had to add this compile flag
 -s EXPORTED_RUNTIME_METHODS='["exceptionCaught"]'

I suppose lua uses longjmp which is technically an "exception"
>>
>>107114635
That reminds me, some rpg maker version eventually had web export, but it doesn't look to me like this format has ever taken off which is weird given overall rpg maker games popularity.
>>
>>107115098
Well I am planning one day to have an upload site for packed formats of my rpg engine games. I will use MEGA as file storage as it has an api and 20GB of free space. When file is uploaded I want to extract it and check each file's sha1sum against a database and only upload the files that have not been uploaded yet.

Other than that you have a website where you can upload, play and rate the games like these. I am working on that packed format now
>>
>>107115143
Sounds good, at least until the day someone with bots decides to ruin it.

>>107114624
Oh my fucking god, I just tried non-uniform distribution in the tests, packing everything closer to one corner, and it scales even better than RTree. It doesn't make any sense. I'm tempted to make a scientific publication out of it, even if it's a massive waste of time.
>>
I doubt there are any game devs at all. Dead internet theory
>>
>>107115376
Quick update, added the new SIMD solution to my quad tree since most time was actually wasted on AABB checks. 60% less CPU time, holy shit. Since the check is like x3 boost, AABB checks must have been around 90% of the search. Still way worse than the optimized grid, but it's much faster to remove and insert on the fly in pessimistic scenarios. At least I can permanently remove RTree from the project.

>>107116059
Getting sidetracked by technicalities is just too tempting. The reality of trying to release anything is just too grim and it burnt me out quite quickly.
>>
One of the hard rules in my engine is absolutely no blocking GPU resource creation. I'm not allowed to create a texture/buffer/pipeline/whatever and block until it's done. All loading needs to be done in the background, during either an initial loading screen or with a level streaming system.
To me this feels obvious. A game is a (soft) realtime system. If you know an operation is slow then /obviously/ you can't just block on it while you're supposed to be rendering a frame.
I don't really understand how it became acceptable for AAAA cutting edge games and engines to create resources, and particularly pipelines, at runtime on the main thread.
What kind of professional looks at ID3D12Device::CreateGraphicsPipelineState and says
>hmm this call can take hundreds of milliseconds
>i know what to do, i will make blocking calls to it hundreds or thousands of times at unpredictable points throughout the game
I get that doing this is the only way to enable certain types of fancy artist-driven node-based material workflows. So what? If those workflows can't be implemented performantly then the engineer should just fucking say no.
>>
>>107116059
The real game devs are employed and can’t talk about anything even if they wanted to because of NDA. The other “game devs” are YouTube grifters.
>>
>>107116654
>I don't really understand how it became acceptable for AAAA cutting edge games and engines to create resources, and particularly pipelines, at runtime on the main thread.
How about you try to make even just a A-AA game engine first while practicing what you preach? Maybe there's a reason for them doing it that way other than everyone but you being stupid.
>>
Another dead general
>>
>>107117220
I completely understand why they do it that way. I even said so in my post: It lets artists make fancy complex custom effects without involving graphics programmers. The game looks better, has more visual variety, and it ships sooner. I get it.
But if it means random 100+ms frame time spikes in the middle of gameplay, it shouldn't be acceptable. Basic professional pride should stop it from happening. It shouldn't cross anyone's mind as being something that you could actually ship.
It would be quicker/easier/cheaper to publish a book if you skip the editing and proofreading steps, but everyone understands that it's just not an option.
Movies would cost less if they left boom mics blatantly in the shot and didn't bother editing out stunt wires, but even the most soulless corporate slop studios don't have standards that low.
>>
>>107117398
>Basic professional pride
Please stop being cringe, you probably haven't had a job
>>
>>107114063
It's good, look into ktx2 / astc / bc compression also for textures.

>>107116654
Doing it in a background thread doesn't automatically fix everything.
> user walks into new area
> game starts loading new area in the background
> user is using an HDD instead of an SSD for some reason in 2025
> the cutscene you were playing to mask a loading screen is now over but the background thread isn't done loading the assets yet
now what? RE engine solved this by having the screen go black with a simple loading indicator.

It happens because people are trying to ship the game asap and it's easier to just do things on the fly and hope that you can profile the game piecemeal overtime to get all the resource creation costs down to the point that you can hit your performance goal in time. Doing things the way you propose is better but takes longer so it doesn't happen as often. It also requires dedicated graphics engineers who are smart enough to architect such a system and these types of devs are rare (I am one), everyone would rather just use unity / unreal.

>>107117417
don't be a cunt
>>
>>107117417
My dayjob is writing webshit. Even there, believe or not, I do have some basic standards. I take security seriously. I care about database consistency. I set up backups and test that they work. There isn't much of a focus on performance as I'd like, but I do make sure it's not embarrassing: Frontend bundles are as small as is reasonable, the right compression and caching headers are set.

There are lots of ways I could make my life easier by shipping slow insecure dogshit, but instead I make sure things are at least decent before I ship them. And I work for a tiny company for a mediocre salary, so I hold FAGMAN products to a higher standard than my own work. Similarly I expect AAA games to be well-engineered, but most of the time they aren't.
>>
>>107117483
"I am very smart why don't companies work the way I do" posters are shit
>>
>>107117493
>Similarly I expect AAA games to be well-engineered, but most of the time they aren't.
Simply getting an AAA game to run at 30 or 60 FPS is a miracle of engineering and nobody should ever forget that
>>
>>107117483
>RE engine solved this by having the screen go black with a simple loading indicator
Yeah this is fine. I get that you can't absolutely guarantee streaming will finish in time.
But with many new PC games, it's literally impossible to run them smoothly even if you have the best CPU, GPU, and storage money can buy. That's not fine.

>>107117506
On the one hand, yes, any big game is a crazy complex beast and shipping one in an even semi-playable state is a feat.
But within a few weeks of Elden Ring's launch (for example), modders and vkd3d devs were analysing the game's misuse of D3D12 and writing wrappers to fix its stuttering. And they were having to reverse engineer it and use hacky workarounds. It was a beautiful game, I loved it. But it shouldn't have shipped in that state and I'm not willing to make excuses for it.
>>
>>107117560
Stuttering in games isn't simply because they're failing to load resources at the right time, creating and destroying large amounts of objects like some new enemies or a menu at runtime is always going to cause little stutters
>>
>>107117560
It falls by the wayside because it's not a priority. I don't think it's always incompetence

>>107117577
I think the point that anon is making though is that stuttering can be avoided completely by amortizing computationally expensive tasks over multiple frames instead of trying to do something that can potentially take 100ms in 1 frame. It bothers me too because I've been rejected from game companies for not having experience then I play their shit and I'm seeing zfighting / stuttering / horrible taa ghosting and other things that I know how to fix.
>>
>>107117577
>always
No, these issues aren't inevitable.
https://www.youtube.com/watch?v=-FjdOQmAHpk
DF spends several minutes just celebrating the complete lack of traversal stutter, shader compilation stutter, or actually any form of stutter even when moving through the world very quickly on weak hardware.
>>
>>107117632
Some things need to happen right away and can't be amortized
It's not like games have bugs because they don't know how to fix them, it's because they don't have time to fix them
>>
Is there an application that can export an image with the pixel layout R9G9B9E5? I noticed O3DE uses it for irradiance maps and I wanna do the same
>>
>>107117638
Not inevitable but hard to avoid
>>
File: ygg-1762390234.webm (1.65 MB, 1920x1200)
1.65 MB
1.65 MB WEBM
Trying to get some sprite debt done recently
>>
Does anybody put scripting in their engines?

I was playing around with LuaJIT and LuauJIT to see how bad performance would be to have game logic be scripted. In a basic test test loop that just modified some Vector3s with no UI or rendering, I got approximately 17000 fps without Lua and 900fps with. Is it seriously that slow, or did I do something wrong? It only got worse the more stuff I tried to marshal back and forth, it doesn't seem viable to me. This was with struts as tables and the vector math implemented in Lua, UserData was way worse. 900fps is way more than I'd ever want my game to run at, but that was still an enormous drop for doing very little. If I actually had it do anything substantial I fear it would tank even lower. How the fuck do real games use Lua??
>>
>>107118057
That's normal, scripting languages are bad for things like math because everything is an object, they're relatively better for business logic where you're just calling a few functions
>>
>>107118057
I use Lua, not LuaJit. Lua is never a bottleneck for me. In general anything computationally expensive gets done in C++ and it takes no time at all. But I'm using the Lua C api directly from C++, not sol3 or anything like that. I'm willing to bet you're doing something wrong, how are you marshaling data back and forth? What is your algorithm actually doing? Also this is a nitpick but when you profile the amount of time a routine takes in microseconds is more useful than using the FPS as a performance indicator
>>
>>107118120
Good point on the microseconds thing.
I was using Rust (yeah yeah) and the mlua crate. I implemented the IntoLua and FromLua traits for a Vector3 type to marshal it from rust struct<-> lua table. I would then call the Lua function with the table and a delta time.
In both the native rust and the Lua, the "algorithm" was basically just

inVector += scale(inVector, Vec3(5,10,20)) * dt;

The semantics were slightly different between the two but that was the gist of it. Even when I was just doing

inVector.(x,y,z)+= 10 * dt

The performance was trash in Lua. I might play with it again and see if I can't figure out what I did wrong. Or maybe I'll try it again in C and see if the rust bindings just suck.
>>
>>107118282
You didn't do anything wrong
>>
I got proper IBL working. Forgive the apparent exposure, windows does not like HDR screenshots and I had to lower the paper white just to get a decent image. There’s no active lights in this scene other than the IBL. I got an hdr from poly haven and processed it through cmftstudio to get the irradiance and radiance maps. Although the amount of steps and fiddling is not ideal and the resulting cubemap is flipped on the x axis, I’ll probably end up doing the asset processing myself sooner than later. There’s still a lot of tuning and cleanup to do.
>>
>>107118282
Yeah, don't try to do hardcore number crunching in a scripting language. It's best used for things that happen rarely, like "when the player touches the chest, open it and give them an item" (where the checking of whether the player is touching the chest is done in native code, and the script gets called only when the event actually happens)
>>
>>107118057
>>107118093
>>107118977
That is not normal for luajit, which will emit native instructions for number crunching. Something's fucky with what you're doing.
>>
>>107118989
he's creating tables
>>
I tried to embed QuickJS to use javascript as scripting language for my game. Building it was trivial, but the documentation was extremely lacking. I could navigate my way around the code, but it didn't really make between the public API and the internal one so I wasted too much time before realizing some function was just not meant to be used by the user. I got everything set up and running at the end, but then I realized javascript is just too bloated for my use case lol. I went back to lua. The syntax is crappy but I can always just transpile it.
>>
http://tululoo.com/ still so much to do...so little tutorial...
I don't even know how to make it embed to sites or,stay in center.



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