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


fuck tripfags 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: >>102940757 (Cross-thread)

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.

Using tripcodes
-only for attention seeking whores and reddit-fags
-your work should speak for yourself
-this is not your person blog
>>
>>103035348
what does gedg stand for
>>
>>103035356
game and engine development general
it's right in the title cmon m8
>>
Currently getting used to shaders, they really lend themselves to how I already write software since there's no pointers and such, that's basically how I do everything
for example I only had to make extremely minor modifications to my perlin noise generation algorithm in order to migrate it to a shader
>>
>>103035399
no it isnt
>>
alright here I go again with trying out odin to learn opengl for the second time. The first time I tried, I lost interest in about a week. This time I'm sticking until I get to 3d stuff.
>>
>>103035425
if it were "your" algorithm, it wouldn't be "perlin's" noise
>>
>>103035517
yes fair enough, I meant "my implementation"
>>
File: you-are-being-weird.png (306 KB, 497x491)
306 KB
306 KB PNG
>>103035517
That is a dumb, conversation and thought terminating, thing to say
You are an anti-social reject, why are you even here?
>>
>>103035517
Watch your mouth, that's Perlin you're talking to.
>>
>>103035348
Normal Maps are a meme. The extra detail they offer is not worth the extra time and headache of retopology and baking. Use your imagination and imagine the defined wrinkles on a foreskin, don't expect me to do it for you.
>>
>>103037212
>on a foreskin
what
>>
File: image.png (49 KB, 1288x264)
49 KB
49 KB PNG
finally, AAA studios are switching to C#
>>
>>103037212
>Normal Maps are a meme
if you consider lighting to be a meme then yes, normal maps are a meme.
>>
>>103035348
Previous: >>103010955

>>103033281
>>103033290
>using somebody else's driver

>>103037894
>C#
Why?
>>
File: 1000004645.jpg (35 KB, 680x657)
35 KB
35 KB JPG
>>103035517
it would be if its in the name, thoguh
>>
File: top-guess-lll-die.jpg (38 KB, 600x565)
38 KB
38 KB JPG
>Want to potentially make music for my game
>my go-to VSTs and my go-to DAW barely work in wine, even with yabridge
>I'd switch back to Windows but the text editor selection there for programming the game is cancer (hence why I'm using linux)
>
>>
>>103035356
gaydog
>>
>>103038261
I'd consider dynamic lighting to be a meme if you don't need it for a specific gameplay dependent reason. Static lighting info painted or baked directly into textures and blob shadows are good enough.
>>
>>103037212
your talking about detailed models like humans here, normal maps are a gamechanger for environment textures like for the rocks in caves and stuff
>>
File: 1726729615606390.gif (287 KB, 800x600)
287 KB
287 KB GIF
>have static camera angle
>no need for normal map
isochads keep winning
>>
>>103037212
they might be extra work, but the extra work of making higher poly models render efficiently is much worse
it's basically free details as far as the render pipeline is concerned why wouldn't you use it?
>>
What's the best occlusion culling method
>>
>>103039373
Quadtree or chunking
>>
>>103039406
What are those
>>
>>103039513
a way to geographically partition your game entities so you can more easily cull them.
>>
File: file.png (24 KB, 334x151)
24 KB
24 KB PNG
>>103039373
well that depends on your draw method
if for example all your objects are primitive shapes or could be described as primitive shapes you could simply use that, for example if you have a house and there's a guy behind it you could simply represent the guy as an oblong sphereoid and check the radii against the cube of the house, if the person is near the edge of the wall and part of him might be visible, draw the guy
you could also use this as just the first step, since if none of the sphereoid could be in view don't bother with anything more complicated, but if some of him MIGHT be visible then you can break him into a series of smaller pieces and check those individually, there is of course a point at which the checks would be more costly than just drawing him but that depends on the level of detail
now of course that's just for individual objects
now for parts of the MAP that might not be visible you have what the other fellow suggested, quad trees and chunking
chunking is when you do what minecraft did, the world is split into large pieces which are visible within range and unrendered when occluded
quad trees are more complicated but more efficient, it's basically the landscape version of what I mentioned with the individual guy, you take the map, figure out which quarters of the map you can see, then begin breaking the map down into quadrants, checking each of those, and repeat until you are only showing the part of the map that you can actually see, you can make this slightly better by checking the geometric shapes against what's already been drawn to see if the existing quad is even visible, much like the guy behind the house
>>
>>103039565
now for a full algorithm for culling first thing you do is eliminate everything that couldn't possibly be in your view distance at all
treat your vision as a cube centered on the player with the width of the cube being twice the view distance, check if the object is in that cube with simple comparisons, easy
then check if they're within view radius, just check the length between you and the object itself, this will cut off the corners and is a slightly more expensive operation, which is why we didn't do it for every object in the game (pythagoras and all)
now just cull anything behind the near plane, simple enough, just check if they're TOO CLOSE to the camera, careful to take FOV into account
next check if any given object is in your view frustum one at a time, check the x plane, determine if it's relative angle (plus it's angular diameter, do not forget the angular diameter) is within the x view plane, repeat for y and z
now you have a view frustum, at this point you can take whatever parts of the map have collided with it and begin cutting them into quads and determining if all those quads also collided, repeat until satisfied
finally you check the visible objects, first as primitives (a cube instead of a house for example) just to see if the whole thing is even visible before you break it down further into a smaller cube with a pyramid on top, etc
>>
Am I crazy or should a vector of the form (0, 0, z_near) or (0, 0, z_far) not always map to (0, 0, 0 or -1) or (0, 0, 1) respectively when multiplied by a perspective matrix regardless of lh/rh zo etc BS.

Or am I completely misunderstanding what a perspective matrix is supposed to do.
>>
Are quaternions faster than rotation matrices because you only need 1 sin/cos per transform as opposed to 1 sin/cos per axis?
>>
>>103040447
>Are quaternions faster than rotation matrices
No
Quaternions are used because you can do spherical interpolation on them
>>
>>103040447
No, but they're comfier to use
>>
>>103038358
I used to use bitwig with yabridge on arch
it worked well, but at some point I bought a macbook m2 air
its garbage for programming, but pretty great if you want to just never have to think about your DAW setup again so that's my music machine now
>>
bump....
>>
https://www.youtube.com/watch?v=PND2Wpy6U-E&t=1523s

time to stop being chuddies and embrace the bussy bros
>>
>>103043420
Is Alice actually a troon or real woman?
>>
>>103043477
>that balding
>woman
>>
>>103043477
yikeserino, chuddy. are you insinuating bussy != pussy?
>>
>>103043477
listen to its voice, its obvious
>>
>>103043547
OK fucking lol, first time I've heard Alice speak, now it all makes sense. I've interacted with them a few times on the Bevy discord server. Year old question answered
>>
>>103043579
>the Bevy discord server
you should be embarassed to say that
>>
>>103043579
bevy is academic masturbation, not a workable game engine
>>
when writing shaders for opengl, is it generally better to make many smaller more specialized shaders for execution simplicity, or less specialized, bigger shaders to reduce time spent binding new shader programs?
>>
>>103043743
bind less often
doom proved that on modern (anything past gtx 900) GPUs benefit from uber shaders
>>
File: file.png (125 KB, 1366x679)
125 KB
125 KB PNG
I managed to write a simple shader that can take a tile sheet and a numerical grid and render backgrounds
gonna use this to make background layers for my engine :D
>>
File: pkm-water.webm (3.82 MB, 1920x1080)
3.82 MB
3.82 MB WEBM
Finally got my reflections in order, holy fuck.
Also that obscure emissive tiles feature finally came in handy.
>>
>>103044241
ngl im kind of annoyed that opengl can't operate on a per-pixel basis, my software rendered code all functions on pixels so my filters and shit have to be rewritten to deal with coordinates
>>
>>103044418
bro your ortho projection?
>>
>>103044424
haven't gotten to projection yet so im just letting opengl do it's thing
>>
>>103044402
Looks great!
>>
>>103044558
You can set up the basic one in half a dozen lines, to me it's a no-brainer if I'm doing 2d stuff. What I mean is that it's definitely not worth rewriting your previous code to work with the default coords system.
>>
>>103044764
im sure it is easy I just haven't gotten around to it yet, I'm making a series of 2D shaders to begin with, so I don't need projection yet
>>
>>103038358
Just use MuseScore.
>but I want to use a D-ACK!
You should be writing in a scorewriter anyways, not a DAW. Ditch the untz-untz shit and make some real music.
>>
>>103044418
Draw a single rectangle covering the viewport and let the fragment shader read your pixel data buffer.
>>
>>103046288
please stop telling me how easy it is to do things I know how easy it is I just haven't gotten around to it
>>
>>103043662
yeah sucks that it's heavily pushed in rust gamedev discussions despite not being an actual viable game engine
>>
>>103047380
What makes it non-viable?
>>
>>103047380
Rust is a terrible gamedev language, Bevy is par for the course
>>
>>103047407
iteration times, it takes long to build even incremental > 5 seconds usually
>>
I've been slowly but surely reverse engineering Havok physics out of Babylon.js to make examples for three.js

