Game development career thread:

Kharzette

Watcher of Overs
5,593
4,573
I've started integrating this cool UI layout library: Clay - UI Layout Library

Weirdly I came across it on youtube. For once the algorithm helped me out.

I've just got some basic shapes drawing so far I think this is going to be really handy:
Screenshot_2025-01-15_04-08-30.png
 

Kharzette

Watcher of Overs
5,593
4,573
It is comin along now! Mine on the left and the raylib sample I copied on the right. Still a few bugs and missing things.
Screenshot_2025-01-20_07-41-11.png
 

Kharzette

Watcher of Overs
5,593
4,573
I've got it mostly working now with just a few visual bugs. I used it to bring over my skeleton editor functionality I had on my old C# tool. This lets you edit bone collision shapes for localized hit detection or ragdolly physics or whatever.

 

Kharzette

Watcher of Overs
5,593
4,573
And speaking of physics, I'm finally getting around to trying a ready-to-go physics library. There are a bunch out there but I decided on jolt. It is C++ but there's a C adapter made by the same person that wrote the C# stuff I used for awhile vortice.



I expected it would take a few days to get anything working, but it was super easy to get going. I had spheres bouncing around in about 5 hours.

Next up is biped movement, then ragdolls, then maybe might try some vehicle stuff.
 
  • 2Like
Reactions: 1 users

Kharzette

Watcher of Overs
5,593
4,573
Hmm looks like most of it isn't implemented on the C side.

I'm looking into directly using the C++ library, but the code makes me ill. The "hello world" is 300 lines.

While the code makes me gag, if you run the samples, they are really well done. It is a good library just wish they had written it in C.
 

Kharzette

Watcher of Overs
5,593
4,573
So ever since the early soul blade games, it was readily apparent that the "east" has a huge edge on the west when it comes to character models. I remember the first soul calibur that came with posing tools, I sat with artists and we looked at the joints and just could not figure out how they were so perfect.

I probably could have figured it out in the meantime with the rise of MMD, but I just never got around to looking into it.

Some gacha game has released their models in mmd format and this artist goes into how it works. 20+ year mystery solved for me. It is similar to how the twitch artist shonzo showed me with the wrists, a twist bone near the joint.

 
  • 1Like
Reactions: 1 user

Kharzette

Watcher of Overs
5,593
4,573
So among my list of bad decisions for making games, one of the best/worst was choosing Collada as a go-between format for art programs and my code.

Blender is getting rid of it in the next couple years, but most linux packages have already removed it as the code is using old libraries that have security vulnerabilities.

This looks like the current favourite art interchange format. glTF™ 2.0 Specification

So I'll probably be moving to that. Will be nice to have everything in C.
 

Kharzette

Watcher of Overs
5,593
4,573
This format is cool. There's even a few vscode addons that read it. Animations even work. Not really possible with collada.
Screenshot_2025-03-04_02-51-08.png

The above was handy because the blender exporter is a bit vague on the details. Took alot of trial and error to get any of the skinning or animation data to export. At first I was painfully digging through it in json (all squished onto one line).

Every format I've ever used with blender won't export real keyframes though. It wants to interpolate and export a new key for every frame. Sampled animation it calls it. It does have some kind of keyframe reduction so maybe in the end it will come out about the same. I'll see once I get it going.

The file's approach is to cram anything that has a name or references into json, and then the raw lists of vectors and matrices are saved in a binary blob. The json gives you the offsets to what it wants. Seems like a solid format.
Skelly.png
 
  • 2Like
Reactions: 1 users

Kharzette

Watcher of Overs
5,593
4,573
So explaining the chain of the above events as a one-thing-leads-to-another chain:

Ludum Dare 55 really revealed some big holes in my terrain physics. I ended up integrating Jolt, a physics library to handle everything physics related.

Once done-ish I had two states I wanted to cover with animations. Falling and sliding.

Falling is just when the character isn't "supported" at the bottom and the velocity vector is mostly pointing downward (measure with a dot product vs 0, -1 ,0). So I made the animation and it just wouldn't come out right. The data coming out of the collada exporter was bad.

So that lead to the gltf detour, which turned out great but took a couple weeks. Then when doing sliding on steep surfaces I realized I needed particles to make a bit of dust fly up from the character's boots.

I hadn't yet done particles in C, and I started to just copy what I had in C# land, but I was kind of in a mood to try something new so I decided to move it all over to the GPU.

Here are the results: ShaderLib/Particles.hlsl at main · Kharzette/ShaderLib

My first revision is basically just taking the C# cpu code and cuntpasting it into hlsl. There's no effort to parallelize or take advantage of the gpu at all. I was hanging out in the directx discord while doing this and I think I horrified the onlookers with what I was doing.

The basic idea is there is an array of particle structs that move, spin, change size, and change color over time and eventually die out. So it isn't like a fixed amount of things to process, which is alot easier to do in a compute shader.

There's a random amount of active particles with gaps in the array where some have died out. I used a sort of "bump allocator" that utilizes a next-empty-spot combined with a next index in the particle struct itself to handle allocs/deallocs.

One challenge I'm still working on is randomness. There's no real random function in HLSL. I found a pretty good random library here: The Book of Shaders

But you need to feed it good seed data. I've been trying various time values, xyz coords etc, but it really isn't very random yet. I'll keep working on it.

Eventually near the bottom you can see where I create vertices for a vertex shader to render. I think I can get rid of this and just build quads directly from the particle buffer.

You can see the vertex shader doesn't have any type assocated with it. This is just reading directly from the structured buffer. This is awesome because it means you don't need an input layout.

