[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: 9-11_driver.jpg (50 KB, 415x604)
50 KB
50 KB JPG
9-11-2000 Fun
https://www.youtube.com/watch?v=fVwcO7R3y8k

/gedg/ Compendium: rentry.org/gedg
/gedg/ Wiki: wiki.installgentoo.com/wiki/Gedg
IRC: irc.rizon.net #/g/gedg
Progress Day: rentry.org/gedg-jams
/agdg/: >>>/vg/agdg
Render bugs: renderdoc

Requesting Help
-Problem Description: Clearly explain the issue you're facing, 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:
>>102307270
>>
no one baked the next thread
>>
File: teapot_spin.webm (41 KB, 480x270)
41 KB
41 KB WEBM
nth for spinning teapots
>>
File: 1712023722777139.jpg (36 KB, 500x500)
36 KB
36 KB JPG
>>102310587
Godot is shit for 2D because C++ sdl&co exists, and is ok for 3D because it loads and builds fast
>>
>>102345918
Until you have a large 3d scene, then it not only takes a year to load but it's laggy as shit
>>
>>102344325
>learn python for a few weeks
>it's basically gdscript
>use godot

Is that all iot takes to get started on my own game?
I'm not delusional enough to think I'll make the nest big indie hit, but I just want to get started on projects and make autistic shit
>>
>>102346015
Pretty much. It's really easy to get started on making games, it's when you get to the midpoint that it can turn into a slog.
>>
File: 105404613_p0.png (150 KB, 1051x919)
150 KB
150 KB PNG
Anyone here using LOVE2D?
I did some of the basic tutorials a while back and got sidetracked with life, now I've been working on my own detailed "blueprint" for a game and am ready to start actually prototyping the code and different features for it, but I'm not sure the tutorials I did are particularly applicable to what I'm trying to make.
Is it worth reading up on Lua 5.1, like is there a nice video series/book that would be useful for a noob to get up to speed on making basic games? Something I could use as a reference point for coding instead of shuffling between various beginner-level tutorials?
>>
>>102346155
love2d is cool. There's literally nothing complicated about Lua (maybe coroutines? which you probably wouldn't need). just get started on your project after spending a day or two learning the language.
>>
>>102346155
I'm currently tinkering with it.
Lua is pleasant enough, and there's mounds of example code to learn from. You can find lots of stuff on github and the Love forum.
>>
>>102345941
This is the problem I've had.
Granted, I'm running a potato, but my potato can run steam and HL2 mods, and that shit is notoriously bulky.
It could also be that there's some optimizations I could be doing in Godot, but I'll be damned if I can figure out what they would be
>>
>>102346283
It's just a lazily put-together editor. I'm on a relatively powerful setup (5800x/3070 ti). You have to keep in mind 3D was an afterthought until relatively recently; even then, barely anyone puts it under enough pressure for it to buckle since it's mostly used for game jams or procedurally generated content. That and Juan gets more retarded every time I hear him speak. I still like the engine overall though.
>>
>>102346314
It's got a lot of features I like, and I want to like it, it just seems to derp in the most ridiculous ways.
>>
Anyone have any opinion on Rust's traits vs regular OOP interfaces?
>>
trying to implement regular functions in Unity DOTS, but with dynamic types
>>
>>102347070
how is it going?
>>
File: Nim.png (83 KB, 1280x1458)
83 KB
83 KB PNG
>>102347039
Limited to compile time but zero cost abstractions vs flexible but you pay the tool of checking the real type at runtime. Overall, for 90% of your needs, I don't know why interfaces would be a bad choice.
Think that rust's hateboner towards oop makes it rely on generics too much (typeclasses are just that) which increases compile times a lot. I rather spend my time developing the game in a pleasant language, then spend the extra time optimizing bottlenecks than writing everything in a performant manner.
>>
>>102348199
I don't think I trust the NIm shill's opinion on anything
>>
File: screen3.png (40 KB, 768x482)
40 KB
40 KB PNG
>>102348227
I'm a honest impresario, they framed me because they hated the truth.
>>
File: 1589900028797.webm (2.9 MB, 1168x954)
2.9 MB
2.9 MB WEBM
>>
File: 1589924205138.gif (141 KB, 640x400)
141 KB
141 KB GIF
>>
>>102344325
My engine is going well
>>
>>102348802
This is why I come to /gedg/
Nice work.
>>
File: 1726080972750166.jpg (57 KB, 627x629)
57 KB
57 KB JPG
>>102350173
maybe even too well...
>>
>>102350209
That isn't a /gedg/ project
>>
>>102344325
bump
>>
Anti aliasing is a negative vibes.
>>
Why is it wrong for volume in my sound engine to just be sample * volume? What the fuck is logarithmic?
>>
File: 1726066058814353.png (156 KB, 581x452)
156 KB
156 KB PNG
>>102353138
what'cha making?
>>
>>102355575
fuck off
>>
>>102355791
rude
>>
File: 1723731226089364.gif (1.12 MB, 1366x1350)
1.12 MB
1.12 MB GIF
>>102355791
>>
>>102355880
You are welcome.
>>
>>102355876
Inviting yourself en masse into existing communities and making inane off topic posts with the sole intent of spamming tranime pictures is rude.
This place is about to go the way of /agdg/ if we don't keep the troons in check
>>
File: eat_crab.gif (1.78 MB, 480x270)
1.78 MB
1.78 MB GIF
>>102355968
>can't ask a fellow yesdev what he's making.
this is literally 1984
>>
>>102356208
fuck off troon
>>
File: 1725474430752934.jpg (219 KB, 1186x1940)
219 KB
219 KB JPG
>>102356510
why don't you interact with progress posters instead of being a bitchy cunt?
No wonder people don't bother posting progress...
>>
>>102356545
fuck off
>>
File: 1723621531929682.gif (101 KB, 232x344)
101 KB
101 KB GIF
>>102356592
let's fuck on
>>
Shut up and post progress.
>>
/gedg/ is not the progress general. it's a general to dab on OOP and ECS.
>>
>>102356699
As God intended.
>>
>>102356699
I don't understand the difference anymore.
>>
>>102357102
one is good and the other is bad
>>
>>102357166
wrong. is good and is bad
>>
>>102347039
interfaces allow to erase types, but generics always generate code bloat for every instantiation, worse if you have nested generics types, that's 2x bloat.
code bloat may thrash cpu instruction cache so it's not always better to implement everyhing as generics
>>
bump
>>
>>102348802
looks good anon, nice aesthetic
>>
>>102359817
It's something he found on twitter
>>
>>102359870
:(
>>
I've been working on this, it's a top-down shooter written in C, but now i need a way to make a map faster, the only way i can do it now is by writing every single barrier like this:
spawn WORLD
barrier 528 254 914 164
barrier 914 164 1158 222
barrier 1158 222 1188 480
barrier 1188 480 892 320
barrier 892 320 914 543
barrier 914 543 871 720
barrier 871 720 1061 747
barrier 1061 747 1228 734
barrier 1228 734 1245 930
barrier 1245 930 1010 1036
barrier 1010 1036 602 1024
barrier 602 1024 456 963
barrier 456 963 505 609
barrier 505 609 458 332
barrier 458 332 528 254

barrier 608 764 558 764
barrier 558 764 558 714
barrier 608 764 558 714

spawn PLAYER
position 530 300

spawn ZOMBIE
position 530 430

There's any tool that can export line points so i can convert them into these barrier shit?
>>
>>102360760
Illustrator can export to SVG, which is basically just XML (Inkscape can hopefully do this too). Alternately, just implement a basic editor in your engine so you can click in the world to add points; not that hard.
>>
>>102360760
I had a similar problem where I loaded the Utah teapot into a vertex shader before I had model loading sorted.
You could hack together something in Python pretty quick.
main :: IO ()
main = readFile "teapot.data" >>= write_files

write_files :: String -> IO ()
write_files in_string = do
let vertices = parse_words "" . drop 1 $ words in_string
writeFile "teapot.vert" vertices

parse_words :: String -> [String] -> String
parse_words vertices [] = vertices
parse_words vertices strings = parse_words (vertices ++ lineify (take 6 strings)) (drop 6 strings)

lineify :: [String] -> String
lineify [v1, v2, v3, n1, n2, n3] = "{{" ++ v1 ++ "f, " ++ v2 ++ "f, " ++ v3 ++ "f}, {"
++ n1 ++ "f, " ++ n2 ++ "f, " ++ n3 ++ "f}},\n"
>>
File: angulars.png (371 KB, 1338x1077)
371 KB
371 KB PNG
I can now add angled surfaces and I've spent some time fixing bugs of the "if you touch this button under certain circumstances, program crashes"
Next order of business is a color sampling, painting and Y-rotation tools. The last one is, apparently, the most used operation I do.
>>
>>102362490
Cool. Looks like fun.
>>
>>102362490
Are you making all the GUI elements manually? I've been debating whether to do that vs using Imgui/Raygui
>>
File: happy_bugs.webm (169 KB, 480x270)
169 KB
169 KB WEBM
Many happy bugs in a simple renderer.
>>
In games with large worlds that get partitioned, are the partitions stored on disk and then loaded at runtime when they become active?
Or is the main point of partitioning not to save RAM but to have a thinner slice of entities to loop through in the main game loop?
>>
>>102363848
I think this is a really complex question. Recent AAA games have removed the loading screen in really clever ways, and the game studios don't really elaborate on their methods.
The partitions are loaded from disk, onto cpu ram, and then onto the gpu ram. However more than one partition will be loaded at once, and I believe that is really the key to getting rid of the loading screen.
>>
>>102363848
Both
Open world games can't load everything at once so it streams it off disk as you play
>>
>>102361372
Didn't know we had Haskell chads here
>>
>>102363969
>>102363975
Thanks anons, I thought about it out loud and realized how dumb of a question it is given all the OG large world games like TES have obvious loading screens, probably just done on a different thread now.
>>
Just discovered that C++23 has a #embed preprocessor directive. It will be very useful.
>>
File: m3actzst1fx01.jpg (42 KB, 626x479)
42 KB
42 KB JPG
>>102359933
don't hate the player, hate the game.
>>
>>102364231
look up how BSP works

bethsoft games are weird, the loading screens exist to cover up the fact that doors are actually teleporters and when you enter buildings you are actually being warped to the interior cell that exists somewhere in the overworld. in a sense, every area is always loaded all the time but its geometry is culled until you enter it. you warping, the culling of the overworld, and the rendering of the interior cell's geometry is all the loading screen hides. it's not actually loading anything at all.
>>
>>102353138
Agreed
>>
>>102364504
That's interesting, thanks anon!
>the loading screens exist to cover up the fact that doors are actually teleporters
I assumed as much for doors like hatches and stuff that load when you go in. I struggle with how to do this in my game, not the teleporting bit but whether to use teleporting in the first place or actually make the world's geometry accurate.
>in a sense, every area is always loaded all the time but its geometry is culled until you enter it
This is what I want to understand. I have a really simple game loop; I have a big vector of entities that I iterate over. Entities have a Relevant field, which if true calls the draw function on it and renders it. My concern is, if all these environmental objects like trees/rocks/terrain are in that list, won't I end up with an absurd number of entities at some point? Or am I overthinking it?
I guess I could figure out some way to chunk all the static geometry into bigger entities to take up less iteration time. But for occlusion culling I'd like to iterate over the individual meshes.. I guess I could still do that inside each chunk though. Hmm I feel kinda stupid rn.
>>
>>102364504
This is fascinating. Almost comical that entering a building sends you to the other side of the map.
Reminds me of the Team Fortess 2 maps. The out of bounds landscape, was an upscaled projection of a tiny miniature set that just hiding outside the playable map.
>>
>>102363969
>and the game studios don't really elaborate on their methods.
what the fuck? chunk partitioning and loading is a solved issue with tons of ways to implement it, it's literally an infinite quadtree/octree with LODs, the hardest part about it is choosing between having a dedicated IO thread or loading files asynchronously with async primitives, it's language/engine dependant more than anything else. Most modern engines have async file loading out of the box.
>>
>>102360760
if you're doing a randomly generated map you could just path some vectors together or merge shapes to get an outline. shouldnt be too hard to conditionalize the construction. idk?

or just program a level editor? should not be that hard desu.

>>102363628
beautiful render
>>
>>102364752
Is there any reason to not use an IO thread and use the language's/a library's async primitive? I can technically choose either but I feel more comfortable just using OS threads.
>>
>>102364504
What do you think loading means? If there are assets inside not resident in memory before you enter I'll call that loading.
>>
>loading big worlds without loading screens
Planetside 2 did it, and some times with hundreds of players at once, in their golden times, that is
>>
>>102363848
>>102364662
That reminds me of dark souls, where the map being loaded is purely based off of what collision you're in contact with, so e.g. when it's playing a cutscene, it just warps the player to some invisible platform which enables all of the cutscene assets.
And then in sekiro, you can just jump through some missing collision and fall into a boss fight stored far below the map.
>>
>>102364658
It sounds like you're trying to reinvent the wheel, by linking frustrum culling and map partitioning together. The culling will remove vertices outside of your projected view. This is a GPU optimization, and I think your on the right track chunking your map into partitions. This will be necessary so that your game can have more entities than the host hardware can process at one time. Another consideration is instancing, so you can draw 100 rocks and 100 trees from 10 different entities, with very little overhead.
>>
>>102364868
>100 rocks and 100 trees from 10 different entities, with very little overhead.
planetside was notorious for re-using assets this way:
>>102364838
at least that's what I think was happening, everything seemed built off the same assets, everywhere
>>
>>102364868
Yeah I'm more worried about CPU optimization right now. I'm gonna use instancing for static geometry, so e.g. trees/rocks will be batched together anyways. Maybe I can just group them together in a single entity or something.
>>
>>102363232
I've done them manually - including drawing of the icons. My only dependencies are Vulkan, SDL and OS runtime.
>>
>>102364962
That's some intense determination. Kudos.
>>
>>102364784
async is simple and easier to write code with, multithreading requires you to write multithread code with all the syncing and message passing shenanigans.
triple A use IO threads because they're using multithreading anyway for audio, AI, animations, other stuff...
in spiderman gdc talk they had a very complicated cutscene streaming mechanism where data is stored in a way that respects the physical disk reading mechanism to avoid any lagging. it's less of an issue in SSDs.
>>
File: acropolis.webm (203 KB, 480x270)
203 KB
203 KB WEBM
>>102364776
I got a neat render afterwards, I'm going to post because I believe it is kino.
>>
>>102364931
Batching and instancing are different things.
>>
>>102365131
What's the difference? For me doing something like mesh instancing just means drawing all the meshes in the same draw call (batching).
>>
>>102365219
Instancing is drawing the same mesh several times, and you have vertex attributes than are per-instance.
>>
>>102365249
Ohh I see, in that case what I have is instancing.
>>
>>102365055
I like your camera work as well
>>
>>102365219
Instancing is as >>102365249 describes, and is a free performance boost.
Batching involves joining meshes together that have compatible materials, which is not always good for performance (and, I especially feel that dynamic batching is not worth it in any regular case).
>>
>>102365538
Gotcha. My level editor is gearing towards being brush-based a la trenchboom/hammer, so I'm gonna have to probably figure out batching since most of the individual terrain/architecture meshes are unique. Should be free for meshes like trees and all that.
>>
>>102364784
For gamedev, you should probably stick to threads. 'Green threads' were invented to scale to one million connections. Threads are limited in number, and if one hangs up it could affect the performance on the whole system. Green threads or async is implemented in usercode, usually there is a n:m relation of threads:processes/green threads.
I have read some arguments on using them for handling AI or dialogue scripts, maybe that works. But say you are thinking about improving the performance of your pathfinding. You are probably better off using threads directly. Asyn usually introduces additional code and wraps everything intro a glorified state machine structure, so I assume that will impact the performance in favor of throughput.
>>
It's confusing how there's about 20 different terms for multithreading and they all mean different things
>>
>>102365664
Thank you, I also thought along these lines.
>>102365000
Isn't it kind of the opposite? Unless you're multithreading actual game code, it should be relatively simple to spawn another thread for loading chunks or computing some algorithm like for pathfinding and checking if it's done periodically.
>>
File: 1716658510145.jpg (621 KB, 1079x1069)
621 KB
621 KB JPG
>>102365699
I don't believe you.
>>
>>102365710
>Unless you're multithreading actual game code
You're multithreading your levels, it a hairy subject, because a level isn't just static geometry, it has entities, effects, and all kind of things.
Consider the case of static geometry, let's simplify the map to a quadtree, how are you even locking it for multithread? lock the whole tree and you just turned your multithreaded application to a single threaded one, so you have multiple locks for each chunk. now the same can happen for entities that require initialisation and updating. The workaround is to always copy anything newly loaded, memory speed will always beat disk speed, but you still need to take into account the copying itself and the increase of memory usage.
Async is just a fire and forget function like any other normal function call, the implementation takes care of everything for you. So it's also a difference in level of control. With multithreading you can have exactly 1 thread per CPU core, and you can control the core affinity so a thread will always run on a specific core without contention with other threads.
So it's really a tradeoff of control and complexity. Not to mention, multithreading is hard to get right, and you get schrodingers bugs that only show up once in a blue moon, fun times.
>>
>>102365862
Mutex, Semaphore, Condition variable, Atomic operation, busy spinning vs signals, job systems and stealing policies, shit you have to only use from the main thread or all hell breaks loose...
How the fuck do you know what to chose and when?
>>
>>102365055
this remind of a fmv camera pan. good work
>>
>>102348199
Rust traits support dynamic dispatch, so I don't know what you mean by limited to compile time and relying on generics too much. You probably don't know what you're talking about
>>
File: console.webm (3.12 MB, 1920x1080)
3.12 MB
3.12 MB WEBM
Nothing like whipping up a console on a friday (totally didn't give up on tile collisions and decided to focus on something else kek).
>>
>>102368612
Looks really comfy. I'm making my game in Lisp so the REPL ended up being the console, almost wish I had an excuse to add a game one lol..
>>
>>102364962
not even stb for image decoding? you doing signed distance fields for font rendering?
>>
>>102357554
this is an uneducated response and you should feel bad.
>>
>>102369250
maybe he's using SDL2_ttf
>>
>>102368612
cool
>>
>>102368612
the problem here is that usually console commands are connected to how you script the game, or connected to game configuration.
If your game was scripted in lua, you would use lua to parse the commands (probably with a prefix).
or you store the game settings in a file and that file shares the same syntax as the commands in the console.
you seem to be mixing those 2 things together.
I assume you are using C++, which by the way I highly suggest you to port your game to emscripten then upload the demo using github pages.
And if you want to be able to modify your entities arbitrarily, I suggest looking into reflection, because there are 2 things you can do with it.
You can expose all your C++ data in a gui or command system. So instead of "select entity" + "teleport", you could just "debug click" on the entity (or select a entity from a global list), it opens a floating GUI window, that window lists all the properties, and if you are fancy you could make the position easy to teleport with (but I like your approach because you can bind teleport to a key, like quake).
If you are using unity, I think C# supports reflection.
If you are using C++, and cmake, I suggest replacing your code with flatbuffers, it's terrible BTW. (DONT READ IF C#).
https://jorenjoestar.github.io/post/flatbuffers_reflection_data_driven_rendering/
Everything that has reflection would be a flatbuffer struct and you would need to add an external "context" / "prettifier" structure so that you can tell which variables cannot be serialized, make the GUI treat translations differently so it has a button for teleport, and etc.
This example shows how, but I don't like the idea of using flatbuffer attributes, even if it's attractive, I think mini reflection + manually defining rules externally is better (it could be a json file or something).
It's super awkward to use, but the alternative is to use macros.
https://jorenjoestar.github.io/post/flatbuffers_reflection_data_driven_rendering/
>>
>>102369658
*well the 2 things you can do with reflection was lua + debug menu.
And I also forgot serialization for save files.
>>
>>102365699
multithreading is a complex topic and warrants the terminology overflow, that's the reality of it.
>>
File: 2024-09-13_20-34.png (174 KB, 1156x1460)
174 KB
174 KB PNG
>>102369658
The console system works mostly in isolation from rest of the game, and would be very very easy and fast to install into any other game/project, though its rendering bits probably would have to be rewritten to match whatever the other game/project uses. The reason I didn't go with GUI is because its there to just help me do stuff quickly, not for the end user to actually use (except if they want to muck around). Being text driven allows me to do exactly "the quake binds", or even execute script files (haha automated testing go brrrr).. or even do that horrible quake/goldsrc hack of "this game entity actually just executes console commands".
Pic is how new commands are defined into the console, and I can check the console class for the selected entity/tile which is the only bit that makes it depend on specifically this game' code. The actual command name is copied from the function name, the ConsoleCommand attribute is used to insert a description for the command (+ optionally define a category which is how the render. or entity. commands are categorized), prettify is there to clean up a parameter if it has "bad human readable" on the code side for whatever reason. All loaded assemblies are reflected upon start, so it in theory should support mod assemblies introducing more commands.
And yeah I'm using C# with Raylib_cslo here, I've written game engines before in c++/sdl2 and I thought I'd switch things up a bit because I want to actually make a game someday, not waste time writing boilerplate lol

No idea where you got the idea of me mixing a save system with a console system there though, I have zero save functionality at the moment. Even then I wouldn't be feeding the (de)serialized save data or settings data into the console's ProcessCommand function.
>>
File: pthreadbook.jpg (111 KB, 1136x476)
111 KB
111 KB JPG
>>102366247
You must be a child.
Adults read book. Try that when you get older.
>>
>>102370073
>POSIX standard
>video games
lol, lmao even
>>
>>102369658
Well. Just in case it isn't clear I should probably expand on why flatbuffers is awful (I actually don't use it myself but I spent time dwelling on it, I am now running through the actual problems for my own purpose).
1. It's generated C++, cmake helps with automatically generating the files.
2. It's primarily for serialization, so when you allocate an reflected object, it gets pushed onto a place in memory in the flatbuffer API, so you can't delete it, but you can reuse the object if you put the deleted object into a list (easy: store pointer in vector, annoying: single linked list, each type needs a separate recycling list).
3. But since you want to add functions to your objects (behaviors, like naive render/logic/etc), you can't use polymorphism, and virtual functions could work but you are essentially making a class, with a reference to the flatbuffer struct, which just feels terrible when you think about the performance (you probably use std::unique_ptr or new/delete, which only allocates a vtable pointer and a pointer to the flatbuffer struct), so the correct choice is to use the C style vtable, where you have a struct of function pointers (not much different than C++ polymorphism, and you share the same struct of functions for all the objects with the same type) but you need to use void* (the pointer to the flatbuffer struct).
Also every member in the class now needs to use get_x() or set_x(1) because of the possibility of little endian CPU's (on x86, arm, RISC-V all use big endian so there is no conversion compared to using a normal struct, at least after optimizations).
fun!
>>102370024
What I mean by the save is how quake has .cfg file, and the cfg file is the same as the console commands, and you can change settings in the console using the same syntax, but that's not the main benefit of the console, the main benefit of the console for quake was the ability to quickly load a mission instantly (through the program arguments or .cfg file?).
>>
>>102369658
>reflection
>C++
boost::pfr is pretty good, needs modern C++ and only works on a subset of structs, but it doesn't need external tools and looks like way less of a hack (and is a standalone dependency)
My game currently uses it for its renderer, all the OpenGL boilerplate is automatically generated, including stuff for shader I/O and render targets
>>
File: moved_buttons.png (393 KB, 1373x1096)
393 KB
393 KB PNG
>>102369250
You got me. I forgor :P Haven't touched that code since march.
I also use truetype for fonts and stb for png support. I will also need something for audio mixing and something for network - I'm not _that_ ambitious. But UI, linear algebra, game specific data formats, scene and resource management - I all do on my own.

I am considering ditching stb, as it is very heavy code wise and I am only using png. Decoder for that does not seem to be that hard to make.

Anyhow - I moved the brick placement buttons to the tools menu.
>>
>>102370949
>I am considering ditching stb, as it is very heavy code wise and I am only using png. Decoder for that does not seem to be that hard to make.
I'm considering doing the opposite lol. Maintaining it is such a hassle.
>>
File: output.webm (2.34 MB, 1280x720)
2.34 MB
2.34 MB WEBM
Progress on the object tool. I need to rework the way objects rotate. Right now they rotate from their origin but it cause some weirdness when picked up not on the origin. Also it doesn't move the objects on top of a moved object.
>>
>>102372538
Cool
>>
>>102370011
>warrants the terminology overflow
You say this but most of the terms seem to describe abstraction built ontop of threads yet people act like they're threading fundamentals
>>
>>102369658
Did you just write an entire story telling this guy how to make his game based on a single sentence
>>
File: AllYourWhatYouSay.png (165 KB, 666x431)
165 KB
165 KB PNG
>>102344325
Anybody here actually work in the games industry?
>>
>>102373112
no
>>
>>102373112
I made two edutainment games for a nuclear power plant (for the worker training), does that count?
>>
bump
>>
File: 43814[1].jpg (55 KB, 512x384)
55 KB
55 KB JPG
Given the screen's coordinate, how do you determine where the point is on an isometric map with elevation and slopes like this?
>>
>>102377597
if you have the stomach for it look into spatial transforms. fuck, that's just going to pull up AI garbage. this stuff:
https://www.cis.rit.edu/class/simg782/lectures/lecture_02/lec782_05_02.pdf
>>
>>102377597
find the column of tiles, iterate through them from bottom to top and check their heights vs the cursor position
>>
>>102377597
If your game supports arbitrary overlapping tiles, then you basically do raycasting.
However, in the example you posted, it’s probably just a 2D tile map that looks isometric, so you can work out exactly what tile you are on, then work out the height from that.
>>
look at how fucking clean this API is.

dynamically loaded functions for dynamically loaded libraries from other dynamic libraries at runtime, with options for statically built versions, all in pure C.

frameworkdev > enginedev
i feel more accomplished than any vulkan renderer has ever made me feel
>>
File: clean2.png (6 KB, 949x128)
6 KB
6 KB PNG
>>102379971
> guy just discovered typedef function pointer's
> loses all over it
Any decent game programmer knows this stuff. Next you will find memory arena and think of it as something new.
>>
File: two.png (25 KB, 991x243)
25 KB
25 KB PNG
>>102380008
multithreading interface
>>
>>102380008
im learning and building, not bragging.
>>
>>102380033
> frameworkdev > enginedev
totally learning not passing judgement
>>
>>102379971
>frameworkdev > enginedev
what does that even mean?
>>
>>102380046
true but the point i was trying to get across is that i am having a lot more fun learning about handling function addresses and i feel very accomplished about it, moreso than I would feel doing the gamedev equivalent of building a PC aka writing a vulkan/openGL wrapper
>>
>>102380063
Oh I totally agree with you on that part. writing a vulkan/opengl/direct3d wrapper is the least interesting part of game dev. 100%
>>
>add physics library so I don't have to do my own collision detection
>realize I need to do it anyway because I need triggers the players can walk through
Fuck me, that's 3 days wasted.

>>102373112
I once applied to a studio in my city. They made these shitty pay or wait browser games and I played a ton of them in preperation. They never replied, but a coworker used to work with them and told me how things worked there. Horrible place to work apperently, like most of the game industry really.

>>102377597
You write a helper function that converts your coordinates, based on the angle of each axis. Dust of your highschool geometry book I guess.
>>
>>102380284
All roads lead to writing you're own physics engine.
>>
>>102379971
My goodness look a that hideous Crap.
>>
>>102379971
looks neat, can you show more code?
>>
>>102380405
here's the backend.

the framework loads the library, then retrieves the correct function for each address.
>>
>>102380284
Physics engines can support triggers.
>>
>>102380304
and lead to dropping your own and trying out bindings until one works in your game
>>
>>102380511
pretty good, you even have a default behaviour and error detection, do you support hotcode reloading too?
>>
>>102368916
I want to try that. Is it common lisp? Do you use that library which that tranny made a kind of metroidvania with?
>>
>>102381030
>that library which that tranny made a kind of metroidvania with
which one?
>>
>>102380284
What physics engine? I'm surprised you couldn't set up invisible triggers.
>>
>>102382305
He can, he just didn't know how so like a fool he gave up
>>
>>102381030
I don't use Trial, don't really trust it. I'm making my own using :claw-raylib, working well so far, just make sure you're ok dealing with cffi for the initial groundwork/wrapping. The other raylib library is easier to set up but is not as performant due to a bug in the library it uses sucking at passing structs by value (which to be fair is only done in a few places). Are you familiar with CL already?
>>
>>102382305
>>102382309
Cannon, but the es-wasm version, with my own abstraction on top. That's where it the issue was, so I just had to rewrite that, or I'll just live with some code duplication.
>>
>>102360760
Look at DoomBuilder or SLADE. They are literally made for this. Check out the Doom UDMF map format. You could convert linedefs to barriers trivially, as the UDMF map format is human-readable.
>>
What's your opinion on binary vs textual data representation, for example, for serialization purposes? Is it worth the space savings of binary in exchange of the impediment of editing the data?
>>
>>102384077
if its a small amount of data or it needs frequent tweaking: textual.
if its a large amount or it needs to be transmitted across the network: binary.
>>
>>102370949
>I am considering ditching stb
Is this is just a little editor that only needs a few icons? If that is so, then .xpm would be very appropriate; loading is just #include.
>>
Im considering your mom
>>
>>102385741
I can't edit these with paint.net and STB is a header only as well. But I can roll my own BMP support and zip them for extra nerd cred.
>>
>>102384077
A JSON file is going to be much larger than a binary file, especially if you're doing named data members, which, if you want it as readable text, you're probably going to do. 10-20x as large, or more. If it's a relatively small file anyways, it's fine. Otherwise, stick to binary unless you specifically need to troubleshoot/diagnose it.
>>
>>102344325
what data structure do they use for those space games with fuck huge map sizes? Is it just a chunk in a chunk in a chunk world type of thing?
>>
>>102387162
What kind of space game?
>>
>>102387351
mix of base building and rts
>>
>>102387162
>space
sparse octrees? space is 99% empty.
>>
>>102387391
Name an example.
You mean like starcraft?
That is not what comes to mind as fuck huge map.
>>
>>102382356
Only a little bit. I made a few simple scripts with it. I'm moderately familiar with elisp. I've messed around with raylib. I might be better off just making a game in C++ though, which I'm very familiar with.
>>
>>102388648
>I might be better off just making a game in C++ though, which I'm very familiar with.
Most likely. Try it anyways if you have any interest, it's surprisingly fun. Recompiling core game logic on the fly feels like cheating.
>>
File: 1650548617242.jpg (21 KB, 437x431)
21 KB
21 KB JPG
haha codebase starting to become a mess... I will NOT start over again...
>>
File: jocko_good.gif (671 KB, 480x270)
671 KB
671 KB GIF
>>102388844
basado
>>
I’m going to make my own cod game, with blackjack, and hookers. And Vulkan. Aiming for graphical fidelity around BO2, which is good because it grounds my desire to do over the top stuff. Don't know yet if I’ll use forward(+?) or deferred. Performance is a priority. The exception being that I want to use some kind of realtime GI because I don’t want to deal with lightmap baking unless it’s ridiculously easier to implement. For UI hopefully I can get away with using something like nuklear. I want to avoid doing my own UI at all costs at least for the initial prototype. Maps will be made out of modular pieces, that is if I cannot easily import bo2 maps. For now I only want nuketown. As for guns I will make my own. I plan on learning hard surface gun modeling by loosely tracing existing cod (and maybe Destiny) weapons in Blender. They certainly won’t look detailed but they be satisfying. I anticipate the hardest part will be animation, and not just the technical side. I want to avoid creating 3rd person animations at all costs. If I really have to I suppose I can use Cascadeur to do the heavy lifting. I don’t mind doing first person animations in fact I look forward to it. I have an idea for an application tailored to making first person animations but it’s hard to say whether that or the game will come first. I don’t care about genuine assets because I don’t plan on releasing an actual game. It’s just a project to propel my desired fps engine. If I can make something that me and my friends or anons can enjoy than great. Initial game modes will be team deathmatch, domination, hardpoint, and capture the flag. Hitscan bullets instead of physics projectiles. The exception of course being grenades and rockets.
>>
>>102389684
where have I seen this copypasta
>>
File: 1721801509815.png (432 KB, 640x640)
432 KB
432 KB PNG
when do i start enjoying coding?
>>
>>102391282
It can certainly be a tedious slog.
For me, the payoff is seeing something actually work.
>>
>>102391282
You either born with a soul or you aren't. You weren't.
>>
The stuff I get recommended on my front page
https://youtu.be/lGii-gGx1wM
>>
>>102391282
I just wrote an anti-anti-anti-debug library that detects and removes user-mode hooks commonly used by debugger-hiding plugins like ScyllaHide and so on. It was pretty fun writing it, and I learned a lot from the process.
You start enjoying coding when you start doing cool shit.
>>
>>102391282
you don't?
>>
apple tree.
>>
>>102391282
What lang?
>>
File: going_forward.png (286 KB, 1149x1163)
286 KB
286 KB PNG
Core features are implemented, but some polish is required for the general ease of use and UX. Which is what I intend to do in the next week or so. At the same time, I'm thinking over the compilation stage between this brick-based model and a usable 3d mesh.
>>
>>102380511
wtf if unbound?
>>
>>102396422
is*
>>
File: 1723160116962816.jpg (10 KB, 226x223)
10 KB
10 KB JPG
>>102388844
Wtf are you me?
>>
>>102391282
Have you learned how to enjoy your own suffering yet?
>>
>>102399062
I don't think he's read enough Dostoyevsky yet.
>>
bump
>>
File: 411126856843141120.jpg (55 KB, 700x604)
55 KB
55 KB JPG
>>102391282
When you stop worrying about optimization (or following rote guides and algorithms on coding) and start testing the limits of mathematical expression instead.
>>
>>102373112
Not at the moment but I've worked in it for 4 years over as many jobs. It's as bad as they say.
>>
I thought the thread would be more active in the weekends, but it's fucking dead.
>>
File: semaphore.png (225 KB, 1009x1086)
225 KB
225 KB PNG
I fixed the orthographic projection.
>>
>>102401559
Good. Now it's time for an orthopaedic inspection.
>>
gosh i need some progress so i can post here
>>
I'm working with SDL2 on windows and I can't seem to load png files (the code compiles and runs but the sprite doesn't appear). I'm following the "remaking cavestory in SDL2 tutorial," so it might be a version issue, can anyone tell me if "SDL_CreateTextureFromSurface" and using SDL_RenderPresent is proper? Am I missing a dll file? Anyone run into this issue before?
>>
>>102402311
ngmi just use unreal/unity/godot, chad++ isn't for you
>>
>>102402446
Switching around when things get a little bumpy is the mark of eventual failure, anon. I'd like to keep at it with this.
>>
>>102402311
SDL has error codes and error messages, start there
>>
>https://www.youtube.com/watch?v=whyJzrVEgVc
>https://www.youtube.com/watch?v=TrHHTQqmAaM
this guy is such a gem
>https://www.youtube.com/channel/UCly0QRJAaJ2UGSGycOQoOdA
it's rare to find actual help with graphics rendering, and apparently PoE 2 went from directX 9 to directX 11 to Vulkan, so fo you Vulkan nerds you made the correct choice.
>>
lol, lmao even.
>>
Do I need to start using quadtrees or is there a simpler way to check for collision/overlap in my game loop than the dumb n^2 way?
>>
>>102405403
grids are simpler
>>
>>102405403
a simple grid, aka array of arrays/vectors, any entity registers itself to a cell based on its position, collision checking is simply checking the neighbouring cells. cell size should be big enough to fully contain an entity, bigger entities can end up on their own simple list because there's few of them anyway.
a somewhat simpler way is bruteforcing it on a sorted array (based on the most relevant axis) so you can early out, the rest is a simple binary search.
>>
>>102405463
>>102405419
Thanks, that could work.
>>
>>102405463
>>102405498
i forgot that you can optimize bruteforcing even further by ignoring duplicate checks (A vs B is the same as B vs A, that's why you sort), you can also pack your rectangle data tighter, for small space you can fit the position and size in a single integer, or drop the size all together if every entity has the same size. the compiler will autovectorize the whole thing, and cache will take care of the rest. it's so fast and can handle a high number of entity it'll make you feel stupid that you underestimated the cpu.
don't forget that bruteforcing is always faster on a small number anyway.
>>
>>102405532
Yeah I can bring it down to N^2/2, that'll probably work until like 1000 entities or something.
>>
>>102405532
You shouldn't try to brute force n^2 algorithms
>>
File: 1726380108802796.png (198 KB, 376x468)
198 KB
198 KB PNG
I hate all the artsy fartsy games about mental illness and depression and shit. Why can't we have games about becoming so powerful, you overcome anything and everything.

I want to make a survival horror game where the protagonist start as a normal guy in silent hill type setup but as time goes on instead of being a weak loser the guy would becomes increasingly unhinged by the monsters he sees and eventually becomes a badass who kills monsters with his bare hands. 90% of the game would be survival horror but it would slowly transition to an action game.

The music too would shift from spoopy background music to slow menacing, powerful drumbeats by the end, to signify that the protagonist has become the Chad he always was, and to signify that the monsters are the weak prey now.

In the end the guy wakes up from a coma with a cocky smile on his face

Yes it's just a powerfantasy but there's nothing wrong with that. It's a lot better than having selfpity fantasies like a lot of indie games about mental health of whatever fruitcake shit.

I'm actually an embedded dev, i don't know game dev and i can't do art
>>
>>102402731
Now ask him why his game runs like shit
>>
>>102406888
>In the end the guy wakes up from a coma
No. Just no.
>>
>>102407113
works on my machine
>>
>>102408839
Ok we can remove that part. What about it being a delusion or a dream?
>>
>>102380031
>COMPLET
heh
>>
>>102408867
Why? Just have it be real - if you want to do some follow up game without the monsters, just have it be that he completely destroys them.
>>
>>102405586
retard
>>
>>102409994
Go back to school and learn about big O
A linear increase in speed from SIMD doesn't mean shit to an exponentially scaling algorithm
>>
>>102410134
>big O
retard
>>
>>102410198
When you become a big boy and you program a real game you'll discover how important it is
>>
>>102405532
My entity list is just an array of pointers to the entity objects. I'm curious, how much of a speed increase would switching to a contiguous array of the data itself yield? Wouldn't be possible and I'd have to re-do the whole thing but I'd like to know how much worse off I am.
>>
>>102410232
depends on the size of the entity in memory
>>
File: mini.jpg (125 KB, 599x640)
125 KB
125 KB JPG
If you game doesn't run in a minipc, it's bloated. Your opinions on garbage collection, objects, languages, engines, frameworks, they are all irrelevant. This is the true benchmark. Anything else is cheating.
>>
>>102410322
that looks better than my current laptop
>>
>>102379971
So, you just reinvented COM?
>>
>>102405403
Depends. For a simple AABB there are simpler way to do it.
>>
>>102405586
That is strongly dependent on the size of the task size and constant before the O. If you have - I dunno - 10 boxes to collide against - then it probably does not matter what the complexity is. But for 20k objects to collide - obviously it matters.
>>
>>102405403
depends on the size of the map.
I personally never reached the point where I needed to fix the naive code because I could spawn 1000 entities and it would still run at 60fps on a 2008 CPU, and I was doing networking so I could barely handle 100 entities moving due to my naive networking code.
>>
How do you deal with overscoping?
>>
>>102411905
organize your scope on a scale of most important to least important and work on most important first
>>
>>102411905
by having specific goals and pillars for your design.
content overscoping is impossible to recover from, just accept the fact that you can't have tons of art/music/assets, or at least make a finished product that you can add stuff to later.
game mechanics overscoping is actually the easiest to deal with, simply cutdown mechanics until you have something solid, less = more, nobody cares about having tons of shallow systems, it's just leads to more buggy code to maintain instead making the people have more fun. a focused design with tight and few mechanics will always beat the kitchensink of a game.
>>
>>102411905
by embracing it.
>>
File: 1599928737904.jpg (96 KB, 736x736)
96 KB
96 KB JPG
>>102379971
>>102380511
what the fuck is this monstrosity
>>
>>102410215
lold hard enjoy your first job when you are out of school in 5 years
>>
Explain as to a small child: why some things in the game code cannot be ideally multithreaded across all cores, resulting in a multiple increase in FPS depending on their count?
>>
>>102412867
most operations depend on the result of another
>>
>>102412867
it's hard and requires extra IQ points
you can't abstract it for shitware devs either
>>
File: penis.png (67 KB, 828x481)
67 KB
67 KB PNG
Godot problem with using signal for area2d.

Can anyone explain to me why the print function, which has been copy pasted 3 times in this function, cause errors of the variable being "null" for the first two instances, but not for the third. This variable is declared earlier in the code in a function that turns the area2d's monitoring on, so I don't understand how it could ever perceived it as null, let alone only for the first half of the function.

Any help would be greatly appreciated, I've been bashing my head against the wall for the past 2 days trying to figure out why its doing this.
>>
>>102372538
How the hell do you manage to record your progress like this?
Every damn OBS setting I've used produces 25fps garbage.
Any suggestions?
>Inb4 upgrade.
Yeah, like 16 cores of goodness and and RTX 4090 with 64 gigs of RAM ain't enough for this piece of shit.
>>
File: fonts.png (219 KB, 1130x736)
219 KB
219 KB PNG
>>102412867
Every frame is built of interlocking systems which, in turn, rely on hard to parallelize algorithms, often of the deep & branch kind. Which is why most of parallelization in modern games comes from either trivially parallelizable algorithms ( like shadow volume calculations ) or pertain to a specific kind of games - namely - massive simulations - and even there it is hard to scale past six or so cores.

On an unrelated note. It turned out my issues with font rendering were due to enabling depth-write on the font render pass.
>>
>>102413253
Probably some weird scope issue. You should declare placeholder somewhere else and see if the issue disappears.
>>
>>102413737
I'm using a state machine and the variable is declared in the enter function, so I don't really know where else I would do it. I have tried making a new function with the explicit role of declaring the placeholder variable and calling it from the enter function and the same thing happens. Also, I didn't mention this before, but if I change the if statement then it can cause the third print function to not work either...
>>
>>102413709
Although, there is still some fuckery with kerning - as the 'Move' is all wrong. Sigh, back to reading the docs.
>>
Is there a way to define the default version of c++ for visual studio??? Every time I start a new project it's set to c++14
>>
>>102346155
Used a number of years ago, although I don't think it's changed hugely. Since it's a framework rather than an engine you need to look after a lot yourself, so I never got very far using it. I've tried using defold recently which allows you to script in lua whilst handling a lot more for you, and also has some good tutorials. Depends what you want to get out of it, ultimately.
>>
>>102413709
Am I correct in my belief that it is absolutely possible to parallelize the rendering engine multiple times over at least 16 cores, unlike game logic?
>>
>>102414316
In Vulkan you can compose multiple command buffers in a separate thread, but whether frustum culling, occlusion or resource loading can be parallelized it is entirely up to your engine.

Once command buffers are submitted - it is all GPU side and from the perspective of the game - it is a serial operation. I _think_ that several frames in flight might be doable on separate cores but that is probably messy.

Look at it this way - if there was a trivial way to parallelize games, people who get paid to write engines would already be all over it.
>>
>>102414140
When you use the default template to create a project it uses the default settings, go figure. If you want custom settings then make a custom template and use that to create a project. I will refrain from berating you for even complaining about having to customize the most simplest settings for your project.
>>
>>102414316
Almost all of the actual work done in a renderer is already parallelized on the GPU. And, finding ways to move parts of the renderer to the GPU is often better than multithreading it on the CPU
>>
Do people use their GPU for physics?
>>
>>102414928
Nope
>>
>>102414951
What about compute shaders?
>>
>>102414928
Yes
>>
>>102414928
PhysX used to work like this, don't know why they stopped but I'm guessing it wasn't worth
>>
>>102414928
only for simple particle physics. you'd be insane to do anything further
>>
>>102415817
do you think people do fluid dynamic sims on cpu?
>>
>>102364214
I started working on an engine in Haskell, but it has been on hiatus for a while now after I got a triangle on the screen and wanted to start on sound. My triangle used GLFW, Vulkan and Reactive-Banana. I wanted to start again last weekend, but I still have other stuff to work on.
>>
>>102356208
looks like gedg is still a pedogeneral, no thanks
>>
>>102406888
Based but skip the coma/dream part, would play.
>>
>>102415897
fluid sims are particle sims
>>
>>102413311
ffmpeg -i output.mp4 -c:v libvpx-vp9 -vf format=yuv420p -an -b:v 1M -fs 3M -pass 1 -f null /dev/null && \
ffmpeg -i output.mp4 -c:v libvpx-vp9 -vf format=yuv420p -an -b:v 1M -fs 3M -pass 2 -y output.webm

And I also capture via ffmpeg
>>
pipelineConfigInfo.inputAssemblyInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;

what in the actual unholy fuck is this abomination?
>>
>>102418848
Setting a struct field to a constant.



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