I'm currently working on collision detection/raycasting/shapecasting and am close to making a breakthrough as I got the functions working just not properly

Examples I've gotten done in Havok to three.js so far

>Creating objects in three then giving them Havok physics
>Quaternions
>Setting properties such as mass, friction, restitution
>Setting the motion types on object for static, dynamic, animated, kinematic
>A lot of other get and set properties such as get velocity, get position, set position, set mass, etc
>Movement stuff such as impulse force, velocity, acceleration
>Created a falling cube stress test to show off how powerful havok.wasm is in the web browser (others have tested and shown it outperformed Unity)
>Did a basic controller that pushed a ball around Super Monkey Ball style with impulse and played with dampening and friction, gave it some bounce and restitution
>Made a restitution based spring material the ball could bounce on to simulate trampolining
>Did a capsule based controller by setting inertia so that the capsule couldn't tip over like a kinematic controller, it moves via velocity and has slow acceleration to a max speed and takes in uphill and downhill movement into account, takes doesn't stop on a dime but gradually stops via dampening to simulate real life stopping
>Jumping handled via an instance of y axis velocity

The need for shapecasting is to see if I can get it to tell me when the y axis of my capsule is touching another object to allow jumping only when it's standing on something.

Once I've got enough stuff reverse engineered to use, I was hoping you guys could help me with the fine tuning and numbers to create some fun stuff. Maybe a Gary's Mod like game for the web we could play.
>>
>>103035356
Godough Engine Dogging Games
>>
>>103039719
>angular diameter
nta but thanks.. how come it's first time ive ever heard this term, including school and all the online shit ive read
>>
>>103048126
huh til babylon has havok. never expected that cus of havoks binaries licensing issues. makes me want to try out babylon now..

>Created a falling cube stress test to show off how powerful havok.wasm is in the web browser (others have tested and shown it outperformed Unity)
how do you compare physics engine performance to game engine performance? seems like those are 2 different things/usecases

great work, threejs could def use that
>>
Which would make more sense for a 2D Pokemonlike -- C99 or C++11?
>>
>>103048961
? all the major compilers support C++20, there's no reason to target anything lower than that on a new project
>>
>>103049164
Everything after C++14 is useless bloat that actively makes the language worse and more convoluted.
>>
>>103049245
ngmi
>>
>>103044402
>pixelated reflections effect in the same style of the sprites
good
>retarded smooth shadows
bad
simple as.
it would look far superior if you implemented a cool dithering instead of a smooth gradient. or better, have a sprite per light strength and make the shadow shader switch to different sprites for the same object.
>>
>>103049298
psst, don't look too closely at nintendo best selling game super mario maker 2
>>
>>103049345
I was having those HD unreal pixel shit garbage in mind, like octopath traveller
>>
>there's an sdl3 now with vulkan/dx12 backends
wtf
>>
test
>>
>>103049435
>SDL now has their own 3D rendering API
I don't know who asked for this.
>>
>>103049435
I tried doing a couple of basic examples and it was kind of shit.
But I haven't used Vulkan before so I think the parts I didn't like were all Vulkan idioms (like every single functions needing 5 different "create info" structs to work).
>>
File: ebussy.jpg (53 KB, 686x386)
53 KB
53 KB JPG
>>103049498
the vulkan API is absurdly based but I think only those that do a lot of programming in actual engineering fields appreciate it
explicitness is king, its a beautiful API because of how much control it gives you
just wrap it appropriately for your own
>use-case

that said I don't see a point in SDL3 going this route
>>
>>103049164
console forks of compilers are usually back a few revisions
I haven't checked in awhile but C++17 was very recent
>>
How do I level up? I learnt opengl, got myself a triangle, learnt texture, depth buffer, cube, rotating cube. Now what?
I basically am stuck because anything that's a bit more interactive seems way too complicated and I don't even know where to start. I want to end up with some kind of a retained mode GUI renderer.
>>
>>103049614
>that said I don't see a point in SDL3 going this route
Yeah I understand Vulkan being explicit even if I don't find the idea pleasant, it's the SDL wrapper needing me to tell it the same dozens of values every time that 99% of people will never need to change that annoys me, I shouldn't need a wrapper for a wrapper
Also in general it was just kind of buggy my log kept getting spammed and it would randomly crash, very sparse documentation too. If this ever ends up being useful it will still take many years in the oven, don't let SDL3 being "out" fool you.
>>
>>103049708
Although to be fair it can draw a triangle in only a few lines while I hear Vulkan needs a lot more, so maybe it's only half as explicit
>>
>>103049732
yeah the first triangle in vulkan is 500-1000 lines of code depending on if you cheat with vk-bootstrap

a few lines is pretty good in SDL3's case
>>
>>103049298
Prebaked sprite light doesn't sound viable, because there are different light colors and HDR range. Texture look up for the light layer would also be expensive unless I do separate cpu calculations.
What I actually need is a palette look up which will come later. Until then dithering sounds like a great option, though doing that while keeping the lighting buffer swap free seems challenging.
>>
>>103049435
>sdl3
Probably be my top recommendation for enginedev at this point. Good documentation, C/C++, all functionality self-contained in one package, AAA tested, even cross-platform if you're into that gay shit.

I don't really give a shit about it hiding boilerplate since that's a one-off thing anyways, but it massively simplifies handling command queues, root signatures, resources, and crap like that.
>>
>>103048440
cause people just assume you know it, very frustrating when you read something and it feels like they're omitting a detail because it's supposedly "common knowledge"
>>
>>103049637
no one?
>>
>>103040038
A perspective matrix maps a frustum to a rectangular prism. So, if you map points from the near or far planes, you should be on the boundary of normalized device coordinates.

You do need to be careful with handedness. In Vulkan positive y is down the screen, so you have to do a sign flip. You can see this
https://johannesugb.github.io/gpu-programming/setting-up-a-proper-vulkan-projection-matrix/

Personally to get my perspective projection, I found it helpful to do the entire derivation from scratch. Here is mine in Vulkan (with a reverse z convention).

