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


[Advertise on 4chan]


File: RS_Romero.jpg (97 KB, 655x871)
97 KB
97 KB JPG
John Romero 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: https://desuarchive.org/g/thread/107727030/#107727030
>>
File: IvyMen_mbWpSRBZpp.2.webm (3.61 MB, 1008x724)
3.61 MB
3.61 MB WEBM
Working on frustum culling, but my math brain is tarded
>>
Any reason NOT to just dump all your shit into a pool and forget about memory management beyond that if your game isn't realistically going to use more than 500MB of RAM at peak?
>>
>wonder why textures arent rendering correctly in a new shader
>spend two hours debugging
>realize i forgot to actually use the texcoords
maybe i should sleep
>>
>>107815064
hard resource limits are cringe
>>
hey autismos, get in here:
>>107809667
and explain what he is saying, he might be trolling, but just in case he is not
>>
>>107815064
people literally gaslight themselves into thinking malloc is bad then reinvent memory allocation themselves as pools and pretend this is better somehow
>>
>>107815823
A strange phenomenon that mostly C and C++ developers fall victim to
>>
>>107815811
he's saying he did some trivial science experiment
>>
>>107815841
You forgot Rust devs who invent a whole memory management scheme just to bypass the borrow checker.
>>
>>107814540
sovl
>>
>>107815387
I'm not proposing that the game ships with a set limit and crashes beyond that, just that there's no deallocation. You set it at some decent number for your game and if you ever need more, you double the pool size. Just that if you then go back below one of these 512MB increments you don't bother freeing that memory.
>>
>>107816314
No you can't make a game with no deallocation
>>
>>107815863
I remember the first time I saw Rust it was a game programming presentation and it was generating ids to objects in a pool and it made me think "Wtf, just return pointers".
>>
>>107816422
Says who?
>>
>>107816634
Unless it's some puzzle game where nothing on the screen never really changes you'll be allocating more memory every frame for every bullet, enemy, particle effect, sound that needs to appear
and if you're going to say "well that doesn't count I'm using my own memory pool" then congratulations you just rewrote malloc / free for no reason
>>
>>107816657
Anon I just said I'm not deallocating, I didn't say I wouldn't use freelists to avoid having 500k bullets when only 500 are alive (yes it can theoretically still happen, no it will not happen in the real world, ever).
>>
>>107816675
>I didn't say I wouldn't use freelists
Yes, you rewrote malloc / free for no reason
Well done
>>
>wrote some of my own shitty std code
>compiles 70+ files in less than a second
>start writing a project with c++ std
>compiles 3 files with 8 std includes in more than a second
i hate this bloat
>>
File: water.webm (107 KB, 1152x648)
107 KB
107 KB WEBM
>>
>>107815823
Malloc literally has a mutex inside of it.
>>
>>107816697
They're not the same at all. Rolling your own like this is absolutely trivial and guarantees o(1), no fragmentation, etc which malloc absolutely does not.