If you are unfamiliar with input layouts, they are a careful definition of the vertex type being fed into a vertex shader. They are a major pain in the ass and I'm seriously considering removing them for all my stuff and just using these structured buffers instead. I mean look at all this crap you have to do: GrogLibsC/MaterialLib/Layouts.c at main · Kharzette/GrogLibsC

I think that's one reason I so enjoyed working with the old original xbox. There were no layouts, you just fed it raw bytes and the shader assumed you knew what was coming.

I had no idea you could do this, so big <3 for the directx discord people for showing me the way.

Some decent looking themes for Ludum dare possible! Starts friday!
Screenshot_2025-03-31_17-06-31.png
Screenshot_2025-04-01_00-03-08.png
 
  • 2Like
Reactions: 1 users

Kharzette

Watcher of Overs
5,593
4,573
Depths won. I didn't have a good idea brainstormed.

The LD regulars don't like it because "deeper and deeper" won a few jams back.

I think there will be alot of submarine games.

I'm making the player a dodgy prospector looking for goodies in Titan's deepest lake Mare Kraken.

I haven't written a single line of code yet but I've got a bangin design doc going :emoji_laughing:
 

Kharzette

Watcher of Overs
5,593
4,573
I had the usual Sunday wake up and think my idea is crap and start over.

A good video on breastidigitation
 
  • 1Like
Reactions: 1 user

Flobee

Vyemm Raider
2,785
3,251
Been quietly grinding away on my little personal project and finally got around to do some preliminary art work for Project: Flobquest. I'm learning how to do this stuff as I go as I have no prior art experience but with modern tools its not terribly hard to get results that are comparible-ish to early 2000's style which is what I'm shooting for anyhow. At some point I'll make an actual thread for it and share details of what I'm shooting for but want to be a little further along first. For now here is a little bit of what I'm working on.

Still need to tweak lighting/brightness and both need animations made for them still. Troll will be completely reskinned as some point, was my first ever 3D model. Will likely do more with Goblin as well. A lot of work to do

1744198178014.png



1744198233346.png
 
  • 3Like
Reactions: 2 users

Kharzette

Watcher of Overs
5,593
4,573
Been quietly grinding away on my little personal project and finally got around to do some preliminary art work for Project: Flobquest. I'm learning how to do this stuff as I go as I have no prior art experience but with modern tools its not terribly hard to get results that are comparible-ish to early 2000's style which is what I'm shooting for anyhow. At some point I'll make an actual thread for it and share details of what I'm shooting for but want to be a little further along first. For now here is a little bit of what I'm working on.

Still need to tweak lighting/brightness and both need animations made for them still. Troll will be completely reskinned as some point, was my first ever 3D model. Will likely do more with Goblin as well. A lot of work to do

View attachment 581590


View attachment 581591
Please post em here! That way the thread doesn't become my personal lunatic rant blog :emoji_laughing:

Love the goblin, as for the Troll, I'll tell you in 8ish hours when the sun goes down and I can see it :D
 
  • 2Worf
Reactions: 1 users
6
1
I participated in Ludum Dare 57! I’ve mostly been in the shadows up to this point, but someone recommended I get more involved and post on the forums—so here I am.


I hope you’ll check out my project—I put a lot of heart into it. I know it ended up looking quite similar to A Game About Digging a Hole, and that wasn’t my intention. With just three days to work, I had to act fast and this is what came out. If I continue developing it, I’ll make sure to give it its own unique identity. Thanks for understanding!

link Depth of debts by Oduvan3000

love all of us <3

Screenshot_21-min.png
 
  • 5Like
Reactions: 4 users

Kharzette

Watcher of Overs
5,593
4,573
Been quietly grinding away on my little personal project and finally got around to do some preliminary art work for Project: Flobquest. I'm learning how to do this stuff as I go as I have no prior art experience but with modern tools its not terribly hard to get results that are comparible-ish to early 2000's style which is what I'm shooting for anyhow. At some point I'll make an actual thread for it and share details of what I'm shooting for but want to be a little further along first. For now here is a little bit of what I'm working on.

Still need to tweak lighting/brightness and both need animations made for them still. Troll will be completely reskinned as some point, was my first ever 3D model. Will likely do more with Goblin as well. A lot of work to do

View attachment 581590


View attachment 581591
Yea that is a really good Troll. Gotta be fat!
 
  • 1Like
Reactions: 1 user

Kharzette

Watcher of Overs
5,593
4,573
When I gave up on the LD deadline I started on a colour table shader that replaces bit of texture with a colour out of a table. I wanted to use it so the player could set whatever skin/eye/nail/hair colour (though my main character is bald for most of the game).

It is doable but it is really difficult.
Screenshot_2025-04-16_18-36-07.png


In my head I'm thinking "this is a 100% opaque texture so alpha channel should be available". But I forgot that nowadays most people (and me) pre-multiply alpha, so I had to make a special path for putting "data" in the channel.

Also it seems to screw up at UV island boundaries, and doesn't mix well with dark colours if doing a multiply. For the above picture the eye liner around the top of the eye and the little nub of a nose and the eyebrows are all gone. And the mouth.

But the biggest problem is the paint programs. They all want to smooth and blend and smear everything. Even like flood filling an area with a specific value, it gets smeared out along the boundaries.

To do this sort of thing you almost need like a deluxe paint from the 80's.

I'm probably going to abandon this idea in favour of a vertex element of some sort. Probably just a uint8 value that indexes into a colour table. It is a little bit of extra work to split verts along boundaries, but better end result, and I've almost always got a few bits unused here and there. Vertex formats are padded out to 16 byte boundaries usually.

It should tint better too. Like if you have a super pale skin that will tint to whatever colour they want, you can still put a reddish area on the knees and it should tint correctly to look like a knee even for darker skin (I hope).
 
  • 1Like
Reactions: 1 user