mat4 perspective_projection(const float fov, const float ratio, const float near, const float far)
{
const float cot = 1.0f / tanf(fov * M_PI / 360);
const float z_delta = far - near;
return (mat4)
{{
cot, 0.0f, 0.0f , 0.0f ,
0.0f, -cot / ratio, 0.0f , 0.0f ,
0.0f, 0.0f , -near / z_delta , -1.0f,
0.0f, 0.0f , near * far / z_delta, 0.0f
}};
}
>>
>>103049637
you began too high level, ignore these retards who tell you not to figure out how things work
you need a key listener that has both keydown list and a key struck list, clear the struck list every loop, this way you can type without striking the same key every time
this should use whatever UI library you have to get keys as events
then in your main loop you want to check for certain keycodes, if your library doesn't have good documentation on that use a simple print statement to get whatever the number value of the keys you strike are within that library (some store them differently like sfml and SDL)
next you want to start working on your physics, try just drawing two rectangles to screen and then figure out how to detect collisions between them, use your keys to move one of the rectangles and change their colors when they collide
after that you want to create a "sprite" system, this will be anything within your game that moves, or is intractable at all, I would use either a struct or a class, depending on your programming style, give it movement methods, collision detection methods, and an AI method, make AI a method for now, basically you want to be able to control one sprite you select, and pass it to all the hostile sprites which then do a simple pursuit AI, that is they check your sprites position and then call their movement commands to take themselves closer
now make a map, this will use a different system than the sprite collision detection, just add in the sprite movement that if they collide with the world geometry they stop moving in that specific direction (make sure to make this a per-axis stop, that way you can slide along walls instead of getting stuck, it also means gravity can work when you move into 3D physics)
next encapsulate this into a "game" class with the main loop being within a run method, this makes the whole thing easier to manage and you can turn it into a state
such that you can have main menus and stuff in other states
>>
You have to make games in the order of complexity they developed historically
Start with PONG
>>
>>103052465
that's literally what I'm doing rn
>>
>>103049248
go away bjarne
>>
>>103052465
That's a gigantic waste of time.
>>
>>103052465
Yes, but which language did they used?
>>
>>103052589
Original PONG is pure hardware. Look up the schematic.
>>
>>103052589
the original pong was written in javascript
>>
What's the best way for me to do bloodsplatters in a 3d game?
Just use a billboard of a bloodsplatter texture?
or some kind of shader?
>>
>>103052589
the original pong was written in logic gates
just when you thought a programming language couldn't get any lower level ammirite?
>>
>>103052764
you mean like a splash effect?
make a particle system, have individual particles emanate from a source with an envelope, so it ramps up quickly, slows down, remains steady for a second and then peters off
attack-decay-sustain-release kind of deal
>>
>>103052807
that makes sense.
that sounds non-trivial to code from scratch? If that's a serious undertaking would the next best easy option be a billboard?
>>
>>103052852
it's super simple, just make a single tiny billboard to hold a blood drop texture
once you have that rendered in a specific space in 3D space add a feature to your character that when injured they become a source object and then spawn a number based on how injured the target is with a specific trajectory, make them go in random directions
then apply gravity
have them vanish a second after they hit the ground, the pile of blood spots will become a splash on the ground so you kill two birds with one stone
>>
>>103052921
oh nice, that sounds doable when you put it like that. Thx I'll plan on doing it that way
>>
>>103052989
absolutely m8
>>
>>103048657
Microsoft owns Babylon and Havok. They made Havok free for the web in WASM.

My assumption was Havok outperformed in three.js over unity and Godot with Havok, I saw a few people do performance tests and claim it. My stress test didn't compare to unity or godot personally, I just saw how many rotating cubes I could drop before performance decreased on a 2080 ti and i7
https://twitter.com/N8Programs/status/1649417563514830849
>>
>>103052570
If you think spending a couple weekends is a waste of time then you're already cooked
>>
>major lack of progress postings itt
Feels good to be back making progress. here's an example of walls that will be placed when a gable roof is added.
Now it's time to add a roof placement tool. Hopefully it won't take me 2 weeks to get it done...
>>
File: Ygg_1212_Tensei_v4_1.gif (197 KB, 1026x576)
197 KB
197 KB GIF
>>103056390
I'll be able to start posting progress soon. I can start reposting until my refactor has caught up to my previous showcases.
>>
>>103056390
Are you using an algorithm to generate the topology of the roof? I recall there were a few interesting approaches last time I did roof stuff. Maybe someone has come up with better algorithms….
>>
God I hate debugging UE projects. I counted, it takes 10 ENTIRE MINUTES from the moment I click the stop button in VS, to the moment I'm back in the main menu in game in my company's current project, with NO rebuilding anything literally just stopping and starting the binary. This is a Development build so it's not even full debug which would be slower still. That means a 10 minute MINIMUM iteration time. Add a few source file changes and you're up to 20 minutes per iteration. God forbid you have to change a project dll header or you'll be out for close to an hour (or several hours, if you're working from home without access to the distributed build cluster and have to build everything locally). Changing a header on the engine side? Fuck man just take the rest of the day off, that binary isn't going to be ready until tomorrow even with full parallel distributed build. And that's not even mentioning the extra hour or two you spend cooking resources/compiling shaders after the damn thing boots for the first time after clearing your local cache, when you're remote without access to the central DDC.

How can people just work like this and think it's okay? Before we adopted UE it was like 20 minute iterations MAX if you changed a global header and had to rebuild the entire project, plus maybe an hour of cooking resources a day to keep your local cache up to date (which you could schedule for lunch break or whatever), and once everything was cooked that was it, no just-in-time bullshit while the project runs, no slow network file access to some central data cache, just smooth loading of files off the local PC. UE's bloat is insane.
>>
>>103058209
Do AAA devs really live like that? Sounds awful
>>
>>103058209
>10 ENTIRE MINUTES
that's 10 minutes to goon. 10 minutes to eat food. 10 minutes to play vidya.
>>
>>103058287
He's a wagie not a king
>>
>>103058222
AAA devs have $20,000 USD workstations.
>>
I fully integrated my ECS framework into my engine finally. Everything works! So nice to see it all come together. With sub-nanosecond cost-per-entity.
>>
>>103059211
and how much does that improve compile times over my $2000 workstation
>>
What are some of the most important features of a physics engine? I'm reverse engineering as much stuff as possible but need to prioritize going forward

What I've got so far
>Giving the bodies default physics
>Velocity and acceleration
>Impulse force
>Raycasting
>Shapecasting
>Hit detection
>Shape creation (it uses the game engine shapes and takes it in)
>Set properties for restitution and mass
>Friction
>Dampening
>Position
>Set motion type
>Create shape and rotation
>>
>>103059284
>>
>>103059284
what about the response
>>
>>103044402
May I ask how you did those perspective tricks from last thread?
>>
>>103039095
Would clean up her poopy
>>
so I see like really naive software raytracers rendering simple 1080p scenes in seconds, could a raytracing compute shader do a low resolution scene of simple shapes/materials at low sample rates at 60+ fps without hardware raytracing support?
>>
>>103060022
Try it.
>>
File: pkm no ortho.webm (2.69 MB, 1920x1080)
2.69 MB
2.69 MB WEBM
>>103059680
The trick is that there are no tricks, only undiluted overengineering. Unless you want to hear about the camera angle or geometry calculation.
>>
>>103059284
Just look at the API of an existing physics engine and implement all of its functions in a horrifically unoptimized and broken way.
>>
>>103060072
>the camera angle or geometry calculation
Yeah, that.
>no ortho
holy hell that looks cool
>>
>>103060109
Camera is a simple ortho projection and it looks at a 45 degree angle at the world. Everything is stretched at y and z axis to compensate for that.
Geometry calculation works by iterating tiles from bottom to top and accumulating height at walls and slopes. This gets more complicated as top ledges can't just decrease height because the actual altitude is unknown due to the used art's inherent perspective. That's what I call terminators, which force the algorithm to look up the height from other neighboring tiles. Any z coordinate change in the geometry has to be offset by y axis, meaning it can only get closer or further from the intended camera angle, to keep it consistent.
>>
>>103037894
KSP chads we are so back!
>>
>>103038266
>Why?
Best guess is that it has to do with doing shit directly in Unity. It kinda makes sense, but still doesn't make a whole lot of sense.
>>
>>103060320
not mentioned: all the engine work has to be done in unsafe mode which basically negates any of the "benefits" of c#

