[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 deleted.
Cute edition

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

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.
>>
thats a man
>>
File: 1728768574126.png (22 KB, 480x334)
22 KB
22 KB PNG
>Godot fund went down by 250$ again
What happened this time?
>>
>>102795428
sdl3 is kino and im tired of pretending that it isn't
>>
>>102795580
Who says otherwise? The only bad thing is it is not finished
>>
>>102795428
That's a man
>>
>>102795428
That is most definitely a man.
>>
Why can't you guys make a 3d game? Doesn't computer science teach graphics programming?
>>
>>102795696
>>102795771
Yeah it's some Russian dude. He's starting to age now, that's one of the very early videos he posted. Some other Russian on /int/ posts his dick pics sometimes.
>>
>>102795531
>few hundred dollars more and I won
chudcacas this is your mindset geg
>>
>>102795696
Damn the tech is getting good
>>
>>102795951
She is 30 anon, she is already old in that video
>>
Dogshit thread, I hope it gets deleted and someone makes a proper one
>>
>>102795580
Yeah, the development time spent on their new shader language (and the maintenance it will require going forward) isn’t a waste at all! We needed a shader language that allows you to: mix and match post types (like Rust!) or pre types, omit brackets (like Python!), disallows shadowing (like… CoffeeScript and Vlang), and adds var (like Rust!) - but we certainly didn’t need var to act as an auto equivalent, having to write
var float4 v = float4(0);
is fine!
>>
>>102795924
Multiple 3D games are posted here every thread
>>
>>102796075
Is there a new shader language? I was reading the wiki of the SDL3 stable release and they linked an article explaining why it was better to stick to the existing ones
>>
>>102796022
I gotchu anon
>>
>>102795924
bait because the only screenshots are from schizo's using vulkan.
if you want 3D games go to /agdg/, the schizo's here really don't like it when they are told that people can accomplish everything they did in like a week of unity + a free plugin, and that modding a unity game is better than a C++ game, and every game with massive mods are made using unity de-compilation.
If you made a 2D game, you better just go to /agdg/ because the schizo's don't like 2D games because 2D is too easy to make (I don't understand the logic, it's easier to make certain 2D games in general purpose game engines, because of built-in UI's, plugins and special effects, but the games aren't 2D, it's 3D with layers in a 2D perspective).
>>
>>102796075
Sdl3 doesn't support GLSL?
>>
File: 1725518923701993.gif (408 KB, 500x440)
408 KB
408 KB GIF
>>102795428
Putting the gay in gedg
>>
>>102795428
he cute
>>
>>102795428
>>102795445
>>102795696
>>102795771
>>102796275
I hate you. I fucking hate all of you. I miss when I could see a pic of cute chick and know it was just that. Fuck all of you and all the trannies who now make me have to second guess everything.
>>
>>102796075
>>102796197
bot post?
>>
>>102796360
Tranny psyop. They're neet men trying to replicate women. So what is the synthesis of this? Furries. The white woman desire to fuck dogs is mashed with anime goonery to create monstrosities.
>>
>>102796139
Only because the new language isn’t ready (and, it’s embarrassing).
https://github.com/libsdl-org/SDL_shader_tools/blob/main/docs/README-shader-language-quickstart.md

>>102796229
It does, but they also made their own.

>>102796374
Retard
>>
>>102796075
actually, sweaty, it's on hold indefinitely
https://github.com/libsdl-org/SDL/pull/11062#discussion_r1788123395
>>
>>102796426
Looks like that got half a dozen commits over the last two years, I wouldn't worry about development time being wasted
>>
>>102796511
Except that the lead dev on it is also the largest contributor to SDL (icculus), and las month he updated it with copes:
>(To restate: _you do not need to use the new shader language if you don't want to!_ But here are some reasons you might want to use it.)
https://github.com/libsdl-org/SDL_shader_tools/commit/c201a3d6447f236f00973861af3d30b1a67cae78

>>102796497
They just don’t know when it will be ready
>>
>>102796426
This is the article I was talking about, I don't know if it's written by a different person https://moonside.games/posts/layers-all-the-way-down/#:~:text=The%20problem%20we%20want%20to%20solve
>>
>>102796627
It was (that is, it was written by the person who made that PR, not the person working on the shader language).
But it does reveal how little they thought through the entire thing - they made the language, then realised there was no easy way to use it on platforms they target.
>>
>>102796420
>word words words ahh the furries!
I'm not a furry or stand with them, I just like cute anthro girls, but when has a furry ever been a problem compared to an actual tranny? Never, furries have one pro and that is that they keep to themselves.
>>
>>102796360
He says as he posts generic animu human girl.
>>
what a shitty thread
>>
What language/s do you use?
>>
File: 191 (1).jpg (147 KB, 970x1200)
147 KB
147 KB JPG
Thank you, maid for cleaning up the general.
>>
Alright, got infinite terrain with a fully directional chunk trigger system operating on virtual chunk space coordinates. Have a full simulation layer now, finally decoupled from the renderer.

The map being shown is not anywhere near the amount of chunks I want for render distance, or how I want them to load in / out. Going to be doing 49 chunks and loading outside of the view of the player at all times. This is just for demonstration.

Next up is fix a few artifacts, do clipmap, expand the terrain to the full 49 chunks I want ( with LOD ), and then do lighting.

Praise be to the King Jesus Christ.
>>
>>102795428
to whoever baked this shit. please kill yourself
>>
>>102796075
Anyone who prefers to use an abstraction over the real thing is a moron.
>>
>>102795924
>Doesn't computer science teach graphics programming?
No necessarily, In my college it's not always available, I guess because low demand? I hope It's available this semester so I can style on them.
>>
>>102798267
Cute maid!
>>
uh what the fuck happened to the actual thread
>>
shout out to the schizo in the last thread that accused me of secretly being a leftist tranny trying to infiltrate 4chan by pretending to be a nazi and samefagging responses agreeing with my post because I pointed out that forking Godot is stupid and meaningless. Also shout out to the gooner Chad from last thread
>>
>>102799331
SNCA
>>
>>102798601
im guessing you program in assembly and rewrite your project for each platform
>>
File: 1716499749274179m.jpg (93 KB, 1024x772)
93 KB
93 KB JPG
My life is an abstraction.
>>
>>102799455
I don't know what that means
>>
Got back from church, prayed up and back to the grind. Realised how dumb my entity system was the other day and spent yesterday fixing it and I'm very happy with how that turned out. Today I've mostly reworked some IO/file loading stuff and will hopefully have building structures functional by the end of the day inshallah
>>
File: tank_colours.gif (567 KB, 320x240)
567 KB
567 KB GIF
>>102800264
>>
File: 1444786648444.jpg (138 KB, 970x582)
138 KB
138 KB JPG
>>102795428
>deleted image
>check archive
>two threads with #214
>see a deleted post
What are you jokers up to? This may be the first /gedg/ thread without a proper image.
>>
File: sprites_2.png (323 KB, 1361x637)
323 KB
323 KB PNG
>>102798489
Bretty gud. I want to do something similar in my game - where terrain can be extended 'infinitely' from the area player starts at.

On related news - progress with sprite generator.
>>
>>102800847
God Bless.

Making this infinite terrain made me make a simulation layer or invisible world and not just play around in the renderer.

Are you making procedurally generated sprites?
>>
>>102800264
I presume you are operating under instruction from God?
>>
>>102800264
mashallah brother
>>
>>102800469
You should create a new thread yourself, I'll post there, I'm not bumping this 'deleted file' trash dumpster, s*g*d.
It's best that OP image is something that various Anons here made, or general game engine architecture image.
--
> no fags, tr*ps, f*rr*es, drugs, gambling, AI slop, tw*tt*r or Pl*bbit screenshots, J*wtubers, and other bullshit...
>>
Hi, I'm a small dev who has only ever made stupid games, more comparable to flash minigames than anything else.

Being a single person, with the misfortune of having 0 artistic abilities and a great ambition (comparable to that of Bethesda with Buggerfall), what do you recommend me to achieve with nothing at my disposal?

Let me explain better, which genre and type of game requires the least amount of artistic/design skills?

Besides, how can I improve?
>>
>>102803488
i dont think there is a single game genre that doesn't require a massive amount of art.

the trick is as a programmer is to realise that the art doesn't have to be good.

+ there are some ways as a programmer you can make things look nice (lighting, lerps and tweens, ect.)

+ you could always find ways to automate and procedurally generate art. (not talking about ai sloppa)
>>
>>102803488
The least amount of art would be traditional terminal-based roguelike game.
> red 'E' == { name = "Greater Evil Eye of Ultimate Death", attack = 144, defense = 96, ... };
However, I don't think anyone plays those games outside of niches nowdays...
I found a lot of good (CC0, CC-BY, copyrighted) sprites on:
> spriters-resource.com
> itch.io
> opengameart.org
And again, in "good", I mean they're not terrible, gameplay should be simple and fun.
>>
File: landmark.png (358 KB, 1156x9452)
358 KB
358 KB PNG
Last post in this dumpster fire thread, write around 400 lines of code for landmarks...
It was 'bulkrename *' 'ls -l' + Ctrl+R + multicursor abuse, all the way, but it's pedantic.
>>
>>102803788
Yandev hello
>>
>>102803488
if you want to make this for a living pay someone for the art
if you are doing it for fun use basic shapes/emojis
>>
>>102805303
>>102803488
forgot to say you can download unreal/unity and grab 3d models from their store its cheaper than paying someone for it but it wont look 'unique' if you want that
>>
I decided to give Unity a try after not using for like 5 years and having used Godot a bit recently, like few months ago. And my expectations were totally ruined. So, I run Unity, I grab my Blender scene file and drag into Unity. Error "blender cannot be launched" whatever, spent half an hour working around it and finally symlinking blender into /usr/local/bin (Godot allows you to just configure Blender path in options and make it work in 1 minute). Then my scene finally imports and... The importer is absolute garbage! Not only it cannot ignore tons of hidden objects in my scene, it also doesn't support any import suffixes whatsoever (stuff like -col, -convcol, -colonly, -navmesh, -rigid from Godot). My disappointment is immeasurable and my day is ruined. I expected Unity to have what Godot has and more. Oh how wrong was I. Back to Godot, I guess.

Here Unityfags take a look how a decent importer looks in this year and age:
https://docs.godotengine.org/en/3.5/tutorials/assets_pipeline/importing_scenes.html#create-collisions-col-convcol-colonly-convcolonly

PS: I just googled how is UE workflow with importing/reimporting of blender scenes and it seems it's garbage. There are dozen of addons that try to fix this, but the ones I looked at I'm not sure they even allow you to have proper collections, for example official send to unreal addon wants you to use some weird structure on blender side. Why the hell is that even needed... Also people say animation reimport doesn't work automatically even with fbx. Seems no one can really match Godot in terms of rapid import/reimport.
>>
File: pong.jpg (831 KB, 2048x1326)
831 KB
831 KB JPG
>>102799671
real engineers design all logic manually
>>
File: 1715204737520843.png (77 KB, 372x300)
77 KB
77 KB PNG
the first day I looked at dx12 is was fucking moon runes

by the 3rd day I could recognize the patterns

by the 5th day I can draw a triangle from scratch
>>
>>102806727
Good on you. I have attempted to learn opengl several times and bounced off an impenetrable wall of boilerpalte every time.
>>
>>102806727
>took anon 5 days to absorb about 30 minutes worth of material
>>
So I figure the skeleton of a game engine would be a solved problem by this point? Any good resources on how a game engine should be structured?
>>
>>102807582
>So I figure the skeleton of a game engine would be a solved problem by this point?
nope
>>
>>102807582
just make your game , but from simpler principles. Don't think of making a general purpose game engine.
>>
>>102798601
Software engineers build abstractions so more people can use their software. Not every platform supports Vulkan. So ideally you build your high level API -> Vulkan | ... backend
>>
>>102808108
braindead nodev statement

engine architecture has nothing to do with making your game engine "general purpose" and everything to do with actually making a game
>>
>>102808221
I'm a yesdev, and I'm not braindead.

I figured I would type the general purpose thing because he explicitly said it was a solved problem.
>>
>>102807582
No. It's way too complex to have a defined structure.
>>
>>102807582
There is an infinite loop in main which reads the system time at the start of each iteration and compares it with time at beginning of previous iteration. This difference called delta is then passed to functions which draw things and calculate game logic. After that, at the end of iteration don't forget to insert calls which poll keyboard and mouse events. That's basically it.
>>
>>102808221
?
It's good advice, your engine will be a lot simpler if you can specialize it to the specific type of game you're making. And, a lot of standard general purpose game engine features are complicated and only exist to make the lives of non-enginedevs easier
>>
>>102796075
Their new language isn't mandatory so who cares.

Personally I'm sticking with SLang.
>>
What's a good place to look for a Particle Artist?

pfx art is one of the big roadblocks we keep running into
>>
File: 16386.jpg (140 KB, 384x545)
140 KB
140 KB JPG
>>102808883
Like I have been using some basic particles being detatched from the boxes and that's difficult to solve unless we have a flame particle for each box the ground reflection was hardcoded to 'match' the client-side particle collision which only worked for flat ground lol
>>
I want to make a very well programmed game engine (a 2D and simple game engine).
I plan to read Clean Architecture: A Craftsman'S Guide to Software Structure and Design (Robert c. Martin), to study data structure and algorithms, to analyze and optimize my algorithms the Big-O notation and to study the necessary Windows API.
Am I doing well?
>>
>>102809251
As long as you're probably reading that book for like 1 hour outside of an 8 hour day of building and you're referring back to the book when you need it.

But if you're doing this as like a preparation stage which will delay your building? No, then you are not doing good in this regard.

Start building, use books only for reference or spare time study.
>>
>>102809272
Well, I've made a game engine before and I've made a lot of mistakes that I want to fix. So my plan is to study theory and do little practical things that will be useful to me in the future.
>>
Spent the weekend implementing archetypal ECS over and over again

int ecs_bench(void) {
World world;

for (size_t i = 0; i < ENTITIES; ++i) {
world.spawn().insert(Velocity {1.f, 2.f}, Position {0.f, 0.f});
}

float final_x = 0.f;
float final_y = 0.f;

world.add_system([&](Query<const Velocity, Position>) {
for (auto [v, p] : query) {
p.x += v.x;
p.y += v.y;
final_x += p.x;
final_y += p.y;
}
});

for (size_t i = 0; i < ITERATIONS; ++i) {
world.progress();
}

printf("Final: (%f, %f)\n", final_x, final_y);
}

int flecs_bench(void) {
flecs::world world;

for (size_t i = 0; i < ENTITIES; ++i) {
world.entity().set<Velocity>({1.0f, 2.0f}).set<Position>({0.0f, 0.0f});
}

float final_x = 0.f;
float final_y = 0.f;

world.system<const Velocity, Position>().each([&](const auto& v, auto& p) {
p.x += v.x;
p.y += v.y;
final_x += p.x;
final_y += p.y;
});

for (size_t i = 0; i < ITERATIONS; ++i) {
world.progress();
}

printf("Final: (%f, %f)\n", final_x, final_y);
}
>>
>>102809505
How did you learn ECS? And how did you go about displaying the time it takes to run the program?
>>
>>102809733
Trial and error. My first attempt was much slower, then my second attempt much faster but overly complex. It took a third try to really simplify the implementation.

When you think about it as an Entity is just:

struct Entity {
A a[size];
B b[size];
};


That's quite easy to keep in mind while designing data structures and access patterns. Then an Archetype is just a collection of Entities with the same components. I may try writing a trait to specialize Entity storage method (so not just archetypal)

I just used "time" in my shell to time the execution of each command.

Also with "bench" which is just a simple C++ program to run the command in the first argument:

Here it is again with 100K entities. I'm pretty pleased with the way it turned out:

$ ./bench ecs3 && ./bench ./ecs_flecs_bench
Final: (17179869184.000000, 34359738368.000000)
Execution time: 202.315 ms
Final: (17179869184.000000, 34359738368.000000)
Execution time: 459.111 ms
>>
I need to stop going into game dev threads on /v/, its filled with retards
>>
A post for /agdg/
Edge detection glsl

#version 450

layout (set= 0, binding = 0) uniform sampler2D color_texture;
layout (set= 0, binding = 1) uniform sampler2D depth_texture;

layout (location = 0) in vec2 in_uv;

layout (location = 0) out vec4 out_color;

void main()
{
vec2 uv = in_uv;
vec2 texel_size = 1.0 / textureSize(depth_texture, 0);

float depth_center = texture(depth_texture, uv).r;
float depth_left = texture(depth_texture, uv + vec2(-texel_size.x, 0.0f )).r;
float depth_right = texture(depth_texture, uv + vec2( texel_size.x, 0.0f )).r;
float depth_up = texture(depth_texture, uv + vec2(0.0f , texel_size.y )).r;
float depth_down = texture(depth_texture, uv + vec2(0.0f , -texel_size.y)).r;

float weight = abs(depth_center - depth_left) + abs(depth_center - depth_right) + abs(depth_center - depth_up) + abs(depth_center - depth_right);
float threshold = 0.01f;
float edge = step(0.0f, weight - threshold);

vec3 color = (1.0f - edge) * texture(color_texture, uv).rgb;
outColor = vec4(color, 1.0f);
}
>>
File: 1727377419209132.png (63 KB, 204x248)
63 KB
63 KB PNG
>>102812150
Forgot the vertex shader

#version 450

layout (location = 0) out vec2 out_uv;

const vec2 positions[4] = vec2[4](vec2(-1.0f, -1.0f), vec2(1.0f, -1.0f), vec2(-1.0f, 1.0f), vec2(1.0f, 1.0f));

void main()
{
vec2 pos = positions[gl_VertexIndex];
outUv = 0.5f * (pos + 1.0f);
gl_Position = vec4(pos, 0.0f, 1.0f);
}
>>
>>102809901
>>102809733
:%s/Entity\ storage/Component\ storage

Also I meant Entity is just an index into the Archetype column (component) row (data). Really trivial. The only non-trivial implementation detail is moving entities and their component data to a different archetype if their mask changes.

when moving entities and their component data to a new archetype if its components change.
>>
File: rer.jpg (850 KB, 2048x2048)
850 KB
850 KB JPG
smfl feels very comfy but I have a feeling I might suffer when it's time to get out of tetris phase and make actual games. Should I just learn an engine?
>>
is the canonical way to rotate an object about a local axis to translate it back to the origin, rotate it, and then translate back? I ask because usually they specify the rotation axis for rotation operations as unit vectors
>>
>>102813469
...or is it better to just recompute the transform matrix from scratch whenever a parameter (position, rotation, scale) changes? but then I guess I would need to keep track of rotation about all 3 axes in case I want to incrementally adjust them

I'm confused, guess I should read a book
>>
>>102813469
Use consistent methodology that gives you desired results. If you fucked something up, it will come back to bite you, and you'll address ut then. Fix issues you have instead of worrying of things you might face.
>>
>>102813469
i dont understand your question
>>
>>102813693
well lets say I previously translated an object to position (10,0,0), or x=10, in the last frame
this frame I want to rotate it about its y axis, which is at x=10. If I try to form a vanilla rotation matrix with a quaternion, the input is a unit vector and an angle to rotate about that unit vector by. The unit vector is at the origin, so I'm not sure what's the best way to rotate about the y axis at x=10 instead of x=0
>>
>>102813827
Typically to calcluate the transform matrix of an object you apply scale then rotation then translation
>>
File: 1728841201421442.jpg (100 KB, 781x1179)
100 KB
100 KB JPG
>>102813897
oh okay, sounds like I should not try to modify the existing matrix and just rebuild it from scratch every time I need to
>>
>>102795428
Does anyone know anything about Tilengine and if it's worth getting into? It looks neat because it focuses only on graphics and has a ton of features like sprite animation by default.
>>
>>102812991
Yes. Even using existing engine to make game is extremely time consuming. Writing engine yourself in most cases means you'll not even get to making the game part. There are exceptions ofc. On the imageboards over the last 20 years I've seen maybe 2-3 games with self made engine, all 2d, all built by Terry Davis tier wizards.
>>
>>102815002
2D engines are pretty easy to make
3D engines are really hard
>>
>>102815041
they certainly can be but they really don't necessarily have to be
>>
>>102815204
2D engine might be hard for someone who lacks experience but it's something you can put together in a few weeks as an intermediate programmer
3D engine is a huge undertaking, supporting any sort of real game is a complex task, can look deceptively easy for people who have put together a tech demo and haven't had to deal with the making a game part
>>
>>102813939
Correct. From a computational standpoint it's basically the same amount of work either way.
>>
>>102803587
>>102805303
>>102805317
In addition to the assets discussion, I was referring to the general complex. Basically I mentioned the genre to know which one requires fewer resources, not only in terms of assets, but also interfaces, scripting and so on
>>
File: roll.webm (69 KB, 1024x600)
69 KB
69 KB WEBM
>>102812150
Here is my rolling shader. It is made for Godot but it should be easily convertible. It's been a year since I wrote it and never touched it again so don't ask me what each part does. I am also no longer working on the game
shader_type spatial;
render_mode cull_disabled ;

uniform float start_at: hint_range(0, 1) = 0.8;
uniform float rolls = 2.0;
uniform float min_r = 0.02;
uniform float max_r = 0.2;
uniform float mesh_length = 2.0;

uniform sampler2D front_texture : hint_white;
uniform sampler2D back_texture : hint_white;

const float PI = 3.14;

void vertex() {
if (UV.y > start_at) {
float part = UV.y - start_at;
part /= 1.0 - (start_at);
float prog = part * rolls * 2.0 * PI - PI/2.0;
float r = max_r - min_r;
r = min_r + r * (1.0 - part);
r *= 1.0 - start_at;
VERTEX.y = sin(prog) * r + (max_r * (1.0 - start_at));
VERTEX.z = (cos(prog)) * r + (start_at * mesh_length - mesh_length / 2.0);
}
}

void fragment() {
vec2 tex_coord = UV.xy;
tex_coord.x = 1.0 - tex_coord.x;

vec4 color;
if (FRONT_FACING) {
color = texture(front_texture, UV);
} else {
color = texture(back_texture, tex_coord);
}

ALBEDO = color.xyz;
}
>>
>>102815234
>3D engine is a huge undertaking, supporting any sort of real game is a complex task, can look deceptively easy for people who have put together a tech demo and haven't had to deal with the making a game part
This. Godot has 1.5MLoC and Unreal Engine has 2.2MLoC. I haven't found the number for Unity
>>
>>102803488
Not everyone may agree but as someone who also has no artistic abilities I find that 3D is much easier to create than 2D, the trick is that you're not actually "creating" anything, only translating what you see in your reference images, there's no creativity involved, you either got it right or you didn't; give it a shot before writing off your ability to create assets by yourself.
Another thing is that low poly is a valid artstyle that lots of people actually like, you wouldn't have as much luck trying to pass off shitty scribbles as game art even if the amount of required effort is similar.
>>
>>102816747
Yes but as I said in >>102816240
I'm looking for some genre that requires as few resources as possible, such as UI and gameplay elements
>>
>>102817951
But on your original post you talked about ambition, I thought you had an idea you wanted to realize
If all you want is "a game", but with the fewest possible assets, interface and gameplay, maybe you'd rather program something other than a game?
The easiest thing you could do is a 2d platformer, there's a reason there's a million of them out there. If you want something heavy on the logic, make a simulation/strategy game, needs a lot of UI but not much else.
>>
>>102816295
Pretty neat!!
https://youtu.be/OPeny2iS43I?si=HyHdWT35HIwX83yr&t=10
>>
>>102803488
> which genre and type of game requires the least amount of artistic/design skills?
Text-based roguelikes like Nethack, DCSS, Dwarf Fortress, etc.
> Besides, how can I improve?
Even just doing it will make you improve and figure out some specific ways to improve in specific areas later.
>>
>>102816338
You can make a 3D engine with way less code than that.
Looking at my own engine, the total amount of 3D related code is maybe 6kSLOC out of around 60kSLOC total. (This is a reimplementation of a real engine that runs real games, not a toy engine project.) Also, the amount of 2D related code is comparable, so I don't think SLOC count is a great metric for comparing the difficulty of 2D vs 3D in the first place.
>>
>>102818993
What engine?
>>
>>102818993
60k is quite large for one person, if I knew everything it would still take me a year working on it full time, probably more because I type slowly
>>
>>102819047
>I type slowly
If you measure by pure typing speed you can type 60k lines of code in a few days
>>
>>102819017
Alicesoft's System 4 engine (Sengoku Rance, Rance Quest, etc.).
>>
>>102819047
The 60k figure is quite bloated due to supporting ~10 years worth of games, including every iteration of the programming interfaces used by them. It also includes the implementation of a VM, which you probably don't need.
>>
>>102819077
That's got really basic 3D graphics as far as I can tell, like OpenGL 1 level
If you want to make anything closer to modern it starts to become far more complex
>>
File: Capture.png (892 KB, 1922x1365)
892 KB
892 KB PNG
>>102815234
Not him, but I may be in the "tech demo, looks deceptively easy" phase with my DOS game remaking. It is a very simple game with very simple graphics, how hard could it be right? I'm hedging though. Making a plugin for UE while working on a from scratch engine at the same time. So far UE has been the bigger pain in the ass because it is a huge project and I have only the faintest hints of how it actually works under the hood having never used it before.
>>
>>102819134
More complex, sure, but I don't think it requires a full order of magnitude more code as suggested by the figures for godot and unreal. Those engines a bloated to hell and back for reasons beyond supporting 3D.
>>
>>102819243
>I don't think it requires a full order of magnitude more code
It does
Not Unity or Unreal levels of course, but my barebones 3D engine is 30k LoC
>>
>>102819282
>>102819293
>>102819295
>>102819338
go back to /pol/ retards
>>
I'm just about to start making my game engine using a software renderer and a fully fledged ECS. Wish me luck everyone!
>>
>>102819338
He's not a woman. He's a man. And so are you.
Btw, don't forget to livestream your tranny suicide so we can all have a laugh.
>>
>>102819471
Good luck, and don't forget to post progress.
>>
>>102819404
Who said anything about incels? And no, the girl in the OP had no makeup
>>
>>102819293
Kill yourself, faggot scum.
And stay away from kids, you freak.
>>
nuke this thread already ffs
>>
>>102819515
If you were a man of principle you'd write your own engine instead of taking one from people you supposedly hate
>>
>>102819495
Are you brown or something? Why the seethe and projection?
>>
>>102819525
Proprietary software is full of rightist coders. That is why we are destroying it (that and it is also run by rich people, often times kikes)
>>
>>102819525
Nah, I'll keep using whatever you make that's useful to me for my purposes.
Die mad, leftist freak.
>>
>>102819546
Yeah so why don't you write your own "right wing" game engine instead of claiming the leftist one for yourself
>>
>>102819563
Because I like to seethe for no reason. Also I am too retarded
>>
>>102819575
>Yes
Okay that settles it
>>
>>102819563
>>102819596
>leftist rat samefagging already
Like clockwork.
Leftists are utter and complete scum.
>>
reminder to report the /pol/fags
>>
File: 1728922528114.png (27 KB, 477x173)
27 KB
27 KB PNG
>>102819607
>>>/r/eddit
>>>/t/witter
>>
>>102819612
>just report the JIDF seethers, they will go away
Anon ...
>>
>>102819618
>inspect element
how pathetic LMAO
>>
>>102819597
>calling other people spiteful
Ironic
>>
>>102819632
You can send a xwitter to the Iranian armed forces about where Mossad is hiding and they will bomb them for you
>>
>>102819637
spiteful is a typical insult in Israel. Look for "spiteful rat goyim" in the Talmund, everything becomes clear then
>>
>>102819612
reminder that you need to go back to preddit
>>
>>102819612
Did the bots move to here now that /vg/ has anti spam measures? Where are these weirdos even coming from
>>
>>102819662
all it takes is one or two
>>
File: 1728922760345.png (851 KB, 1033x2109)
851 KB
851 KB PNG
>>102819651
>>
>>102819649
Post links/examples so I know you're not just making shit up (you wouldn't do that, would you?)
>>
>>102819667
It is actually just one and if you browse here regularly like I do, you know who it is. No, it is not related to /pol/, /pol/ doesn't use spiteful or rat as an insult, they call you kike and a nigger. This is a redditor or a discord raider
>>
>>102819686
I've never seen a schizo in this thread
>>
>>102819668
didn't preddit ban The_Donald a lifetime ago?
>>
>>102819706
yes, and where did all the redditors go?
>>
>>102819637
>Iron—AAACK!
>>
>>102819700
You never post on /g/ outside of this thread?
>>
>>102819728
The rest of this board is trash, used to go to /dpt/ but that got ruined by some crazy fuck
>>
>>102819686
>/pol/ doesn't use spiteful or rat as an insult
https://archive.4plebs.org/pol/search/text/%22spiteful%20mutant%22/
https://archive.4plebs.org/pol/search/text/%22you%20rat%22/
>>
this thread is such a shitshow holy crap, why did mods delete the wrong one

may as well pour more fuel on the fire so we can get a good thread later

Rust solves memory leaks
>>
>>102819719
they're on reddit, the left-wing echo chamber
>>
>>102819737
>2129 results
https://archive.4plebs.org/pol/search/text/kike/
https://archive.4plebs.org/pol/search/text/nigger/
>>
>>102819754
eleutheromaniacs are seething again, delaying the inevitable
>>
>>102819621
keep seething
>>
>>102819649
>>102819686
You're an idiot who doesn't know what "spiteful mutant" means.
Come to think of it, you're probably a leftist trying to muddy the waters.
https://youtube.com/watch?v=IjjvNEHPl7Q
>>
>>102819515
>>102819554
>>102819597
>>102819809
Why do you hate left handed people so much? What did we ever do to you?
>>
>>102819487
The dude in the OP is clearly a man.
You need to get your eyes checked.
Or perhaps you have brain damage.
>>
>>102819761
Watching your flailing is funny.
>>
>>102819682
>*crickets*
>>
>>102819950
You made a typo, here I'll fix it for you
>/pol/tards like me rape kids. And cause plagues.
>>102819968
Nope she's as much of a woman as you are hon
>>
>>102820014
>as much of a woman as you are
Exactly. He's a man.
>>
>>102820047
Wrong. You will always be a woman.
>>
File: IMG_7858.png (226 KB, 407x512)
226 KB
226 KB PNG
>>102820070
Your flailing is funny to watch.
You will never be a woman, and neither will the dude in the OP.
>>
>>102820104
Your flailing is funny to watch.
You will always be a woman, and so will the lady in the OP.
>>
File: 1691984126089997.jpg (39 KB, 478x434)
39 KB
39 KB JPG
what the hell is going on in this thread
>>
>>102820120
Cute girls showed up and made the resident /pol/boys horny
>>
>>102820120
Some tranny from reddit doing damage control (you can easily tell which posts are his)
>>
>>102820154
Stop wasting time with this dumb reddit tier /pol/shit, post tits or GTFO
>>
>>102820164
>his
Are you mentally ill? She is a woman.
>>
File: IMG_7860.jpg (113 KB, 680x690)
113 KB
113 KB JPG
>>102820139
>Cute girls
>>
>>102820186
Still cuter than you sweaty. Post face and tits
>>
File: IMG_7862.png (130 KB, 301x366)
130 KB
130 KB PNG
>>102820179
>Are you mentally ill?
>>
blessing this dumpster fire of a thread.
>>
>>102820208
Cute selfie, stay beautiful queen
>>
>>102820221
Why would this anon go on 4chan and post obvious lies?
>>
File: IMG_7863.jpg (831 KB, 2320x3088)
831 KB
831 KB JPG
>>102820199
>Still cuter than you sweaty.
>>
>>102820295
Nice, you posted your face but where's the tits?
>>
I wonder, will my OpenGL project (a 2D game with lots of big textures) be able to run on next gen's consoles without hassle? I hope I don't have to rewrite everything for the Super Switch's graphics API.
>>
poltards (redditors) ruined another perfectly good thread
>>
>>102821883
fuck off
>>
>>102821883
Kill yourself.
>>
troons get the rope but stop giving them (You)s, it's the attention that feeds them
>>
can jannies just delete this shit thread? should we spam it to hit bump limit and die? literally 0 value in this hot garbage from the very op
i hope whoever made this thread gets cancer
>>
>>102821960
this board has no jannies
>>
File: Types.png (19 KB, 544x195)
19 KB
19 KB PNG
>math.Round returns a float
why is it like this?
>>
>>102822253
Floats have a larger range than ints
2^40 won't fit in a 32 bit int, but it'll fit in a 32 bit float with some imprecision
>>
>>102822253
>golang

:|
>>
>>102822746
what am i reading
>>
>>102822253
Because returning the same type as the argument makes the most sense the vast majority of the time, especially when people start chaining math functions together.
>>
File: tomoko-kuroki-1.jpg (148 KB, 400x554)
148 KB
148 KB JPG
>>102823075
what's wrong with go?
>>
>>102821960
>literally 0 value in this hot garbage from the very op
Anons in the thread are trying to stay on topic and post relevant information. So I wouldn't go that far at all. Eventually, the thread will be cleaned of this flamewar.

>>102809505
>>102809901
Good job!!

>>102813469
Typically, the transformation order is to scale, then rotate, then translate. If you do this you will rotate about the axis passing through the origin of your 3D mesh/model. Then you concatenate these transforms in a tree structure if you have some node system in place.
>>
>>102823724
Translate obviously has to be the last otherwise you'd be scaling/rotating around the world origin point but does the order of scale and rotate matter?
>>
Removed atomic counters completely.
I had to because I have to implement chunk specific deletions and the atomic counters were not abiding by the voxel regions in the scalar field SSBO.

Now everything is seamlessly aligned.

Praise be to the King Jesus Christ.
>>
File: 2024-10-14_17:33:06.png (21 KB, 450x540)
21 KB
21 KB PNG
>>102823810
Let me give you an example in 2D. Take a square.

Scale it along the x-axis and then rotate it 45 degrees counterclockwise. You have a rotated rectangle.

Now try something different. Rotate the square by 45 degrees then elongate it along the x-axis. You have a diamond.

I have included a rough sketch of what I'm talking about.

But it turns out that "rotate then scale" is the same as "scale then rotate" if you modify the scaling! After all, the second example can be pictured as scaling along the 135 degree axis and then rotating by 45 degrees. Once again, we can change the order if we modify the scaling!

When people normally construct a scaling matrix they specifically construct a diagonal matrix. This means that they scale by x y and z in the initial space. But technically, a scaling is any similarity transformation of the diagonal scaling matrix S. In other words, P * S * P^-1 is a scaling matrix if S is a diagonal scaling matrix and P is an invertible matrix. This is what is called the eigendecomposition of a general scaling matrix.

If all of this is weird to you, think of it like this: Any 3D scaling can be broken up into a scaling along three axes, that is P * (1 0 0)^T, P * (0 1 0)^T, and P * (0 0 1)^T. If P is the identity matrix, then we are just saying that these scaling axes are the three axes in our original coordinate system.

Now let's say you rotate before scaling and let's ignore translation. We just want to go into the space before we translate. Then for rotation matrix R, final vector w, and initial vector v

Compare
Case 1:
w1 = R * S * v (scale then rotate)


with

Case 2:
w2 = S * R * v (rotate then scale)
w2 = R * R^-1 * S * R * v
w2 = R * (R^-1 * S * R) * v (modified scale by similarity transform then rotate)


So case 2 can be written in a "scale then rotate" form!! It's just that the scaling is now in the new rotated coordinate system. So it should be clear w1 is not equal to w2 in general.
>>
>>102822253
funny float stuff, there's a difference between +0 and -0 too and you can abuse it
>>
>>102823810
Yes it matters, if the scale is uniform in all dimensions then the wrong application of the scale matrix ends up looking exactly the same as the correct one. But if you scale on a single axis for example it matters greatly, you shouldn't even have to think very hard about that to see why it's true.
>>
>>102824077
>>102824566
Now think about this: The scaled object should have the same scaling no matter how you rotate or translate it. Scale a square as we have described, it is a rectangle. Take a rectangle and translate it or rotate it. It is always a rectangle, it is just translated or rotated. But take a square and rotate it, then scale it and the geometry changes depending on how you rotate it.

That being said, there is a use for rotating and then scaling, but the rotation in this case is not the rotation of the model, it is a fixed rotation you use to define the scaling. If you want to scale along the 10 degree axis in 2D, you need a fixed rotation matrix to get a non-diagonal scaling matrix. If you had a square with each side parallel to the x or y axis, and you wanted to scale along the 135 degree axis, it would NOT be a diagonal matrix. So even though tutorials use diagonal matrices to teach scaling they do not encapsulate all possible scalings. Remember, a diagonal scaling matrix describes only scaling defined along the original coordinate system's 3 axes. The rotational similarity transform rotates the coordinate system of the scaling. So we can use diagonal scaling matrices and rotation matrices to generate more general scaling.

A further note after reading >>102824764
: Scaling is isotropic in many situations. That means the scaling is the same everywhere. S = z I where z is the scaling in every direction ( z is just a number multiplying all elements of the matrix) and I is the identity matrix. Remember that R^-1 * S * R is also a scaling matrix for any rotation R. But in the isotropic case, R^-1 * S * R = a R^-1 * I * R = a R^-1 * R = a I. So isotropic scaling is the same in every rotated coordinate system. You originally asked why they are different. Look back at Case 1 and 2 in my previous post. For isotropic scaling, they aren't different at all! If the scaling is not isotropic, the order matters!
>>
>>102825007
Didn't mean to quote >>102824077, sorry. Meant to quote >>102823810
>>
>>102825007
>>102824764
Makes sense. I'm retarded.
>>
What's the standard way to handle blending 2d tiles together?
>>
>>102825864
you mean 2 color pixels?
add them up then divide by 2, ya?
>>
File: Capture.png (12 KB, 181x156)
12 KB
12 KB PNG
>>102826359
I mean like the tilesets.
>>
>>102826499
Marching squares?
>>
does anyone here know how localisation is supposed to work?
>>
>>102827238
You just want to do a literal translation, anything else and people will get mad at you for it.
Except for China, I guess you'll need to censor stuff for them.
>>
File: delete_row_of_chunks.webm (1.01 MB, 1920x1080)
1.01 MB
1.01 MB WEBM
implemented derendering any row of chunks so that I am not rebuilding the entire mesh every time I need to load/unload chunks.

Engine is in a good place right now.

Praise be to the King Jesus Christ
>>
>>102827261
I mean ideally I wouldn't want to export a different binary and have different code for every language, like I would want some kind of mechanism which can change the language seamlessly
>>
>>102827354
praise God
>>
>>102827373
text is data dont hard code it
you can store it in any format you want (csv, xml, json, po, db, txt....)
>>
>>102827649
that would have to be the way but it does complicate things
>>
>>102827373
You mean like how to set the contents of a variable based on a setting? kek. In seriousness, just as >>102827649 said
>>
//Posting w/ code tag because my post got blocked for some reason
//Sup /gedg/ I want to write a game using SDL2 with an OpenGL context for rendering. I have messed with opengl a little forever ago on an older computer.
//My problem is that my current PC uses an rx580 8gb and Windows 10 and it's been good enough for my shit. I know OpenGL runs fine on Linux AMD drivers, but I had heard Windows Radeon drivers work poorly for OpenGL a couple years back.
//I'm too stupid to learn Vulcan. Is OpenGL ok on AMD + Windows in current year? What can I do short of dual booting Linux or buying a new card?
>>
>>102827895
opengl works fine on windows
>>
>>102827895
It's fine for a hobby project. If I were you I'd write a high level rendering API that has an OpenGL backend for GNU/Linux and a backend with an easier API (like D3D11) for Windows support.
>>
Anyone else enter a game into Steam Next Fest? How's it been looking? Seeing a bump?

It's my first time, so not exactly sure what to expect. It's been cool seeing people actually play my game SWEYET(etc.) though, even if it's only a couple people.

Absolutely garbage at marketing, so would greatly appreciate hearing how people feel about my store page:

https://store.steampowered.com/app/3201420/SWEYET_DREAMING_EMULATOR_THE_FAMILIAR_DISCOMFORT_OF_THE_UNPREDICTABLE_DEMO/

Tried the contacting journalists route but didn't get too many bites.
>>
>>102827895
Even if the drivers are bad, I can't imagine they're so bad that it's impossible for an indie game to run at a decent FPS with the developer directly optimizing for them. Many types of games barely even use the GPU, anyways
>>
>>102828002
There's plenty of real projects shipped on Windows with OpenGL, there's no need to use two backends
>>
>>102828002
Are the AMD drivers really that bad that I'm better off writing my own compatability layer to D3D11? Am I better off using OpenGL ES + Angle at that point?
I actually haven't ever tried ES, but I read Angle can translate it into OpenGL, Dx11, Vulcan.
Actually I'm not against trying opengl es, I just find a lot more resources for learning regular OpenGL compared to ES.
>>
>>102828514
ES is a subset of opengl and works more or less the same. I'm saying this as someone who has experience with both btw
>>
>>102828514
>Are the AMD drivers really that bad that I'm better off writing my own compatability layer to D3D11?
No
>>
So great. I optimized the "query" system parameter in my ECS implementation. There was a slight overhead on each invocation with injected system parameters, but now it's free. System parameters are resolved at system creation and are members of the system.

And anything can be a system parameter, as a "Query" is just:
template<typename... Components>
struct into_system_param<Query<Components...>> {
static const Query<Components...> get(World& world) {
return world.template query<Components...>();
}
};


And in a system:
world.add_system(
[](const Time& time, Query<Entity, Velocity, const Position>& query) {
for (auto [_e, v, p] : query) {
v.x += p.x * time.delta;
v.y += p.y * time.delta;
}
});


I haven't decided how I want to get a QueryFilter<> in there yet (as far as API design goes), but the type is defined and it works (it has With<A,B,...> and Without<X,Y,...>). I just need to add entity hierarchy and then I think I'll start replacing flecs in my engine with this.

Modern C++ is actually pretty awesome.
>>
>>102829193
In ECS systems are functions that take a group of components, a system would be the inner portion of the loop
>>
File: bones.webm (3.72 MB, 1856x1048)
3.72 MB
3.72 MB WEBM
progress I hope to add character death ragdoll physics soon
>>
>>102830064
Very groovy
>>
>>102830064
I'm looking to re-write my animation system soon, could you talk about your implementation and maybe share some insights
>>
>>102830085
thanks
>>102830183
how does yours work now?
>>
>>102830336
I'm using raylib but the way it does animation is a bit fucked and I need a fuckton of animated units on screen at any given time. Basically it loops through every vertex on the CPU and transforms it based on the pose and then updates the main vertex buffer with the transformed vert data. It's probably done this way to make the API really simple but it's obviously it's way too fucking slow (although not as bad as I thought such a thing would be)

https://github.com/raysan5/raylib/blob/master/src/rmodels.c#L2249
>>
>>102830388
>Basically it loops through every vertex on the CPU and transforms it based on the pose and then updates the main vertex buffer with the transformed vert data.
This is why I tell people not to use raylib for 3D
>>
>>102830388
>Basically it loops through every vertex on the CPU and transforms it based on the pose and then updates the main vertex buffer with the transformed vert data
Change CPU to GPU and you have yourself a vertex shader ;)
>>
File: wtf.png (66 KB, 704x301)
66 KB
66 KB PNG
>>102830404
I've had to hack around it a fair bit but overall it's pretty good. Pic related is probably the worst thing I've seen it do so far. In the DrawMeshInstanced function you pass in the amount of instances you want and an array of transform matrices. In raylib the matrix struct is defined with 16 named floats m0 to m15, so here it mallocs a new buffer, calls a function in raymath which returns a "float16" which is another struct where the only member is an array of 16 floats and then loops through to set each matrix value in the new allocated buffer. It does this every draw call which obviously is not great so I wrote my own thing that doesn't do any of that shit.

>>102830443
uhhhh yeah no shit dude that's why I mentioned that it was probably done this way to keep the API simple, you still have the same Model struct and the same DrawModel function for static and animated meshes.
>>
>>102830539
CPU based animation is far worse than that
>>
>>102830388
https://github.com/raysan5/raylib/blob/master/examples/models/models_gpu_skinning.c
no bro do it this way with gpu skinning in the shader.
UpdateModelAnimation() is retarded and actually modifies the mesh on the cpu.
When I first started using raylib I used UpdateModelAnimation() to calculate each frame of animation and store it as its own model, then iterate through all of those models to animate. That worked but it was shit.
>>
>>102830539
another huge annoyance with doing 3D stuff in raylib is that it only supports 16bit indices and rlgl doesn't expose the raw opengl calls to get around it. Raysan says this is due to a limitation of opengl ES 2.0 and so it has to be that way unfortunately. So yeah maybe if I could go back in time I would have just written my own engine but it does add a lot of convenience and does most things very well

>>102830558
performance wise absolutely but I can see why they might have done that, the code in that pic however just has no reason to be that way at all. The Matrix struct memory layout is identical to an array of 16 floats so it's allocating memory, looping through every element and setting it with a function every frame for no reason.
>>
>>102830709
>I can see why they might have done that
Why? There's no reason to do it, literally tanking animation performance because they can't be bothered writing a simple vertex shader
>>
>>102830539
>uhhhh yeah no shit dude
lmao butthurt
>>
File: java_n6TlqTxBWz.webm (469 KB, 736x400)
469 KB
469 KB WEBM
Making a little tool for generating unity-like physics layer filters, but it generates C++ classes for PhysX. Mine distinguishes between collisions and raycasts. Some entities should be able to raycast each other (see each other, shoot each other) but not collide with each other. I'm thinking of adding a third category, since "seeing" raycast checks are different from "shooting" raycast checks (i.e: an enemy should be able to see the player through another enemy, but shouldn't be able to shoot through the enemy. This way they're not blind if there's an enemy in the way, but they can still aggro each other, like in doom
>>
>>102832122
How could they agro each other if they can;t shoot each other
>>
File: me.png (150 KB, 549x578)
150 KB
150 KB PNG
>>102830775
no!!!!
>>
>>102832158
They can shoot each other, but for regular line of site checks against their current target (usually the player), they don't see each other. Aggro entities are a special case, since they need to be able to see the target to shoot it, so the logic would look like

if(entity == target) {
return true;
}
else if(entity->getLayer() == "enemy") {
return false;
}
else if(entity->getLayer() == "wall") {
return true;
}


(Pseudocode)
>>
>>102832253
>entity->getLayer() == "enemy"
Use a bitflags for this
You can have 64 layers and you can test for all and any of them in a single instruction
>>
>>102832410
Oh yeah I have an enum generated and the c++ code it compiles does a single bit mask check, there's no strings involved. That was just pseudocode
>>
File: java_BMTNraTFgJ.png (25 KB, 584x368)
25 KB
25 KB PNG
Ooh baby silkicons
>>
>>102795531
Godot is swimming in corporate money, and implementing corporate features (while ignoring community requests). They're not going to disappear anytime soon. In fact, you SHOULD use Redot, but not for the reasons you think. Godot is full corporate cock gargle.
>>
>>102833512
Using a fork of an engine forked by reactionary /pol/tards sounds like a wonderful idea
>>
File: 1726052986268621.gif (1.55 MB, 640x616)
1.55 MB
1.55 MB GIF
I wish of a world where every gamedevs make their game without an engine.
>>
>>102833768
Just say "I wish for a world where games stopped existing after the 1980s"
>>
>>102833810
I wish for a world where games stopped existing after the 1980s
>>
>>102830620
Niggerlicious, I hate morons using opaque types instead of pointers to opaque structs.
>>
>>102833810
I wish for a world where games stopped existing after 2003
>>
>>102833849
Games used engines before 2003
>>
>>102833854
those weren't games.
>>
>>102833885
"interactive entertainment mediums" existed before 2003 which used engines
>>
>>102833900
those weren't games. if you use an engine, you're not making a game.
>>
>>102833918
Then explain "make their game without an engine"
>>
>>102833925
by not using an engine. simple as.
Raw dogging (for procreation) OpenGL / Direct3D like God intended.
>>
>>102833968
Your statement implies games can be made with an engine, you just don't like it. You later contradict yourself.
In short: you are retarded.
>>
File: 20241016_032109.webm (3.04 MB, 1388x1030)
3.04 MB
3.04 MB WEBM
>>102830064
lmao even
>>
File: 1728544179278134.gif (1.02 MB, 1024x1024)
1.02 MB
1.02 MB GIF
>>102833986
and you're the retardeder for engaging with my trolling
>>
I was planning to make a doom-like raycaster (heights, possibly angled walls in the future) supporting many entities. And I mean many entities, such as in slaughter-map wads.
I have some C knowledge. I was thinking about using SDL2, would it be a decent idea? This will be a long-term project, and I am aware I have much to learn, but it would be nice to know if I am following a reasonable road
>>
>>102834247
I wrote a raycaster in SDL2, it works great
btw doom isn't a raycaster, it uses BSP trees, you're thinking wolfenstein 3D for the PC (the SNES version uses BSP trees as well)
here's some info to get you started:
https://lodev.org/cgtutor/raycasting.html
https://www.youtube.com/watch?v=gYRrGTC7GtA

when you're drawing try to copy the pixel data directly, don't use blitting it's horribly slow, get the pointer to the surfaces and just do a direct copy it's so much faster it's absolutely worth the extra effort
>>
>>102833532
It is the actual essence of open source. Leftists think they have a monopoly on such things.
>>
>>102834284
You are right on that, I said "doom-like" just to make it more clear about how it should look like. Sorry about that.
As you said doom uses bsp trees, but I am not sure I want to get into it yet.
What I was thinking about is a DDA raycaster which supports heights and possibly angled walls (Rise of the Triad is a better example actually, minus the angled walls).
Despite not being trivial, I assume it is doable using SDL2, but I wonder what would be the best way to handle a massive amount of enemies on screen
>>
>>102834367
I actually have a solution for that, give me a moment to find the video, my engine design can handle hundreds of sprites on screen at a time without hardware acceleration
I've been working on documenting everything so I can put it on a website complete with explanations, API info, and detailed explanations of the algorithms used
>>
>>102819809
>eceleb speak
>>
Lmao what an awesome thread. Best /gedg/ thread ever
>>
>>102834321
open source = communism = leftism
>>
how is this thread still going
>>
>>102834597
bump limit is 311
>>
File: 1725979881831991.png (915 KB, 1158x824)
915 KB
915 KB PNG
>>102834597
you want it to never end, right?
>>
>>102834597
Why not?
>>
>>102834399
>my engine design can handle hundreds of sprites on screen at a time without hardware acceleration
That's impressive, I admire that.
I'll probably have to use hardware acceleration through SDL2 though, since my goal is to render thousands of them.
Thank you in advance for your help, anon
>>
>>102834736
Games could draw thousands of sprites before graphics cards ever existed
>>
>>102834736
>>102834399
no sweat Anon, here's the vid, all the trees are sprites just like the mimics, ignore the poor quality of the artwork, I've been trying to get better, I'm only good at scenery like walls and such myself
the basics of the drawing pattern are:
Calculate the sprites position in 3D space, important to calculate 3D space and not 2D space, it's a perspective issue
sort the sprites by distance as a 32 bit integer (it's a special tool we'll need later)
next use that information to transform the corners, upper left and right
since the sprites are squares you only need the 2 points, since no matter the scale it should render as a square
interpolate the X texture values and save them
calculate the position of the lower corners by adding the distance between the top corners to the Y coordinates
next interpolate the far left texture values on the far left of the texture, save them, draw the line
for each line then simply update the x coordinate of each of the saved texture coordinates with the next X coordinate in the list

if you use a raycaster to draw the background then draw that first and save the distance for each cast as a 32 bit integer

draw if the pixel is (not a specific value (I use 255,0,255) this is the only if statement but I haven't found a faster way to do this since alpha blending is slow) and (the distance to the sprite is less than the distance of the last raycast)

sounds complicated but you should be able to do it with only 2 if statements, since you sorted the list of sprites you're using the painters algorithm and that gives you transparency without a 2d depth buffer which is EXTREMELY SLOW

I've been working on making this system faster by using the raycaster to get the relevant data (distance, hit location, texture, etc) and then sorting the sprite/raycast renderer with the 1d depth buffer, dropping 1 if statement which when you consider thousands of sprites 60 times a second really adds up


https://files.catbox.moe/fublhv.webm
>>
>>102834943
you'll notice some graphical glitches, I've already fixed those but my current version isn't ready for demo yet
>>
>>102832122
which GUI are you using?
>>
>>102834943
>>102834959
My renderer uses a "sprite" for the player, and as such uses any "sprite" for the observer when running the rendering systems to render to any surface I want
the practical upshot of which is that I can make mirrors, portals, and so forth
I also made rotatable sprites, but they're more expensive than billboards cause you have to do extra calculations with 1/z and so forth to get the perspective right, you'll notice a sort of "pringles" effect here, that's cause this is an older version where I didn't calculate the Z coordinates right
check it out:

https://files.catbox.moe/4yyot4.mp4
>>
>>102834943
>>102834959
Very interesting strategy, I'll keep it in mind once I begin to work on that.
For now, I'll follow the raycaster links you gave me because I feel I need some brush up on that too.
Keep up the good work, I hope to see a demo soon. Also I'll try to post some of my progress here, soon or later
>>
>>102835166
good luck brother
>>
>>102833367
Nice!
>>
>>102833968
You'll create abstraction between gameplay and low-level libraries just to make your job easier. And you'll be able to use said library to make other games. So you'll end with "engine" anyway.
>>
>>102833918
So, Hexen or Doom aren't games.
Ok.
>>
>>102827701
GNU Gettext.
>>
>>102837741
>no api
>requires a physical file and a directory instead of being hardcoded in the executable
GARBAGE TRASH
>>
Can please someone explain me what is the general workflow of baking lighting for huge landscapes? For example I have a level for a game in Blender which is moderately big landscape with tiled texture that is like 2k resolution, now I want to bake lights in Blender to this landscape and then use it in some game engine, like Godot/Unity/UE. I want to bake specifically in Blender because lighting looks dramatically different in every engine, I want it to look exactly like it looks in Blender when I'm modelling it. So what do I need? As far as I understand I need a second UV unwrap, that's easy, but how to bake properly and what exactly should be baked? If I just bake my diffuse/albedo but with lighting applied it's gonna be fucking massive 32k x 32k texture at least, because even though my normal texture is 2k, it's tiled and the model itself is huge. What people usually use for this? Also, after I bake something, how am I supposed to use it in game engine? If it's just albedo with light, then I get it, but if not, am I going to set up some shader that mixes texture with baked lights in some indirect form?
>>
finally got around to trying out emscripten, and tried getting sdl3 running. was relatively easy to get a minimal setup for it in the end.
now i just need to actually make something with it lol
but for now ill just experiment with various libraries and get them working together.
>>
File: jolt.webm (143 KB, 1920x1080)
143 KB
143 KB WEBM
first stab at integrating jolt for physics
>>
is it even possible to link glfw statically?
>>
>>102840385
Yeah, I did it in my project. What trouble is it giving you? It worked right away for me. You do have to build it yourself rather than download the precompiled binaries. Use cmake to make a visual studio solution, change everything to MT, and away you go.
>>
>>102837741
thanks a lot anon, this is probably the right solution

>>102837745
how else are you supposed to do this?
>>
>>102837809
You output the texture to the emissive texture in whatever engine you are using.
The thing is, you shouldn’t be baking in Blender, you should be baking in whatever engine you are targeting, because you can’t bake everything (both in general, e.g. specular, or in Blender, e.g. no way to export light probes).
>>
>>102840862
C11 supports embed
>>
>>102840385
yes I do it too. But like the other anon said, you have to compile it yourself.



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