Yeah if you use mimalloc you might get similar performance in most cases, but then you're using mimalloc.
>>
>>107816697
anything is better than malloc and free, dumb nocoder.
>>
>>107816917
>Rolling your own like this is absolutely trivial
Yeah but if you actually benchmark it there's no real observable difference, you're cargo cult programming
>>
>>107817105
Funny how you bring up benchmarking and cargo culting in one sentence.
>>
>>107817115
Why's it funny?
>>
>>107817121
Because it shows that you know nothing and should stop posting.
>>
>>107817131
When you benchmark something and observe the results for yourself you're doing the opposite of cargo cult programming
>>
>>107817137
When you benchmark you create fake results and then you verify that your wrong results that mean nothing are absolutely correct and then you proclaim that your mental retardation is scientific and opposite of being a retarded cargo culting nocoder, but it could be nothing further than that.
Benchmarking is like asking a shit eater if eating shit is wrong, of course he will say it isn't.
>>
https://www.youtube.com/watch?v=IZIc4IFNeGQ
this raytraced audio is so awesome
>>
>>107817162
>When you benchmark you create fake results
what the fuck am i reading
>>
>>107817198
Reality that's hard to accept to cultists of the cargo programming.
>>
>>107817233
So if benchmarks are fake results what are real results?
>>
>>107817253
Real code.
>>
>>107817258
Am I talking to an AI?
>>
>>107817276
It would be very sad if even "AI" turned out to be more intelligent than you.
>>
>>107817282
go back to your containment thread lil bro
>>
>>107816314
this is one of the dumbest things posted on /gedg/ this year
>>
>develop your own game engine
Lmao wut? Just use unity or unreal. How hard is it that?
>Reinventing the wheel
No
>>
>>107816845
>not using precompiled headers
>>
>>107817359
i am
>>
>>107817359
i actually even made a makefile target to generate it so i wont miss any includes
pch:
@echo "#pragma once" > $(PCH_FILE)
@echo "" >> $(PCH_FILE)
@grep -rhoP '#include\s*<[^>]+>' $(SRC_DIR) | \
grep -v '#include <pch.h>' | \
sed 's/#include\s*<\(.*\)>/\#include <\1>/' | \
sort -u >> $(PCH_FILE)
>>
>>107817343
Your own memory pool won't be significantly faster than malloc
>>
>>107817417
what is wrong with someone wanting to write anything on their own? be it for any reason
>>
>>107817509
Nothing, I use my own memory allocators, it's just that peoples reasoning (malloc = bad, avoiding it is good) is completely retarded
>>
>>107817417
If you're using the standard allocator, it will absolutely be faster than malloc. Not faster than mimalloc or others, but standard? Yes.
>>
>>107817417
Except it will, but you don't understand anything and believe that running a function in a hot loop is a valid test so not like it matters what I write.
>>
>>107817580
There you go again inventing imaginary scenarios to argue against
You really should see a mental health professional
>>
>>107815823
>Gaslight
If you use malloc and free you are wasting operations and have to worry about use after free or leaking memory. If you malloc a pool then you just have to manage that pool and free one allocation eliminating memory leaks as a factor. As long as you know how large the pool is you literally cannot lose track of memory.
>>
>>107817612
What you're talking about is an arena, not a pool
>>
>>107817624
You haven't written any games bro you spend all day seething in /dpt/ about malloc
"Benchmark" doesn't mean "run a function a hot loop"
You can switch out your allocator on a full game project and compare the results, doesn't get any more accurate than that
>>
>>107817622
>Arena vs pool
What's the difference? I thought an arena was just a type of pool.
>>
>>107817639
So now you don't even understand what basic words mean? Pajeet hubris is incredible.
>>
>>107817648
A pool is a general purpose allocator, it replaces malloc and free
An arena is a specialized allocator, it only gives you malloc, you can't free things individually
>>
>allocate some memory with malloc
>free it when you're done with it
>don't free it if you aren't done with it
Wow, so difficult.
>>
>>107815387
>>107815823
>>107816657
>>107816697
After thinking about it, I decided to just use mimalloc and forget about it. I wasn't gaining anything from doing >>107815064 and I don't see any reason to bloat my code with stuff I don't need and doesn't benefit me.

Thanks for calling me a retard and making me think about my system more than I would have otherwise. Who said internet arguments aren't productive?
>>
>>107818069
you're welcome
>>
I'm sure malloc is the bottleneck of your engines.
>>
>>107818167
malloc is the bottleneck of my registry dumper
>>
>>107818167
Maybe not, but why not just take 30 minutes (probably way less) to switch to a better allocator? Replacing the standard implementation is what, 1 line of code?
>>
>>107818212
dont waste your time on trivial problems that dont exist
>>
Where the FUCK have racing games gone bros? I feel like a ngga could make a buck selling an indie NFS Underground clone rn.
>>
>>107818426
I assume they just put out the same carslop game every year and that's the entire racing game audience
>>
>>107818426
Is there actually an unoccupied niche in the market? Also aren't real life car models copyrighted?
>>
>>107818232
I'm sure you've done things with less return on investment than taking 10 minutes to switch the default allocator to mimalloc.
>>
>>107814484
Curious. Has a Scratch "game dev" ever harassed /gedg/? If so, did they get laughed out of the general immediately? One would hope.
>>
File: 1551149757988.png (73 KB, 555x416)
73 KB
73 KB PNG
How I look working on my game engine while being unemployed
>>
File: file.png (69 KB, 2106x219)
69 KB
69 KB PNG
randomly remembered this one, good times
actually thought it was further back
https://desuarchive.org/g/thread/104638811/#104663562
>>
>>107818667
what else would you do?
>>
>>107814484
>The Bitcher 3
>>
>>107818715
javascript CRUD applications leveraging AI + jeetcode and trying to get a webdev job would seem like the well adjusted man's choice
>>
>>107818637
we just ignore him
>>
File: best.gif (322 KB, 768x512)
322 KB
322 KB GIF
My top scientists are working on a cure for nodevs, they tell me in 2 more weeks they will have the results for 6-7 of the test trials
>>
im trying sdl gpu, and ive managed to draw multiple meshes with their own transforms all in one indirect draw call,
but multiple things im relying on are "not recommended", so im trying to do things in "proper" way. but doing anything different breaks everything.
im about to just give up and just use opengl.
>>
how hard is it to build a simple car physics engine with suspension, acceleration/braking, and steering?
>>
File: ygg-frog.gif (71 KB, 160x160)
71 KB
71 KB GIF
>>107819850
Trial 1 result: Frog
>>
>>107820108
actually fuck me im retarded.
completely forgot you had to specify how many uniforms/storages/etc a shader expects when constructing them.



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