people have been writing game engines in c# since xna days, it's fine if you're not pushing any limits, calling it "highly optimized" is extremely disingenuous though
>>
What is THE correct way to model mesh/entity hierarchy?
>>
God damn it, it took me about an hour to do this. My MMO is never going to come out.
Specifically what I did was generate a plane. I already had all the rendering set up.
>>
>>103057955
It's nothing fancy. I build the roof with scaled triangle and square pieces.
Also I have yet to add a "Auto Roof" function.
>>
>>103057686
Nice to see more isochad! What are you making?
>>
>>103058209
And to think I was mad about unity taking 3 minutes
Are you working off a SSD?
>>
File: sonic-says-okay.jpg (28 KB, 525x475)
28 KB
28 KB JPG
>>103059227
I appreciate you actually posting a video/screenshot
Way too many people talking BS without posting anything interesting
looks cool btw, good work anon
>>
>>103060022
That's a fun idea, you could make it render in 480p and say it's super retro, zoomers love that shit
>>
File: output.webm (1.57 MB, 1280x720)
1.57 MB
1.57 MB WEBM
Sliced the roofs into floors so as you move through the floors, the roofs below get shown instead of being a on or off for roofs.
>>
>>103062201
w-what if you added modding support so it'd be like srb2kart or gzdoom or something like that but for sims..
y-youre cool anon keep it up
>>
File: output.webm (1.95 MB, 1280x720)
1.95 MB
1.95 MB WEBM
Im done with Godot, Unity.
Also I literally spent an hour trying to edit and render this recording in shotcut, kdenlive.
Literally incapable of creating quality webms, no matter what settings i use.
but the very first ffmpeg cmd line from GPT gives me a higher quality image in less size.

All these grifters are just holding me back.
>>
>>103062476
>Literally incapable of creating quality webms, no matter what settings i use.
Use ffmpeg
>but the very first ffmpeg cmd line
I was just going to say...
>>
>>103062476
are you using tiles from the dcss repo or the old version from opengameart
I was also using rltiles but then I projecthopped
>>
>>103062498
>use ffmpeg
im going to need to cut footage eventually.
am I going to need to make my own video editor?
>>103062517
opengameart. iirc the current dcss sprites aren't all CC0, some I think they're only licensed specifically for dcss?
Cause otherwise i would love to use the full updated sprites.
>>
>>103062548
>im going to need to cut footage eventually.
Just do what I do, manually specify timestamps (it's painful)
>>
How does a large popular project like shotcut or kdenlive lose to 1 line default ffmpeg?

Surely they could run the same exact ffmpeg commands, in like 2 lines of code?
>>
File: Ygg_1219_Resources_2.gif (71 KB, 550x140)
71 KB
71 KB GIF
>>103060901
Server & client multiplayer open-world sandbox. Many core behaviors like movement style, combat style are all defined on a per server basis (or restrictive minigames within a server) so the experience will not always be the same. As well as the map itself, and entities on the map (I have a map builder as well)
>>
>>103062637
Because they're graphical applications trying to guess your intentions (and failing at it), when you tell ffmpeg you are being explicit, it will do exactly what you tell it to. Sure enough those programs could have added a "make me the best webm for 4chan" button and skipped all the guessing, but they didn't.
>>
>>103062305
Thank you but I'm not planning to add extensive modding support.
I'm of the opinion that if it helps me, then it will be added but I won't go out of my way to add it for the sake of adding it. I'm making a game and not engine. Also the game is FOSS so people can modify it to their heart content.

>>103062671
That's a neat idea! How are you making it? Techstack?
>>
>>103047445
What language for game dev has good compile times? My c++ incremental build is 5-7ish seconds with use of standard library. Don't recommend vaporware like jai or hare.
>>
>>103062201
Looking good man!
>>
>>103062769
bellard org tcc
tiny c compiler
nothing can surpass it in terms of functionality, even linking sdl works
>>
>>103062769
Use a dynamic language, this problem was solved 60 years ago.
>>
File: pixelart.png (151 KB, 550x309)
151 KB
151 KB PNG
>>103044402
>Walking isn't tile based
>>
>>103062855
It's not 1983 anymore greatgrandpa
>>
>>103057686
same here, I have alot of stuff to rewrite im currently only able to render 2D images with some color manipulation
>>
>>103062769
the more useful and productive the language is, the slower it takes to compile.
actually I don't know how long it takes to compile C# / unity code.
Depending on the size of the executable, it should not take 5 seconds to link your code, that reminds me of the performance hit you get from using vcpkg manifest mode, the main reason why I use classic mode is because it won't impact build time as much.
I think there might be a way to prevent manifest mode from being super slow (you could speed it up to be just as fast, but my personal problem is that it copies the binaries into your cmake folder and wastes like 200mb more space).
Also you can't use incremental linking with address sanitizer, you should not be debugging without it.
>>
>>103062817
I embed Lua for doing gui stuff but I don't see how you could implement a whole game (engine) in a dynamic language.
>>
>>103060307
ooooh "pkm no ortho" as in the japanese conjunction, so in english it's "ortho pkm" or "otho pokemon"
I get it
aha I thought you meant it wasn't using ortho
please do explain the geometry calculation this looks similar to something I need to do
>>
>>103062887
Oh sorry, so graphics are just placeholders?
>>
>>103062924
>cmake, vcpkg
Slow and awful experience. Ditched those recently for ndk-build (makefiles on android) and dependency vendoring.
>>
>>103062965
in that case it's obvious the problem with performance is your toolchain.
it's not like cmake or vcpkg does anything special that affects the speed of linking (as long as vcpkg isn't using manifest mode, AKA I think it polls git for changes every time you build? but I don't remember)
>>
File: Ygg_1110_1_Cut.webm (2.36 MB, 1366x785)
2.36 MB
2.36 MB WEBM
Ancient webm of roguelike grid movement restrictions, which I have a few others now

>>103062724
A mix of python and opengl
>>
>>103044402
>>103062855
>>103062887
>>103062950
if your graphics are place holders post your sprite sheet and I'll make you a new one
>>
>>103063010
Probably true. Android development is a mess and launches gradle too every build. Going from two bloated systems to one made a big difference but I agree using cmake on its own isn't that bad.
>>
>>103062201
I have seen your projects development for quite some time now while lurking these threads. Looks impressive, anon.
>>
File: geometry calc.png (154 KB, 737x418)
154 KB
154 KB PNG
>>103062936
You actually got it right the first time, as the webm has orthogonal projection turned off.
Here's the general idea. There are some nuances like needing to set the reference height tile that would solve the whole system. You also run the whole thing in a loop until no changes are made or it's fully resolved (there might be some graph method to this but I was too lazy this time).
Walls are just steeper slopes and more aggressive terminators, cutting off left-right look up at the edges. Order of calculation is not that important as long as you always check if neighboring tile is fully resolved.
>>103063074
Thanks but I'll be doing more than just retexture by experimenting with proc gen as the amount of tiles required to do something similar looking to Johto Redrawn would be insane.
>>
>>103062769
>>103062769
>What language for game dev has good compile times? My c++ incremental build is 5-7ish seconds with use of standard library.
Is it really similarly bad with c++? Then rust doesn't sound too bad but that's still shit.
Like others have said you need to separate your core from scripting and just solve it like that.
>>
File: hrot.jpg (261 KB, 1920x1080)
261 KB
261 KB JPG
What's the /gedg/ take on hrot?
>Some slav motherfucker made a whole ass Build engine knockoff in the year of our lord 2021
>He wrote it in fucking PASCAL
>It just works
>Somehow less buggy than the real build engine

>also the game is pretty fun

i personally consider it an inspiration
>>
>>103064702
90s style stuff is easy to program
>>
Does anyone else HATE web*fundementals.org? The damn site(s) aren't referenceable. Every single page is a step-by-step novel of code snippets. Not a single diagram in sight. It's as if the pages are designed for the reader to take notes, discard the site, and reference their own notes. Horrible.
>>
File: brickED.png (280 KB, 1491x915)
280 KB
280 KB PNG
Preparing to release my editor to the unsuspecting victims. 578 commits to version control, about 50k lines of c++ and a year of work on-n-off
>>
>>103064702
As long as he's having fun, I wish the guy all the best.
>>103064740
Don't underestimate how weird 90s games ended up being to work around insane low spec system requirements which changed very fast.
>>
>>103064981
>web*fundementals
wrong thread
>>
>>103064992
wow, look at all those DLLs
>>
>>103065010
>webglfundementals.org
>webgl2fundementals.org
>webgpufundementals.org
This is the right thread.
>>
>>103065028
Lovely, isn't it?
>>103064992
Download link for the brave: https://drive.google.com/file/d/1jobLZMVfeG_EiWg3LO_6T4y24tB4Lgq7/view?usp=sharing
>>
>>103059378
Good call. I'll look at that next. Sorry I went to bed at 3am last night right after posting that.

>>103060094
I'm not actually writing a physics engine. I'm tearing babylon's havok.wasm and havok.js file out and trying to make as much stuff as I can work in three.js. The problem is there's no documentation for havok.js because it was written to be used in the Babylon plugin, so I'm pretty much brute forcing it.

I just finished the first rough version of a character controller.
>>
>>103062681
i can't imagine "Higher Quality" and "Lower File Size" being a subjective thing. One or the other, sure, but the webms outputted by those editors were 7MB+ and so blurry you couldnt read the text
>>
>>103054942
hmm maybe so..
>They made Havok free for the web in WASM
very un-microsoft-like, very cool
>Havok outperformed in three.js over unity and Godot with Havok
i wonder how much this has to do with physics, and how much with other engine stuff. obviously unity and godot are way heavier by default, but the projects could've been setup differentlly, like using (or not) instanced rendering
who even uses havok in unity/godot? there is physx, and there is and unity.physics which would excel in stress-test like that, although i guess it wont work in a browser
having said all that, i am still glad that there is actually performant physics engine for the web that works in a lightweight free game engine
>>
>>103065198
Coincidentially, I've swapped from three + cannon to babylon because of the physics. Performance was getting terrible because of physics and three didn't want to work with multithreading, so I tought I could as well go for a propper engine. In the end I just scrapped physics and spend about a week doing my own collisions.
Did you implement the controller with or without physics? In cannon the task was very simple.

>>103054942
>just saw how many rotating cubes I could drop before performance decreased on a 2080 ti and i7
Word of warning: my performance issues with cannon didn't happend due to mass, it happened due to size of the world. I implemented procdecurally generated terrain and once I got 300~ meter from the starting point performance dropped despite not using my system ressources and me dropping older parts of the world. The reason might have been communicating from wasm to JS which might also crop up in havoc.
>>
>>103065087
works for me
from the ss i thought it was a voxel modelling thing, but you can actually place all the different primitives which is cool
im absolute dogshit at anything modelling, so won't actually make any use of it
polska gurom
>>
>>103059284
joints
>>
>>103062476
for a new project in C#, monogame is supposedly better. fna is just xna rereleased, but monogame is activeproject, works on more platforms + has actual roadmap
>>
>>103065459
I have no idea why they're letting us use it free, I guess they don't think web engines are powerful enough to lose enough business on via free havok. Except that webGPU just came out lmao

>>103065536
The controller is physics based completely.

If you would like to try it for yourself I got my character controller rough version up, but bare in mind I'm just starting and probably doing a lot of things that will make you cringe. But as far as I know this is the first three.js Havok physics character controller.
https://stackblitz.com/edit/vitejs-vite-yfobe9?file=index.html
>>
>>103065536
Also I'll add I used Babylon before three is a bit but it seemed too lacking. Simondev has a video on multi threading in three if I remember right.

A few people have the cubes test if you wanna try it
https://ustymukhman.github.io/three-havok/dist/
>>
>>103059284
>Shapecasting
already more advanced than godot
>>
>>103066975
I got an example of if you wanna see, the link at >>103066792

I'm probably using it wrong but it's proof of concept
>>
/wdg/ guy here. I have nothing important to say, just bumping your thread because it's on page 10.
>>
>>103035348
If I'm an absolute no coder (most I've done is hello world in C++) and have an idea for a short game which steps should I take?
Learn to code first? Art first? Just dump it on a pre existing engine and hit export?
>>
>>103068754
2d or 3d?
>>
>>103068774
2D, top down or isometric view depending on which looks better in action
>>
>>103065780
False.
>>
>>103068754
that depends, what skills do you have?
art? music? dialog?
>>
>>103068754
If it were me, I'd probably just marathon Godot tutorials for a week. Like nonstop, hyper-autistic adderall focus them. You'll learn enough programming as you go.

You probably want to use an engine because you won't be able to go from nocoder to making your own engine in a reasonable amount of time. I wouldn't recommend that unless you want to specifically be an engine dev.

The other option is Construct 3. I've heard nocoders like it (I think it uses a kind of visual scripting system) but I've never personally used it.
>>
>>103060022
Even a shit gpu can raytrace a scene of thousands of sphere at thousands of fps in compute. That probably drops rapidly once you add heterogenous shapes into the mix, textures, additional light sources, and other shit though.
>>
File: output.webm (355 KB, 1280x720)
355 KB
355 KB WEBM
ok nevermind on FNA. Some people told me that c# could export to wasm and those people lied to me.

I think I'm going to try this: https://ebitengine.org/
Cross Compiles to working wasm almost instantly.
Next concern is getting screen scaling and resolution to work exactly how id want it in wasm and desktop.
>>
>>103049248
What's the need for any of C++'s features anyway? What's so great about it? I like the simplicity of C.
>>
>>103069669
Because you're a mentally simple person writing simple programs like hello world.
>>
>>103069527
huh? there are multiple ways to convert .net code to wasm, no clue if any of those are compatible with fna though but I wouldn't be using fna in the first place
>>
>>103070214
Do you have any ideas for a tech stack for a c# game that exports to wasm? It needs visuals and input, not just some server tech stack thing.
I also don't know about glueing together different things and what's going to be compatible.
>>
>>103070299
Macromedia Flash is pretty good
>>
>>103070314
slug
>>
>>103070314
I wish I could go back in time to when someone on a forum would actually be recommending (Macromedia) Flash for anything. Better times
>>
>>103070379
sry you get soulless youtube videos and unityslop forever now
>>
>>103069715
Guess there's nothing I'm missing out on then. Good to know.
>>
"I don't need anything except C" is the hallmark of beginner programmers with DK syndrome
>>
void Sys_FPU_SetPrecision( int precision ) {
short precisionBitTable[4] = { 0, 1, 3, 0 };
short precisionBits = precisionBitTable[precision & 3] << 8;
short precisionMask = ~( ( 1 << 9 ) | ( 1 << 8 ) );

__asm {
mov eax, statePtr
mov cx, precisionBits
fnstcw word ptr [eax]
mov bx, word ptr [eax]
and bx, precisionMask
or bx, cx
mov word ptr [eax], bx
fldcw word ptr [eax]
}
}

wtf this wasn't in any of the gamedev tutorials
>>
>>103070477
I'm not sure you need this nowadays. Modern CPUs are using SIMDs for floating point calculations not FPU.
>>
>>103070513
>Modern CPUs are using SIMDs for floating point calculations
not for every operation right
>>
>>103070477
Wouldn't that destabilize the entire system? Or does Windows store the floating point precision and restore it when switching contexts?
>>
>>103070477
I could be absolutely wrong here but I think that's more about reproducing the same behavior on different CPUs more than it's about performance. Probably irrelevant in current year?
>>
>>103070570
Googling suggests that the FPU is usually set using compiler options, so it sounds like this is just the long manual way of accomplishing the same thing (i.e. if your compiler doesn't support such arguments).
>>
>>103070443
You still haven't listed something that would benefit me, so you're just full of shit.
>>
>>103070767
templates
>>
>>103070477
>gamedev tutorials
tutorials are written by babies for babies

you should be looking at official dev resources from microsoft and aaa source code on github
>>
>>103066822
What did you find lacking? The only thing I care about for an engine is movement and 3d rendering areas and sprites, I don't even have 3d character models. The rest of the game is easy, e.g. I already did a dialogue system for work once.
In my initial tests Babylon and three were pretty much the same, the only notable difference was babylon handling sprites in 3d differently: better colors but worse scaling.
>>
>>103069669
Yes I do want to reinvent hashtables and cast to void* when making a game.
>>
>>103044241
haven't seen that smiley face for a while. very cool.
>>
Ok so hear me out. I got this idea for a game engine written in Rust. Why Rust? Because I don't like C++ and C just doesn't have the features that I like. So I'm going to have the main structure, something like World. This structure is going to contain containers (something like HashMap<ComponentType, Vec<Component>>) for all the components (which are structs) that can exist in the world like Position, Rotation, Scale, Color etc. You can also put all the resources into it, like Textures, and then use them by their ids. When inserting something into the world, you get back the id which is basically an index in a bucket where that struct was inserted. So you can get it back by providing the type of the struct T and the returned index. You can then read one value or multiple (slice of values) immutable and mutable. This should deal with the borrow checker/unnecessary copying. Plus since all the types will be grouped together in buckets based on types, it should be easy to get advantage of SIMD/multithreading for calculations. So then, in order to create a game object with multiple parameters like Translation, Rotation, Scale, etc. you insert those structures into the world (one by one or as a tuple in one batch), get the ids and then construct your GameObject with the ids you got from the World: GameObject(ti: TranslationId, ri: RotationId, si: ScaleId). The problem here is to somehow ensure that you can't get back a component by incorrect id (like Translation by ScaleId). Then also need to figure out how to remove components from the buckets as it will create a gap in the bucket. This is basically like ECS, but without the queries (which I don't really like). Why not just use Bevy? I have tried Bevy and didn't really like the way it forces you to write all the code in one pattern where you need to use queries and send signals and all that shit. It's too rigid. I just want my game loop and then do whatever I want inside of it. What do you think?
>>
>>103071351
New copypasta just dropped?
>>
>>103071357
I just wrote this shit by myself.
>>
>>103071351
truly revolutionary
>>
>replying to AI slop
>>
File: rags.webm (3.47 MB, 1898x1060)
3.47 MB
3.47 MB WEBM
finally progress
>>
>>103071713
what is the ui? is it imgui?
language? details?
it looks cool
is it a sandbox?
>>
>>103071767
It is C and raylib library with ODE library for the physics
openGL for the drawing and the gui is also raylib library too.
I want to make some sort of quake 1/half life 1 game engine style of game with vehicles and extreme violence
>>
File: file.png (19 KB, 444x173)
19 KB
19 KB PNG
are these any good?
>>
>>103070537
Of course it does anon, but if you have code running inside the process which changes the fpu mode on the fly you still need to account for that. This is why d3d9 was such a pain in a lot of cases.
>>
Is the point of deferred to save computation by making sure we do lighting calculation for pixels that end up on screen?
Why is this idea incompatible with MSAA?
For what reasons beside deferred did MSAA loose its popularity?
>>
>>103072361
>For what reasons beside deferred did MSAA loose its popularity?
MSAA isn't compatible with the new DXGI flip model on Windows, so if a modern game wants to support MSAA they have to resolve it in a shader which defeats the point.
>>
>>103072422
>new DXGI flip model on Windows
I'm sorry what is that? Something introduced by DX12?
>they have to resolve it in a shader which defeats the point.
Yep, MSAA getting hardware accelerated sounded nice on paper. I thought deferred killed that but I don't see how it's not possible to "simply" use MSAA with deferred (you do your 4x sample on each of the gbuffer texture).
>>
>>103072439
>I'm sorry what is that? Something introduced by DX12?
Used by DX12 but not part of it. You'll have to reach the MS docs to get a full answer on what DXGI is because it encompasses a huge amount of Windows functionality. Doesn't matter what graphics API you're using, if it's being displayed to the screen on Windows it's going through DXGI at some level even if you're not personally calling into it.
>>
File: 20241104_005619.webm (572 KB, 1774x992)
572 KB
572 KB WEBM
>>103071713
>>
>>103070979
>Yes I do want to reinvent hashtables
khash.h
>and cast to void* when making a game
Not really needed except when using function pointers.
>>
>>103070405
Nothing wrong with unity if it helps you finish a game
>>
>>103072678
Spoken like a zoomer who never experienced the glory days of Flash gaming.
>>
>>103071767
>I want to make some sort of quake 1/half life 1 game engine style of game with vehicles and extreme violence
Extremely based. My dream would be to make a Halo: CE like game and that is basically a quake engine game with vehicles and basic violence.
>>
how do you even render vector art in a shader, is there like a reasonable equation for a pixel to take its own position in a quad and calculate if that's inside of a shape defined by a potentially massively complex shape?

maybe easier to do in compute...
>>
>>103035348
>>
>>103071713
>>103072479
lovely game, keep us update. any link to blog/development progress?
>>
>>103072361
It’s possible to use msaa with deferred but you need to work around issues with the sampling at the edges. There’s a few blog posts about it.
>>
>>103072730
Meaningless comment
>>
>>103072361
>For what reasons beside deferred did MSAA loose its popularity?
That's literally the only reason
You can do MSAA with deferred but it's too slow to be viable
>>
https://raytracing.github.io/books/RayTracingInOneWeekend.html
I'm trying to do this, but in Rust. Is this a useful resource. Aside from the choice of my language, is this a good idea?
>>
>>103074065
>That's literally the only reason
https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/dxgi-flip-model

Like the other anon said, DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL added in Windows 8 does not support MSAA and is used by virtually 100% of video games on Windows made since it was implemented.

If anything is "literally the only reason", it's that.
>>
>>103074246
I don't know what the fuck that is but MSAA died long before Windows 8 and I can make a forward rendered video game right now and turn MSAA on
>>
I'm considering representing characters in my game as 2D images, with one image per a "unique pose". There would be about 8 poses per character -- 6 front-facing (facing the camera in a "battle view"), and 2 back-facing (facing away from the camera). I am stuck deciding between two styles for these images -- 64x64 16-color sprites ala GBA/SNES, or high-res (256x256) black and white "manga-style" drawings. I'm assuming that each image for the 16-color style will be 4KB, and each image for the manga style will be 64KB. Assume that I have 200 unique "monster characters" (this is an RPG... of a certain kind), meaning the total filesize for all monster sprites would be ~6MB for the 16-color style, and 100MB for the latter style. Which style should I choose? Does file size not really matter? I know we all have lots of ram and storage space, but I'd still like to have assets take up little space (i'm autistic)
>>
>>103074410
It's why you get FSE tier performance when in windowed fullscreen mode on modern Windows, and on recent GPUs with MPO support it's why you get FSE tier performance even in non-fullscreen windows.
>>
>>103074528
>Does file size not really matter?
no
>>
cozy sunday, I think today I will read up on shadows
>>
>>103060470
What features in C# and .net are they going for that do not exist in c++?
>>
File: kmk_bump.jpg (154 KB, 1440x1080)
154 KB
154 KB JPG
>>103035348
bump
>>
File: i herd mudkipz.webm (3.25 MB, 1920x1080)
3.25 MB
3.25 MB WEBM
Oh boy, this is going to take a lot of work.
>>
>>103076195
why is the top and bottom blurry?
>>
>>103072361
It's just deferred rendering. Games like Half-Life Alyx (which looks amazing, by the way. Screenshots don't do it justice, you have to play it to really experience how good it looks) still use MSAA.
>>
>>103076407
For the nintendo diorama effect meme.
>>
File: output.webm (1.58 MB, 1280x720)
1.58 MB
1.58 MB WEBM
First iteration on the roof tool.
>>
>>103076195
The DoF is too much.
>>
>>103076626
good job m8, looks gr8, I r8 8/8
>>
>>103076626
What happens with irregular layouts?
>>
File: output.webm (3.18 MB, 1280x720)
3.18 MB
3.18 MB WEBM
>>103077546
You just draw multiple roofs.
>>
>>103076626
Are you planning on making the roof transparent as you're placing it?
>>
File: output.webm (1.28 MB, 1280x720)
1.28 MB
1.28 MB WEBM
>>103077893
Transparency is such a pain in the butt.
>>
trying out a bunch of new languages for game dev. so far i've tried out:
- zig (some good, some bad)
- rust (no no no no no)

gonna try out c3 and odin next anyone got any other languages i should try out?
>>
>>103078957
what was the bad on Zig?
>>
>>103073451
yee
https://www.youtube.com/watch?v=C9jyfWZlX0Q
>>
>>103078957
when you're ready to stop being a baby playing with memelang toys, c++ is there for you
>>
>>103079050
dont like putting data and functions together. prefer the simple c style where your program is essentially a long list of structs and functions. you CAN program in zig like this but it feels like your fighting the language.

other than that zig is a damn ugly language, not rust or modern sepples levels vomit enducing, but still a bit of a minger.

there are some good sides to zig thoughbeit:
- c interop
- good meta-programming
- nullability operator
- good standard library
- arenas and pools

i might come back to zig if c3 or odin dont tickle my fancy desu.
>>
>>103079170
post your compile times
>>
>>103079223
for my dinky hobby project, including raylib
>>
>>103079223
This included re-building and re-linking three demo executables as I changed an engine header file:

$ time ninja
________________________________________________________
Executed in 3.44 secs fish external
usr time 4.46 secs 0.25 millis 4.46 secs
sys time 0.86 secs 2.57 millis 0.86 secs
>>
>>103079170
no defer statements...
>>
File: ct.png (3 KB, 537x33)
3 KB
3 KB PNG
>>103079223
for this -
>>103079061
>>
>>103079221
>not rust or modern sepples levels vomit enducing
I'd argue it's even worse than rust. have you tried making something that requires casting from floats to int or vice versa, they unironically want you to use this when you want to cast something or do floating point division
@as(i32, @intCast(i))
@as(f32,@floatFromInt(23))
@divTrunc(@as(f32,@floatFromInt(32)),5.0)

// real code I had to write
const gap: f32 = @divTrunc(@as(f32, @floatFromInt(rl.getScreenWidth() - (4 * obstacleWidth))), 5.0)
const offsetX: f32 = @as(f32, @floatFromInt(index + 1)) * gap + @as(f32, @floatFromInt(index)) * @as(f32, @floatFromInt(obstacleWidth));



I had to write these 2 lines back to back, and at that point I was done with zig. I honestly prefer rust's way of casting, it's at least not vomit inducing.

x as type

this is way better to read, mostly because it logically makes sense while reading from left to right and doesn't make me vomit.
Though I agree arena, pools, allocators by default are some nice features.
Unless they find a easier way of doing casting, in it's current iteration I'm never touching zig for gamedev.
>>
>>103079511
i just hate putting things in parentheses. it's always like 6+ ctrl+right_arrow presses minimum for complex values.
>>
>>103079511
zig really is so fucking ugly

the sepples code I've been writing lately, in comparison, is so beautiful
>>
>>103074145
Despite what anons here say about Rust it is on par with C++, however C++ will be easier for gamedev due to it being the golden standard since the late nineties. All the tools and libraries are C/C++ and majority of learning material will be C++.

Most importantly you will have to wrestle the borrow checker and iteration times will be slower due to the much stronger type system. People like to shit on OOP but for games and GUI I'd argue it's the best paradigm, and while you can do some OOP lite in Rust it is not so ergonomic.

Stay clear of Bevy and other ECS shit, focus on Rusts strengths and make plenty of state machines, and other than that use it as a better C. Rusts structs and enums are very powerful so utilise them well.

Finally raytracing in one weeking is a very good starting point for graphics programming and if you already know Rust it shouldn't be so hard to convert C++ to it, worst case look up cppreference and learncpp.
>>
>>103081019
There is literally nothing wrong with ECS. It's just composition that is a lot easier to modify vs. updating a class or struct with new fields. You can even have a "god component". Plus, with selective querying it's so simple to quickly enable/disable behavior.

Organizationally it's so much better
>>
>>103081019
>>103081049
Video games?
>>
>>103081019
Yeah I know Rust, at least enough to get by the borrow checker. I know C++ so it's not that hard to convert the code. I already started the ray tracing in one weekend. I was just questioning the quality of the resource itself, whether it was a good starting point or not.
>>
>recommending rust in a game engine dev thread
lol

practically every real game dev library targets C/C++ and all the documentation and learning resources are going to be written for C/C++

writing a toy game engine in a meme language is for people who already know what they're doing and have nothing better to spend their time on

>j-just interop!
lmao no
>>
File: 1728222335894120.png (517 KB, 1035x626)
517 KB
517 KB PNG
Anyone running Unityhub on linux? I'm getting stuck on the sign in.
>>
>>103081221
Someone who's enginedeving for fun probably wouldn't go through the trouble of using a big state of the art C++ library anyway, so that doesn't matter.
What C++ libraries do (you) use in your hobby enginedev projects?
>>
>>103071713
looking sick, if you are going to release it, is it going to be as a separate engine, or the game you make with it? any plans or developing a vfx graph like in unity or ue? for the particles
>>
>>103081415
i used unity in docker for cicd pipelines. i dont think i used hub though, only cli arguments for the editor and logged in using license files (for free version) that you generate beforehand. look up cli arguments for editor (and maybe for hub if its easier)
>>
Is agdt dead on the other boards? This general is kind of gay because I want to make games and not game engines.
>>
>>103082175
youre gay, go away asap:
>>>/vg/agdg
>>
>>103082175
agdg is liv on /vg/ but you won't find nor games nor engines there
>>
File: terry-dance-noaudio.webm (2.02 MB, 640x360)
2.02 MB
2.02 MB WEBM
>>103082182
thanks faggot, have fun making nogames and reinventing the wheel
>>
>>103082227
>this is what unity/godot-slop-cucks actually believe
>>
>>103068864
Yesn't
>>
>>103082412
Show game
>>
File: 1727694275616938.png (206 KB, 516x492)
206 KB
206 KB PNG
I love rust & ecs. it make me feels so hecking valid and cute!
>>
>>103081449
Not that anon but I use bezier, cereal, Clipper2Lib, eventpp, imgui, implot, magic_enum, various mapbox stuff, msdf-atlas-gen, msdfgen, pugixml, SPIRV-reflect, thread-pool, vk-bootstrap, and VMA
>>
>>103081415
Just use windows if you want always online spyware
>>
>>103083683
no
>>
>>103064992
Looks fine, anon. Publish it on itchio and Twitter, amass a following.
>>
>>103083179
a match made in hell
>>
>>103083768
>>103083683
I'm kind of surprised a linux user is not only using unity in 2024 after all the BS we know about it (I used it back in like 2016), but makes a post about it in /gedg/

you chose linux, you chose to be a real man - roll your own engine or save yourself the embarrassment and stop posting
>>
>>103084584
He's using a premade OS so he's not a man, or even a boy. He's a sissy and should use sissy engines like Unity.
>>
File: triple_dog_dare.jpg (109 KB, 750x1000)
109 KB
109 KB JPG
>>103084584
>>103084796
>>
File: IvyMen_mbWpSRBZpp.webm (3.56 MB, 1008x724)
3.56 MB
3.56 MB WEBM
Added infighting. When the hobos get shot by the redneck, they switch their aggro to him (but they lose that battle)
>>
>>103084880
>Added infighting. When the hobos get shot by the redneck, they switch their aggro to him (but they lose that battle)

Homebrew or what? This is neat
>>
>>103084910
>homebrew
Not sure what you mean. It's my own engine in C++/DirectX
>>
>>103084880
This a mod for Barony?
>>
>>103084954
>It's my own
That's what homebrew means. You made your own beer instead of buying it.
>>
>>103085004
I thought you might've meant homebrew on a console of some kind
>>
File: John_aUO6FVV6Rb.png (266 KB, 1851x1111)
266 KB
266 KB PNG
>>103084880
>>103085004
>>103084956
>>103084910
Also here's the little level editor I made for another game but have been using on other projects since then
>>
>>103085085
>Also here's the little level editor I made for another game but have been using on other projects since then
(Meth) Zombies Ate My Neighbors
>>
File: file.png (10 KB, 897x114)
10 KB
10 KB PNG
So this is the power of bevy and rust. Thanks rust people
>>
>>103085182
>rust people
I wouldn't call them 'people'
>>
>>103085202
Hey, no hate against rust folks but I think I can cross rust off my list of languages to learn.
>>
>>103084880
>7-eleven at 3:33am simulator
I love your game
>>
File: 1730229882741939.png (588 KB, 900x506)
588 KB
588 KB PNG
>>103085182
it's rust FOLX! Ugh you chuds can't get anything right...
>>
>>103084880
this looks really good, what kind of engine is it? raycast, bsp, styalized 3D?
your design is giving me some ideas for my own raycaster
>>
>>103084796
>>103084584
Post game
>>
File: i herd mudkipz2.webm (3.82 MB, 1920x1080)
3.82 MB
3.82 MB WEBM
>when you can't decide whether to make a monster catching game or water simulation
>>
>>103085704
>get sued by nintendo
or
>get used by pepsi co
>>
>>103085704
add a glow effect and its an instant orgasm
>>
>>103085704
Can you remove the shitty CRT filter?
>>
File: IvyMen_Nl9BFWrA3d.webm (1.69 MB, 1008x724)
1.69 MB
1.69 MB WEBM
>>103085679
Not a raycaster, just looks like one. It's all C++ and DirectX. Walls and other 3D objects are a different shader from the billbaorded sprites (enemies). I also have this neat thing I've been working on for user interfaces
>>
File: pkm bloom.png (247 KB, 954x635)
247 KB
247 KB PNG
>>103085736
You mean this?
>>103085753
Yeah, but I'll have to find a way to desaturate the screen without it because colors look so much better with it on.
>>
>>103085779
I like saturated pixel art, what's with all the bloom?
>>
>>103085754
very cool, I'm gonna see if I can add camera shaking to my raycaster to give it a more life like effect cause this looks sick
>>
>>103085779
it looks nice but kinda odd because where the glow has no light around it
I meant something like an opengl shader
if you played ufo defense with xcom it has some shaders and there's a bloom one and a crt curvature one
>>
File: pkm no lcd.png (94 KB, 960x640)
94 KB
94 KB PNG
>>103085802
It looks off to me, I'll have to check whether I screwed up something in the color space.
>>103085827
Oh, so you mean a crt glow. The one I have is supposed to emulate an lcd. It might be over the top for this case.
>>
>>103085754
Simple but elegant solution.
>>
>>103085892
oh, also I just realized it reminds me of ASCIICKER (https://www.asciicker.com)
it's a 3d game that uses a text screen instead of pixels
>>
>>103085892
looks much better without that awful CRT/retro filter
>>
>>103085892
I prefer it without the lcd/crt filter
>>
>>103085922
I wrote a post on a forum about the math used to implement this in case anyone else wants to do it too:

https://www.gamedev.net/forums/topic/717549-doom-3-touchscreens-in-directx/5466634/
>>
File: pkm no grid.png (92 KB, 955x642)
92 KB
92 KB PNG
>>103086023
>>103085994
Is this acceptable? It has the color correction but no pixel grid.
>>
>>103084880
looking cool, but I hate the camera sway
>>
>>103086193
looks pristine to me now. very nice
>>
>>103085704
I might be controversial but I prefer the look of this to >>103086193
But only if the intent is to make a sort of cursed / creepypasta game.
>>
>>103085892
Looks good, I'd like to see a video in motion
>I'll have to check whether I screwed up something in the color space.
The GBC had weird colors to begin with
>>
>>103086193
Good middle ground, would probably look great in motion with your lighting effects
>>
>>103086325
If he's actually making a creepypasta game, I agree. There's something surreal with those effects plus the thousand mudkips fleeing from the player while apparently being imprisoned in that screen
>>
File: living walls.webm (3.79 MB, 1920x1080)
3.79 MB
3.79 MB WEBM
>>103086379
I completely forgot that every single one of those has light occlusion turned on.
Take your guesses which has the most performance impact.
>physics
>lighting
>a simple unordered_map access for the monster AI
>>
>>103086714
Now that looks great, my favorite so far
>>
>>103086714
Can you make the sprites cast shadows shaped like them?

>Take your guesses which has the most performance impact.
lighting?
>>
>>103086988
That would be challenging. Without the blur it's doable, but the shader transformation for the penumbra only works with simple walls. Blurring a sprite in similar manner would be way too complicated unless I decompose it into simple shapes. It would be neat to have that though.
As for performance at around 350 monsters
>physics 20% mostly due to bloat
>lighting 4%
>unordered_map access 12%, 25% for the monster update logic
>>
Anyone know how to load an indexed image in OpenGL with C++ from a PNG and still have access to the index, and just apply the palette from a swappable palette texture at runtime via a shader?
Stb_image seems to automatically depalettize (aka apply the palette) the image when loading it and I don't want that.
>>
>>103087406
PNGs aren't guaranteed to be in indexed format, so I wouldn't count on any library to provide this.
>>
>>103087554
Ok, then what about BMP files? How would I use those?
>>
>>103087603
That's even worse for your purposes.
The easiest solution would be to suck it up and postprocess the image after loading into an indexed format.
Other options would be finding and handling a preexisting format or making your own if you really need the performance.
>>
>>103087651
Hmm.
>a preexisting format
Only other format I can think of is TGA. Is that any better?
>>
>>103087730
GIF is indexed from what I remember, but its alpha channel might be bad depending on use case.
>>
>>103087775
Meh, not a fan of GIF.
Btw, here's the main reason I want to do paletted images if you're curious: https://bulbapedia.bulbagarden.net/wiki/Shiny_Pok%C3%A9mon
(that and maybe palette/color shifting for day/night cycle effects)
I know I could just have 2 copies of each sprite and one of the copies be the shiny mon, but I think that's stupid.
>>
>>103087891
Make a custom image format
>>
File: waterfall-gif.gif (756 KB, 640x480)
756 KB
756 KB GIF
>>103087891
Palette swaps can be neat for many things if you have the skill.
GIF should be plenty for this. You should have an asset processing program either way, so you can always work with PNG but internally use GIFs or whatever.
>>
>>103087984
>internally use GIFs
File formats like GIF and PNG are not for internal use
>>
>>103087997
What should be used then? We are not talking about large textures but pixel art.
>>
>>103087406
Sounds like you want a real library like libpng instead of a quick and dirty solution like STB/SDL
Not that I've ever dared to used but it has one million features, no doubt managing palettes too
>>
>>103088019
Have you ever actually programmed anything that handles images before?
>>
>>103087984
I'm still iffy about using GIFs for pixel art sprites.
Maybe I'll just suck it up and just do "multiple copies of the sprite for each color variation".
>>
>>103088029
When you load an image, scan the image, make a list of every color in the image, then you automatically have a palette
Isn't this supposed be the thread for technical gamedev discussion why are people getting stuck on these basic problems
>>
>>103088027
I don't think we are on the same page. By internally I mean packaged assets and from what files program loads the data.
>>
>>103088054
oh yeah, you could just make your own format if that was the case instead of fucking around with shit like GIF
>>
new thread
>>103088648



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