New Reply
Name
×
Email
Subject
Message
Files Max 5 files50MB total
Tegaki
Password
[New Reply]


2020-04-27_03-34-07_(1).mp4
[Hide] (2.7MB, 1280x720, 00:13)
Post what you're working on.
>>123 (OP) 
Man that looks like it has some serious potential.
Replies: >>127
2020-04-30_16-14-36.mp4
[Hide] (4.9MB, 1280x720, 00:24)
>>124
demo day soon
Replies: >>130
Wrote a program to compile my game. It spawns a subprocess for each file. If each file is done and there's no errors, it links them. It's a lot faster than compiling one file at a time. Highly recommended to anyone that has a large C/C++ project.

Getting ready for demo day.
Replies: >>130 >>149
>>127
The scale of this looks staggering.

>>129
You mean a makefile? GNU make already does all of that and it also checks if your code has any updates to see if it's worth compiling.
Replies: >>131
>>130
>You mean a makefile? GNU make already does all of that and it also checks if your code has any updates to see if it's worth compiling.
I don't like Make and feel comfier using a custom script.
Replies: >>132 >>149
>>131
What's wrong with make?
Replies: >>133
>>132
After setting up a more complex makefile myself I can say that it's not fun to learn. It's extremely logical, but also so alien to other programming languages to the point where it's almost like relearning how to code. It also has some short comings. For example, I wanted to make all my C rules depend on all files within the directory so if I cahnged any files within that same directory it would have to recompile that script. However, I couldn't really find a way to do this since I wouuld have to do something like %.o : %.c ${dir $< ... } or whatever, which does not work because you can't dynamically generate dependencies like that.
2020-05-01_23-44-51.webm
[Hide] (7.7MB, 1280x720, 00:46)
AI will still be pretty dumb this demo, but now they can hear your footsteps.
Replies: >>152 >>351
>>129
>>131
that sounds both interesting and impressive anon. have you looked into how ninja works yet? might give you some ideas.
>>147
I really like that silence pistol. It reminds me of the one from n64 james bond. Although the silencer is a bit blocky.
Replies: >>162
2020-05-16_20-07-35_(1).mp4
[Hide] (6.5MB, 1280x720, 00:32)
>>152
thanks, I got that feeling too. I'm fond of the blocky suppressors tbh.
The demo day level is being expanded
mhiSPqj2uO.webm
[Hide] (4.5MB, 1024x600, 00:14)
lasers, alarms, computers
qVkI2Z2U65.gif
[Hide] (708.9KB, 717x320)
First time I post on this site, hope it doesn't die out. Anyway, dunno how much peep there's in this place but it sounds comfy enough to post progress. 

Pict related is the end result of the core engine in C++. I also have a homemade UI and all that thing, I'm not sharing picture of it because I don't have a proper font yet. From here on I'm consider making a game or something. Maybe a rpg, I dunno.

geno sprite is obviously not mine.
Replies: >>166 >>167
>>165
I like that lighting you’ve done in the background. Very nice effect.
Replies: >>174
>>165
Looks nice.
Replies: >>174
>>166
>>167

well that was quick, I'll try to post my relevant weekly update in here(anything visual). Also, if you're refering to the straight line on the light, it's not an effect in itself but just how the rendering works, which is  inspired from:
https://github.com/s-macke/VoxelSpace

in mouvement, it's weird to look at, but not unpleasant I promise.
Replies: >>176
>>174
>in mouvement, it's weird to look at, but not unpleasant I promise.
actually, i like the jiggly physics things going on. just don't go overboard with it haha.
Replies: >>185
ClipboardImage.png
[Hide] (14.7KB, 1309x213)
Brinstar_Tileset.png
[Hide] (193KB, 1024x720)
How does this tileset look? It needs more detail but I'm not sure where/how. I've been using the Brinstar tilesheet as a sort of reference but it's hard to replicate without simply copying it completely. Feel free to scribble/make my game for me
Replies: >>193
>>176
the weird thing is the terrain, not the mouvement. the terrain gets weird due to the level of detail being rather small in range. It forces the game to be a horror game in a sens. Which I'm totally okay with.
>>177
It is good looking and I couldn't do better. But for proper criticism, you need more solid volume. Try going for more defined shape like rectangular prism. I'm looking forward to see you grow. You're in a great start.
Screen_Shot_2020-05-22_at_20.01.33.png
[Hide] (882.4KB, 2272x1468)
output.webm
[Hide] (523.3KB, 2046x1198, 00:04)
I'm trying to do weekly progress reports.
So, since last week:
>Campfire
Developed pipeline how to add objects
>Bus
Damn, it was harder than it looks
>Toilet
For the sole purpose of working toilet door I've added interaction system
>Firs level nemu
>WASD as some anon suggested
Replies: >>202
>>201
did you make your own sprite?
The bus and the tent looks good. Also
Replies: >>203 >>205
>>202
the "also" is a type, ignore it
poster_5.jpg
[Hide] (429.8KB, 740x1000)
>>202
No, I have dude who can paint and willing to work for loolz. And he paints nice posters.
Tent and grass are stolen from LPC.
Replies: >>206
JdkftOa9ou.mp4
[Hide] (668.2KB, 686x438, 00:22)
Here's an update of my shit, trying to post here weekly prevents me from stopping, so here's my procedural UI library from scratch on comic sans with bad lightning.

>>205
You have an amazing artist, hope you guys are motivated t'ill the end.
Replies: >>208
>>206
That is really looking neat, Anon. Any plans to integrate a sprite sheet with different views on the guys as he turns and walks, etc.?

Keep going Anon, we believe in you! :^)
Replies: >>209
>>208
>That is really looking neat
I love you to

>Any plans to integrate a sprite sheet
I can't really draw sprite, in fact, the sprite isn't mine. I'm still practicing my human anatomy on paper. I'm considering buying a tablet or finding an artist who's willing to dedicate his free time on a game that look like that
>with different views on the guys as he turns and walks, etc.?

Right now for any character sprite, I plan on copying paper mario TTYD, so a walk cycle from front and a walk cycle from back. I'm going to test the 360 view with a normal map and a depth map this week just to test if I can get a perfect 3D illusion on this engine. It might make a good demo for finding an intership for the next semester.
Replies: >>211
>>209
You can literally just use your own human-anatomy practises to map out how to create sprite sheets and properly use them within your game. The mechanics of it all, yea? And then your block-out will make things really obvious for when the artist does come along. 

Lay some groundwork now ahead of time.

>It might make a good demo for finding an intership for the next semester.
It just might! Good luck, lad.
Sans_titre.png
[Hide] (134.6KB, 1154x480)
Sans_titr2e.png
[Hide] (41.5KB, 519x354)
barely did anything this week due to uni and searching an intership. I generated normal maps on sprites if provided a depth. Car is not mine obviously. The normals looks a bit noisy compare to the clean depth map. It does the job for now but if it's visually problematic I might look for a better way.
Replies: >>213 >>219
>>212
>The normals looks a bit noisy compare to the clean depth map.
How many rays are you casting? Also, are you doing something to randomize the gather of the normal vectors?

Good job, keep it up lad.
Replies: >>219
output1.webm
[Hide] (599.9KB, 1128x722, 00:11)
output.webm
[Hide] (215.4KB, 970x606, 00:06)
Had an ambitious plan for this week but failed miserably.
But still, weekly progress
>Added hand to indicate interaction
>Implemented walking into water
>Made tutorial for art guy how to make levels.
Last one took a lot of time
gendo1.jpg
[Hide] (19KB, 399x300)
Not sure where else to post this:
What do you think an "anti-Undertale" game would have? By "anti-Undertale" I mean something that doesn't punish you for becoming more powerful at the expense of others, and that isn't overly soft-hearted, but isn't over the top in edge either. I have some ideas as to how this game would work, but I'm curious about others' input.
Is there a cracked copy of Aseprite for Ubuntu?
Replies: >>217 >>221
>>216
>5 seconds search time:
https://github.com/aseprite/aseprite
Replies: >>220 >>221
How does wolfrpg compare to RPG maker?
>>212
On a small update on this: I used to only code on this project when I feel a bit down on life, but as of this week, my whole rendering is broken for good and the project is dead. For anyone who actually believe I could achieve anything with this, I couldn't get one interview for an intern.

>>213
>How many rays are you casting?
around 65k fo the terrain. Anything else isn't raycasted. It's just sprite well calculated at the exact spot and scale and there's a depth texture for cuting part of the sprites.
>Good job, keep it up lad.
nah, it's dead
>>217
yeah i posted without searching first, i'm retarded
was a bitch to build and had to use an old version but it's finally working now
>>216
>>217
How is GraphicsGale compared to Aseprite?
Replies: >>223 >>226
Is Pyxel Edit good? Is it better than Aseprite?
>>221
Seconding. Mostly curious about how the animation compares to Aseprite. Also, fuck Aseprite's faggot devs.
>>221
impressive GET with that poster ID
Replies: >>227
cirno_embarrassed.jpg
[Hide] (111.6KB, 360x425)
>>226
output.webm
[Hide] (30.4KB, 322x292, 00:00)
Screen_Shot_2020-06-07_at_09.57.41.png
[Hide] (120.7KB, 710x484)
Weekly progress
>Added small splash animation
>Continuous integration
Dumped a lot of time to setup actions on GitHub. But now it automatically deploys to itch.
>Pioneress now can do emojis
Hope, CI will payoff in the long run. It took a lot of effort.
Replies: >>229
>>228
>emojis
*Emoji, because they're Japanese.
Replies: >>230
>>229
>Emoji
Thanks I didn't knew they are Japanese.
But dictionary says
>plural emoji or emojis
Replies: >>231
>>230
The dictionary also says that "nationalism" means something along the lines of "excessive patriotism", which it does not. And there are different dictionaries with different definitions. It is listed because enough idiots who don't know better have used "emojis" as the plural form despite that it is uncountable, being from Japan (and the worst thing to come out of that shithole in recent memory).
Replies: >>243
I've had this guilty urge lately to say fuck doing my own 3D engine and just use Unreal.
Replies: >>233
Matsuoka_Shuzo_-_NEVER_GIVE_UP!!_[English]-KxGRhd_iWuE.mp4
[Hide] (2.2MB, 640x480, 00:34)
>>232
Whoa there, Anon. Don't be too hasty tbh.
ClipboardImage.png
[Hide] (159.2KB, 1774x989)
moar sprites
still feels like they're missing something but I don't know what.
Hey /AGDG/ there's something I want to bounce by you guys, because I've been on the fence about it.

I'm an anon who has undertaken the task of making a rewrite of feralpheonix's Uncommon Time, last year. As far as script, I've made a whole ton of progress on that front- about 70% done to be precise.

Lately however, I've been meditating on just what kind of game I'd want to make. I've realized that the Uncommon time Project I've been making is exactly what I want to make. The problem is, I've been getting into Godot, and part of me wants to use parts of the story and go on my own path with it.

I really don't know what to do, /AGDG/. RPGmakerVXAce is nice, but it has the problem I have with most of the entry-level game engines: accessible with some things, but completely asinine if you want to do anything more advanced. The thing is, I'm still learning how to use Godot. I have plenty of programming experience, except that It's frustrating trying to relearn how to program in GDscript. The last time I did game programming was flixel with Actionscript 3, that was years ago.

It wouldn't be too hard for more to reimagine the characters, the setting and the world for what I've made for my Uncommon Time project, the problem is, I would have to redo all the busywork-related assets by scratch. If I do this, I would be able to actually sell the game for money, and not be bound by the requirements of Uncommon Time as an IP.

The flip-side, with just using RPGmaker and hacking my way through with it. I could actually get this project done. I wouldn't make any money with it, and FP could have a reason to get pissed at me, but it would be an actually-done game. At times, THAT is the most important.

I don't know what to do /AGDG/ what should I do?
>>123 (OP) 
https://www.youtube.com/watch?v=O60Pd7bDKQQ

we made a trailer for the project in OP
62eeb6778f8f2545b5ed74eaf50e4f5d7cd7479c0bd5c068e35a606641285d12.jpg
[Hide] (28.9KB, 446x446)
>Start porn game
>It's niche, not fetichistic shit, but niche
>Slowly build fanbase
>Very very slowly
>Depression attacks
>I stop publicly making updated
>In that time my popularity explodes
>But since I'm not around people assumed I abandoned the game
>I didn't, I was working on it, just didn't want to interact with anyone
>mfw I lost my oportunity to ride the wave
Damn it.
Replies: >>239
>>238
are you JackONinedev?
Porn is the easiest way to earn money these days, just make a triumphant return and people will eat your shit up.
Even better, tell your story to your followers and you'l get extra support
also post spoilered samples
Replies: >>240
Spoiler File
(2MB, 1920x1080)
Spoiler File
(1.8MB, 1920x1080)
Spoiler File
(2MB, 1920x1080)
Spoiler File
(2.1MB, 1920x1080)
408305_WhatsApp_Image_2019-08-19_at_3.30.47_PM.jpeg
[Hide] (9.8KB, 228x540)
>>239
>are you JackONinedev?
Nah. I think Jack-O-Nine Tails is a cuck brothel game.
>just make a triumphant return and people will eat your shit up
I really don't want to rip people off or something. The porn game scene is bad enough as it is. There's still people supporting me, but if I continued to post progress and updates I'd have more money now without being a piece of shit.
>Post spoilered samples
I know, >3D gobbos from illusion, but when I started I didn't have a lot of options. I'm learning hot to draw for my upcoming game, both traditionally and pixel art for my upcoming game, last pic related. I'd also love to hire an artist for my other projects, because I really don't want to use Koikatsu, but I just have to. I'd share my profits on patreon, but I don't really make a lot of money.
Replies: >>241
>>240
>Nah. I think Jack-O-Nine Tails is a cuck brothel game.
guy was agdg too

 >3D gobbos from illusion
the style makes things nondestinct. I think I might have seen your game... even a demo, a while ago on 8. But that could have been another guy using Illusion's models
If you feel like a piece of shit about taking peoples money, just make an update to the game. Make it worth their time
though they are coomer degenerates and perhaps should be milked dry instead
Replies: >>242
>>241
>guy was agdg too
I know he was, but that doesn't change how I feel about a game where you only train your waifus so they can be fucked by others, regardless of the option to keep them, it means nothing if the end goal of the game is making money out of selling them.
>the style makes things nondestinct
I know and I hate it. Most people use Honey Select or that new one that came out relatively recently, though. I use Koikatsu because of a more anime style, since I wanted the game to be 2D in the first place.
>If you feel like a piece of shit about taking peoples money, just make an update to the game. Make it worth their time
I already am, I did release an update recently, but it's far from what I wanted it to be.
>though they are coomer degenerates and perhaps should be milked dry instead
I only have 4 patrons so who knows. And I know one of them just pledges out of pity. I wish I could make enough to actually focus on game development exclusively.

Here's a link, if you are interested. I don't have anything behind pay walls because that's gay.
https://mega.nz/#F!0dt01SKR!r5TuTMcYfA1woIdH6JGYcA
Replies: >>244
Screenshot_2020-06-08_at_21.44.30.png
[Hide] (1.4MB, 2056x1202)
Screenshot_2020-06-14_at_20.22.05.png
[Hide] (678.2KB, 2272x1468)
Weekly progress
>Finally made a menu
>Arts guy made decent looking level
>I had to refactor this unmanageable mess with few dozens of objects
On the bright side I was forced to learn to make tiles that are bigger than one tile. 
>>231
I'll keep that in mind
Replies: >>245
>>242
>Ich will
yeah that was what I remember

good luck on the new project, my dude. Hope it will fare better. Don't let depression get ya, the fact you have patrons at all and have people that care for your stuff, even if degenerate, is reason enough not to take the blackpill.
>>243
Looking good, anon, keep at it!
Raycast_reaction.mp4
[Hide] (4.2MB, 1920x1080, 00:08)
I got raycast and damage response working.
Now all I have to do is actually program an enemy AI. Should be totally easy. :^) 


:^(
Replies: >>249 >>266
>>246
Good work. 
>npc ai
Maybe study A* path planning Anon?
https://www.gameenginebook.com/
Replies: >>250
>>249
It's Unity, so I can likely use their navmeshes. If not, then I could make use of A*. Thanks, anon.
Replies: >>266
Screen-Recording-2020-06-21-at-1.gif
[Hide] (231.8KB, 558x442)
Weekly progress
>Implemented dialog system.
It's simple AF, but took a lot of time to figure out.
ClipboardImage.png
[Hide] (47.5KB, 752x554)
working on implementing a basic jump mechanic, the main problem i'm having is I don't know where to put the last block to prevent mashing the jump button for infinite height.
>inb4 fisher price code
i've always hated programming, i've just started working on this for real and it should come on its own while I'm working on it.
Replies: >>254 >>371
>>253
>Fisher-Price code
Is that Scratch? I've always thought it looked like a great approach to teach beginners programming logic. Eventually you'd want to leave the interface behind for simple text itself, but the enforced structure is probably helpful in the beginning when you're just beginning to learn coding I imagine.
Replies: >>255
>>254
it's Stencyl, working on making a metroidvania since there was another guy doing the same thing with the same engine (Ghost Song), but after I started working with it I found out that he switched to Unity about a year ago because Stencyl was too restrictive for him.
Replies: >>256
>>255
Interesting. Apparently Stencyl's design mode that you capped here was taken from Scratch.
>"...The concept of Design Mode as a form of end-user development originated with MIT's Scratch computer language learning environment, and was used with permission for Stencyl."
sauce https://en.wikipedia.org/wiki/Stencyl

If you're still having problems, figuring the the step and can explain what you're goal is in pseudo-code, I imagine that I or others here might be able to help.
Replies: >>257
ClipboardImage.png
[Hide] (54.9KB, 1034x497)
>>256
finally got it, might as well post it for any other nodevs that use the same engine
doesn't account for collisions yet though, so the player can still just walk over pits if they don't jump
Replies: >>258
>>257
Good job. It looks like you can setup fairly complex conditional tests with Stencyl. Have you switched over and looked at it in the text view yet? Keep going Anon!
i think the most daunting challengs for me is going to be creating the sheer amount of artwork needed for the game. programming is actually a very small portion of the work compared to making assets. would it be worth it in the long run to hire a guy purely for art?
Replies: >>262 >>264
>>261
I feel you man. I would've dropped project dong ago if not to highly motivated art guy.
Not that it's necessary or something.
>>261
literally just create shitty stick-figures and put them on sprites as proxies. This will
A) allow you to keep making progress instead of over-thinking the 'muh_arts' meme
B) allow you to keep making progress by going ahead and blocking-out the animations, motion paths etc.
C) allow you to keep making progress.

Did I mention just keep moving forward Anon? Getting hung up on things you have little control over and not just figuring out how to go over, under, or through the obstacle is the single.greatest.key. to failure. Now stop making excuses and get your ass in gear. Time is short.

Keep moving forward.
>>246
>>250

If you're aware of "Unity Learn", there is full course on NPC AI.

https://learn.unity.com/course/artificial-intelligence-for-beginners
Fresh progress
>Working on AI
Damn, it's harder than I thought
>Implemented action list
>Still have no idea how to implement GoToPostion action
Hope to resolve it until next week's report. Also I think I need sensor system.
Screen-Recording-2020-07-12-at-1.gif
[Hide] (88.8KB, 284x302)
Screenshot_2020-07-12_at_13.24.32.png
[Hide] (38.2KB, 478x294)
>>271
My images
Replies: >>273
>>272
Reminds me of Stardew Valley
2020-07-18_05-41-38.mp4
[Hide] (4.6MB, 1280x720, 00:23)
2020-07-18_18-57-00.mp4
[Hide] (935.9KB, 1280x720, 00:04)
We have huge fans
Replies: >>286
>>275
This looks so comfy eerie
Comfeerie
Screenshot_2020-07-28_at_21.31.57.png
[Hide] (60.6KB, 442x510)
output.webm
[Hide] (126.1KB, 432x434, 00:06)
Died for a few weeks but I think, I'm back on track.
>Added icons for actions
>Added GoTo action
>Implemented "Speak" action
>Refactored Doors
>Added first sensor to check if toilet is occupied
>Added "Mine" level, artist was working on for a while
My AI code is a mess. I need to clean it up heavily.
RT-post-rehersal-day1.png
[Hide] (143.9KB, 639x416)
Rehearsal day 1 is complete.

>Notable changes
--New-character Marybelle is now a part of Aubrey and Alto's mini-quest to get Aubrey a legal ID- mostly since, 1. She's his mom. and 2. She's more or less a living-legend in-game. I've got it planned so that act 3 sidequests explore that the "living legend" part is not quite hyperbole.
-Rehersal sequences will be changed to account for Alto's new siblings, Mezzo and Soprano. And unlike OG-UT, shit gets real on rehearsal day 3.
2020-08-05_02-25-27.webm
[Hide] (10.1MB, 1280x720, 01:46)
Containers and shops
Replies: >>300
output.webm
[Hide] (245.1KB, 960x642, 00:09)
>Implemented light switch
>Implemented minecart fall
>Fixed low FPS in mine level
>Fixed collisions in mine
>Implemented light flicker
Replies: >>300
Post-rehearsal-before-metronome.png
[Hide] (338.1KB, 1595x935)
Currently laying down dialogue sequences for cutscenes for rehearsal days two, three and the first performance atop Metronome Tower. Pic related is just before you actually enter Metronome tower.

-I admit, these cutscenes are just as wordy as OG-UT's are. My hope is that my storytelling will be much more compelling and entertaining. If there is a way I can cut dialogue and get the story I want to tell across, let me know, please.
-I want to get things to be at bare minimum, Programmer's-art-level ready. Ideal goal is nuclear teagan, but when demo-day comes I'll release what I've got, then update it once I get to Nuclear Teagan. After that, I wait for the next demo day to release.

>>296
>>298
Diggin' that shit, anons, keep it up!
UTRW-empty-manor.png
[Hide] (114.2KB, 640x418)
Weekly progress update, didn't feel like I did too much, but this is something.

-- Changed an error where the Solfege shopkeep incorrectly refers to the band as "girls" despite clearly seeing Mezzo as a boy two other lines in.
-- More progress done on the front of the rehearsal days.
-- Changed up the music for when it starts snowing in Arpeggio pass, I would like to keep the music track for Aubrey's theme as intended..
-- sporadically adjusted a few portrait choices for characters in cutscenes
-- Mapping for spoiler-worthy-stuff.
-- Rewritten some sequences in the new, empty manor map of Bel Canto (pic related). Old version (and new version when implemented) of the writing are viewable by interacting with three spots while either Saki or Marybelle are in your party. Marybelle joins your party temporarily during the post-rehearsal sequences of day one and two, but not day three.
Weekly report
>Implemented bladder for pioneeres
>Implemented framework for AI
>Fixed collisions here and there
>Added show emoji action
output.webm
[Hide] (302.5KB, 960x642, 00:09)
Progress:
>Added new enemy
>Added AI for it
Framework turned out nicely. I wrote like 5 lines of GDScript to make it work.
>New death animations, thanks to pixel artist
UTRW-polyphony-jail.png
[Hide] (322.1KB, 1193x841)
- Day 2 progress : rehearsal sequence complete
- Day 2 Post-Rehearsal still in progress, dialogue is laid out, cutscene pathing and other event semantics will be continued.
- Day 3 dialogue almost fully laid out.
- Squashed a bug in Teagan's room that continues displaying Teagan from the post-move-in-sequence of Bel-Canto.
- Working on mapping for polyphony's new guard-station/jail.
- Laid out some sparse normal NPC dialogue for the secret-final-arc. Little things that will make everything come together, and are best gotten out of the way now.
- Audio software and tools set-up and ready to start producing. No guarantee I'll actually get to that this month or september. Art will be more important once I get my dialogue progress to act 2.
UTRW-post-rehersal-day2.png
[Hide] (173.7KB, 639x415)
Small update for today. Had quite a few missed dev-days due to IRL getting in the way.

- Day 2 post-rehearsal progress continued. Rewrite of Saki's backstory implemented. New Graveyard cutscene implemented. (pic related)
- Updated raw writing for Act 2 Pizzicato Trail revisit.

Holy shit, Bel Canto's finally coming along, I'M GONNA MAKE IT!
UTRW-Cantabile-manor-2.0.png
[Hide] (392.9KB, 929x895)
UTRW-quote-on-quote-rehersal-day3.png
[Hide] (110.9KB, 635x413)
HOO BOY! I thought I wasn't getting much done this week like last week, but HOLY FUCK! The crunchiest scene in the entire rehearsal set is done. Now, day 3 I unfortunately cannot show much to you due to just exactly what that scene sets up, so you get an angry-stare-Teagan instead.

On another note, due to the logistics required for the upcoming cutscenes, The Cantabile manor has it's front yard trimmed.

-Day 3 Rehearsal cutscene complete
-Day 3 post-rehersal cutscenes have the script implemented,
-Picked out a temp track from Tales of Symphonia- Judgement of Mana, to put in place as Metronome Tower's music.
-Script progress for act 2 updated, specifically, some emotionally-raw moments for waifufags. Gotta have those to make the upper moments all the more sweeter you know.
UTRW-bel-canto-inn-2.0.png
[Hide] (361.9KB, 859x863)
Hey everyone, this update I've felt like I'm made a good chunk of significant progress. Which is nice, because I'm gonna take a little break from gamedev to flex my drawing muscles on a small non-UT project I've been putting off.

Weekly Progress Report
-Added in about half of the day 3 post-rehearsal cutscenes and events. It's a dialogue-heavy day for sure, but I hope the pacing keeps things from dragging on.
-Edited Bel Canto's inn to be 1. more fitting of the high-class-town area, and 2. to accomodate space for new cutscenes. (Pic related)
-Changed Mezzo's class title from rhythmist to percussionist.
-Added in an act 2 boss fight to the debug room. Spoiler-heavy. Ingame, it will be skippable as to prevent what would be a soft-lock for that area.
-Added in in events that store recovery items away during Glissando Arena. Not fully implemented of course, but it should be implemented come the Nuclear Teagan release.

See you the 28th!
LAZ_01-work.png
[Hide] (207.8KB, 400x300)
A got  a bit more on track. So, weekly report.
>Added interactive popups
>Added cockpit
>Made essential buttons work
>Fixed bug with interaction, some anon pointed out
2020-09-24_12-46-22.mp4
[Hide] (6.8MB, 1920x996, 00:21)
2020-09-24_17-01-16.mp4
[Hide] (6.1MB, 1920x996, 00:19)
tme to get wet
Replies: >>322
>>321
>1st video
>water effect

It's particle system or some kind of animation ?
Replies: >>336
Screenshot_2020-09-27_at_20.15.28.png
[Hide] (113.1KB, 1024x768)
Weekly report
>Added energy bar
>Added energy
Weekly Progress Report
- Back from side project dealings. Ended up changing gears to something different than drawing, but no biggie.
- Did some writing for Act 2 and 3, specifically post-party-split dialogue, and Arietta's Uncommon time.

Back in business, time to get shit done.
output.webm
[Hide] (1.3MB, 1280x962, 00:31)
Yeerk's weekly
>AI now can react on Yeerk
I was hoping to also add attack, but unfortunately it stays for the next week.
RT_Saki_Aubrey_SD_sketch.jpeg
[Hide] (78.1KB, 969x719)
Uncommon Time Rewrite Progress

Current Progress report
-Continued with raw writing for act 2 and 3. Getting close to completion.
-Drew some initial concepts for the ex-worm and ex-faggot.

Not much done for the current playable progress of the game, but since I got art to eventually do. Pic-related, is a super-deformed imagining of what the faggot and the worm will now look like:
Sakarias "Saki" Toikka, The wild-man. Auberon "Aubrey" Spica, the faerie-halfing from long-ago. 

this is not the intended artstyle, this is something silly and without anatomy perfectionism so I can show you characters at their most-basic form
Replies: >>328
output.webm
[Hide] (212.4KB, 1280x962, 00:01)
Yeerk's weekly
>Still working on attack
Animation is in place, but no hitbox yet and no mechanism to exit the state.
the_pain_of_vomiting.png
[Hide] (108KB, 640x414)
>>326
Uncommon time Rewrite Weekly Progress Report
-Changed up character class names; only the Cantabiles will have musician-themed class names.
-Continued progress on day 3 post-rehearsal cutscenes. pic related
-Added a reset button for Metronome Tower's pre-boss area to prevent a potential post-cutscene soft-lock.
-Certain Act 2 writing sequences put in limbo for now. Not technically cut, but close to the chopping block and I'm hesitant on it.
Replies: >>333
output.webm
[Hide] (1.1MB, 2048x1202, 00:09)
After two weeks instead of one
>Pineeres's attack is finally working
>Yeerk is dying
I've had to implement additional animation system that is unrelated to movement for that. Pretty happy with result.
Core mechanics are almost done. Hope to finish them next week.
>>328
since the cafe was down last time I was doing weekly updates, this one is a bi-weekly plus one day because yesterdayt was not worth uploading on. No screenshot either because nothing I've done this week is really worth showing.

Weekly Progress Report
-Finally got around to downloading inkscape and testing shading on it. My aim for this week is to draw a character and get a completed art piece out to you guys so I can show "yes, I can do art, and at the barest of minimums have it not be shit".
-Crushed the rest of the unformatted nametags in Nuclear Teagan.
-Crushed unformatted nametags in Glissando Arena.
Replies: >>971
output.webm
[Hide] (313.1KB, 960x642, 00:09)
Screenshot_2020-10-31_at_21.48.31.png
[Hide] (12.8KB, 292x236)
Yeekr's weekly
>Implemented reaction on dead bodies
>It's now possible to eat pioneeres
Art guy was busy so visuals aren there yet. Shouldn't be a problem though.
Main mechanics are ready. It makes me happy.
I plan on making 1st level by the demo day.
leejy5.mp4
[Hide] (13.2MB, 1920x996, 00:41)
>>322
sorry dudem missed your question. It's an animated alpha map
Replies: >>341
DEMO DAY currently underway on these boards:

https://zzzchan.xyz/v/thread/18328.html#18329
https://8chan.moe/v/res/149845.html

post your stuff, repost here: >>338
>>336
can you reupload anon i know im days late but i wanna try your game been looking forward to it
Replies: >>344
ClipboardImage.png
[Hide] (383KB, 787x449)
>>341
sorry about the wait. here's the more refined demo. 
https://shodanon.itch.io/peripeteia/download/i7bzqNEKmw6JJ_JwEOYbEoAvVbJUhnPVA5Efab9_
Replies: >>352
>>147
Reminds me of Deus Ex. What's your game called?
Replies: >>352
>>344
>>351
this is the game
>>123 (OP) 
Does this board have a Board Owner?
Replies: >>370
>>368
I ran the original 8chan board for a few years, while the anon.cafe one had a different owner for a while. I jannied here, didn't log in for a long time, now I discover it has been transferred to me. So the answer is "yeah, it has one".
Replies: >>380
>>253
Start writing code threw a language in an engine,I say this by experience it much more modifiable and easy in the long-term.
>>370
Congratulations, I guess.
Downloaded Unreal engine 5 to mess around and make a game or two. Got nowhere with it yet, since I'm starting from scratch. Anyone else using unreal 5?
>>123 (OP) 
Can I use this space to bounce ideas off?
UIIdHw.png
[Hide] (42KB, 315x250)
I've started several projects (games and visual novels). I'm not quite sure which one is good enough to be worth finishing.

You can find almost all of them on:
qrayz.itch.io
Replies: >>452
>>451
HackSim seems like a good concept to put in a game instead of the typical hacking minigame. I didn't try the others, especially the VNs since they rarely feel like games to me, maybe I'll get around to them later.
astar.png
[Hide] (28.6KB, 1204x838)
astar_colors.png
[Hide] (30.1KB, 1204x838)
astar_debug.png
[Hide] (44.3KB, 1204x838)
Finally got A* path-finding working after a couple of days of banging my head against it. Test program here is done with Raylib.
Replies: >>480
>>477
based raylib user, how are you liking it?
Replies: >>481
>>480
It's a true joy to work in. I'd recommend it to anyone, really. Dead simple to use, only needs a single header included, no cumbersome build system,  with tons of useful built-in functions (all optional, mind you) with straightforward interfaces and a minimum of proprietary objects. To any beginners out there still fucking around with SDL2 or SFML or god forbid, raw OpenGL, you gotta switch over.
Replies: >>529
>>481
>To any beginners out there still fucking around with SDL2 or SFML or god forbid, raw OpenGL, you gotta switch over.
Does it have support for things like sound, networking, and concurrency?
Replies: >>530
>>529
Raylib is a single-header library, so I'm sure it'll play fine with your threaded and networked application. That said, neither of those are 'built-in'; you would need to provide your own. Sound, however, is very well supported, see 'module: raudio' on the cheat sheet: ht tps://www.raylib.com/cheatsheet/cheatsheet.html

As far as networking goes, no it's not included right now. See this thread about developing a networking module for Raylib and the solutions users came up in the meantime: ht tps://github.com/raysan5/raylib/issues/753 People seem to like enet: ht tps://github.com/zpl-c/enet ht tps://github.com/nxrighthere/ENet-CSharp Here's an example of using enet with Raylib: ht tps://github.com/JeffM2501/raylib_networking_example nbnet was also mentioned at the bottom but the link was dead there so: ht tps://github.com/nathhB/nbnet 

Just gonna drop this here for everyone too - giant curated list of game development libraries: ht tps://github.com/Caerind/AwesomeCppGameDev World's your oyster, mates.

As for threading, CPP has had concurrency support since C++11, and using posix threads (pthread.h) should be supported by all platforms. The trick to threading, of course, is all about resource access, as long as you aren't trying to access a resource (something in RAM, the GPU, whatever) with two threads at once, you should be alright. So while trying to render a complex scene using two or more draw threads will absolutely fuck your shit up, using a thread to calculate updates to game state (pathfinding, line-of-sight, physics, sound, background resource loading, etc. while your main thread is going through all your draw lists, you should be alright. You also have to ask yourself, "Do I really need concurrency in my game?" Even toasters today have 3+ GHz processors pipelined miles deep. I guarantee you can see better than the 2-4x speedup of threading by just fixing your approach somewhere. Got 300 entities recalculating their pathfinding every frame and struggling to hit 60 FPS? List them up, and update 30 of them every frame, in round-robin fashion. Now you're updating everyone's path 10 times a second instead of 60 and your shit's 6x faster. Stuff like that. If you're even considering raylib for your project, I really wouldn't worry about threading. Look at the complexity and speed of games in the 386 to pentium 4 era and look at the processing power we've got today. You could absolutely make a Quake-like in Raylib if you wanted to. As long as you don't write your shit all retarded, you'll be alright. Here's a really basic threading example for raylib: ht tps://www.raylib.com/examples/core/loader.html?name=core_loading_thread
Replies: >>531
>>530
Great reply thanks. I'll look into it now.
DOOM.png
[Hide] (375.6KB, 1284x838)
DOOOM.png
[Hide] (254KB, 1284x838)
DOOOOM.png
[Hide] (153.9KB, 1284x838)
DOOOOOM.png
[Hide] (94KB, 1284x838)
Was curious about the state of DOOM-style BSP engines since I still see so much chatter over modding and source ports and shit. Went looking for some actually free code and found something called rtdoom over on the shithubs ht tps://github.com/mausimus/rtdoom Took a few minutes to change a few things to get it to compile on linux with GNU Make and somehow it worked. Dropped in some WAD off freedoom and this is the result. Occasional visual bugs like in the last pic and Z-level movement isn't handled too well but otherwise ran ok.
high.png
[Hide] (73.3KB, 964x758)
low1.png
[Hide] (61KB, 964x758)
low2.png
[Hide] (39KB, 964x758)
crate1_diffuse_small.png
[Hide] (32.4KB, 64x64)
Playing around a bit with 3D in Raylib. Loaded a mesh from an OBJ file, then rendered it at 320x240 and scaled up 3x for a kind of old-school, PS1 look. First shot is with the old 512x512 texture, second is scaled down to 64x64 and contrast tweaked a bit to bring out some detail. If I get some free time again I think I'll try making the camera first person and use a vertex lighting shader too.
Replies: >>585
screenshot000.png
[Hide] (73.5KB, 960x720)
screenshot001.png
[Hide] (47.5KB, 960x720)
>>583
Oops, had bilinear filtering on for the last 2 shots. These are more what I was going for.
Replies: >>586
screenshot000.png
[Hide] (102.2KB, 960x720)
screenshot001.png
[Hide] (92.3KB, 960x720)
screenshot002.png
[Hide] (97.1KB, 960x720)
>>585
Now with affine texture mapping by adding "noperspective" interpolation qualifier to the default vertex and fragment shaders. Next I gotta find a more complex model to try it out on.
Replies: >>587
>>586
Since they won't upload: 
base.vs
#version 330

// Input vertex attributes
in vec3 vertexPosition;
in vec2 vertexTexCoord;
in vec3 vertexNormal;
in vec4 vertexColor;

// Input uniform values
uniform mat4 mvp;

// Output vertex attributes (to fragment shader)
//out vec2 fragTexCoord;
noperspective out vec2 fragTexCoord;
out vec4 fragColor;

// NOTE: Add here your custom variables

void main()
{
    // Send vertex attributes to fragment shader
    fragTexCoord = vertexTexCoord;
    fragColor = vertexColor;

    // Calculate final vertex position
    gl_Position = mvp*vec4(vertexPosition, 1.0);
}

base.fs
#version 330

// Input vertex attributes (from vertex shader)
//in vec2 fragTexCoord;
noperspective in vec2 fragTexCoord;
in vec4 fragColor;

// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;

// Output fragment color
out vec4 finalColor;

// NOTE: Add here your custom variables

void main()
{
    // Texel color fetching from texture sampler
    vec4 texelColor = texture(texture0, fragTexCoord);

    // NOTE: Implement here your fragment shader code

    finalColor = texelColor*colDiffuse;
}

relevant bit in main.cpp:
Shader shader = LoadShader("base.vs", "base.fs");
Model model = LoadModel("crate.obj"); // Load model
Texture2D texture = LoadTexture("crate1_diffuse_small.png"); // Load model texture
//SetTextureFilter(texture, TEXTURE_FILTER_BILINEAR);
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture
model.materials[0].shader = shader; // Set material shader

screenshot000.png
[Hide] (48.4KB, 960x720)
screenshot001.png
[Hide] (53.4KB, 960x720)
_screenshot000.png
[Hide] (65.1KB, 960x720)
_screenshot001.png
[Hide] (69.7KB, 960x720)
Well, shit. Ifrit was a little hard because he came upside down, scaled up 1000x, and needed two diffuse textures but otherwise they're just plug and play. Models grabbed from ht tps://www.models-resource.com by the way.
Replies: >>589
screenshot002.png
[Hide] (85.7KB, 960x720)
screenshot000.png
[Hide] (84KB, 960x720)
screenshot001.png
[Hide] (124.5KB, 960x720)
>>588
An attempt at lighting. Looking a little washed out, think I set the ambient light value too high. Shame too though, it appears the lighting model from here ht tps://github.com/raysan5/raylib/blob/master/examples/shaders/shaders_basic_lighting.c is Phong (per-pixel specular) and not the more period-accurate Gouraud (per-vertex). Gonna have to read up on lighting models and shader code to see if I can't change that, though I did find some code here ht tps://garykeen27.wixsite.com/portfolio/gouraud-shading that might do it.
Replies: >>590
>>589
Maybe you clipping maximum brightness for a texture. 200red50green50blue+150 white=255red,200green,200blue, which is almost white. if  Can you change shader, so its capped by the original texture values? That way stuff could only become darker, but never washed out. Try rendering some gradients to look what is going on. However washed up look is quite common for simple light engine in games, like in fucking dark souls 2.
Replies: >>592
srgbtexture_gamma.png
[Hide] (129.8KB, 960x720)
srgb_tolinear_gamma.png
[Hide] (118.7KB, 960x720)
comparison.png
[Hide] (264.4KB, 1920x720)
gimp_colorspace.png
[Hide] (87.7KB, 645x462)
>>590
>clamping colors in the shader
I player around with that, didn't fix it. The problem ended up being color space and gamma correction. Turns out I was using sRGB color space PNG images for the textures (which is normal for images meant to be displayed as-is on a monitor) and the final step in the fragment shader was applying gamma correction to convert from linear color space to the sRGB color space expected by the monitor. The double conversion was causing the washout. Commenting out the gamma correction resulted in something somewhat closer to correct, but that wasn't a proper fix. It turns out color and lighting calculations need to be done in linear color space for the math to work out right. The proper way to do it is to either use texture images that are already in linear color space (GIMP can do this for you, see pic related), do calculations, then gamma correct OR, use sRGB color space textures, convert to linear color space in the shader, do calculations, then gamma correct back to sRGB for display. In the side-by-side comparison shot, you can see I've done that in the 3rd and 4th pics, resulting in (virtually) identical outputs. The other images are all incorrect in some way or another. See references for more information and the shader code I borrowed for the color space conversion.

The final fragment shader ended up looking like this:
#version 330

// Input vertex attributes (from vertex shader)
in vec3 fragPosition;
//in vec2 fragTexCoord;
noperspective in vec2 fragTexCoord;
//in vec4 fragColor;
in vec3 fragNormal;

// Input uniform values
uniform sampler2D texture0;
uniform vec4 colDiffuse;

// Output fragment color
out vec4 finalColor;

// NOTE: Add here your custom variables

#define     MAX_LIGHTS              4
#define     LIGHT_DIRECTIONAL       0
#define     LIGHT_POINT             1

struct MaterialProperty {
    vec3 color;
    int useSampler;
    sampler2D sampler;
};

struct Light {
    int enabled;
    int type;
    vec3 position;
    vec3 target;
    vec4 color;
};

// Input lighting values
uniform Light lights[MAX_LIGHTS];
uniform vec4 ambient;
uniform vec3 viewPos;

const float SRGB_ALPHA = 0.055;

// Converts a single srgb channel to rgb
float srgb_to_linear(float channel)
{
    if (channel <= 0.04045)
    {
        return channel / 12.92;
    }
    else
    {
        return pow((channel + SRGB_ALPHA) / (1.0 + SRGB_ALPHA), 2.4);
    }
}

// Converts a srgb color to a linear rgb color (exact, not approximated)
vec4 srgb_to_rgb(vec4 srgb)
{
    return vec4(
        srgb_to_linear(srgb.r),
        srgb_to_linear(srgb.g),
        srgb_to_linear(srgb.b),
        srgb.a);
}

void main()
{
    // Texel color fetching from texture sampler
    //vec4 texelColor = texture(texture0, fragTexCoord); //  get texture color as-is
    vec4 texelColor = srgb_to_rgb(texture(texture0, fragTexCoord)); // get fragment color from texture and convert to linear color space
    vec3 lightDot = vec3(0.0);
    vec3 normal = normalize(fragNormal);
    vec3 viewD = normalize(viewPos - fragPosition);
    vec3 specular = vec3(0.0);

    // NOTE: Implement here your fragment shader code

    for (int i = 0; i < MAX_LIGHTS; i++)
    {
        if (lights[i].enabled == 1)
        {
            vec3 light = vec3(0.0);

            if (lights[i].type == LIGHT_DIRECTIONAL)
            {
                light = -normalize(lights[i].target - lights[i].position);
            }

            if (lights[i].type == LIGHT_POINT)
            {
                light = normalize(lights[i].position - fragPosition);
            }

            float NdotL = max(dot(normal, light), 0.0);
            lightDot += lights[i].color.rgb*NdotL;

            float specCo = 0.0;
            if (NdotL > 0.0) specCo = pow(max(0.0, dot(viewD, reflect(-(light), normal))), 16.0); // 16 refers to shine
            specular += specCo;
        }
    }

    finalColor = (texelColor*((colDiffuse + vec4(specular, 1.0))*vec4(lightDot, 1.0)));
    finalColor += texelColor*(ambient/10.0)*colDiffuse;

    // Gamma correction
    finalColor = pow(finalColor, vec4(1.0/2.2));
}


references:
ht tps://en.wikipedia.org/wiki/SRGB
ht tps://learnopengl.com/Advanced-Lighting/Gamma-Correction
ht tps://github.com/tobspr/GLSL-Color-Spaces/blob/master/ColorSpaces.inc.glsl
ht tps://www.shadertoy.com/view/lscSzl
Replies: >>593
ffdtex0.png
[Hide] (20.2KB, 128x128)
ffdtex0_linear.png
[Hide] (29.2KB, 128x128)
ffdtex1.png
[Hide] (17.4KB, 128x128)
ffdtex1_linear.png
[Hide] (22.5KB, 128x128)
>>592
The textures in question - you can see the linear color space ones are darker and a bit "black-crushed". Or not, it looks like they're being converted to sRGB on upload.
Replies: >>594
>>593
Nevermind, they posted more or less ok.
bb4.jpg
[Hide] (74.2KB, 642x482)
bl1.png
[Hide] (30.9KB, 640x480)
bl2.png
[Hide] (106.7KB, 640x480)
https://ily888.itch.io/billys-quest-for-love

instruction manual → https://shithole.neocities.org/gggg.html

UPDATED JUNE 2023!!

r18+ nudity , drugs and course language. Guide Billy in his life searching for love. go to school, interact with the residents of the village, and find love! maybe.. Your choices will affect later events. Working time clock 1 sec is 1 min. game ends on the 5th day. the usual game flow goes like this: go to school in the morning, wait for it to get dark outside, then go to sleep in the bed, repeat until day 5.

Controls: Arroy keys to move. z is accept/interact. x is menu/cancel.

Bugs:-flying the airship over doors will get u stuck.
-dont press any directions during scripted events like the intro, u will get stuck.

update 2023:
-fixed skipping school bug.
-removed save from menu.
-removed garbage from pocket watch.
-removed junk hud.
-more information. more dialogs. changed some dialogs.
-signs.
-school music is quieter.
-a message to sleep at night.
-more wheelz interaction.
-princess doesnt run away after festival.
-airship now requires chocolate.
-chocolate is much cheaper.
-longer window for finding magic tiger.
-skipping school being triggered at the wrong time glitch fixed.
mud.png
[Hide] (93.2KB, 1494x987)
Got around to working on an older long-term project again, a graphical MUD. Been a boring couple of days doing nothing but sockets, threads, and MySQL but account creation, login, and chat is in place at least. Only a few more days like this and I might even get to some gameplay.
Replies: >>756
>>755
Cool. Do you have a specific idea in mind?
Replies: >>757
mer1.jpeg
[Hide] (580.9KB, 1184x729)
mer2.jpeg
[Hide] (376.8KB, 1202x1080)
mer3.png
[Hide] (331.8KB, 693x555)
arena1.jpeg
[Hide] (86KB, 950x534)
tes.jpeg
[Hide] (296.2KB, 2560x1440)
>>756
I have a lot of ideas, but right now they're kind of all over the place and not yet crystallized. So right now I'm cranking out the boring ass back-end infrastructure stuff while I work out the gameplay details and come up with something both interesting, yet scoped properly enough to actually be doable in a human lifespan. What I have for an idea so far is your classic fantasy, first-gen MMORPG-like graphical MUD, sometimes lovingly referred to as a "database simulator" if you know what the back end looks like on one of those. As for graphics and UI, think Meridian 59 or the Everquest UI from 1999 - Large text box in the center, surrounded by hotkeys and UI elements on the sides, and first-person 3D world view above. I'm trying to take the best features of MUDs like the high degree of interactivity (especially via commands like /look, etc.) and ease of content creation (mainly descriptive text, dialog, and database entries) and meld that with the controls of a more modern RPG: actually being able to backspace before sending text, WASD to move, hotkeys, mouse look, click to select, drag-and-drop items, etc. "Rooms" will exist like in your average MUD, only that you will be able to move around freely inside of them. Think again, dense, meandering, and claustrophobic Everquest maps vs seamlessly loading, sprawling, empty nu-RPG maps. Even outdoor areas will be "rooms". Level architecture may be DOOM-like - I would like to be able to leverage the mature map editing resources available for DOOM if I can, rather than use blender or roll my own. As for models, NPCs, other players, MOBs, etc. should be billboards to start (think Elder Scrolls Arena or Daggerfall), though a move to full-3D in the future would be cool. What I would like to do to stand out, if not exactly to innovate, is to bring back the interactivity you can find in MUDs, as well as in tabletop games - being able to use words to get additional information or manipulate the environment. Think typing /search to search the area around you for traps, hidden passages, and similar. Or using /look, to get clues about an area without them having to be explicitly modeled into the world: animal tracks, scratches in the floor, a suspicious crack in a wall. Being able to /get something that only exists in text, maybe only after having /search'ed for it. Should allow for a small team to flesh out a world without needing 200 indian sweatshop workers with pirated copies of Maya to do it.

That's what I got so far.
Replies: >>764
wiz4.jpeg
[Hide] (68.9KB, 1024x640)
mer4.jpeg
[Hide] (143.4KB, 750x563)
equi.jpg
[Hide] (430.6KB, 900x675)
tes2.jpeg
[Hide] (577.5KB, 1920x1080)
wiz2.jpeg
[Hide] (280.4KB, 1280x960)
More reference pics.
Replies: >>764
>>757
>>758
That does sound fun, good luck anon!
Replies: >>778
>>764
Thanks. It should be fun, if you're into tabletop and old-school gameplay (and it ever gets made). Making an MMORPG (or more realistically, an MORPG) has been an almost life-long dream of mine, ever since I sank my highschool years into Everquest. Since then, I've tried to follow the MMO space but nothing has kept my interest for more than a few weeks. Later, I (tried to) get into MUDs, seeing as they influenced the making of EQ to such a degree that they were taken to court by the DIKUMUD guys and made to swear that their codebase did not contain any stolen DIKU code. I was never able to get past the telnet clunkiness and having to set macros for every little thing just to kind of keep up with the scrolling text "/attack %t with handgun" and shit. Never got into dwarf fortress for that reason too but whatever. Later got into tabletop from seeing how a lot of MUD's more free-form gameplay was based off of that, focus on small-group dungeon crawls, abstracting the environment away through descriptive text, high level of interactivity, etc. Everquest's world, lore, major NPCs, etc. were also lifted directly from one of the dev's old tabletop campaigns, which I believe was a major factor in them getting a game of that scale out the door with the team and time they had, couple dozen people and ~3 years IIRC.

Recently, I've been following the development of an indie MMORPG by the name of Monsters & Memories, an Everquest clone, surprisingly the first one since EQ's release 24 years ago (WoW clones being a dime a dozen). The lead (dev? designer?), Shawn Lord, was a designer on EQ since the (very poorly received) Shadows of Luclin expansion, though I believe he was lead designer during the (very well received) Planes of Power expansion. They too, are going old school with the gameplay and graphics, and they are also incorporating MUD-style text commands into the game. He talks about MUD commands a little at the end of this video ht tps://yewtu.be/watch?v=-Vihut0iKt4 The guy streams his development on the Monsters and Memories channel, and it can be pretty interesting, at least to listen to. You get to see a lot of gray-box work, database stuff, talk about design, etc. Worth a watch in my opinion. Shawn's personal channel - ht tps://yewtu.be/channel/UCFl_3ktLNPYUeicLmhSvB1Q?sort_by=newest has some good videos about behind-the-scenes EQ development and design stuff, a lot of which was news to the fan community when he posted it, quite cool if you're interested in that sort of thing.

So I've mainly been working on network stuff recently. I had been using a TCP sockets library, mainly because it's MIT licensed, easy to use, and offers TLS/SSL encryption. I know, TCP can have some nasty latency versus UDP and nobody uses it outside of browser games which are forced to, but apparently there are some "zero-latency" tricks out there like running multiple sockets per client (being able to send another packet before receiving the ack from the first one), disabling Nagle's algorithm (an anti-network congestion thing where small packets are buffered and combined into one larger one), reducing resend delay to the minimum, etc. I'm not too happy with it though. I've had to make some changes to it (which is something I don't like to with external libraries) to set some socket options that need to be set on creation, as well as to allow the sending and receiving of unsigned chars, not just signed ones. It also doesn't have async support out of the box, though I've been able to add it with STL threads. I currently have on the server side a threaded listener that gets incoming socket connections and adds them to a queue for the main thread to pick up. The main thread passes these to a threaded sender and receiver, which simply loops forever select()-ing the open sockets for activity, and if found, getting their packets and adding them to a queue for the main thread to process. The async sender/receiver also checks for new packets to send from a queue that the main thread pushes to. The client is similar, with a main thread for game stuff (input, display, etc.) and a threaded TCP client for async sending and receiving. It works, for now.

I've been doing a lot of reading though, and network stuff is a lot more involved than I first believed. Thus I'm looking evaluating nbnet - ht tps://github.com/nathhB/nbnet and enet ht tps://github.com/lsalzman/enet to save me a lot of low-level networking work, as well as to be able to use UDP, albeit with "TCP features" like ordered packets and reliable packets (will resend if no ack). enet is apparently mature and well-supported, notable for being developed for the Sauerbraten/Cube or whatever FPS. The tutorial at ht tp://sauerbraten.org/enet/Tutorial.html makes it seem straight-forward enough. nbnet is simpler, focused on smaller, hobbyist use. That said, it has an example showing off most of the library's features, using raylib, which is awesome. You can see videos of the raylib example in action here ht tps://yewtu.be/watch?v=BJl_XN3QJhQ and a little tank game here ht tps://yewtu.be/watch?v=Nz28tMpLfTQ From here, I'm going to be testing these network libraries, as well as developing a simple offline RPG to give me something to actually simulate on client and server, something like the raylib example: players log in, show up in some enclosed space with a color and player name, move around, chat, maybe fight an enemy, etc.

Some of what I've been reading:
ht tps://web.archive.org/web/20180823014904/https://gafferongames.com/categories/building-a-game-network-protocol
ht tps://pvigier.github.io/2019/09/08/beginner-guide-game-networking.html
ht tps://www.cs.umd.edu/class/spring2018/cmsc425/Lects/lect22-multiplayer.pdf
ht tp://ithare.com/tcp-peculiarities-for-games-part-1/
[/blog]
Replies: >>803
37923874.png
[Hide] (5.7KB, 274x311)
It sure is great when something planned out in your head goes off juuuuust right. (keypad for a safe, four letter code)
Replies: >>801 >>803
>>799
Cool. What's it for?
Replies: >>836
mud_multi.png
[Hide] (27.1KB, 1033x813)
axes.png
[Hide] (827.5KB, 1916x1014)
collision.png
[Hide] (34.6KB, 1290x844)
collision2.png
[Hide] (32.1KB, 1285x843)
>>799
What went just right? You got some code or a video to follow up with? Let us know what you're working on.

>>778
Update. I ended up going with enet for networking. It's mature, straight-forward to use, allows multiple channels per connection, and does both reliable (guaranteed delivery) and unreliable packets. Played around a bit and got to where multiple players could log in and the other players would see their movements. Definitely need to use client-side prediction though, because even on the same machine (with 8ms round-trip time for some reason, OS stuff?), movement was pretty jerky even at 30 server ticks (updates) per second. enet documentation leaves a lot to be desired though, like all fucking libraries it seems, so there's still a lot of features I'm not able to use yet. Have to do some profiling too then to see if these socket operations and stuff really aren't blocking. Next up with networking is to see about using cereal ht tps://github.com/USCiLab/cereal to serialize/deserialize (convert cpp types like float, etc. to bytes and back again) data for packets instead of the ghetto casting to and from uint8_t I'm doing now.

Speaking of libraries sucking a dick. I'm still looking for a C/C++ physics library for capsule -> mesh collision detection and can't find shit. Apparently "free to use", "doesn't require a Phd to use", "compiles and links without errors per the instructions", and "has documentation/tutorials/a how-to-get-started" is too tall an order for even these libraries that have been around 10+ years and have thousands of stars on shithub. Reactphysics3d almost seems like it would fit the bill, but I'm getting odd behavior with it. For instance, moving directly perpendicularly into a wall will slide me along it to a degree that can't be explained by floating point errors or collisions with edges of tris in that wall. I'm also finding myself limited by the information given with a collision. You have a number of "contact pairs", which seem like 1 per triangle collided with, for a concave mesh. You're also given the local and world coordinates of the "collision point" on both of the intersecting volumes. Which I can only assume are the two closest points on the 2 shapes - the world mesh and collision capsule shape. That's not to say that there isn't any documentation, in fact rp3d was the only library I could find with something like this: ht tps://raw.githubusercontent.com/DanielChappuis/reactphysics3d/master/documentation/UserManual/ReactPhysics3D-UserManual.pdf - a decent user manual. Still, it just mentions in passing that the library does collision detection and that you can get the points, what that means however, remains a mystery to me. I get the feeling that I need to somehow use the movement vector at the time of collision, combined with the intersection vector (which again, has no explanation and I can only assume is the normalized vector formed by the pair of intersecting points), to determine the order in which the triangles were intersected and resolve collisions in that order, changing movement vector and re-checking collisions after each tri. 

Fed up with how React was treating me, I rolled my own capsule -> triangulated mesh collision per ht tps://wickedengine.net/2020/04/26/capsule-collision-detection/ Getting access to the triangle data with an .obj imported into raylib isn't hard, and the page offers a pretty good explanation of the algorithms and implementation (though the included code contains several bizarre errors that I can only imagine are put there to deter copy-pasting) right up until the end where he goes all "now draw the rest of the fucking owl". So I've got some bugs in my implementation and it's pissing me off, reminds me of early days with 2D platformer collision. 

Anyway, some screens of my experiments.

I'll try to do a proper post on some of this shit when I can organize my thoughts better. Right now I'm getting a little frustrated at this sort of 
>I don't fully understand/can't implement this complicated 3D maths/physics/rendering thing
>Let's try using a popular open-source library, that's what all the cool kids do
>I don't understand/can't use this library and there's no documentation outside of the source code
>fuck
loop I've gotten myself into the past few days. Next up: get a proper camera set up, WASD/mouse-look/no-clip style so I can get a better look at what's going on with this collision bullshit.
Replies: >>808 >>810 >>836
collide.webm
[Hide] (5.8MB, 1090x804, 00:28)
>>803
Finally got it working. That fucking faggot from the wickedengine site, I swear to god. Shit's all fucked up. Not just typos and copy-paste errors either. Taking the absolute value of the dot product of the triangle normal and the capsule center line vector (for whatever fucking reason) was keeping me from colliding with polygons that were over my head, even though I could collide with back-facing polygons from below. What an ass.
Replies: >>811
1423363071997.jpg
[Hide] (302.5KB, 640x848)
>>803
>I don't understand/can't use this library and there's no documentation outside of the source code
It's even better when there are docs but they're flat-out wrong, and when you ask about how things actually work after banging your head against the thing for hours you get a heaping helping of vagueness, denial, gaslighting, or - my favorite - some obscure drivel about how the library's internals being built a certain way means that the astonishingly contradictory behavior you're seeing is of course obvious.
Replies: >>811 >>813 >>814
gravity.webm
[Hide] (6.9MB, 1278x800, 00:35)
>>810
Tell me about it. And people wonder why everyone's always re-inventing the wheel.

>>808
Added gravity back in. Everything seems ok, I just need to do some raycasts to get proper behavior on slopes and stairs - don't slide down slopes if they're less than such-and-such angle, "pop up" to the next stair when walking into it instead of "rolling" up it, etc. Currently takes 150 microseconds to do all the collision detection and resolution, colliding with 1 mesh of roughly 350 tris. That's not terrible, considering 150uS is less than 1% of the frame time (60 FPS is ~16667uS) and the collision detection routine is horribly unoptimized. Working on partitioning the world into a cubic grid, and keeping a list of tris that intersect each cube. Should be easier to implement than an octree, plus empty cubes don't take memory or time to check, and which cubes need to be checked for collisions can be directly calculated from player position, without recursively traversing a tree structure or anything like you would with octree. Aiming for less than 50 collision tris or so per cube, giving a worst-case scenario (player AABB overlaps 8 cubes) of 400 tris per frame to check against. If I still have issues, for example with multiplayer (all other players visible to the client need to be collision tested against the level geo as well to accurately predict their positions), I can decrease cube size and/or add threading, discarding duplicate collisions after all threads finish (if each cube got a thread, some tris exist in multiple cubes).
Replies: >>812
polys.png
[Hide] (45.8KB, 1280x837)
>>811
Update: I added spatial partitioning - just a regular old 3D cubic grid. Brought collision time down to 20-60uS on average, from 150uS before. Not the craziest improvement, but it's at least consistent now, no matter how many triangles make up the mesh. Tested by adding a torus with a bunch of subdivisions to the mesh - 20-60uS when not in that cell, ~3600uS when in it. Mesh info:
TOTAL MESH TRIS: 4124
TOTAL MESH TRIS In CELLS (DUPES AND ALL): 5491
CELL TRI COUNT MIN: 2
CELL TRI COUNT MAX: 1947
CELL TRI COUNT AVG: 54
Not bad. I am going to need to process the mesh offline though; It takes ~2 seconds to sort the tris into their respective cells with my current shitty implementation. This is a bad example though, as the average and max are heavily skewed by the polygon-dense torus in that one spot, but I hope you get the idea.
Replies: >>817 >>823
>>810
Sounds a lot like unreal’s legalese documentation.
It should not take over an hour to explain how to do something as simple as making a light switch.
Replies: >>817
>>810
Bonus points if they tell you that you’re doing something wrong. Like no shit.
camera.webm
[Hide] (15.4MB, 1284x802, 00:28)
takemehomecountryroads.jpeg
[Hide] (373.3KB, 1280x803)
>>812
Fuck me this video is not easy on the eyes.

>>813
>Unreal documentation
I can only imagine. Anyone else play around with the Unreal Engine 2 SDK when it released? With the outdoor area with the thatched hut and the cave with the torches with the particle flames and shit? I want to go back.
Replies: >>821 >>822 >>861
mouselook.webm
[Hide] (13.4MB, 1278x800, 00:22)
>>817
Mouse look working. Apologies for the file sizes.
Replies: >>861
>>817
tried to make a few prototypes of different genres in UE4 and 5. I am 100% sure mainstream engines like Unreal and Unity are sabotaged so you cannot complete anything beyond a shitpost game on it. Unless you are part of a zogbot propaganda "AAA" studio.

Asking questions about concepts like optimization so your project isn't a laggy POS that crashes often even in an empty, brand new project is a guaranteed ban in any UE developer community. The gaslighting is off the scale. While they LARP about wanting people to ask questions. (so they can permaban them without warning) 


Is there even a way to obtain a copy of the UE2 SDK anymore?
That demo level is way better than the templates UE4/5 provide.
Replies: >>830
>>812
>but I hope you get the idea.
I do indeed Anon. It's alway a good idea to normalize/regularize your sensor/control mesh patches down to the bare minimum beforehand (presuming thats feasible -- that is, your mesh is stable (which in this case it should be)). GG.
Replies: >>829
bb1.png
[Hide] (1.4MB, 1920x1080)
bb2.png
[Hide] (1.6MB, 1920x1080)
bb3.png
[Hide] (2.1MB, 1920x1080)
bb4.png
[Hide] (1.7MB, 1920x1080)
>>823
>It's alway a good idea to normalize/regularize your sensor/control mesh patches down to the bare minimum beforehand (presuming thats feasible -- that is, your mesh is stable (which in this case it should be)).
You lost me. I was talking about splitting the mesh into regularly sized chunks to speed up collision checking - only checking collision with the triangles contained within the chunks you are currently intersecting. I'm not using any kind of subdivision or modifiers in Blender, just good old fashioned low-poly modeling - what you see is what you get. As a graphics target, I scrapped the DOOM-like idea I mentioned before as being too limiting; I'm aiming for somewhere between Everquest and Metroid Prime, in terms of verticality?, poly count, materials, and lighting. DOOM-like would not offer any real content creation advantage over low-poly modeling and UV-mapping in Blender, while imposing some nasty restrictions - no slopes, vertical walls only, no level geometry overlapping on the z-axis; fuck that. Some shots of Everquest (1999) dungeon zone geometry for reference; this is more what I'm going for - organic and winding, vertical, interconnected, almost 3D-plaformer-like. Little trivia: the original Everquest engine was adopted from Verant Interactive's previous title Tanarus, a 3D tank game, and it uses a Quake BSP compatible level format, they just have a different file extension for it, .s3d.

I've also been thinking lately about how to split the level geometry mesh for frustum culling (not trying to render tris that aren't in view of the camera). Currently, I am importing the terrain mesh from an .obj file to a raylib Model, then using raylib's DrawModel() to render it. Importing the terrain obj right now results in 2 meshes (a Model holds an array of Meshes)- one for each material used on it (it has a wall stone texture and a ground texture). I would like to do a mesh per 3D grid cell, but given that 1 mesh = 1 material, I may end up with total_meshes = number_of_cells x num_different_materials_in_that_cell, which could easy result in thousands or even tens of thousands of individual meshes, some with only a handful of tris. That is, unless I used a different grid size for rendering than I do for collision. Even my shitty Ryzen APU will do 1M+ tris at 60 FPS, I could realistically split the level into 8 cells around the origin and call it a day. I'm trying to plan ahead though. At some point, I would like to try to stream the level geometry from the server. Texture, shaders, that sort of mesh material data could live on the client, while vertex data would be streamed, with the primary goal being preventing datamining and exploitation. Your account isn't flagged as holding the key to the door to area X? Then your client doesn't have the geometry data for area X. You want to look hack at it? Good luck. Move hack into it? Enjoy falling under the world. So ideally the zone level data could be split into chunks that could be streamed to clients as they need them/become allowed to access them. Maybe I could do a scale factor between vis cell and collision cell. Say, 1 vis cell holds 64 collision cells (4 x 4 x 4). So each chunk update would send 1 vis cell and 64 collision cells. Who knows.

But whatever. Looking into raylib's Model and Mesh classes now to see about creating custom classes based on those that would allow me to create new meshes on the fly, merge meshes, and append meshes to a list held by Model, or just work with a list of meshes directly when viewport culling and rendering. Going to ramble a bit about my design ideas here but, a client would have a bunch of "zones", which is an EQ term for a somewhat-expanded MUD "room". Ideally, each zone would only include as much geometry data as is needed to start a new character there and start walking around. Not to mention that the client would only come with zone data for the starting zones, none of the surrounding zones or end-game dungeons or anything like that. As your character moves around the starting zone, more geometry would be streamed in as you approach it/it could possibly become visible from where you are, and saved to disk. So I would like to be able to append to the level geometry data held by the client, but obviously not as one contiguous mesh that gets rendered every frame, as that would quickly become expensive. So it would be more like a list of chunks that grows. When the player moves to a new "zone", the server would have to check what chunks that client has in that zone already, then send them the minimum that they need to enter the new zone. For instance, the entranceway and surrounding rooms. Or, if teleporting to a new zone, the area around the teleporter site. Shit like that. The idea is to keep secrets secret for as long as possible. Is there a locked door that no one's been able to find the key to yet? Then no one has the level geometry beyond it. High-end raid dungeon no one is high enough level to get to yet? No one even has a zone file for it then. I think this sort of approach is critical to the success of a niche MMORPG in today's climate, and completely technically feasible with today's internet bandwidth; it's not the 1999 dial-up days any more.
Replies: >>839
>>822
>Is there even a way to obtain a copy of the UE2 SDK anymore?
I really doubt it. I'm sure you can find the code and shit if you go looking for it but I don't believe back then they were offering it for free* like they do the current unreal engine, it was more a demo IIRC, so you would have to license it from Epic and all that bullshit.
2023-06-28_22-53-51.mp4
[Hide] (877.5KB, 768x480, 00:15)
2023-06-28_22-55-08.mp4
[Hide] (1.1MB, 768x480, 00:14)
One of the things I worked on. Base (code, rules, premise) is done, but it would need content (fun situations + art + sounds).
Replies: >>835
>>834
Neat. Not sure what exactly but you've certainly got something here. Turn-based tactical RPG? Tell us more about what you're trying to make. What's going on in the second video? Is that graph/mesh thing supposed to be the overworld map?
Replies: >>838
>>801
Game I'm working on.
>>803
I was sitting in the bath, drunk as all fuck thinking about how I could add some pizzaz to a simple get safe code followed by a open safe event and tried putting the idea into game code. It worked perfectly on the first try.
Replies: >>837
>>836
What's the game?
>>835
>Turn-based tactical RPG?
Slight chess inspiration like Into the Breach. With a twist on status effects. To be under any of the 3 "locks" inhibits you in combat, but will benefit you if you stick with it.
>Is that graph/mesh thing supposed to be the overworld map?
Yes, like a pirate's treasure map, each zone stays consistent.
>Not sure what exactly but you've certainly got something here.
The idea is a bit highfalutin and probably needs to be described with art, but basically that it's okay to be a skeleton.
Replies: >>840
blockoutdude.png
[Hide] (1.1MB, 1920x1017)
sittingdude.png
[Hide] (1021.5KB, 1917x1012)
nodes.png
[Hide] (453.5KB, 1573x1008)
swarthy.png
[Hide] (1.4MB, 1286x808)
table.png
[Hide] (978.4KB, 1917x1008)
>>829
Update. Getting ready to do some block-out/gray-boxing in order to get a feel for player scale, zone size, and the like so I can refine the character controller (move speed, turn speed, FOV, jump height/length, etc.) as well as add NPC pathfinding, visibility/line-of-sight, and stuff like that. In the final game, in addition to just walking around, I would like to have jumping (clearing small gaps and low obstacles/ledges), swimming (free movement in 3D space while within a water volume), crouching (for moving through low/tight spaces not designed for humans) and climbing (ladders - not interested in scaling cliffs and shit). So I need to get an environment in place to test all of this. Was doing some research and came across a good resource on level design. ht tps://book.leveldesignbook.com/process/blockout/metrics This section in particular talks about what I'm trying to do now and the importance of getting it done early. See these pages too for similar good reads:
ht tps://book.leveldesignbook.com/process/layout
ht tps://book.leveldesignbook.com/process/blockout
Also reminds me that we need a game dev literature thread.

Got a hold of some low-poly human figures from ht tps://quaternius.com/packs/backgroundposedhumans.html and got them into blender to replace my 60x60x185cm box I was using. They needed to be scaled down to the proper scale and the soles of their feet go below the floor about 1cm but that was a few minutes fix. Also inset some faces and added eyes to the one standing male, couldn't tell which way he was facing before when flat shaded. I'll be using these guys to set up doorway height/width, table/counter height, room size, and such. Take for instance, a tavern room with one long counter and 2 employees behind it, plus room for 3 tables that can each sit 4-6. Rather than just eyeball it and make some vaguely shaped room, I can drop placeholder tables and people sitting around them, then actually walk around the space. Can I get from the doorway to the bar OK? Is anyone sitting so close to the fireplace that they'll catch fire? That sort of shit. Once the size of homes and buildings is established and I have a few examples of each, cities and towns can be blocked out using those, and the world and dungeons proportional to those. I worry though, that my block-out dude is not as anatomically correct as he could be - might want to grab something from makehuman or whatever if I want to make objects "shoulder-high", "knee-high", "waist-high", etc.

I got some of those 1-meter grid prototyping textures from Kenney: ht tps://kenney.nl/assets/prototype-textures I took one of the "dark" themed ones, scaled it down to 256x256 and added more readable text in the upper-left corner. Going to make a few more in different colors for grass, dirt, stone, water, wood, etc. Had to set up "triplanar texture mapping" in blender to get proper texture scaling and alignment. Searched around and found a niggit post with this pic that basically did the trick ht tps://i.imgur.com/lhWopKh.jpg I think he's using 2.8 or something though because it's a little different from mine (3.5). 

Fun shit. Beats grinding out network code at least.
Replies: >>854 >>863
>>838
Interesting. Sounds very "gamey" though. Is there an in-world explanation for these "locks"? Are they magical effects? Combat stances?

>Yes, like a pirate's treasure map, each zone stays consistent.
I don't really get it. What made you go with that instead of your classic RPG overworld map?

>The idea is a bit highfalutin and probably needs to be described with art
I'd like to hear more about it. Is this something currently in active development?

>it's okay to be a skeleton.
As a live, flesh-and-blood human I'm literally shaking right now.
Replies: >>841
2023-06-28_22-54-20.mp4
[Hide] (591.4KB, 768x480, 00:09)
>>840

>Are they magical effects?
Like curses, preventing using abilities/tools or turn you into a skeleton.
>I don't really get it. What made you go with that instead of your classic RPG overworld map?
By dividing the world into "zones" you can quickly write any encounter you want. Kind of like fallout. Eventually I want "penciled in" landmarks.
>I'd like to hear more about it. Is this something currently in active development?
Nothing right now, I want to get an artist eventually, if my time doesn't get too divided. All I can do is describe. vid related. These things get put on hold for something else.
>As a live, flesh-and-blood human I'm literally shaking right now.
It's a "painless" instant process in-game.
Replies: >>842
>>841
>fallout
Now I get it. Like a point crawl from tabletop games. 

>Nothing right now, I want to get an artist eventually, if my time doesn't get too divided. All I can do is describe.
So you're leaning into flavor text to set the scene, I see. Nothing wrong with that, just gotta brush up the UI to support it.

>These things get put on hold for something else.
Tell me about it. You working on a few projects at once or just don't have the time to commit right now? Would be cool to see you take this further if you have the passion for it and a proper design in mind to make it fun and stand out from other tactics-style RPGs.

I tried and failed to make a joke about being triggered by your skeleton remark, like "it's ok to be white."
Replies: >>846 >>848
>>842
>So you're leaning into flavor text to set the scene, I see. Nothing wrong with that, just gotta brush up the UI to support it.
The shop UI is messy, but I don't think adding anything to the dialogue UI is top pri
>spoiler
Heh. Well it will be important later.
Spoiler File
(370.3KB, 2200x2149)
>>842
>"it's ok to be white."
Literally shaking r/n
Replies: >>850
Spoiler File
(13.8KB, 468x60)
Spoiler File
(12.1KB, 459x63)
>>848
>Literally shaking r/n
Replies: >>851 >>854
>>850
>2nd pic
Lol
triplanar_blender.png
[Hide] (1.2MB, 1920x1014)
nouv.png
[Hide] (16.9KB, 1282x802)
workingiguess.png
[Hide] (207KB, 1286x808)
ok.png
[Hide] (181.4KB, 1284x807)
hmm.png
[Hide] (310.6KB, 1286x807)
>>850
2spooky4me

>>839
Update. So I said before I was getting started with some block-out type work in blender, right? And I found a nice shader to let me do triplanar mapping inside blender, so I can see a 1m grid overlaid on the world. Well everything was going fine until I imported the meshes into my project and... there's of course there's no UVs. Turns out the triplanar shader works on the world coordinates of the meshes, and doesn't affect their UVs at all, unlike what you would get in a Quake-style editor like Radiant or Trenchbroom where you can lock the texture UVs to the faces or to the world, and the information is exported with your map. Well, fuck me. Did a bunch of panicked searching and almost gave up and went with Trenchbroom for blocking out before I remembered that if blender could do triplanar mapping with a shader, then so could I, in theory. Took a few hours and it was extremely painful but I did manage to get something working. The way the z-axis texture is oriented is different than how blender does it but fuck it. What matters most is that the "1 METER" text is upright and reads left to right but... I have no way of verifying that the proportions are correct on non-axis-aligned slopes/angles because of perspective skewing and it's driving me crazy but whatever.
Replies: >>855
out.png
[Hide] (1.1MB, 1920x1081)
>>854
Blender has a lot of mapping options, including UV, local object and global (sometimes global is called "generated"). Also you can just use appropriate scale in blender for everything, its one of the main rules. You can simply export default blender texture. Also you might want to switch to 2x2m objects, because I use them. 
Also I use 2x2 "cage" to see scale of things. Texture is not really okay way to measure object size, especially when they are using UV mapping, and whole thing is just handmade, not adjusted to realscale in any way. If you move a vertex, it will move UV coordinates.  You can probably do it with code, but it is annoying to do/learn for a very little benefit. Worst case you can use a couple of gradient shaders with ZYX coordinates for input, or some simple shader which draws a white line when XYZ has integer value.
Replies: >>859
>>855
Triplanar texture mapping doesn't use UV coordinates; the world coordinates determine the texture mapping, with 1 blender unit (1 meter default) equaling 0-1 in UV. Right now, in both blender and in my project, the "1 METER" texture is grid aligned, at least on the primary axes. So I can slap down any arbitrary geometry and it'll get textured properly according to the face normals. This whole grid texture block-out thing is pretty standard, look at something like Unity probuilder. 

As far as texture baking goes, I did see that suggested as a fix elsewhere and it was the next thing to try should I had I not gotten this shader working. Hopefully the UVs get baked too? Who knows. I'll deal with that when I go to bake lightmaps.
Replies: >>860
>>859
You export UV as part of the model, depending of file format. OBJ export gave me perfectly working model with working UV, however you need to unwrap object first. You dont really need to bake anything for it.
Replies: >>861
>>860
>You export UV as part of the model, depending of file format.
I know that. I'm saying that this is a shader, a procedural texture if you will - you don't UV map the model. These videos: >>817 and >>821 have a UV-mapped and textured .obj as the terrain. Textures generated inside blender need to be baked to be used outside of blender, unless you can do the same material/shader set up in your engine, which is what I did here - world coords to texture coords shader in blender -> world coords to texture coords shader in raylib, no UV mapping involved. Because I'm trying to block out test environments quickly. If you follow.
Replies: >>863
ClipboardImage.png
[Hide] (809KB, 1920x1081)
>>861
>I know that. I'm saying that this is a shader, a procedural texture if you will - you don't UV map the model.
Actually they can use whatever as input, especially UV, but I get what you meant.
However fucking with textures to make a global grid, used for size reference, seems like a strange idea to me. Why not just make a huge grid mesh, and keep it around, while you still need it? >>839 Also here texture coordinates in blender for image texture set "object" and image textures almost always use UV. Or instead of grid just 2*2 boxes placed every 10*10 meters, very easy to make. Now that I think about it, 10m tall object is a good reference because it should take a second to drop 10m.
Replies: >>866 >>867
LDB_Blockout_Iterate.gif
[Hide] (1.7MB, 1130x733)
block1.jpg
[Hide] (331.5KB, 1920x1200)
block2.jpg
[Hide] (381.6KB, 1920x1080)
block3.png
[Hide] (1.2MB, 1829x944)
block4.png
[Hide] (689.2KB, 1311x720)
>>863
>a grid
Not the worst idea, if your world is mostly flat. Raylib comes with a grid drawing function (though the y-axis is up).
void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
but you could do the same thing with the line drawing function too:
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space
But my world is going to be everything but flat and I'm also not just trying to measure this and that. Did you take a look at the e-book I linked about design? The block-out, "metrics", and playtesting bits especially. See pics if not for an idea of what I'm talking about. Odds are I'll be running, jumping, swimming, swinging swords, and throwing fireballs inside this "1 METER" grid space for a very long time. Least I can do is make it easy to iterate on and to grasp feeling of space and movement and the such.
Replies: >>870
>>863
>10m takes 1 sec to fall
Never mind, I feel bad after I though about it for a second.
Replies: >>868
>>867
Don't worry, I got what you meant - after falling for 1 second, you will be traveling at 9.81m/s. Another reason why it's nice to be able to work in meters and not something like Quake units - you have a basis to work from. A human male character can be ~1.85m tall, with eye line (camera height) at 1.75, which gives you a starting point to start playing with character speed and field of view. I've been using a tape measure a lot too recently - measuring furniture, room sizes, doorway width/height etc. They'll all need to be adjusted of course, usually made larger, but it's a starting point.
block.webm
[Hide] (18MB, 1276x798, 00:30)
An idea of what I'm working with atm. Ignore the first "house" - was taking way too long to do with proper topology and triangulation so I gave up. The "building" next to it was done proper block-out style in a couple minutes by copying and pasting a wall section - kind of like that gif I posted here >>866 . The block-out in that gif was done with Trenchbroom by the way, something I'm still considering incorporating in my production pipeline somewhere.
Replies: >>873
skybox.webm
[Hide] (12.4MB, 1280x800, 00:21)
>>870
Added a skybox and fixed a bug with the camera up/down.
Replies: >>874
>>873
Nice, great to see each stage of the development.
Replies: >>875
cave.webm
[Hide] (13.8MB, 1282x802, 00:26)
>>874
Thanks. I been meaning to make my own thread but I'm being lazy. Here's a video with an interior cave-like space being lit with point lights. I'm working out ideas for the lighting model at the moment so I whipped up a little test space in the corner here.
Replies: >>877
lighting1.png
[Hide] (344.2KB, 1283x801)
lighting2.png
[Hide] (306.8KB, 1284x801)
lighting3.png
[Hide] (225.3KB, 1284x802)
lighting4.png
[Hide] (311.2KB, 1283x804)
lighting5.png
[Hide] (259.8KB, 1283x804)
So I mentioned I'm working out a lighting model for the game world. I will be leaning heavily on good old-fashioned "vertex lights" like we saw a lot of up until the advent of pixel shaders and per-pixel lighting around the time of Half-Life 2 and Doom 3 and similar. Vertex lights can look nice if your geometry supports it - no triangles the size of the screen, make sure your vertex normals are smoothed where they should be smoothed and split where they shouldn't be, and watch how stuff clips through one another. The best thing about vertex lights: they're stupid cheap and because of that, practically unlimited. In addition to those, I'd like to bake lightmap textures, even if relatively low-res. Vertex lighting can also be baked (vertex colors), and may be an alternative if lightmapping doesn't have the look or performance I want. No reason to render static lights on static geometry every frame like I was doing in the last video - that sort of stuff gets baked. Baked vertex lighting also has the advantage of not standing out when compared to lightmapped surfaces, if anyone remembers back when doors and other moving objects stood out from background static geometry because of that. It has the disadvantage of not capturing fine shadow detail though. That said, the lightmap could be disabled while the object is in motion or otherwise not in it's original place. Will have to experiment.

I'm also working on a day-night cycle using a directional light that rotates around the zone, light direction facing the center of rotation. The light will change color and intensity based on time of day. Dawn/dusk - dimmer/orange-ish, midday - brightest/white-est, night (moonlight) - very dim and blue-white. That's easy enough to implement, I just need to choose what meshes are affected by it and which aren't, hence the interior/exterior space testing (the inside and outside are two separate meshes). Right now, I'm not able to do any kind of fade between interior/exterior, but I'm going to try using a point or maybe a directional light at the entrance to simulate light coming in from outside. How that will work with doors opening and closing, I don't know yet. 

Dynamic lighting will be done by having a list of light sources held by each mesh. On every frame, each mesh will update its list depending on distance to dynamic lights (mesh bounding sphere to light radius collision) and pass those values to its lighting shader. Sphere to sphere collision checking with squared distances (no sqrt) is the fastest 3D collision check, so a fancy spatial partition scheme may not be needed. May be a different story if I end up with 100s or 1000s of meshes per zone like I mentioned before; we'll see.

So far I've got planned for lighting:
>Directional "sun/moon" lights for zones fully or partially outdoors.
>a lot of dungeons will be dark, like real fucking dark. Bring a light.
>baked static lighting (vertex? 
>dynamic vertex lighting (player light sources, spell effects, flames/lava, etc.)
>players may "glow" Dark Souls style if they have a light source equipped
>NPCs may give off light, if they're made of fire or lava or some shit 
>moving objects will be vertex-lit only
>dynamic shadows are being looked into. Shadow maps look the easiest, compared to stencil shadows or other fancy stuff

Pics are me playing around with some crude interior lighting. First pic is the default lighting shader from the one raylib example: 
ht tps://www.raylib.com/examples/shaders/loader.html?name=shaders_basic_lighting
ht tps://github.com/raysan5/raylib/blob/master/examples/shaders/shaders_basic_lighting.c
Notice there's no fall-off/attenuation. The light travels infinitely in all directions, changing intensity only with angle of face to light source. Next pic shows the same with proper fall-off. This is with a light radius of 4 meters I think, and a linear fall-off. Next pic is looking further into the "cave". I wasn't too happy with the way the light seems to end pretty abruptly like in the 4th pic, so I changed the fall-off to quadratic instead of linear. Basically just intensity (0.0 to 1.0, calculate with "min(0.0, (1.0 - distance / radius))") * intensity again. Gives a much smoother result.
Replies: >>877 >>878
>>875
>>876
Interesting. Will that cave become an example of your world chunk idea?
>if anyone remembers back when doors and other moving objects stood out
Oh yeah, that's a common problem in Quake mapping with the baked lightmaps.
>So far I've got planned for lighting
Sounds flexible, should allow for building a strong atmosphere.
Replies: >>880
>>876
Nice explanations Anon. Thank you very much.
sunlight1.png
[Hide] (393.7KB, 1283x804)
sunlight2.png
[Hide] (385.6KB, 1284x801)
sunlight3.png
[Hide] (354.2KB, 1282x804)
>>877
>Will that cave become an example of your world chunk idea?
No. I just needed some geometry to let me test different lighting styles. The world chunking thing is still in the works. Obviously collision is in place, as I can walk around these blockout spaces. Chunking will be 

"Outdoor" zones will still contain caves, tunnels, building interiors and the such, and a naive skylight implementation will end up penetrating into those. So the idea was to split interior meshes from outdoor ones, then do something for the transition zone to make it less jarring. For instance, opening a door to a building could enable a point light in the doorway, that affects only the building's interior meshes. The point light color would be the current zone "sunlight" color (though maybe brighter to account for fall-off, which directional lights don't have). The ambient light value of the interior meshes could be changed as well, from say... {0.05, 0.05, 0.02} to (0.12, 0.12, 0.12} or something, then reset to default when the door closes again. Just thinking of things that may come up and how I might tackle them.

>Sounds flexible, should allow for building a strong atmosphere.
I hope so. As far as atmosphere goes, and I may have mentioned it before, I'm going for the level geometry of Everquest, which you can view here: ht tp://www.ulftek.com/eqscout/ Check out old sebilis, crystal caverns, or lower guk if you want to see some god-tier dungeons. Combined with the level geo/lighting of Metroid Prime, which you can check out here ht tps://noclip.website/ Tallon Overworld and Chozo Ruins being good examples of "fantasy" environments. Ambitious? Maybe. These are games from 1999/2001.

Tried my hand at doing the whole "sunlight coming into interior space" thing. Eh. Better, but not quite there. Think I'll worry about it about it again when I get around to dealing with light baking.
Replies: >>881 >>887
>>880
Fuck me. I forgot that players and mobs can move between outdoor, sunlit spaces and interior, unlit spaces freely. Might need something like a collision volume to partition the two, and have the point light at the entrance affect PCs as well.
rei.png
[Hide] (707.6KB, 1284x802)
no.png
[Hide] (986.2KB, 1284x803)
pool.png
[Hide] (925.9KB, 1284x805)
water.png
[Hide] (1.5MB, 1920x990)
swimming.png
[Hide] (99.4KB, 1284x805)
Update. So while I didn't do any more than a debug print, I tried my hand at line of sight calculation today. What I'm doing is tracing a line segment from NPC eye position to player eye position, then checking for mesh triangle intersection at a distance of less than ray length. If any triangle intersects ray like that, the check ends early with no line of sight. It's easy enough, I just need to take it a step further and use the level geometry chunking system with it. Right now I'm calculating distance between PC and NPC, seeing if it's less than LOS range, then checking against every tri in the map. Getting about ~500-600 microseconds for one LOS check. Definitely going to need all the optimization I can get though, considering it will be done server-side, for all PC-NPC interactions.

Next up: swimming. The plan so far is to use the water as a collision volume, which you can see in the 4th pic. Basically a bounding box encompasses the level geometry that should be underwater. For some zones, this may be one single box that extends from some z-level downwards - think islands sticking up out of a flat ocean. Different movement rules and physics will apply whether the player's collision capsule's center is in the water volume or not. Out of water volume, normal run in 2 dimensions + jump, crouch, climb, etc. In water volume, can no longer crouch or jump, but can move in all directions. Falling into a water volume from above will have the player fall normally until their center intersects the water volume where they will then decelerate quickly. Standing in shallow water, where the player center is out of the water volume, will allow movement like normal. I will also be using the player's eye position to determine the render mode. If the player's eye point is inside the water volume, the ambient lighting will be changed to match that of the water volume (probably dim and blue/green), and the distance fog will be made much more aggressive (reduced visibility). I'd also like to blend a cube-mapped animated caustics texture over meshes under the water if I can, because that looks cool. Torches, lanterns, etc. will not work underwater but other magical sources of light will. The collision check for whether one is in water or not will probably be a naive approach (check every volume against player center and eyes every frame) since point -> bounding box collision is cheap, and I can't imagine having more than a handful of separate water volumes per zone. 5th pic outlines some of the plan as it stands. I still haven't come up with an easy solution for getting the player up out of the water where it meets land at a sharp angle. In real life, you just grab on and hoist yourself up on out, like getting out of a pool, but we're working with capsule collisions here. Maybe on collision I can shoot a ray from player center point one player width long and if it doesn't hit terrain or the water volume, allow movement up onto the colliding mesh. That or put a short invisible "ladder" volume along those edges, which come to think of it, act a lot like water volumes: while colliding, you can look up and push forward to move upwards. Got to experiment some.
Replies: >>890 >>959
>>880
>Chunking will be 
I have no idea what I meant to write here.
rayromano.webm
[Hide] (11.3MB, 1280x800, 00:41)
>>886
This is pretty much what I was going for: distance fog for lower visibility when in water, underwater mesh brightness based on distance to surface + the usual angle to light source shading. Still have to figure something out for the water surface. I'd like to have the water's surface reflect the sky/ceiling from above, and just be semi-transparent from below (assumes above water is brighter than below water). Still gotta do animated caustics for under the water, again with intensity based on distance from surface. Should look pretty slick.
Replies: >>892
shader.webm
[Hide] (15.9MB, 1282x804, 00:44)
>>890
Played with swimming and the underwater shader some more. Looking into navmesh pathfinding stuff now. The recast/detour library ht tps://github.com/recastnavigation/recastnavigation seems to be the go-to solution for that, looking for resources on that at the moment.
Replies: >>959
Spoiler File
(155KB, 489x443)
In my other game I was making an objective marker script while in the middle of it this happened. It looked like the works of a stalker ex-boyfriend so I thought it was neat. The objectives work now.
Replies: >>958 >>960
>>950
Cool. What's the game?
Replies: >>960 >>966
serval_coffee.jpg
[Hide] (147.6KB, 960x1275)
>>886
>>892
>pool.png
You motherfucker.
>>950
>>958
Forgot to mention I also did skeleton tactics. This is an experimental XCOM type game where you can focus on just strategy layer and interception of sites. I wanted to act out the idea of multiple fights happening happening at once. Something I imagine is humanity losing grasp of a planet. You get to see that from a map view without any interruptions like going to a tactical layer.
>>958
Forgot to mention, no name yet, and ALSO BUMP
>>333
Are you still alive?
ClipboardImage.png
[Hide] (3.1MB, 1902x932)
2023-08-19.webm
[Hide] (5.4MB, 1920x1080, 00:10)
ClipboardImage.png
[Hide] (1.6MB, 1902x932)
The more I do, the more I need to do, and the more things can break. 
Same fucking code to move "character" and move whole tileset, just a fucking t.x=v.x. It works for character, but doesnt work for ground. Managed to fix it, but it becomes apparent I need to start cleaning up testing code and useless shit. Had "my_viewport" and "viewport" and "camera", all of which (were supposed to) do the same fucking thing. 
Its really discouraging. But hey, at least bare minimum works. Looks like shit tho, at lower scale. So, I would either need to remake assets, or change how I render things, but maybe it will look better with more varied assets.
Replies: >>988
2023-08-19_21-49-35_2.mp4
[Hide] (2.3MB, 1920x1080, 00:21)
>>123 (OP) 
experimenting with writing a data-oriented vulkan renderer with branchless optimizations for potential performance gains.
just seeing how fast i can open vullkan windows rn... each window can have its own attached rendering state or share a common state e.g for split-screen or something like that...
Replies: >>988
2023-08-25.webm
[Hide] (6MB, 1290x954, 00:11)
ClipboardImage.png
[Hide] (2.7MB, 1902x932)
>>977
Did some random shading, just to measure how it would look. And made some (wrong) controls. I wanted to do zigzag rendering of tiles, but it seem to be impossible, due to my laziness, and not wanting to deal with complexity of transforming everything into zigzagged coordinates. Technically it is just a temporary way to render, and later I want to make a buffer for stuff to be rendered in desired order. Next is forest generation, and rudimentary light system. 
>>987
How does it indicate anything related to vulkan? I assume window opening is just part of winapi. From what I read vulkan is awesome, but it provides very low level access/api, so you will have to build everything yourself, and it takes a lot of time and effort, which is not something indie devs have. 
Still fun to see, and good exercise.
Replies: >>994
test.png
[Hide] (33.8KB, 422x599)
virtualboy.png
[Hide] (2KB, 136x125)
Spent a couple hours trying to figure out why the projection matrix in my compute particle system wasn't working only to realize I'd forgotten to homogenize the transformed vectors. Also accidental virtual boy mode.
Replies: >>991
logo_(2)_vb.png
[Hide] (1019B, 115x86)
>>989
>Also accidental virtual boy mode.
Neat. Have an edited anon.cafe icon I made a couple years ago but never did anything with it.
yellow_leaves_brownish_bark_PR.png
[Hide] (694.9KB, 771x739)
yellow_leaves_brownish_bark_SM.png
[Hide] (48KB, 154x148)
yellow_leaves_brownish_bark.png
[Hide] (1.7MB, 1920x1080)
>>988
>make a forest
>well, I need to make texture cropper/resizer/converter
>default sdl api is a bit fucked, and I have no idea how to make transparency work, so either colorkey(good way anyway) or look into libpng
>and some simple "enhancements" filters would be great
>and I would need working interface to use them
>sdl works for now so whatever
>but to make proper converter I need json loader/data manager
I should look into hierarchy of the stuff I need to make, before making other stuff.
Replies: >>995
ClipboardImage.png
[Hide] (329.3KB, 786x466)
direction0_W_frame_1.png
[Hide] (43.7KB, 270x300)
rocky_cropped_should_be_good_grass_5.5.png
[Hide] (1.9MB, 1000x500)
direction0_W.png
[Hide] (871.4KB, 782x962)
>>994
Made simple automatic texture cropper with offsets. Just need to attach them to data files, and/maybe gui. And now I can process character tiles and implement proper systems for them. 
And make better grass tiles. They are flat, and I rendered all of them at the same time and just cut off the mask, now I can render each tile separately, and keep blades of grass which go outside of default rhombus, and even use any kinds of image processing on them. (hopefully it will look better). But that is an improvement for later, current grass works perfectly for a placeholder.
ClipboardImage.png
[Hide] (385.7KB, 790x439)
0030.png
[Hide] (587.1KB, 1000x1000)
ClipboardImage.png
[Hide] (77KB, 227x277)
Note to self. Dont use 1000*1000 resolution for renders instead of 1024*1024, especially when you batch rendering something on cpu. For "less precise" stuff like trees and other decorations, it might be fine, but walls and ground tiles must be precise.
But on the bright side, I figured out why grass renders always had dark spots in the middle of each tile(Pic2). I simply forgot to give renderer more bounces for transparency (it was only 4 total), so everything transparent turned into black.
>now I just need to pack everything
>lets search for already made simple packing algorithms
>here is link, everything is explained in it!
>link is for 200 page scientific paper on packing anything into a box
Welp, Could have been worse. So many topics are so well researched, but its practically impossible to read through all of them. Packing even has free tools for it, but adapting them for my exact needs is the same, as doing it from what I already have. 
Next up, is making my tileinfo.json format to be compatible with Tiled editor. And a format for character sprites. And technically, at that point, I would be able to start actual game developement.
licardev.png
[Hide] (1.4MB, 1920x1080)
libre Trackmania clone under CC0, in C99 with no libraries, uses own 3D renderer, own physics engine
bump for demo day
sample_b.mp4
[Hide] (3.2MB, 960x704, 00:12)
Didn't feel it warranted a whole thread but took part in LD55. The theme is summoning so you play as a bunny summoned to court but instead you kick the crap out of carrots and avoid getting run over by police cars. Didn't get as much as I wanted done (as always) but it was fun. Page includes source too. https://ev-dev.itch.io/cac
Replies: >>1201 >>1204 >>1207
>>1200
Seems interesting enough that you could flesh it out further if you wanted.
>>1200
Nice. But ears should be more reactive to jumping and landing.
Replies: >>1205 >>1210
>>1204
It's quite stiff overall.
Replies: >>1210
quad_sprites.png
[Hide] (1.7KB, 63x319)
diagonals.png
[Hide] (15KB, 600x449)
tiletests.png
[Hide] (169KB, 1022x651)
zzzchan brainrot is becoming too much for me to handle so I'll try blogposting here for now.

I may have come up with a new way to do tile rendering inspired by Starbound's tilesheets. There's 5 problems I'd like to solve all at once:
1. Diagonal sprites usually explode the complexity of the spritesheet by a LOT, which is a lot of work for an artist.
2. I want to be able to put 2 slopes next to each other. If you turn a tile into a triangle like in Terraria, it cuts the tile in half and you can't fill it with another tile. Putting 2 tiles in the same spot would make everything more complicated than it's worth. Starbound solves this by making certain tile types connect diagonally, but it's kinda complicated and limited.
3. I want to be able to create a very thick edge for sprites, for example the blue meteorite bricks in Terraria have a prominent orange border.
4. I want to be able to overdraw the tile a lot, for example crystal and leaf blocks in Starbound look really good because they render on top of adjacent tiles.
5. The edge should blend into the tile properly, for example the leaf blocks in Starbound would look weird if the border and the middle sprite were drawn completely separately. The reason they look good is because each sprite variation has it's own borders associated with it, which also makes the spritesheet very simple.

So my idea goes as follows. To start with, each tile is drawn out of 4 separate parts: one for each corner. This way you only need to draw 5 sprites to create all the possible connections between solid blocks, and the edge can overdraw half a tile's worth both inside and outside of the middle sprite. All the edge sprites should be designed to connect with to the plain tile at the top, that way you'll get a seamless edge even if the sprite is complex like leaf tiles.

As for slopes, rather than turning tiles into triangles like Terraria does, use the Starbound method of connecting diagonally, except make it manual. The player can toggle connections between corners. If a tile is flagged to connect diagonally, it'll connect diagonally into that direction. If not, it'll be drawn normally. I'm not 100% sure how to piece together the sprites for diagonals, but at the moment it looks like you just need 7 extra sprites per corner. So in total you need about 5+7 "full size" sprites for each tile, or just 5 if you don't need diagonals.

If this works the way I hope, it should be extremely versatile and easy to make sprites for.
Replies: >>1208 >>1220
>>1200
I think more varied floor sprites would make a huge difference, currently it's almost no different than a solid rectangle. Also some kind of flashy particle effect when you punch.
>>1206
Sounds like a good problem to solve, I'll be interested to see your solution develop anon.
Replies: >>1209
shapeset.png
[Hide] (31.5KB, 865x641)
I think I cracked the code, and it actually only requires 4 extra sprites, so it's 9 in total. At first I thought you'd have to layer multiple sprites on the same spot in some cases, but turns out that (unless I'm missing something big) you can do every possible shape just by swapping the 4 corners. Pic related, on the left are all the sprites you need, and on the right is some random shape I built with them.

I don't know how hard it'll be to make good looking sprites, I think that as long as you can make leaf blocks and hard metal surfaces, then you can make anything. I need to implement this so I can experiment properly, it's super tedious to make test shapes in an image editor.

>>1208
I might make a proper explanation/tutorial for the implementation and how it works, assuming it ends up working. I've never seen such a simple and effective solution to this problem.
Replies: >>1211
>>1204
>>1205
IIRC, doesn't the Tutorials thread (>>12) have some kinds of information like that from the 12 Principles of Animation? In this case the two most important ones being Squash & Stretch, and Secondary Animation.
Replies: >>1212
ClipboardImage.png
[Hide] (562.2KB, 698x763)
ClipboardImage.png
[Hide] (23.4KB, 250x208)
ClipboardImage.png
[Hide] (25.8KB, 250x208)
>>1209
>tiles outside of tile borders
Render order will be painful, since everything is at the same distance. Unless you want to make "in between" tiles, to determine what you want on top, which is fine, but complicated. It will give you option for borders (as you wanted), but require more sprites. I guess It can be solved with "wide tiles dont allow other types of wide tiles nearby". Or have specific tile rendering priority, which would mean more complicated rendering.  
>how difficult it will be to draw
Drawing a single sprite should be as difficult as drawing entire set, except for figuring out how to make sprites seamless. So, if you make proper blank tiles and some simple demo program for tilesets, it should not be a problem. Unless you plan to make different tilesets interact or blend with each other, in which case it becomes more and more complicated with each additional set. 
>I've never seen such a simple and effective solution to this problem.
Aren't you clever, Mr. Humble!

Picrelated is cc0 from. 
https://opengameart.org/content/good-cc0-art
Replies: >>1218
>>1210
Oops, I meant (>>23)
Replies: >>1214
https://www.boristhebrave.com/permanent/23/03/tileset-creator/
https://www.boristhebrave.com/2021/11/14/classification-of-tilesets/
Also.
>>1212
Yeah, you're right. Technically he does everything right (reaction frame, slight pause, slight pushback) but it diesn't feel as good.
Replies: >>1216
if (key pressed){
    if (key not_pressed){
	
Being retarded is hard work.
Replies: >>1217
>>1214
EXAGGERATION IS USUALLY THE ANSWER TO THAT ISSUE!111ONE!!ELEVEN!!

:DD
>>1215
>Being retarded is hard work.
Lel. Everything is hard work!  :D

The key difference is to work at doing things you like (or at least that serve as stepping stones to the rewards you desire). Cheers, Anon.  :)
>>1211
Keep seething in bitter jealousy as your inferior brain struggles to comprehend my supremely high IQ designs.
tilesystem.png
[Hide] (56.1KB, 960x600)
Implemented the tile system and it works very well so far. There's a couple kinks I need to figure out, notably diagonal tiles leave empty gaps (shows as purple pixels) next to them unless I draw background tiles behind foreground tiles. It's wasteful to draw all the background tiles that are hidden behind foreground tiles, so I need to figure out a way to only draw the necessary ones.

The dirt and leaf sprites are from Starbound.
Replies: >>1254
forks.png
[Hide] (180.5KB, 607x588)
Here's also all the fork shapes recreated from >>1206
pipemaybe.png
[Hide] (56.4KB, 762x378)
Tried to make a pipe-style texture similar to the Starbound copper pipes, and it doesn't work too well. It kinda works but there's not as much control as I'd like to have, the fact that the corners don't know about each other is great for simplifying the sprite, but it severely limits the amount of control you have over shapes that go "through" the sprite. The Starbound pipes don't look good either if you make a 2x2 shape though.
Replies: >>1222
>>1221
Looks fine except for lack of overlapping pipes.
Replies: >>1223
bronz.png
[Hide] (94KB, 764x508)
>>1222
It looks even better if I steal the pipe texture from Starbound. It's not perfect but I guess it's usable, the main downside is that you can't put an opening to the end of the pipe. Maybe I could create special sprite exceptions for certain corner combinations.
Replies: >>1224
>>1223
Are the purple spots transparent in the source file?
Replies: >>1225
clip.gif
[Hide] (167.4KB, 480x300)
>>1224
Purple is window background color. It happens because background tiles aren't drawn if there's something in front of them, diagonal sprites don't cover the entire tile so the purple ends up showing through. I'll have to tweak this anyway because transparent tiles like glass and fences need to have transparency anyway.
Replies: >>1229
clip.webm
[Hide] (213.3KB, 480x300, 00:13)
What's even the point of gif if the thumbnail doesn't animate.
Replies: >>1227
8e149b493c4f67056e59f37e55e29725d48773208a0c676fa701d4d8d227d79d.jpg
[Hide] (42.5KB, 500x500)
>>1226
Limitation of jschan, I guess. I don't like it either.
Replies: >>1228
magszines.jpg
[Hide] (541.1KB, 2166x955)
Not exactly gamedev but I made a Stalker Anomaly mod, I can't actually upload it though because moddb is shit and won't let me make an account. There's a few mods that remove/replace the porn mags for various reasons, but what bothers me personally is that they are pointless. So I replaced them with crafting/repair related magazines and buffed their repair bonuses, one helps with weapon repair, and the other helps with all repair but gives a smaller bonus. Now they should actually be valuable to find.

>>1227
Some other jschan imageboards have animated thumbnails. When I'm trying to show an animation I prefer to use animated gifs since you can see the animation right away and makes the thread look more lively, but if the thumbnail is not animated then it's hard to tell that it's an animation so I'd rather post a webm which has the play button on top.
Replies: >>1230
>>1225
Depending on how you render things, sometimes its faster to just render everything all the time. Alternatively, you can just edit sprites to cover missing pixels. I had similar problem with scaling, non-square sprites caused problems when they needed to be seamless. 
 
Good read on that. 
https://www.factorio.com/blog/post/fff-264
>>1228
>Not exactly gamedev but I made a Stalker Anomaly mod
Many gamedevs started out with mods as did many games. Maybe we should have a modding thread?
Replies: >>1231
>>1230
If there's other people who delve into modding then sure. The only game I'm interested in modding is Stalker, and it's too infuriating to mod so I won't be doing much. Maybe I'll try again in 2037 when Anomaly or something similar is ported into OpenXRay.
Note to self: always use movement vector(s) for every actor, instead of modifying position. I can simulate any number of forces, by simply adding 2+2 together.
Replies: >>1233
>>1232
One of those small insights that makes a big difference.
Replies: >>1234
>>1233
Now I only need to learn how to fix spaghetti and do general refactoring.
foodicons.jpg
[Hide] (172.6KB, 1106x458)
canned_food.jpg
[Hide] (128.5KB, 1079x723)
I ended up making 2 new mods after all. By default cooked foods had shitty icons and used some stupid symbol to differentiate between tiers, I made it so each tier has an entirely different icon (roasted < gray bowl < gold bowl). It kinda works together with my older food rebalance mod which removes water requirements from tier 1 foods (so it's basically just roasted meat). Took me a while to figure out how to do this since there used to be only 1 icon per food type and the water symbol was added on top separately, and because the config files are a mess of random properties.

Second mod is that canned foods cannot be eaten, you have to open them with a swiss knife first. Took me all day to figure out how to do this since it required scripting and changing the functionality of existing items (I don't want to modify all the item drop/spawn/trader settings to have sealed cans, so I had to remove the ability to eat the default item). This also works with the older food rebalance mod which changes the advantages and drawbacks of different foods, the advantage of canned foods is that they're very clean, the drawback is that they're heavy, and now they also require a swiss knife to open.
Replies: >>1236 >>1237
>>1235
Nice tweaks anon, the can opener mod sounds like a cool immersion boost.
Replies: >>1238
>>1235
>finger food
spilledfood.jpg
[Hide] (223.3KB, 1176x638)
tallbottles.jpg
[Hide] (198.5KB, 1343x519)
>>1236
Immersion? Here's some immersion. I made a mod that adds a chance for certain foods to spill out if you move around too hard or if you take damage from something. You get a number of "spilled food" items that are in total worth about 1/3 of the satiety that the original food item had.

I also remade the inventory icons for beer/vodka bottles to be tall like other bottles. I've seen other mods that do the same, but they tend to look weird so I tried to make them look as similar to the original icons as possible. I just took screenshots of the in-game models and edited them, so they're slightly more accurate too. Also the beer bottle only has 1 use by default for some reason, so I made it have 3 uses like the other bottles.

I wasn't supposed to mod any more but here I am. I don't know if I will, but I want to do a complete foods overhaul, there's lots of different foods in Anomaly but it's hard to care because of how similar they all are. I want to make them more varied so you can make more interesting gameplay decisions. Here's my "vision" so far:
- Roasted meats are decent general purpose food and easy to cook, but also radioactive and an inefficient use of mutant meat.
- Cooked bowls are the best foods all around, but spill out if you move too hard so you have to keep a cooking kit with you and cook them on-the-go, eat straight out from a trader, or move slowly. The cooking recipe also uses some of your water.
- Canned foods are much heavier than other foods, require a swiss knife to open, and may spill like bowls if you keep opened cans on you (so it's better to carry sealed cans along with swiss knives).
- Snacks like nuts and raisins are very light weight, have many small bites so you can top up your satiety, but increase thirst slightly and are kinda expensive and hard to obtain.
- Military rations and MREs are by far the most effective foods with no downsides other than also being by far the most expensive.

There's other plain foods like sausages and bread, I'm not sure what to do with them. They're very abundant and sold by many traders so they shouldn't be good, but it doesn't make sense to make them expensive. Maybe just slightly worse version of roasted meats.
Replies: >>1239 >>1241
>>1238
Sounds like something for cata:dda instead of stalker.
Replies: >>1240
>>1239
I'd agree if you were talking about normal Stalker, but Anomaly is a clusterfuck of masochist survival and half assed ideas. Some of the systems like cooking aren't even useful unless you want to roleplay, I'm just trying to make some of it have more of a point. Why even have 20 different foods + 30 cooked ones (not including drinks) in the game if they're all effectively the same thing.
Replies: >>1241
>>1238
>>1240
>I made a mod that adds a chance for certain foods to spill out if you move around too hard or if you take damage from something.
That's an interesting mechanic, makes me think of Death Stranding somewhat.
>I wasn't supposed to mod any more but here I am.
Keep at it anon! The experience and fun will be worth it alone.
>Why even have 20 different foods + 30 cooked ones (not including drinks) in the game if they're all effectively the same thing.
This bothers me too, so many games have dozens of food items but little reason to care which is which.
matches.jpg
[Hide] (83.2KB, 1029x221)
I made a whole walkthrough about how I made this mod and was going to make a modding thread, but then my computer froze and lost all the screenshots that I had in MS Paint and now I'm mad so fuck it.

I made it so rain makes it harder to light cigarettes. Cigarettes are almost weightless so you can easily have a bunch of them on you at all times, which makes alcohol kinda useless for healing radiation. This isn't enough to nerf cigs though, I'm not sure how to balance them in a way that would make me consider using any other item.
Option 1: give cigs comically harmful stats so you'd only carry them as emergency backup.
Option 2: buff alcohol so it has almost no downsides except weight.
Option 3: buff radiation so you have to cure it more regularly, that would make the downsides of cigs more pronounced, but this is way too hard to do.

Radiation pills are easy to balance in this equation, they're light and a medicine so it makes sense that they're the very expensive top tier cure.
Replies: >>1243 >>1245
>>1242
>my computer froze and lost all the screenshots that I had
That sucks anon, hope you figure out the problem.
>I'm not sure how to balance them in a way that would make me consider using any other item.
Option 1 sounds like the right sort of idea, some kind of physical fatigue effect maybe?
Replies: >>1244
>>1243
>hope you figure out the problem
My computer crashes probably 2 times per year, it's NSA watching me and pressing the crash button when it's most annoying to me. My text editor saved all the text so I didn't lose the actual content though.

>some kind of physical fatigue effect maybe?
I didn't consider adding a new debuff effect, that sounds pretty interesting. It might be difficult to do, I'd have to add an icon about the debuff to the item description window and to the HUD, and there's important mods that improve the item description window which I don't want to conflict with. Modifying existing things is easy enough but adding new ones gets complicated, being able to do that could be very useful for other purposes though. One downside of this idea is that alcohol has a drunkenness effect which screws up your aim, so adding another debuff that equates to "you're screwed in a combat situation" makes them more similar.

Another idea I had was that your character has to actively smoke for the whole duration of the heal (~30-60 seconds), so equipping any item or doing some other actions cancels it. Might be confusing if I can't add some kind of smoke and/or sound effects.
>>1242
That's a shame. You should switch to something that autosaves, like paint.net.
Replies: >>1246
>>1245
I have Krita for serious stuff and it autosaves, but it's way more clumsy. I use MS Paint because it's by far the most convenient for quickly slapping stuff together, it's extremely light weight, I can open new windows instantly which is in some ways superior to switching between tabs, if I paste an image the canvas automatically expands to fit it in, it just does what I tell it to do instead of asking me for confirmations in popup windows, I don't have to use 50 keyboard shortcuts for basic things, I don't have to look for the correct layer because everything goes to the same one...

One of the programming projects I've been meaning to get to is making a better version of MS Paint that's also cross-platform.

>paint.net
I recall wanting to try it but noped the fuck out during installation because the whole installation process was too weird and spyware-esque. Might have been a different program though.
Also, since it's all on 1 layer and it treats background color as transparency, it doesn't need it's own file format so you can just use PNG directly.
1361104408001.png
[Hide] (40KB, 760x797)
>100 objects = 2000 fps (if I disable cap)
>101 objects = 32~ fps
>101 objects + mouse movement = 60~ fps
Can you guess what was the problem? It was radeon drivers, "helpfully" reducing framerate to 30-60 frames when they feel like it.
Replies: >>1249
>>1248
And how did you fix it?
Replies: >>1250
halloween-costume-skeleton-grim-reaper-wearing-black-robe-white-background-gesturing-sad-depressed-expressions-137984894.jpg
[Hide] (19.8KB, 630x900)
>>1249
Turned it off in driver control panel. But it really fucked things up, when I tried to fix it. 
>maybe its because (screen)texture goes over 2048*2048
>maybe its because of some weird transparency issue
>maybe its because of sprite scaling
>maybe I simply did something wrong
>maybe I used i, instead of j, and it runs thousand times more than it should
>maybe its wrong event handling
>maybe its some sdl bug
>maybe its some cursor issue
>maybe its vsync issue
>maybe its dx/opengl issue
Tried to adjust all of it. 
The only similar problem to mine, was wrong event handling, entire game logic was handled at any event, for example mouse movements. And some guy mentioned that windows can decide when to refresh the window, for example when mouse moved.
I checked driver updates, and they mentioned this fucking "feature" in them, and I recalled trying to use it (it didnt work).
im_not_a_math_guy_but...png
[Hide] (143.3KB, 464x194)
Nobody cares if I rant a bit right? I'm going to rant a bit. Thanks for reading my blog. Trying to mod Stalker leaves me so frustrated that I want to make my own similar game. The deeper you dig the more convoluted and inconsistent everything becomes.

Even the surface-level details make no sense, like if you want to make an item that removes exactly 10% thirstiness, the thirst value of the item needs to be -0.72, but then every mod that shows the percentage or a thirst bar filling up or whatever uses the wrong calculation so they will show up as 12.5%. If you want to use a value that shows up as 10% (even though it isn't actually 10%) then you need to set the thirst value to -0.576. This makes it very difficult to balance items.

Don't even let me get started on timed buffs that have completely incorrect nonsense, pic related. If you want a specific timed mSv reduction, the calculation I ended up figuring out is: total_msv/seconds/23220. In other words, the timed msv reduction value for the item in this pic is 0.00086132644272179 which communicates neither the value on top, nor the value on bottom. I'm pretty sure the green number on top (which comes from a mod) is the correct amount reduced.

Yesterday I tried to rebalance a couple weapons and discovered that the stats displayed on weapons aren't really representative of anything real. In the process of figuring out which of the 200 values to change, I found a script where the game prints the stats on screen (at least I think so). Ignoring that the calculations are nonsense once again (different item stats are in arbitrary inconsistent ranges like from 2.1 to 0.0 and 3.0 to 1.0 and 0.0 to 1.5), I modified those stats on the weapon and ended up changing the displayed ergonomics and accuracy values massively (far more than buying any new weapon in the game could) without noticing any actual difference ingame. That completely changed how I think about weapons, if the stats don't matter then why not just pick the one that I like most aesthetically? But when you start going there, you start wondering why play at all, what's the point of exploring and finding cool new stuff if it's basically just cosmetics?

Makes me wonder how the hell this game ever got made in the first place, but it does kinda explain why all the numbers in everything are so arbitrary and why there's no rhyme or reason to things. One of the mods I want to make most is rebalance all the weapons and armors so they are more comprehensible and varied and there's more progression through "tiers" and different factions have different advantages and such, because currently they make no sense whatsoever from game design standpoint. There's just so many weapons and armors in the game and the stat/price differences are mostly insignificant and meaningless and difficult to reason about, and it's almost impossible to figure out what effect the stats even have (what's the practical difference between 5% and 7% electric protection?). If I want an armor that's good against fire anomalies, I don't even know if there is such a thing, it's as if they hit the randomize button on all the stats on all the armors and divided the result by 20 so the differences look insignificant, and then removed the decimal numbers on the UI so most items just show "1%" or "2%" on everything. On a related note, I don't even want an armor that's good against fire because non-physical damage types are so rare, the only stats that matter in reality are physical and radiation protection, which is another painful missed opportunity. Why aren't different areas of the world "themed" to lean more towards different damage types, and armors balanced towards certain protections, so you could actually use your brain to figure out the best course of action. I want to make that mod too. It would be so much more cool if things in the game had more meaning, which is kinda what I was trying to do by modding consumables and trying to make them have different characteristics. (On that note, I messed around with cigarettes more, nothing I did caused me to even consider carrying non-cigarettes until I nerfed the hell out of their rad healing so they're only useful to shave off small amounts of it, and prevented you from lighting them when outside due to "wind", that weightlessness is just far far too convenient.)

And that's just the simplest, easiest, surface-level item numbers, it gets worse depending on what you want to look at. Every time I try to modify something on the scripting side, I end up spending hours trying to untangle the uncommented spaghetti and 1-4 letter nondescriptive variables to understand what the hell it's trying to do, nevermind lua being dynamically typed so you could have a completely nonexistent variable name somewhere which doesn't stop the game from starting but will crash it at some random point when it's used, some basic functionality like hunger and radiation being in engine-side so you can't change them (unlike tiredness and thirst which are implemented through modifiable scripts), and other problems that make everything harder. Mods seem to follow very similar patterns, I tried to modify one UI mod and I just don't fucking understand what causes someone to write such a convoluted mess for such simple functionality, there was like 7 lines of seemingly arbitrary calculations modifying 2 different variables one after another that mapped something into a range of 0.0 to 0.55 and then immediately normalized it back into 0.0 to 1.0. The goal of that was to make a progress bar for some value.

Anyway, the more I delve into this the more all the different things build a picture in my mind and makes me think it's a waste of time trying to improve it, that it would be easier and more satisfying to make a game from scratch than try to improve this one. Problem is that it's a big 3D game and I'll never have the time and skills to make something comparable even if I accept PS1-tier graphics, but I can't help but to dream of how much better it could be than this shit. I'm thinking of making a similar 2D game, but it just can't be the same, it would inevitably be more like Project Zomboid.
Replies: >>1252 >>1253
>>1251
Wow anon, I had no idea Stalker was such spaghetti code. Sounds like making a new game is going to be necessary to explore your ideas.
>Problem is that it's a big 3D game and I'll never have the time and skills to make something comparable even if I accept PS1-tier graphics
Maybe you need to start small and work your way up? Better to have a fun game with a reasonable scope than to end up in a similar situation.
Replies: >>1254
14a9a0adf1e8384249f9398822fd490d04f32295f627f0588b38ef67c5991f00.jpg
[Hide] (57.6KB, 959x910)
>>1251
>Nobody cares if I rant a bit right?
You're good.
green.png
[Hide] (99.2KB, 872x446)
>>1252
>I had no idea Stalker was such spaghetti code
To be fair to Stalker, I'm modding Anomaly. There's a whole history of large scale overhaul mods for Stalker, as far as I know Anomaly is their final form so I don't exactly know who to blame for the mess, how much of it is from the vanilla game, how much from Anomaly, and how much just brought over from other mods.

>Maybe you need to start small and work your way up?
I'm thinking about it. It's not that I can't make a 3D game, but I don't want to use an engine and I really struggle with programming anything related to graphics even in 2D. Somehow no matter what new approach I try, it always turns into a mess and I find new problems and get stuck and demotivated.

At this very moment all of my semitransparent colors get dyed with the background color and I haven't been able to figure out why. The pink lines in >>1219 aren't actually pink, the color being drawn is something like rgb(1, 1, 1, 0.2). If I change the window background color into green, all the lines get dyed with green instead, pic related. I just start hating programming and get burned out every time I try to do rendering, I can't tell whether I'm retarded or cursed or 400% autistic or all of the above.
Replies: >>1255 >>1261
>>1254
I remember similar problem, you probably changing renderer default color, or something similar, its an easy fix. You probably will encounter problems with seams on tiles when scaling later. The solution is to keep scaling to values without seams, solving it in any other way is not worth it. 
>semitransparent
I advice you to sanitize your tiles to have binary alpha (even if its stored as 8 bit). While rendering them is not that taxing, they create problems anyway. 
>it always turns into a mess and I find new problems and get stuck and demotivated
Welcome to the club.
Replies: >>1256
>>1255
>seams on tiles
I've already solved all of that.

>changing renderer default color
What would I even change it to though? I don't want colors to be dyed with anything, I want it to use the color that I gave it. It's so frustrating that I can't just write pixels onto the screen myself and then I have to deal with this kind of shit because of it.
Replies: >>1257 >>1261
>>1256
Have you tried white as the background color? That shouldn't cause any tinting.
Replies: >>1258
>>1257
If I set it to white then black colors become gray. If I set it to black then white colors become gray. There's no background color that gives the correct result as long as it's being blended into my colors. The alpha channel of the background color makes no difference.
I started reading documentation regarding blending and I think I had an epiphany about what's causing it. It's because the blending function is wrong. Basically if you draw with a color that has 0.6 opacity, the background ends up having 0.4 opacity, and then those get blended together. Then the intermediary "canvas" gets drawn on top of the green background. I could be wrong, but I think this is what causes it, currently investigating how to fix it.
Replies: >>1261
fixed.png
[Hide] (102.6KB, 724x580)
Yep.

Before:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
After:
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE);
Replies: >>1262
>>1256
>seams on tiles
>I've already solved all of that.
It will return. 
>what color should I use
What color do you want? Lets use >>1254 for example. If you want lines to be semi-transparent, you should use 0,0,0,1 as default renderer color and whatever color you want (x,x,x,0.5) to draw them. In your case, it seems that green is the default color, so everything rendered with transparent pixels, will have green background, including the screen background. When drawing lines on top of everything else, you should declare color, and in SDL2 it should work normally, unless you use intermediate texture. 
https://wiki.libsdl.org/SDL2/SDL_BlendMode
Would be helpful to know what engine you are using. It sounds like extremely common problem. 
>>1259
>0.6 + 1 =0.4
Its worse, sometimes x0.5 + 0.3c +z0.5= 1z +0x +0c. 
Fix is probably something easy, dont worry about it.
Replies: >>1263
>>1260
Nice one. Is that straight up OpenGL you're using?
Replies: >>1263
>>1261
Tile gaps should only appear for me if floating point inaccuracy gets so bad that numbers are off by 0.5.

>>1262
Yes. I've thought about learning Vulkan just because OpenGL frustrates me so much at times, but Vulkan might end up being even worse so I can't commit to that plan.
Replies: >>1264
>>1263
There are wrappers for opengl, unless you want to learn it, its probably better just use glut, glew or whatever most updated wrapper is.
Replies: >>1265
>>1264
I don't really have a problem setting up and using a graphics API so a wrapper doesn't help me. Getting the correct results on screen without crap performance or massive spaghetti in the code is the hard part, everything's too clumsy and complicated for me to get things done. For example in my current implementation I need to edit like 5 separate places in my code every time I want to add a new shader.
search_engines.png
[Hide] (148.1KB, 910x1299)
I hate the modern internet I hate the modern internet I hate the modern internet I hate the modern internet
Replies: >>1267 >>1268
>>1266
This AI shit is making dead internet theory real.
>>1266
Dont use jewjewGo, use https://etsi.me/ or at least brave search. But yes, it fucking sucks.
43478260_p0.jpg
[Hide] (816.9KB, 1200x849)
I went on a tangent looking into what 3D rendering techniques are used these days. Apparently Stalker was one of the first games to use deferred rendering, and it's what people use(d?) for a long time mostly because it's much more accommodating for rendering many light sources. Supposedly forward rendering is better except for that; it's performance suffers when you have many lights, but people came up with ways to make it even faster than deferred rendering, and I found this which seems like a further upgrade that I haven't seen mentioned anywhere: https://www.youtube.com/watch?v=nyItqF3sM84
Ancient news by this point but it's pretty interesting, especially if you read any lighting tutorial and get told that forward rendering is bad for lights.

I'm reading that a lot of modern renderers are deferred, but also that some of the new AAA games use forward, Unity uses a mixture of both. All rendering "tutorials" are super old, and most new tech demonstrations focus on very high level things and ray tracing and global illumination, so it's hard to figure out what the basic rendering process is. This website has lots of presentations throughout the years, very interesting to browse through: https://advances.realtimerendering.com/

It's a little sad that all information about rendering is focused on one of 2 things: realism or anime cell shading. I'd love to see techniques for getting interesting and for the lack of a better term "emotional" graphics, not just realism and wacky indie cartoon shaders that get old in 5 minutes. Like imagine a game that looks like pic related.
68465058_p3.jpg
[Hide] (286.7KB, 1200x600)
Or this.
Replies: >>1272
One could argue that light and shadow are the most memorable parts of any video game.
ClipboardImage.png
[Hide] (3.2MB, 1500x860)
ClipboardImage.png
[Hide] (469.1KB, 640x300)
>>1270
I dont see how this would be possible, unless everything is prerendered, and just applied light effects on top. We cant even make film grain effect which dont look like shit. And even if something looks okay as a static image, it often turn to shit when animations are involved. 
Modern shaders work on per pixel basis. What you asking is making them work on entire image at the same time, while noting previous frames, so it doesnt look like shit. Modern "AI" does this stuff, but its stupidly expensive. 
While its not impossible, its really difficult. Even making a single textured model, which would fit this style. 
Wolfwalkers cartoon was made with heavy usage of blender, and you probably cant tell if anything is 3d.
Replies: >>1273
2020-05-13-image-21.jpg
[Hide] (465.3KB, 2491x1401)
>>1272
>I dont see how this would be possible
If I asked you to make an engine that renders pic related in 60 FPS, you'd end up saying the same thing.

That picture looks difficult because we spend all of our time around realistic shading techniques instead of creative ones, but I can almost guarantee that it would be easier to come up with tricks for rendering that than coming up with the stuff that modern engines do. Obviously you can't make a pixel perfect replication of that image, but you could make a game that looks just like it. You could get pretty far along just by creatively using surface normals and brushed textures and relative positions to modify lighting, and adding some kind of post-processing on top that's aided by vertex/normal/texture/depth data so it looks consistent in motion.
Replies: >>1274
>>1273
>people are just not creative enough, because they hate beautiful things
No, its because its really hard to replicate. You are not the first guy who come up with "what if cgi looked awesome" idea.
Replies: >>1275
1659741915389467.webm
[Hide] (2.9MB, 534x652, 00:13)
>>1274
Who are you quoting?

Only amateur indie devs make "aesthetic" renderers and they're obviously less skilled and have less time and resources than AAA engine developers. Big budget devs who do stylized graphics always go for clean cell shaded art like this which doesn't require any remarkable techniques beyond edge detection and custom vertex normals.
normals.png
[Hide] (83.7KB, 372x299)
1508803426868.gif
[Hide] (1.7MB, 640x278)
yhGjCzxJV3E.png
[Hide] (922.5KB, 1595x840)
normal_map.png
[Hide] (312.3KB, 522x256)
I keep mentioning normals and wondering how many people know exactly what they are, I feel like you might not if you don't interact with rendering or 3D yourself, so here's a mini tutorial.

Each triangle or vertex can have a "normal vector" attached to it, a normal usually points perpendicular to the surface of the triangle, and you can easily calculate lighting by comparing the directions of the camera/light/normal. In some cases you can make the normal vector point into a custom direction and "trick" the shader into thinking that the triangle points somewhere other than where it actually points to, it gives you more fine control over the lighting. There's also textures where each pixel is a normal vector (you might've seen those colorful textures), or you can render normals into a texture in real-time, there's all kinds of ways to use them but the main use is to manipulate the apparent angle of surfaces for lighting purposes.
Replies: >>1277
fff-324-tree-debug.mp4
[Hide] (6.9MB, 768x432, 00:09)
>>1276
They can be used for anything, using them to make flat surfaces look 3d is just one of the more clever designs. 
https://www.factorio.com/blog/post/fff-324
Replies: >>1278
leaf.png
[Hide] (42.4KB, 542x590)
>>1277
I'm not sure what the exact definition is. To me a normal vector represents a direction, which is different than a position/offset. I think things like waving leaves are usually done with some kind of an offset. They're effectively the same concept used in a different way though so it doesn't really matter.

I've thought about how to do waving leaves too but I can't figure it out. My idea is pic related; use an offset texture where each pixel of a leaf in a texture has offset to the center of that leaf, that way every pixel of that leaf can get the same value from a "wind offset" texture, and you could then animate the wind texture however you want with liquid/smoke simulation or whatever and the leaves would animate independently from other leaves.

The problem and reason why this won't work is that shaders work in the opposite way than how you'd intuitively think, the output of a fragment shader is always a screen pixel and you can't change that, you can only change where from a texture you pick the color for that screen pixel from. So you can't pick a value from the offset map to change where to output the pixel to. I think you can probably make it work somehow but I'm not experienced enough with shaders to figure out how.
Replies: >>1279
ClipboardImage.png
[Hide] (399.4KB, 605x403)
tuatara_bulge_uvs.mp4
[Hide] (175.5KB, 600x600, 00:01)
>>1278
>and the leaves would animate independently from other leaves
I have no idea how you trying to do this, from your explanation. 
>I think things like waving leaves are usually done with some kind of an offset.
Usually they just rotate the whole model a little, or just the leaves if they are fancy. Its leaves, no one cares, you can have square leaves and no one will notice. And in case of factorio, UV offset is also one of the most common ways to do fancy 2d effects.
>shaders work in the opposite way than how you'd intuitively think
No.

Few other examples of similar stuff. 
https://simonschreibt.de/gat/diablo-3-wings-of-angels/
https://simonschreibt.de/gat/diablo-3-resource-bubbles/
Replies: >>1280
shaders.png
[Hide] (32.7KB, 842x360)
>>1279
>I have no idea how you trying to do this
Did you read the post because I said that it doesn't work. The goal is to move leaves independently from other leaves, in 2D. You can just apply the wind distortion into the whole tree sprite or whatever, but it won't look as good.

>no one cares
Shut up nigger, you can't tell me as the developer of my game that I don't care.

>No.
Yes.
Replies: >>1281
>>1280
>pic
I think you confusing textures with shaders. No one thinks that you pick a color and than decide where to render it. Its not a mono color real life printing press. Have you used computers before? 
>The goal is to move leaves independently from other leaves, in 2D
Yeah, I had similar idea, but for something else, cant even remember what, but it was related to depth of 2d sprite. In your case its as easy as assigning random colors to each leaf, and use it as UV offset. Or better yet steal factorio idea. 
>Shut up nigger, you can't tell me as the developer of my game that I don't care.
Good luck with your failed ideas. The more you spend on stupid shit, like making perfect leaf physics, the less you will spend on actual game. Especially if you ignore all and any advice, and try to do it, in your own way.
Replies: >>1282
>>1281
I think I'm talking to an AI right now.
Replies: >>1283
ClipboardImage.png
[Hide] (192.5KB, 800x670)
>>1282
No, you are just stupid and arrogant cunt. You literally think that everyone misunderstands how shaders work, because you cant understand them.
Replies: >>1284
>>1283
>arrogant cunt
I become that way when I'm trying to accomplish something and solve an interesting problem and then some faggot comes along and tells me I should stop caring. If you don't care then don't reply, if you don't know how to do it then don't reply, stop wasting my time.

You can only change the destination where you draw in the vertex shader, but you don't use normal map textures in the vertex shader. You use normal maps on the fragment shader, and when you're in the fragment shader you can no longer change where you're drawing your pixel, you can only change what color to put in it.

In other words, you can't move a leaf with a normal map. You can distort the texture as a whole, but you can't move an independent leaf. In order to do it, the leaf normals would have to already be moved into the destination and then you use those to get the leaf pixels from the actual leaf texture. But if the normal values were moved to the destination, why didn't you just move the actual leaf pixels in the first place and read those?
Correction: you CAN use normal maps in the vertex shader, but then you're moving the whole mesh.
I want to know what esoteric knowledge Anon has picked up in his journey of gamedev.
Please share it with me.
Replies: >>1291
Funky_Laptop.png
[Hide] (943.1KB, 634x623)
adding sqlite databases into my godot game instead of a gorillion strings everywhere, i've done it before so it's not too hard but getting the queries structured right in gdscript is pretty tedious
Replies: >>1289 >>1290
>>1288
What? How is typing strings into a database better than typing strings into variables?
Replies: >>1292
00c4eff4991c133a.jpeg
[Hide] (135.9KB, 1024x768)
>>1288
>adding sqlite databases into my godot game to store strings
Replies: >>1292
>>1287
>what esoteric knowledge Anon has picked up
You can make videogames if you don't give up.
571ad1dd1104a8737aff49cb6718fd46ef97a3098308117372c4d3d627287530.png
[Hide] (24.1KB, 455x261)
>>1289
>>1290
because otherwise i will have a shitton of 
>day1MessageID string
>day1MessageSubject string
>day1MessageContent string
>day1MessageRead bool
etc.
unless there's a better way of doing that that doesn't involve strings everywhere, or nodes with all the prewritten strings attached
if i'm being a retard please tell me
Replies: >>1293 >>1295
>>1292
Won't an array (of a struct) do? Unless you have so many entries that it won't fit in the RAM, embedding a full blown SQL db engine sounds like an overkill.
Replies: >>1294
>>1293
It's not giving much overhead right now, and I find it easier to manage the messages in an external program right now than adding them in the IDE. If for some reason SQLite starts dragging the whole game down then I can find another way of adding it in, but it should be fine for now.
>>1292
Usually you'd just put a big array or associative array somewhere and get values from that, even if you want to save things into it for a save game, saving a JSON file with the same names/indexes will work for almost all cases. But if a database feels more comfortable for you and you're not querying it 120 times per second, then there isn't much harm in using one.

Can you post an example of what your code would look like before using a database and after using a database?
Replies: >>1296
>>1295
It'd most likely be a big nested array in a dictionary based on message ID, which I could probably do but right now doing it from a database is just a lot easier. Right now I'm more concerned about getting to first playable even if it runs like garbage (but it's running pretty well on my 10 year old Celeron laptop right now).
Replies: >>1297
>>1296
I'm just trying to understand what a database would help with. For example I'd do something like this (pseudocode):

enum Message {
	Message_None,
	Message_Day1,
	Message_Day2,
	Message_QuestFoo,
}
Messages = Array()
Messages[Message_Day1] = { Subject:"Hello", Content:"World" }
Messages[Message_Day2] = { Subject:"Hello", Content:"World" }
Messages[Message_QuestFoo] = { Subject:"Hello", Content:"World" }

ReadMessageIds = null

function load_game () {
	ReadMessageIds = read_json_file("save.json")
	if (ReadMessageIds == null) ReadMessageIds = Array()
}
function read_message (MessageId) {
	ReadMessageIds[MessageId] = true
	save_json_file("save.json", ReadMessageIds)
}
function print_messages () {
	for (i=0; i<Messages.count; i++) {
		msg = Messages[MessageId]
		if (ReadMessageIds[MessageId]) set_text_color("white")
		else set_text_color("yellow")
		print(msg.Subject, msg.Content)
	}
}
Alternatively you could use an associative array with a string ID instead of an integer enum ID. I'm not sure what a database would make easier, or maybe I'm misunderstanding what you're doing.
Replies: >>1298
>>1297
Well for starts there'd be a lot more to keep track of for each message entry. They're all "emails" which contain
>date and time message was sent
>sender
>subject
>recipients
>message
>attachments (optional)
>read/unread flag
So a dictionary of arrays may work better, such as
[code]gdscript
messages = {0: [date, sender, subject, recipients, message, attachments[attachment 1, attachment 2,]. isRead]}
[/code]
and so on
Replies: >>1299 >>1300
>>1298
why are code tags different here wtf
Replies: >>1300 >>1301
>>1298
The same general idea works almost no matter what the messages have in them. If the messages are "generated" rather than pre-defined story messages, then a database solution starts to look more similar and makes more sense, but I still don't see it being more convenient or reducing the amount of strings in the code. I understand using a database, but not how it's related to the reason you gave.

>>1299
I gave up trying to remember them for every imageboard, I just copy the tags from the faq every time I need them.
Replies: >>1303
>>1299
I wonder if [spoiler]spoilers [spoiler] in spoilers[/spoiler] are fucked[/spoiler]?
Replies: >>1302
1659172515819841.png
[Hide] (220.3KB, 500x372)
>>1301
And when I said I copy the tags from the faq, I meant ALL the tags. If I was a dictator I would make it illegal to use anything other than bbcode for formatting.
>>1300
I just assumed that having one variable with a shitton of dictionaries and nested arrays of huge string blocks was less efficient than a database for holding all of it instead?
Replies: >>1304 >>1306
>>1303
I guess having a file with all the string data, plus a method to load from it, might be very similar to what you did. But sql database to store strings, because you think it will work better, is wrong. 
I havent looked into godot, but I am willing to bet it supports json files natively.
Replies: >>1305
>>1304
It does support JSON but it was a pain to edit them over and over again and get all the brackets right once it's really nested, unless there's a program that can make formatting and working with them easier?
Replies: >>1306 >>1307 >>1308
>>1303
I'd say it's very unlikely that a database will be faster than having the data in a variable. I haven't exactly benchmarked it but I can only imagine 2 reasons why a database could be more efficient.
1. You have such an enormous amount of data that having it all in a variable starts to use too much RAM (people very often over-estimate the amount of data they have, so make sure you've actually done the math).
2. You do something like foo.bar.biz.zoo[2].x, you use a scripting language and it does a hash table lookup on each "layer" (I have no idea how scripting languages work underneath), but your database caches the result of the query into a hash table and the database doesn't update much so it can just use the same result and only needs 1 hash table lookup. Also this assumes that the language does NOT use clever tricks to optimize or cache the access path, which it might.

>>1305
>it was a pain to edit them
This is one of the most understandable reasons to switch your tools/methods to something else. If it's annoying to work with something, then it's annoying to work on your game.
Replies: >>1307 >>1308
>>1305
>pain to edit
Understandable, but its still not enough of a reason. On that note, all json gui editors are fucking awful. 
>>1306
People use databases, when they need some large amount of external data. Such as stats for every unit in game, which often change. Or when they worry about localization, and having all text in some database is easier to use for translators. But loading it on the fly, for each random message is not a good idea. In the end you will load same amount of data into memory anyway, but in really weird way, it cant be more efficient.
>>1305
Won't a simple CSV file do it? Since you're having SQL tables now, I'm assume your data is mostly tabular. Just open it in libreoffice calc or something if you need a fancy GUI for it.

>>1306
>a database could be more efficient
A database (especially an SQL, like sqlite anon is talking about) can be more efficient if you need to query your data according to various requirements, and you have the appropriate index, the sql query optimizer will come up with better solution than a naive full table scan.
But of course, this is assuming you're a retard and can't choose the proper data structure to store your data. Also accessing the data from a DB will be orders of magnitude slower as soon as it has to hit the disk vs a variable that's inside the RAM as long as you don't do something very stupid (like searching linearly for some data in a multi gigabyte array).
Replies: >>1309
>>1308
While something so tiny as a few strings will not cause too much trouble, using it for random messages might make noticeable lag in game. Unless you preload them, of course.
Kosketa.webm
[Hide] (152.9KB, 300x200, 00:12)
I've been trying to listen to music while ignoring the vocals as inspiration of what kind of music my game could have (and possibly to use as a placeholder music), and it's surprisingly difficult. Almost all the music that I know of is either energizing or emotional, and neither of those fits my game at all.

I want the music to be harsh and kind of uncomfortable/unnerving, but it's hard to find something like that, especially something that isn't overly electronic or silent horror-style music. The closest I can find are Rammstein-style bands, I got this clip which is close to what I'm looking for. I tried to remove the vocals but it didn't work very well, just try to pretend they're not there.

Perturbator also has some songs that are pretty close, but they tend to be too electronic.

I wish I had any kind of musical skills, even just barely enough to make placeholder programmer-music.
Replies: >>1314
Technoir.webm
[Hide] (202.7KB, 300x200, 00:15)
Here's a clip from a Perturbator song and slowed down. Too electronic for my taste but the overall mood is somewhat there.
Replies: >>1315
>>1312
https://www.youtube.com/watch?v=mTLunRuCGQQ
https://www.youtube.com/watch?v=wyA8lD58_V4
https://www.youtube.com/watch?v=wcaZcbain2s
b5e56c6efb5854f5b2ba045af8f8b54ca30c9c59f0b753ff64e7409601e6f0c2.mp3
[Hide] (3.1MB, 02:13)
>>1313
Uploading an audio file.
text_search.webm
[Hide] (1.2MB, 1800x900, 00:19)
Not sure if this counts as gamedev, but I got tired of my shitty text search solution for modding purposes, so I made my own.

Webm is me searching for "tracer" from Anomaly config folders. Left click opens the position of the match in my text editor, and right click opens the folder where the file is in. I'm thinking of adding a real-time search so you can type into a text box and the results update automatically, but I don't need it so I'm not motivated.

My goal was to make all bullets show a tracer because in the vanilla Stalker games your bullets are visible and I always thought it was cool to see your bullets curve through the air, especially at long ranges. In Anomaly there's like 4/5 chance for your bullets to be invisible and 1/5 chance for them to show a colorful tracer. I can't find what's making it only show up ever now and then though.
Replies: >>1318
tracers.mp4
[Hide] (3MB, 1920x1080, 00:14)
Nevermind I'm fucking retarded. It's the "1to4_tracer" property, for some reason I thought it was something else, but when I vocalized the 4/5 chance for bullets to be invisible I was like "wait a sec". I don't understand why it's enabled for all ammo types though.
Replies: >>1319
>>1316
That's a very cool tool anon, I don't think I've seen anything like it before.
>>1317
silenced vintar my beloved
I wish GPUs were just hugely parallel CPUs. Like you give it a program and it just runs it with 1000 threads and everything is on 512-bit SIMD registers. None of this vertex/fragment/compute shader shit or graphics APIs. I think graphics programming would be a lot more fun that way.
Replies: >>1322
>>1321
Isn't that what CUDA & OpenCL are?
Replies: >>1323
>>1322
Kind of, but I want the whole GPU to be dedicated and optimized for it, so you're meant to do everything from start to finish however you want using the exact same thing. And as far as I know compute shaders still require you to do things through a graphics API which both complicates and limits what you can do.
Replies: >>1324
>>1323
Do you even need it? Its "I am going to run pathfinding from the gpu and have billion units" isnt it?
Replies: >>1325
>>1324
A noble goal. Everyone should have a billion units.
mod.png
[Hide] (71.9KB, 910x853)
I spent a whole day trying to add an image to the HUD on Anomaly, and I got so frustrated by how difficult it was that I started experimenting with a modding system that I might theoretically use for my own game. If you add a folder with C source code files into my game's /mods folder, my program will compile it into a .dll with TCC and get some functions from it.

I've thought about how to make C-style programming less dangerous (so someone can't just put malware into their mod). I don't care about crashes, but I am concerned about intentionally malicious code that would attempt to modify files or use system calls.

To start with I'll need to make my own parser for C (or maybe my own language that transpiles into C) so I can validate everything, I've wanted to do that for a long time anyway. The first line of defense is to forbid extrenal files and function calls, you can only import a file that's in your own mod folder, and only call functions from your own files or the API that my game provides. You could hypothetically still mess up data and function pointers though, you may be able to somehow switch a function pointer into a pointer to a system call, or screw up my program's variables in a bad way. I don't know how practical it is to do that though, if you need to modify buffers randomly and the mod crashes 99% of the time due to screwing things up, it would just be labeled shit and probably unable to cause any harm. I wish I was more knowledgeable about how programs work.

>use a scripting language
No.
ClipboardImage.png
[Hide] (289.6KB, 680x649)
>>1326
Why not make your own OS while at it?
>>1326
After rolling this thought around a bit more, I realized one potential problem: cross-mod compatibility.

Using Anomaly as an example, if you add a new weapon into the game, you might want to add compatibility with the MagsRedux mod (which adds escape from tarkov-style magazines to weapons). You'd need to be able to check if that mod is enabled at compile-time, because if you try to use some struct/type from MagsRedux but that mod is NOT installed, then there will be a compilation error.

You could probably kinda sorta work around to it with some kind of callbacks that the main game orchestrates, but it would be much better to add a custom compile-time #ifdef, something like this:
#if_mod_is_enabled("MagsRedux");
	#mod_import("MagsRedux/main.c") MagsRedux;
	
	void update_mags () {
		// something
		MagsRedux.foo();
	}
	
	MagsRedux.Thing my_custom_mags_thing = {};
#endif;

void update_something () {
	something();
	whatever();
	
	#if_mod_is_enabled("MagsRedux");
		my_custom_mags_thing.x = 123;
		update_mags();
	#endif;
}
Replies: >>1329
>>1326
>>1328
What about a VM-based language like QuakeC? There's even a standalone implementation: https://github.com/erysdren/QCVM
Replies: >>1330
>>1329
All it says is that it's a "QuakeC virtual machine" which doesn't tell me enough about it. What does it do, what is it's purpose and goal, how does it accomplish what it's trying to accomplish, nothing is stated about it.

I'd love to learn how to put code into a sandbox or virtual machine myself though, so I might look at the code when I'm less burned out from looking at other people's code. You can configure some kind of security settings when you start a new process, one option I was going to look at is putting all the mods together, compiling them into a single program, and running that as a separate process.
Replies: >>1331
>>1330
>All it says is that it's a "QuakeC virtual machine" which doesn't tell me enough about it. What does it do, what is it's purpose and goal
QuakeC is the programming language created by John Carmack for the original Quake. It compiles to a platform neutral bytecode which is loaded by Quake (or other compatible engines) into a virtual machine to control gameplay logic. The original spec for QuakeC was quite limited, lacking features like file handling, whereas forks of Quake like FTEQW include additional opcodes to greatly extend functionality. This is the benefit of using a VM, since you can support (or not support) as many features as you want for your mod sandbox.
1620488603947.png
[Hide] (7.9KB, 307x339)
>today I will start a project and NOT overcomplicate it so I can make progress without getting burned out
>I'll do a cult sim where you herd little cultists
>let me just look at Rimworld for inspiration for the UI...
>actually I completely lost interest in cult sim when I look at all the building stuff in Rimworld, I should make a cultist colony sim, that seems more fun
>wait that's too complicated, I will not fall for this again
>maybe I'll just take one part and make a game for that, I should make a machine building game where you need to generate power and connect wires to things and stuff
>all I need is to build a complicated logic wiring system
>mfw
How do I come up with a simple project that I won't think is boring? This is the curse that prevents me from ever making anything.
Replies: >>1333 >>1334 >>1343
>>1332
Everything is more complicated than it seems, and sandboxes are notorious for it. Just start with simple engine stuff, visuals. Whatever you do its still 2d/isometric, and you will need code for stuff like npc/actors, animations, rendering etc. 
And meanwhile work on design document, on stuff you want in the game, and what you will require, and how it will interact with each other.
>>1332
start with smaller games (as in pong, snake, asteroids small) and work your way up to progessively bigger projects. you'll learn good ways of doing complicated methods that way so they're not harder later on.
ZS_loot.png
[Hide] (16.5KB, 548x337)
In an open world human-vs-human looter shooter type game, there's a problem where if you kill a high tier enemy, you instantly get high tier equipment from them. How could you "fix" that so that it's harder to progress in the game?

Some games like Elder Scrolls have dynamic difficulty, so enemies will never have gear that's much better than yours in the first place, but that's kind of stupid and enforces a certain kind of world design. You can never get high level loot from killing high level enemies since those enemies don't exist until you level up (although the levelup-based enemy strength wouldn't necessarily allow that anyway, which is stupid in it's own way).
In Stalker, enemies don't drop armor but they do drop weapons, so when any NPC walks into a campfire or dies for whatever reason, you can just pick up a fee weapon from them, so you never need to buy weapons.
In Stalker Anomaly, enemy equipment always drops in shit condition so they're completely useless, but the items also have parts inside of them with their own durabilities and you can grab good durability inner components from broken items, but the whole system is pretty pointless. There's ways to tweak it with mods, but you're always trading off one downside for another.
ZERO Sievert is similar to Stalker except enemy weapons drop at random durability, and again there's never a reason to buy a weapon in that game. Armor seems to drop at the actual durability of that armor, but it gets shredded so quickly that by the time you kill an enemy their armor will be at 0% durability and useless, I can't remember if it's cheaper to repair one of those or to buy a new one.
MMOs make loot drops rare and often disconnected from what the enemy is equipping.
Escape from Tarkov just gives you 1:1 everything the enemy had, but it's a multiplayer game where you can die at the drop of a hat and you drop everything on death so it works out very differently.

Here's the ideas I currently have:
1. Equipment dropped by enemies are "locked", which prevents you from repairing or modifying them. You can use it for it's remaining durability, but you have to pay a mechanic or use a rare item to unlock it if you want to repair and use it long-term or put a scope on a weapon or whatever.
2. Same as above except design the whole game around this: You can't repair equipment in the first place and have to grab whatever you can. This is kinda how Stalker SoC works, but the item durability should reduce much faster, and maybe items bought from a shop have 4x durability or some kind of small buff compared to items dropped by enemies so there would still be a reason to buy items.
3. Items can only be repaired by combining 2 of the same item. This way even if enemies drop their stuff at 20% durability, you can combine 5 of them for a 100% durability one.
4. Enemy equipment are made of multiple parts and each part has it's own durability, the sum of all the parts is the item's total durability. The parts are usually broken, but if you find a high durability version of each part, you can put together a proper item. This lets you loot the equipment that the enemy used, but you need to work harder to get properly usable equipment for yourself, can't just luck/cheese your way into a high tier weapon or anything.
5. High level human enemies are deep in high level areas full of high level non-humans, so the humans with loot are hard to reach in the first place if you have low level gear. This would be pretty hard to design for.

Also should there be a second thread for generic gamedev musings like this? This isn't exactly progress but I don't know where else to post.
Replies: >>1336 >>1338
>>1335
Interesting ideas anon, the player becoming unstoppable too early is definitely a tricky issue to solve. Approach 5 sounds like one of the better options, since nerfing or restricting loot for balance can often feel artificial. Also, from a replayability perspective making great gear available but difficult to acquire rewards a returning player's knowledge of the game, allowing them to get off to a stronger start than a new player would (this is the case in games such as Morrowind for example).
>Also should there be a second thread for generic gamedev musings like this?
Not necessarily, making plans is part of the process and this board doesn't get flooded with activity anyway.
Replies: >>1337
>>1336
Approach 5 is the one with the most challenges I think. You'd need a lot of empty room between map "tiers" so the player can't just slip through one spot to get the high level loot, and it's harder to create a smooth gradual progression of power rather than 2 or 3 big tier jumps. It's very limiting for world design. Also random enemy wandering behavior would create gaps that the player can go though, so you would have to make the world more static and less emergent/replayable if you want them to reliably block the player's path.

Even if you play with self-imposed limitations, it's still very hard to resist taking certain opportunities that you come across. I prefer a solution where you have to consistently demonstrate the ability to fight against higher tiers of enemies, and can't just skip to it with some trick that you saw in a youtube video by loading a savegame a few times when you fail.
>>1335
Better equipment is a reward. 2,3,4 is turning something fun into something tedious. Just use different ammo types, people figured it out since doom. And balance around impracticability. A weapon can zap someone instantly, but it also can ricochet into player, or anything with a heavy weapon. 
Or mundane-fancy weapons. Mundane weapons always do the job, but fancy weapons require playing around their negative sides. No energy weapons during rain. No high explosive weapons inside. No drone weapons when its windy. Self charging energy gun, but recharge takes a few minutes. Super piercer rounds, which can kill anything when you hit vitals, but will deal next to none damage, with normal hits.
Replies: >>1339
>>1338
That sounds unrelated to the problem.
features.png
[Hide] (50.6KB, 1346x878)
Just heard of an interesting game design idea from Jonathan Blow's Braid anniversary podcast.

Make a matrix of all the things in your game, and think about what the interaction between those things are, and whether there's something more that could be added. Pic related, I made a crappy example from Mario. Blue slots are places where you could potentially add new interactions with, for example piranha plant could eat the mushroom, so maybe you'd have to reach the mushroom fast enough in some situations. Or maybe mushroom/goomba can go down pipes. Maybe fireball velocity changes when it bounces on a moving platform.

You could also use it for story writing. For example put all the factions/races into the matrix and write down what they think of each other or how they interact. If there's empty slots, then there's a hole in your lore. In this case you could do both sides, what faction X thinks about faction Y is not the same as what Y thinks about X (for example X looks up to and depends on Y, while Y thinks of X as subhumans but exploit them as useful tools).
Replies: >>1342
It's probably more useful for sandbox games though, not for something like Mario.
>>1340
I can see this being useful for finding plotholes, thanks for sharing
trees.webm
[Hide] (4.8MB, 1270x710, 00:21)
>>1332
I decided on this project. The mechanics are almost there, if I can get a couple more things in then I think I can just work on this and add new items or quests or something without having to think too hard about it.

I re-organized the codebase and it's a lot more comfortable to work with now, although it's rendered entirely on the CPU so it has shit performance. I'm conflicted about moving this to the GPU, the performance is starting to get bad as I draw more things and it's hard to get the line of sight to be the correct way (it's supposed to draw shadows where you can't see, not blue where you can see), but one of the reasons this project is this far along at all is because I don't have to deal with GPU related problems, I can just draw pixels.

It was kinda confusing to toggle different settings with keyboard shortcuts, so I added a new "chat" feed on the bottom which shows when I toggle something.
I added a shitty FPS counter to the top right, I was too tired to finish it yesterday so the number is fucked sometimes. The yellow line shows frame time (higher = worse FPS).
I added trees and implemented "wall segments" that rotate to point towards you. I could create a circle of wall segments or a rectangle around trees, but I want to minimize the performance cost of the line of sight system. A circle/rectangle would also let you see into all directions when you go on top of the tree, but if I really want that then I can just disable the tree segment when you're close to it.
Not visible in the picture, but I gave objects and wall segments a height, so now I can make things like sandbags that you can crouch behind.
Replies: >>1344 >>1397
>>1343
Good start anon.
>it's rendered entirely on the CPU so it has shit performance.
What are you using under the hood?
Replies: >>1345
>>1344
This project is from like a year ago so I didn't do much yet. Next to-do is UI and inventory, drawing a UI on top of the game will probably kill the performance even more.

>What are you using under the hood?
Windows API. I use STB libraries for loading images and text, but for graphics I just write pixels into a big array and tell Windows to put it onto my window. Like this:
[code]C
#pragma pack(push, 1)
typedef struct {
	u8 r;   u8 g;   u8 b;   u8 a;
} Rgba8;
#pragma pack(pop)

typedef struct {
	Vec2i size;
	Rgba8* data;
	int datasize; // Bytes allocated in .data
} Image;

inline void draw_pixel (Image* img, Vec2i pos, Rgba8 color) {
	if (pos.x < 0 || pos.y < 0 || pos.x >= img->size.w || pos.y >= img->size.h) return;
	
	Rgba8* dest = img->data + (img->size.w * pos.y) + pos.x;
	*dest = color;
}

void show_image_on_window (Os_window* window, Image* img) {
	BITMAPINFO bitmap_info = {
		.bmiHeader = {
			.biSize = sizeof(BITMAPINFOHEADER),
			.biWidth = img->size.w,
			.biHeight = -img->size.h, // Positive value = bottom-up pixel order, negative value = top-down pixel order
			.biPlanes = 1,
			.biBitCount = 32,
			.biCompression = BI_RGB,
		}
	};
	
	StretchDIBits(
		GetDC(window->win_window_handle), // HWND win_window_handle
		0, 0, window->inner_bounds.w, window->inner_bounds.h,
		0, 0, img->size.w, img->size.h,
		img->data,
		&bitmap_info,
		DIB_RGB_COLORS,
		SRCCOPY
	);
}
[/code]
+ a bunch of optimized functions for drawing various shapes and changing RGBA to BGRA (because Windows wants pixels in that order) and doing transparency blending etc.
Replies: >>1347
I don't know why I was so confident that [code] tags would exist. Shame on me for not checking the FAQ this time.
>>1345
You have to use win api as a punishment for your sins, or just as exercise? If exercise, you probably should use indexed palette colors instead of 8888rbga. And hey, you can reverse usual rendering order, and just render things "closest to camera" first, and later check if these bytes in buffer are empty, it would be funny. 

But on serious note, just use sdl2, its way easier. And if you against using it, you can just prerender bigger elements of the map, like floors, into a bigger pre-rendered chunks, it will be useful, even if you switch to something else, since batching is important. And code for creating rendering order, for more complex scenes.
Replies: >>1348
>>1347
>punishment
Not dealing with someone else's extra API layers is the equivalent of me sitting in bahamas in the beach drinking coctails while a big tit anime girl massages my feet. This is how I maximize my programming enjoyment.
Replies: >>1349
>>1348
You realize that win api is api, right?
Replies: >>1350
>>1349
Just because you like SDL doesn't mean I do.
inventory.webm
[Hide] (386.3KB, 460x440, 00:22)
Implemented items and inventories. Inventories can have multiple separated sections, for example the big grid and the 3 2x3 grids below it are part of the same storage container.

Inventory cells can be broken so an item can't overlap the broken part. When for example a backpack's durability gets low, it will start gaining broken sections, which makes it harder to store large items. If an item was already where the broken part appears, then the item can be left there, but you can't pick it up and place it back where it was. Can't rotate items yet, mostly because I don't have a way to draw rotated sprites.

Next to-do is adding items and inventories into the world.
Replies: >>1354 >>1355
>>1353
Damaged inventory slots is such a cool idea, great stuff anon!
Replies: >>1355
>>1353
Cool. 
>cant draw rotated sprites
Just pre-rotate them. 
>>1354
What is so cool about it?
Replies: >>1356 >>1357 >>1358
>>1355
He's being sarcastic. No one enjoys limited inventory slots or durability mechanics.
Replies: >>1357 >>1358
>>1355
>Just pre-rotate them.
I thought about that (for in-world objects), but I anticipate switching to a proper renderer eventually which will give me rotation for free, so I don't want to put effort into some weird workaround.

>>1356
People don't enjoy mechanics that add nothing to the game or that are over-tuned, for example a stamina mechanic adds nothing good to 90% of the games that have one and the game would be better without it. If you project this damaged inventory mechanic into some other game then it probably wouldn't be fun, because this mechanic wasn't designed to complement that game, it was designed to complement this game.
>>1355
>>1356
It's cool because it creates both consequences and emergent situations for the player. If the player doesn't (or can't) maintain their storage then eventually they will end up in a situation where they find something they really need and have to decide what to leave behind to carry it. It's fun in the same way Resident Evil's limited inventory forces you to strategize and plan ahead except now that limitation is dynamic and a direct result of the player's actions.
Replies: >>1369
20240518_2.mp4
[Hide] (26.3MB, 960x540, 00:35)
20240518_1.mp4
[Hide] (6.9MB, 960x540, 00:36)
20240517_1.mp4
[Hide] (8.4MB, 960x540, 00:33)
Spent some time over the last month following a course in making a software renderer from scratch. From loading an OBJ file, going through model -> world -> camera space, clipping triangles against view frustum, triangulating clipped polygons, projecting, triangle filling with z-buffer and perspective corrected texture mapping.  Was a lot of fun.
Replies: >>1360
agdg_box.gif
[Hide] (1.1MB, 450x450)
>>1359
Awesome, I've been wanting to try that myself, mostly because it seems like a great learning exercise. I made a simple 3D line renderer before, but it's literally just rotating/moving points and drawing lines between them so it's not really a proper renderer. I did it without matrices so I learned a bunch about how vector transformations work though.

>triangulating clipped polygons
I've never heard of that before, where did you get that from?
Replies: >>1361
ClipboardImage.png
[Hide] (27.1KB, 713x783)
>>1360
>I've never heard of that before, where did you get that from?
Was just part of the clipping section, it's very simple since it only needs to work on convex polygons. Just makes them into a fan of triangles, since the pipeline only deals with triangles.
Replies: >>1362 >>1363
>>1361
>it's very simple
And totally unnecessary, unless you have triangles so huge that you run into float precision issues or you convert your coordinates to fixed point and run out of bits.
Replies: >>1366
>>1361
>part of the clipping section
You're following a book or a course or something? I'm confused because I've never heard of GPUs doing this and I can only see it being useful for optimizing software rendering, but software rendering is only done as an exercise these days so I'm not sure why someone would teach it.
Replies: >>1364 >>1365 >>1366
>>1363
GPUs do, but rarely (rasterizers generally work with fixed point, and so if the float->fix point conversion of the coordinates would overflow, they'll have to do it. But you need huge triangles for that, like sky boxes or a real closeup) Otherwise they just clip the bounding box of the triangle to the viewport.
>>1363
I think it was useful before gpu were a thing. 
>why someone would teach it
Principles stay the same. All of it is just vector math, geometry and general computer science. Understanding of low level operations are important, but it might be a waste of time for most of programmers, since specific knowledge is very outdated.
ClipboardImage.png
[Hide] (129.1KB, 1276x409)
>>1362
>And totally unnecessary
It needs to at least be done against near and far planes to avoid things exploding, and beyond that it still makes life easier to not need to constantly check about writing outside frame buffer, keeping triangle bounding box within screen pixels, etc.

>>1363
Yeah, it was a course. GPUs still do clipping, but they do it in clip space at a different point than in where I'm doing it.
Replies: >>1367 >>1368
the_more_you_knowa.gif
[Hide] (1.5MB, 478x354)
>>1366
I thought GPUs just discard fragment clusters that are out of screen rather than modifying triangles.
>>1366
>need to constantly check about writing outside frame buffer
You're not trying to implement some kind of scanline rasterizer, right?
>>1358
>direct result of the player's actions.
Are you punishing players for playing badly when they need all the help they can get?
Replies: >>1370
>>1369
Anon's game seems to be survival oriented hence the durability system, I think introducing plausible complications like that help to invest the player in the world, since their character is more integrated into the simulation and not just an all powerful being playing by different rules.
Replies: >>1372
f8a4881924bc3581eb0e81a96049cd96854f190fd3cb453760e43180879487b4.gif
[Hide] (738.8KB, 640x640)
>>1370
>game seems to be survival oriented
It will be, but you won't build a base in the world like in most "survival games", you go in and out of maps. The key word for this game is "scavenging", you're supposed to always be short on resources and scavenge through places for anything you can make use of.

Games with carry limits seem to have these weird deeply entrenched habits to punish the player for looting (reducing speed or increasing stamina drain depending on how much stuff you have), and reward the player for doing something very tedious and annoying (you can carry extra loot by moving slowly while over-encumbered). Some games even reduce your carry capacity if you get hungry/hurt, so you'll have to drop stuff that you already previously looted, very very annoying.

I wanted to avoid all these problems so I decided that "inventory tetris" should be the only mechanic that limits what you can carry and how, and you should never have to drop what you already picked up. The purpose of backpack degradation (besides being consistent with other equipment degrading) is to give you a reason to always look for new backpacks and repair tools to loot, broken connections was the most interesting and least annoying way I could come up with to make you care about your backpack's durability. You might even want to switch to another broken ass backpack similar to what you already have if it has a more convenient configuration of broken slots.

Hunger is also often annoying and badly designed. I haven't played Valheim, but it looks like one of the most unique hunger systems I've seen. In it you can stack 3 different buffs by eating 3 different foods, which then determines your max HP and stamina. The buff strength/duration depends on the food so there's a reason to upgrade your foods. I don't think it would fit my game and I'm in general not a fan of X minute timers. I plan to add both hunger and thirst because foods are some of the most reliable and useful items to keep you looting. I'm not sure exactly how they should work though, I have some ideas but they're just tweaks to a normal hunger bar rather than anything particularly creative. I want to avoid foods giving stat buffs since I want to avoid player mechanics changing arbitrarily, I want equipped items to be the primary source of stat changes. I also don't plan to have anything like a stamina mechanic.
e9c0341760eeb5fd64eda2b61364b9b949bc581e.jpg
[Hide] (958.3KB, 1479x1757)
2d5e6cf4d59a6fbef417bd0a29d9d1baf4cb49dc.jpg
[Hide] (853.5KB, 1305x1550)
831e87d99dd0dfdec1463d2dc381af61f0f1cb8e.jpg
[Hide] (916.3KB, 1479x1757)
I was going to make a thread for non-progress posting but thread creation is disabled so I'm posting here.

I saw these in Project Zomboid blog and found it pretty inspiring. Shows that you don't need to do everything perfectly right away, you can always go back to improve things later.
Replies: >>1374
fcf3360973bf18397e075fa4de28becd032024c6e0c92a1601843190275381ee.jpg
[Hide] (33.3KB, 571x493)
>>1373
>thread creation is disabled
I didn't think I'd fucked up this badly. Try now.
Replies: >>1376
>>1374
It has happened so many times in different imageboards that I don't even question it anymore, maybe it's because of a spammer or whatever, maybe I'm just unlucky.
w.png
[Hide] (275.9KB, 1232x592)
>try to get a random number that's either 0 or 1
>somehow always get 1
Turns out my random integer generator always returns an odd number, so random()%2 will always result in 1. I've used this randomizer forever without realizing it.

I've been thinking about how to structure my world and data. I originally wanted walls to fill an entire "tile" just to make things simpler and clearer, the main advantage is that when your FOV is behind the walls and they become transparent, there's no ambiguity about where the walls are since you can see a black "void" on the ground. But when I look at Project Zomboid, I start wanting things like fences and diagonal walls and decorative "pillars" at the corners of tiles, which are hard to do with the way I'm currently handling tiles. Full-tile walls also make things like doors and windows slightly awkward since your FOV through them becomes quite narrow.

In terms of data, there's all kinds of questions, like should each map tile have 6 slots for each possible wall position (4 edges + 2 diagonals) and 4 more slots for corner decorations, should adjacent tiles share the wall between them or should both have their own (so you could for example put a brick wall on the outside and a wallpaper on the inside), maybe walls should be centered on tiles instead of being at the edges so you only need 1 "slot" for the wall (although that would complicate floor tiles since the floor tile would be detached from the wall), should walls even be part of the world's tile "grid" or should they be more like "entities" so you can overlap as many walls as you want or put them at arbitrary angles/positions.

I also realized that increasing the map size to 1000x1000 made the number of trees jump up to ~40000, so that made me wonder how to store objects in the world. I thought that to keep things simple, all the objects could just be in an array, but 40k is more than I expected just for trees and I'd rather not loop through that many every time I want to check for collision or whatever. I need to split the map into a grid after all, but should the tiles be in a grid too? I dislike the extra complexity that happens when you want to interact with a tile and now you need to transform the coordinates and find the appropriate chunk and shit first. The map grid is itself kind of self-partitioning; you don't need to loop through all tiles to find a tile at a particular position, you just jump to the x/y tile position. So maybe only objects need to be organized into chunks.

There's still a question though; should trees be objects, or should the map grid have a slots for some kind of furniture objects? I also want to put items and various decorative things and crap into the world, should they be positioned freely or be attached to the grid? What if you drop a bunch of items into the same spot, I can't put an infinite amount of item slots into each tile in the map grid so maybe they SHOULD be objects rather than being in the tile grid. Should all objects be just objects, or should there be a differentiation between a "free" object and an object that's on a tile, or should the map grid only have floor and wall information? Also should I combine living entities like NPCs and objects like trees into one uniform "entity" object to make things simpler? At the moment the only reason I see to keep objects and NPCs separate is that I won't have to loop through every object in the game just to simulate NPC AI. But then again maybe I can keep a some kind of separate list of pointers that points to all the objects that have AI, I want NPCs to move around when they're at the other side of the map after all...

Another way to potentially organize things (as opposed to sorting objects into a grid of chunks) is to have an initial step at the start of a frame or even periodically where you collect all the objects and entities that are close enough to the player to be worth considering.

My current coordinate system is rotated 45 degrees because it's just more convenient when the map is a linear grid, but that makes it harder to loop through only the area that is visible on screen. If you loop through a square area, it's shaped like a diamond on-screen. So I'm also wondering if I should change that somehow, but then I can no longer use axis-aligned bounding boxes as easily and it'll be more annoying to check adjacent tiles. But if I want diagonal walls, I'll have to do diagonal collisions anyway, so maybe it's ok.

There's so many possible ways to do things, I don't usually struggle with analysis paralysis like this.

On another topic I experimented with save games. I came up with a neat way to store custom item types, the file stores text IDs for all the items/objects/tiles/etc that are currently registered, and then tries to translate them when you load the file. It can detect if a previously known item type is missing and such. I wonder what's the best way to be modding friendly with custom data, like how can mods store their own data into tiles and items and entities? Maybe the default save game data just is what it is, and mods have to save/load their own section in the file and figure it out on their own. Like they can save an array that has an item ID and then some custom property for it.
Replies: >>1392
sort.png
[Hide] (4.8KB, 393x345)
There's also this problem, and I'm not sure how to solve it. Sorting objects by Y position is easy, but where do walls go in that equation? Currently I'm just always drawing objects in front of walls which is obviously incorrect.

I'm considering 3D for various reasons including this and player animations. Depth buffer in 3D would kinda solve this, but a depth buffer doesn't work with semi-transparent objects. I'm currently lowering the opacity of walls that you can see behind, and objects that are not fully in field of view.
Replies: >>1389
sort2.png
[Hide] (7.3KB, 554x499)
z_solution.png
[Hide] (129.9KB, 1135x690)
>>1388
And actually that image doesn't even fully communicate why it's so complicated. Here's a better one. This tree should be in front of all the wall segments even though it's higher than some of them. You can't loop through he walls diagonally because then the walls in the other diagonal will break.

To be fair, 3D and depth buffer wouldn't even solve this one unless you draw sprites in 2 halves in a weird V shape to trick the depth buffer.

There's a few solutions I can see:
1. go full 3D, too much effort for me
2. have an artistic rule that limits sprite sizes so the problem is less likely to appear, this would conflict with some plans I had
3. have huge hitboxes that prevents objects from being too close to walls, might be problematic
4. crop the sprites in real-time so that you draw it in multiple vertical stripes that never cross tile boundaries

I'll probably end up doing #4, I've done it before for a similar problem in another project.
Replies: >>1392 >>1421
ClipboardImage.png
[Hide] (14.5KB, 664x241)
>>1389
Layers or rendering with buffer lists, which fill with items you want to render each frame. You can make "a camera distance" thing, which is a pain in the ass to do, really. You will hit "how do I light things" problem too. 
>tree is higher even when its behind
Yeah, I though about that exact problem, and its just not worth to make a perfect solution. Modern gpu can overdraw sprites faster than CPU can check whenever something can be seen at all, and checking gets really fucking complicated. 
>>1387
I have same exact problems. Most of them were solved in diablo http://paul.siramy.free.fr/_divers/dt1_doc/
>collision
Your stuff seems simple enough, so collision can be tile based, anything in tile[1,2] just makes it impassible. And you can make walls 1 tile wide, so you never have a problem with them, just as the most easy solution, since you never need to loop through. Splitting world into chunks is a better solution, however you should check if its even necessary.
>If you loop through a square area, it's shaped like a diamond on-screen
It doesnt matter since PC are powerful enough to waste processing power on a just a few additional tiles. Or you can just premade a list x[1][2]...x[32][32], with every visible tile position, so you never go through i=1<64, and instead just go through a premade list, like in a link I posted. 
>storing items
I figured out I will use "binary" tree (changed to flags later but whatever). Each item is basically however many properties it can have, stored as binary, plus an array of additional properties (when applicable). Mostly for fair item generation. So I can generate items as a simple integer numbers. 
First few bits would be a type of item, for example which slot it is, so I can dedicate 5 bits to have up to main 32 item types, for equipment, consumables, keys, whatever. Than a few bits will dictate subtype, than a few bits will dictate any number of additional properties, and than last few bits will correlate to whenever it has additional special properties for the array. You can use first of these array slots to store mod info. 64 bits + arrays should be enough for all of my needs. 
>>1389
>crop sprites
You assuming that doing all these manipulations will be more efficient, than simply rendering them on top of each other. 
Honestly, you doing a lot of things wrong. You use standard isometric tiles, while you dont have to. They were used, because they were literally pixel perfect, no wasted data, and had no "empty corners". Your tiles are square anyway, so each pixel has 2 tiles on top of each other anyway, even if they are empty/transparent. If you really wanted to optimize, you would copy what diablo did, and use your own image format, with a palette attached, but it would be still extremely inefficient compared to using gpu for it.
You can look at factorio blog, they do exactly this kind of stuff.
Replies: >>1393
accuracy.gif
[Hide] (1.5MB, 731x460)
>>1392
>"how do I light things" problem
Lighting is easy unless it ends up looking ugly and I want to change it: I plan to store the light level into tiles, then objects can just pick the light from the tile they're on, and walls from in front of them.

>diamond on-screen
>It doesnt matter since PC are powerful enough
A diamond is around 2x the amount of tiles, I'm more concerned about cost added to the field-of-view system. Each tile and entity has to test their coverage with the FOV triangle fan multiple times per frame, and tiles/objects may add new wall segments which increases the overall complexity of the whole process. I haven't benchmarked it or anything but it feels like a lot of calculations and sorting and such is going through all the points and segments every frame.

Anyway, after sleeping I realize the tiles on screen can be looped through very easily. I'm pretty sure there's a simple and efficient way to check for collision with a rotated rectangle too, to check if objects are on-screen, but I haven't done that kind of thing enough to tell off the top of my head how. I think you just rotate/skew a vector, and then any position you multiply with it becomes axis aligned with the rectangle (which must also be rotated).

>You assuming that doing all these manipulations will be more efficient, than simply rendering them on top of each other.
Cropping sprites into vertical slices is not about efficiency, it's just a simple solution to the layering problem. Pic related shows better how it works, you just start from the center of the tile that the sprite is on, and loop to the sides in half-tile increments while increasing the Z depth. It works slightly differently for this project though because the problem is walls rather than raised ground tiles, so you would decrease the depth rather than increasing it. It doesn't work with rotation though, don't know if that will be a problem but I don't anticipate rotating anything bigger than particles/projectiles.

>your own image format
That's way too much effort since image editors have 0 support for attaching data to images in any way whatsoever. That said, I'm already considering making my own image editor just so I can identify where sprites are in a spritesheet without having to type the numbers somewhere by hand. I wonder how hard it would be to make that kind of plugin for Krita.

>dedicate 5 bits to have up to main 32 item types
Personally I don't go far enough to have sub-byte integers. I like to be conservative with numbers so mods have room to expand things, and so I won't have to refactor anything if I want to add more things than I expected. I'd probably start doing that if I made a game with a 3D voxel world since the number of voxels would be massive. I have a plan that would allow mods to add arbitrary amount of custom data to anything.
Replies: >>1396 >>1421
xjzqw0b1.png
[Hide] (2.5KB, 245x333)
I just realized that the sprite cropping won't work if something is behind a wall, I was too fixated on fixing the "sprite in front of wall" problem. Pic related is what would happen. I think the reason this method worked for the other project is that everything was properly isometric and physically tied to the world grid, the whole design of this system was based on that premise. For example this tree would be big enough to occupy a 2x2 or 3x3 area in the world, so it could never be positioned in a way to cause a problem. Maybe I can just adjust the collision boxes so objects can't be too close to a wall, I'll have to experiment...
Replies: >>1395
tree_2.0.png
[Hide] (7.4KB, 296x330)
>>1394
So basically a tree would have to be like this (cyan is the "hitbox"), drawn in 3 or 4 vertical slices.
Replies: >>1396
>>1395
It is the common solution for many reasons. 
>lighting
>fow
The same thing, really. And pathfinding, if you think about it. If you worry about efficiency, you can just scale up walkable grid, so its closer to tile size. (Or just up to tile size, in which case you can use precalculated binary fow cones)  Assuming its even a problem to begin with. Its like you making a game for old 16 bit machine with a tiny instruction set, or something. 
>>1393
>I like to be conservative with numbers
What do you mean? I plan to use single ID variable, to store as much info as I can inside of it. And you wondered how to handle save files. And I am not planning to create 5 bit variables, I am just using standard types as bitflags, to store binary data in them, and have quite a room to expand. 
Lets say its a gun.
First 5 bits tell a main type. So they say its an equipment item, and its a weapon slot and its ranged. Since its equipment, next is subtype, few bits (lets say 5 for 32 types of possible ranged weapons), to say its a handgun. Next will be the exact tier and type, few more bits, lets say 8 bits, for 256 possible types of a handgun. Other stuff, like position, which inventory, stack size, etc, and last 8 bits of variable dictate if there are any additional properties stored somewhere else. Main types can include a few MODDED types. Both completely new, and based off main types. Even with 32 bits variables, there are plenty of space. 
Of course you can just use everything as a bit flag, but its a bit harder to manage. 

>Each tile and entity has to test their coverage with the FOW triangle fan multiple times per frame
Why? Unless you trying to run some sort of simulation with thousands of independent creatures, I dont understand why would you need it? Why would you run its AI more than once per frame, or rather once per pair for that matter? And how many entities you planning to have? Unless you meant per second, which is still not that often. Tank in your image implies a strategy game, but people figured out that you dont really need FOW for strategy games, and no one will notice. Even relatively new warcraft3 didnt have a real fow, they simply used distance, and elevation for it. It just wasnt necessary for simulations.
Replies: >>1397
>>1396
>strategy game
The tank is from an RTS project which was a different game, I just posted it for the vertical slicing/layering technique, I guess I wasn't clear about that. My current project is a real-time shooter. >>1343 The blue area here is the field of view, you can see the NPCs fading in/out when they go into it.
>Why would you run its AI more than once per frame
The AI only runs once, but I'm testing collision with the FOW 9 times per object to get rough coverage, similar to anti-aliasing. If only the corner of an object is visible, the object will be drawn at ~11% opacity.

>lighting
>fow
>The same thing, really.
My FOW is vectorized, but lighting will be tile-based flood fill -style solution that gets written into the map tiles, so it should be completely different. That said, I do want things like flashlights, so I'm not entirely sure how I want to do lighting yet.

>I like to be conservative with numbers
>What do you mean?
My bad, I meant the opposite of conservative. If I want an ID or an enum then I'll just use an entire integer that's definitely big enough, for example if I need 5 bits for an item type then I'd just use a 8-bit int for it. I don't usually try to pack things in a way where I have to use extract values out with a mask. Even when I use bit flags, they're functionally just a bunch of booleans at the top of a struct.

I try to lean heavily towards expandability and not having any limitations, for example I plan to have custom property buffers for items and tiles and everything, which mods can expand to add anything they want into them. If I'm even 1/4 of the way to using all the values of the integer that stores item/tile IDs, then I'll probably switch from 8-bit to 16-bit ints for the IDs.
edgewalls.webm
[Hide] (8.6MB, 1270x710, 00:48)
Managed to change walls from tile-based to tile edge-based. Games like Sims and Zomboid make walls shorter when you can see behind them, I originally didn't like that, but I think it looks pretty good when I draw a semi-transparent wall on top of that (although maybe there's too many different transparency levels everywhere, it looks a bit chaotic at times). I don't want to accidentally shoot at a wall because the game didn't communicate clearly enough that there was one. The walls are too thin now, but there's some problems with drawing walls that are "thick", I'll have to experiment how to draw them well.

Also added diagonal walls while I was at it, but problem is that floor/roof tiles don't work well with them. Rather than adding 3 extra floor and roof slots per map tile just to deal with this, I think I'll just use diagonal walls sparingly. I can use things like diagonal fences since they don't need a floor or a roof, and I can make walls inside buildings diagonal as long as both sides use the same floor type. Entities don't collide with them yet, but bullets do.

Improved building controls with a simple highlight and by toggling walls/roofs depending on what you're building. I don't think I'll have building mechanics in the game, it's just for me for now. I have a dream of making a main "story mode" with a manually designed world, and then providing procedurally generated maps with customizable rules and difficulty as a separate sandbox gamemode for people who have already completed the story mode.
Replies: >>1415
thicker.png
[Hide] (48.8KB, 1354x461)
>>1413
I came up with a different way to draw walls which allows for almost any thickness. There's still a few problems though.
1. Vertical diagonal walls don't connect well to straight walls, and I'm not exactly sure if it's possible to fix that without a whole bunch of extra sprites just for these connections. To be fair this didn't work with the old drawing method either.
2. Some 90 degree corners are beveled instead of sharp (compare the 2 squiggly lines on the center), not a deal breaker but it just looks kinda wrong.
3. Not visible in this pic, but some of the textures overlap at the top, which may make brick-style textures look wrong.
4. There's a visual position error in one the end points (circled with red) due to how the walls are drawn.
5. The hitboxes in general are a bit off depending on wall thickness.

I may be able to tweak the hitboxes later on, but the connection issues are problematic. I can live with #2 and #3, but #1 is way too broken looking. Maybe I just won't have any vertical diagonal walls, it's kinda hard to see doors on them so maybe it's better that way anyway.
Replies: >>1416
fix.png
[Hide] (48.5KB, 425x444)
>>1415
Actually, I had messed up the height of the vertical diagonal wall. It doesn't look too bad now that it's fixed, I may even be able to fill the corner to make it perfect. I don't immediately see how though, I don't want to add 8 corner sprites to fix it.
Replies: >>1417
>>1416
What engine are we dealing with?
Replies: >>1418
longlines.png
[Hide] (234.5KB, 1066x708)
Optimized new wall segments so straight walls only create a single long line. This was way more complicated than the old system because there's so many ways for walls to connect, and the segments should break at every connection point because of how the FOV system works. My text renderer is slow so previously my FPS became unusable when I toggled this view on due to how many tiny wall segments there were, now it's manageable.

Also made a loop that loops through map tiles horizontally in screen-space rather than in a diamond shape. I don't know if this helps with performance, but more importantly it's much easier to draw things in the correct order this way.
// Loops in this kind of order:
// 1   2   3
//   4   5   6
// 7   8   9

Vec2i topleft = screen_pos_to_map_cell_pos(0, 0); // Tile on top left corner of the screen.
topleft.x -= 1; // Offset a little (negative X in world-space goes towards top-left in screen-space) to make sure the entire top/left edges are covered.

int loop_w = div_round_up(window_width, TILE_PX_W) + 2; // +2 = a little extra space to make sure the entire screen is covered.
int loop_h = div_round_up(window_height, TILE_PX_H/2) + 3;
loop_h += div_round_up(300, TILE_PX_H/2); // Go about 300 pixels below the bottom of screen so tall walls will show up.

for (int loop_y=0; loop_y<loop_h; loop_y++) {
	int x = topleft.x + (loop_y)/2;
	int y = topleft.y + (loop_y+1)/2;
	for (int loop_x=0; loop_x<loop_w; loop_x++, x++, y--) {
		Mapcell* cell = get_map_cell(map, x, y);
		if (!cell) continue;
		// Do stuff
	}
}

Maybe I can finally go back to working on interesting things instead of weird technicalities.

>>1417
Just C code.
GOTTA_GO_FAST.webm
[Hide] (1.1MB, 700x500, 00:06)
Not progress: there has been this spastic extra fast NPC for a while now, I've been wondering why he's different but it wasn't important enough to investigate. I just realized that it's because he somehow ended up with the player's entity type, so he has the player's acceleration and max speed.
furniture.png
[Hide] (203.9KB, 856x674)
Implemented proper furniture, I'm calling them "props". Trees used to be entity-style free floating objects, but now they're props which are stored in the map grid. They can have a vision hitbox and bullet hitbox separately, so you could for example shoot through a wooden board but not see through it.

They're drawn with this method >>1389 >>1393 so they layer correctly with walls and other furniture objects, even when the prop is so long that it's impossible to draw it in the correct order. Pic related is some props of different sizes for testing. I was originally planning to flip the sprites with a shader, but I realized that I have to draw a "backwards" sprite anyway (e.g. chair pointing away from camera), and the "light source" is on the right, so I decided it's better to just draw rotated sprites.

Am I spamming this thread? Should I make my own thread so people can hide it if they want?
Replies: >>1422 >>1423 >>1426
>>1421
>Am I spamming this thread?
I'm not even into agdg things but I enjoy watching your work. Keep it going !
>>1421
You're fine. I wish I had something to show but I'm sick.
>>1421
Posting progress? In progress thread? You gone too far, buddy.
Replies: >>1427
rainy.webm
[Hide] (3MB, 760x600, 00:08)
rotation_plan.webm
[Hide] (523.8KB, 700x500, 00:34)
It has been rainy for several days IRL so I added rain. The wind direction and rain amount changes over time, although it doesn't change in any kind of smart way yet.

Also I've had this human sprite lying around since the beginning of this project, I gave him 8 rotations so I don't have to look at the dumb minecraft zombie -looking guy who was supposed to be just for perspective reference. My plan is to eventually slightly rotate the top half of the sprite in a shader to give the impression of smooth rotation without needing extra sprites, not sure how well it'll work but it looks alright when I try it in my image editor.

>>1426
I usually check the overboard when I come to this imageboard, so I thought maybe someone doesn't like constantly seeing my progress posts there.
Replies: >>1428
>>1427
Unless you prerender sprites in blender, it might be way easier to use 3d models for characters. Skeletal animations are way better than making everything by hand.
Replies: >>1429
>>1428
I'll use 3D as a reference to draw over, but I'm far too inexperienced and slow with 3D to make 3D assets, and I especially don't want to implement a 3D skeletal animation system and model loading etc. I don't want to complicate this project more than necessary.
Replies: >>1430
runner.gif
[Hide] (31.3KB, 256x256)
>>1429
Simple animations are incredibly easy to make, takes like 5 minutes. If you have a reference, like colors detail level, and such, and a list of needed animations, I can easily make them. Or I can give you blend file, and you can adjust it yourself, its super easy. 
https://youtu.be/yjjLD3h3yRc
This guy explains it in 20 minutes. Even if you prerender sprites, you probably will save time on animations, but its up to you. 
Nice trees btw.
2024-06-14.webm
[Hide] (5.5MB, 1270x710, 00:53)
Props can now be clicked, and they can have inventories. That prop collision box took me like 5 hours to figure out because I wanted a cheap way out without doing any kind of ray casting or 3D collision boxes, but only afterwards I realized that the same method won't work for clicking NPCs (for trading and looting corpses).

Added a whole bunch of items (absolutely NONE of which I ripped off from ZERO Sievert) to experiment with, some of which can also have inventories. I'm planning to have ~12 ammo "calibers" for different kinds of weapons, you can tell which one it is by the shape/size, and different variations (like subsonic) will be mostly color/texture variations. Each caliber will have different characteristics, for example the long thin one will be silent and have high piercing, but low damage.

Made a tag system to go along with all this. Items can have tags, and inventories can have a whitelist of tags, for example you can only put money and access cards into the wallet. I can also automate/test things more easily, for example all the items with "ammo" tag are currently being automatically added into the ammo box.

Made a half assed animal so I can test looting enemies that don't have "equipment". Entities can't have items yet though, that's why the inventory says "TEMP NAME", it's hard coded to show the first inventory in the game rather than inventories that come from the player's equipment.

I think I need to start loading stuff from some kind of data files, the code for defining all the items is starting to look like a huge mess.
Replies: >>1435
item_stacks.webm
[Hide] (281.2KB, 910x590, 00:21)
Inventory window now shows inventories that come from player's equipped items. I can't scale down the icon well so it looks a bit weird.

Added the ability to split and merge stacks of items. Ctrl-click will pick up or drop half of a stack. When you shift-click an item, it quick transfers it to another inventory, and recursively looks through all the containers within containers for available places to go.
Replies: >>1439
code-based_data_file.png
[Hide] (50.7KB, 1418x372)
>>1433
>I think I need to start loading stuff from some kind of data files
I've been thinking about this and every approach I can think of just seems to have a wardrobe full of downsides. I'm considering just making data files into C source code files. In my head I'm trying to balance performance (I'd like my game to start as instantly as possible), ease of use, moddability, and the amount of effort and bloat required to create a system that parses data files. If I plan to compile C source code files like this >>1326 for mods anyway, then I don't really need to build any extra systems for data files, I can just have a bunch of macros that directly manipulate variables in the game. It would be pretty hard to get faster than that, it would be maximally customizable and moddable since you could just put code in the middle if you want and do advanced things by not using the macros.

Pic related is an example of what a data file could look like. The item() macro creates the item object, and the other commands do all the relevant logic to set values to it. You could create variations of the item() macro so that it overwrites existing items, only sets the values for existing items without creating a new one, etc.

The biggest downside of code-based data files would be that I can't give my own error messages. If some kid wants to add an item and makes a typo, they're going to get a nightmarishly unreadable list of 50 C macro error messages and there's nothing I can do about it.
Oh, another advantage of code data files, this is how I define inventory grids:
.grids={ // width, height, x pixel offset, y pixel offset
	{6, 12,   0,   0},
	{6, 12,   6*CELL_SIZE+GRID_GAP), 0},
}
I can easily do math in the values, or use whatever logic necessary. I don't have to count pixels to position things correctly, if I want to make these grids wider I can just change all the 6's to 7's.
Replies: >>1437
>>1436
>data files
They are hard to make for many reasons, and just using regular C is easier, but you probably want to make a proper API anyway. Just defyning everything in code is way easier and faster on execution. 
> I can't give my own error messages.
You will need a verification stuff anyway, so you might as well make a toolset for it. 
The easiest solution would be open source, like dcss. 

>code
In my (limited) experience, its bad code style. Its almost always better to make functions to do stuff like that, instead of just typing in all of code. 
inventory.expand(6,12,0,0);
inventory.expand(6,12,6*CELLSIZE,0);
	
Directly assigning values to variables can bite you in the ass, if you start manipulating them. And inventory is probably will be heavily accessed by all kinds of functions, resizing, adjusting pixel sizes, scaling etc. You might even need console commands, because adjusting stuff via recompiling code is painful.
Replies: >>1438 >>1439
>>1437
PS. 
And if you think about it, proper console commands might as well be your own language and data format, just like how python apps work.
candy.png
[Hide] (8.8KB, 327x177)
nom.jpg
[Hide] (241.5KB, 800x747)
Behold, the first ever in-game object I've made out of a real-life object. I've had a camera in my closet for years, I just got an SD card reader and put it to use.

I wonder what the legality of using photos of products is, I've been thinking about going around photographing stuff from stores and making item icons this way. I can easily shoop any text and logos out, but I wonder if someone is legally pedantic enough to complain that I'm using the shape or design of their thing. It's almost impossible to tell from this icon, but take for instance the green ammo box (shown here >>1434 ). I took it from a search engine so obviously I don't have any rights to it, but if I had photographed it myself, I wonder if I could get in trouble for it since you can kinda see and possibly recognize the design of that box even though I modified it a bit.

>>1437
>You will need a verification stuff anyway
It's easy to verify data that comes into my system, but I can't take any data if it gets blocked by a compilation error that the compiler spewed out. I guess I can do a hybrid between a code-based data file and a text-based one: my game will take in data files in text format, but then re-formats them as C code files and compiles them. If I have to parse and validate it anyway, it's trivial to then re-format it. That will at least solve any speed concerns and reduce the potential for exploits.

>Its almost always better to make functions to do stuff like that
I'm already doing it. I have a separate simplified version of my game object which I use just to input data, it will then be read and transferred to the actual game data by a create_item(x) -style function. The macros I mentioned would just be the create_item() function except split into many separate parts.

>adjusting stuff via recompiling code is painful
>console commands
My game compiles and starts in 2 seconds so it's not a big deal. I plan to add hot reloading for data files eventually, so the game will just update stuff when I update the data file. I need actual data files first though.
Replies: >>1441
items.png
[Hide] (22.5KB, 353x284)
This is kinda fun.
ea29e8fb2d57aa40418f92c2017966bf26b29456eb726dc567de827cb7a31d6e.jpg
[Hide] (1.5MB, 1830x2930)
>>1439
I want to eat that.
Replies: >>1442 >>1443
>>1441
If you think it looks tasty, you should have seen my spaghetti code.
>>1441
They're like hardened paste that stretches similarly to bubble gum and slowly melts in your mouth. The yellow one tastes like lemons but the other ones are very tasty, they have more of a fresh fruity taste than an overly sweet sugary one.
bars.png
[Hide] (41KB, 504x541)
I spent all day trying to come up with a more interesting design for my stat bars, but ended up going backwards instead of forward. I started with the top left image but didn't like it so I started trying different things, but eventually figured out that the most boring one (bottom image) suits my game best. It looks the least "gamey", least like "a design", it doesn't say anything except what your stats are, which is good because I want the tone of my game to be kind of gritty and grounded.

My original idea was to show a PDA-like medical device which shows your status, but that doesn't work because of how my stats work.
Replies: >>1445
>>1444
GUI is not supposed to be entertainment, its main purpose is to show players necessary data. And they all look identical.
Replies: >>1446
>>1445
>graphics don't matter
Well I disagree.
Replies: >>1448
im_age.png
[Hide] (914.4KB, 2048x2048)
ClipboardImage.png
[Hide] (28.3KB, 219x243)
ClipboardImage.png
[Hide] (329.7KB, 1600x800)
Replies: >>1450
>>1446
GFX should be the last thing you focus on.
Replies: >>1449 >>1451
>>1448
Graphics is not the same as art style, and i think anon knows that too
>last thing you focus on
Wrong, the art style helps a lot with immersion which helps with attachment which helps with a game's subjective longevity
Replies: >>1451 >>1455
asda.png
[Hide] (329.2KB, 2048x2048)
imag_e.png
[Hide] (356.3KB, 2048x2048)
>>1447
Fixed. More or less. Sometimes it refuses to make 4k texture, and only works with 2k, but at least packing side is working seemingly perfectly.
Replies: >>1452
>>1448
The better my game looks, the more exciting and motivating it is for me to work on it, so I disagree again.

>>1449
Graphics is graphics. Your game looking good matters, but there's a lot of different things that can contribute to your game looking good, art is complex so can't really summarize it in a sentence let alone a word. The thing that people most commonly mistake as being important but that isn't is realism. Realism IS an ingredient that you can use to make your game look good, but it's only one of them, and it's restricting because many other good-art-ingredients like exaggerated animations and lighting don't work well with it, and it can easily cause your game to look uninspired and too similar to other games because they're all based on the same thing (reality) rather than each artist's own styles.

You can always make up for bad art with exceptional gameplay, but no matter how good your gameplay is, better graphics will still make your game better. It's a recent-ish trend to make shit games where you put 99% of the effort into art and 1% into gameplay, but thinking that graphics aren't important is an unhelpful and incorrect kneejerk reaction to it.
Replies: >>1455
>>1450
What kind of packing algorithm are you using?
Replies: >>1453
>>1452
https://github.com/juj/RectangleBinPack
MaxRectsBinPack.
NTA, but thanks, Anon! Great algorithm, and good coding as well. Cheers.  :)
>>1449
>>1451
Mario 64 was Mario's model in an empty room for the first year until the movement was perfected. You don't do graphics unless you have an extra set of artists who don't have jobs. Videogames are programming first and art assets later, even if you know what you want it to look like.
Look at the opening post for an example of good project management.
Replies: >>1456 >>1462
>>1455
>but corporations do it differently
>until perfected
>project management
Yeah, it doesnt work like that if you are a single guy doing it as a hobby. Doing same tasks over and over kills motivation.
Replies: >>1457
>>1456
Should have picked a less repetitive hobby then, eh?
But on the other hand, programming is more like a puzzle so your logic fails either way. You do realize you can program the graphics right?
Replies: >>1458
>>1457
Stop wasting time and go back to making your game. Dont return until its "perfected".
Replies: >>1460 >>1463
>>1458
It's not that hard to admit you're wrong about design. You can think about all the lovely images you're going to print but you need to build the canvas first.
Replies: >>1461
>>1460
You already perfected your game? Amazing, where is it?
>>1455
It shouldn't come as a surprise that I am not Nintendo.
>>1458
>Dont return until its "perfected"
You imply as if a movement-focused game focusing on movement is somehow bad.
Replies: >>1464
ClipboardImage.png
[Hide] (109.9KB, 773x1000)
1698489656_new_Project_Zomboid_-_Uncanny_dog.gif
[Hide] (4.6MB, 512x480)
>>1463
No, I imply that you should not give inapplicable advice. Especially if its "you are not real developer, unless you code in assembler, to make sure everything is perfect and 100% optimized". 

Anyway, idea for sprite based character layers and animation. (like legs, torso, hands, weapon, hat, etc are separate layers) Instead of adjusting each animation layers in proper order by hand (which would be around a fucking thousand+ frames for humanoids) I can simply use additional "complete" render. I will just use "do every possible combination of sprite order" and compare it to the complete render, whichever result is the most similar, is the correct one. I can always adjust failed results later.
On related note, it would be way easier in 3d. Everything adds complexity to 2d sprite based animations, and the size becomes unreasonable, and unmanageable. If you want any character customization for main character, consider adding 3d just for him, even if everything else is 2d.
1lQH3Uj.jpg
[Hide] (76.2KB, 288x402)
Anyone knows good apps to visualize stuff? I need stuff to design class hierarchy and make it more understandable. Because my spaghetti is out of control. 
file>surface>texture>source texture atlas>ready to render texture atlas+same atlas but as a surface
And that is without temporary textures and surfaces which pop up here and there, all of them called "temp/tmp/mid/TEMP/_+texture". I am not even sure if I should worry about these, since I usually destroy them immediately, but my naming scheme is terrible, so I am bound to shoot myself with these.
Hierarchy becomes recursive, and that it without taking into account that sometimes I want to save resulting atlas into file. (sdl surface is a texture but stored in ram, not vram) 
So I need a function to render the texture directly, and to put it into atlas, and to "reload" it into atlas from the surface, because sometimes graphic api decides to destroy all textures, for random reason, like resizing window. I kind of understand why a lot of games use "on each new level, destroy everything and reload everything again" approach. 
Maybe I should just split all textures between "temporary" and ready-to-render? 
And the terrible naming, since I have texture_atlas, spritesheet and both mean basically the same thing.
Replies: >>1466 >>1467 >>1470
>>1465
I have nothing but I feel your pain.
>>1465
Have you tried using imagination?
Replies: >>1468
ClipboardImage.png
[Hide] (2.4MB, 2048x2048)
>>1467
Unfortunately, its not a good substitute for discipline and planning.
Replies: >>1469
>>1468
Maybe a notebook then?
Replies: >>1470
>>1465
>app
lol. Listen to this guy >>1469 and bust out a piece of paper and a pencil if you can't keep it straight in your head.
Replies: >>1471
>>1470
And if that turns out to be convoluted, then it's time for refactoring.
Replies: >>1473
ClipboardImage.png
[Hide] (14.3KB, 681x240)
>>1471
>it's time for refactoring
It was the problem. 
I "talked it out" with .txt, so except for some annoying edge cases it should be solid. A lot of problems come from deciding between what is convenient and what is better designed. 
Like how these directions work in diablo2. There are logic between adding more directions, between existing ones, and ease of shift operations, so its very performant. But even if I #define them, I will forget about it, and it will break.
chat.png
[Hide] (250.9KB, 1280x720)
Added the ability to interact with NPCs. I figured out a clever trick to do a simple fake "3D" collision test for this kind of isometric system. The rough idea is to check the bottom and top separately in 2D (you can imagine the the hitbox becoming larger so that it covers both the top and the bottom of the 3D box), and then check if the horizontal position is out of bounds in screen-space  It's too hard to explain so here's the code:
static inline bool point_in_3d_hitbox (Vec2f point, Vec2f pos, Vec2f size, f32 z_height) {
	// Check if out of bounds from the 2D hitbox on the floor (bottom-left or bottom-right on screen-space).
	if (point.x >= pos.x+size.w) return false;
	if (point.y >= pos.y+size.h) return false;
	// Check if out of bounds from the 2D hitbox at the top (top-left or top-right on screen-space).
	if (point.x < pos.x-z_height) return false;
	if (point.y < pos.y-z_height) return false;
	// Check if out of bounds from the sides (left or right in screen-space).
	if (point.x-point.y < (pos.x) - (pos.y+size.h)) return false;
	if (point.x-point.y > (pos.x+size.w) - (pos.y)) return false;
	return true;
}

This NPC window is 100% hard coded, I expanded my text rendering system so I can add various commands in the text for inserting images or changing font style. I also spent a whole day making badge designs for different factions, I have about 180 variations, still temporary though. For now there's 7 factions that I've planned, not counting bandits.

I have no idea how to create a dialogue system. I want to be able to check for arbitrary conditions to change what is said or what options you have, so I may need to do all the dialogue in code. I was originally thinking of making a dialogue designer tool, but I don't know if it would actually be useful at all since I'll have to add the conditions in code anyway. I don't really want to parse out some kind of conditions and branches from the dialogue text, especially since they may need to dynamically refer to objects that currently exist in the game, that sounds way more complicated than just adding the conditions into code.

Surprisingly hexadecimal values are very easy to convert into 8-bit integers (useful for turning hex colors like #ffaa00 into RGB). If you look at the bit structure of ASCII numbers and alphabet, it turns out all you need to do is mask out the 4 left-most bits and then do some bit-shifts and additions. I wonder if this is why ASCII characters are organized in such a strange way, you can even ignore the capitalization of the alphabetical characters. Here's an ASCII table with binary values: https://sundee.neocities.org/ascii/ascii_full_8

Also I implemented the status bars on top left.
Replies: >>1486
>>1485
>Surprisingly hexadecimal values are very easy to convert into 8-bit integers
No, its not surprising at all. 
>how to do dialogue system
Scripting is the solution for many problems. You will need parser sooner or later. The other easier option is to have limited number of options, like in diablo. Per npc: Text dump, a single question, trade, goodbye. Trying to make a dialogue tree, without proper system for it, require a lot of people. IIRC even with scripting languages, people working on planescape had to dedicate coders time to making dialogue scripts, because it was so annoyingly complex, before they made a dialogue maker.
If you are too lazy to do it properly, its better to avoid making complex systems at all.
Replies: >>1505
>>1486
>its not surprising at all
If you've never looked into it, there's no way you would guess that you can just do a couple binary operations to convert a hex color code like "#FF25ad" into an RGB color. Here's how you do it without any libraries or magic mystery functions:
u8 htoi (u8 c) {
	// Numerical characters do not have the second-from-left bit set, but all alphabetical characters do.
	// If you ignore the first 4 bits, '9' has the integer value 9 (binary 1001), and both 'a' and 'A' have integer value of 1 (binary 0001).
	if (c & 0b01000000) c += 0b00001001; // All alphabetical characters come after 9.
	c &= 0b00001111;
	return c;
}

char* str = "#FF25ad";
u8 r = (htoi(str[1]) << 4) | htoi(str[2]);
u8 g = (htoi(str[3]) << 4) | htoi(str[4]);
u8 b = (htoi(str[5]) << 4) | htoi(str[6]);

You can also do 2 characters at once if you don't want to do the bit shifts manually:
u8 htoi2 (u16 c) {
	if (c & 0b0000000001000000) c += 0b0000000000001001;
	if (c & 0b0100000000000000) c += 0b0000100100000000;
	c &= 0b0000111100001111;
	return ((c << 4) | (c >> 8)) & 0b0000000011111111;
}

char* str = "#FF25ad";
u8 r = htoi2(*(u16*)(str+1));
u8 g = htoi2(*(u16*)(str+3));
u8 b = htoi2(*(u16*)(str+5));
Replies: >>1506 >>1507
>>1505
Neat! Thanks RGB Anon!
>>1505
You are not converting hex to octo, you converting string literal into hexadecimal. There is no need to convert hexadecimal to binary and vice versa, because for computers both are binary, you just need to specify how they will be displayed, which is usually in hex, because its readable. 
You can even input it, via using "hex" specifier
cin >> hex >> yourNumber
and yourNumber is typed in 0xF format.
Replies: >>1508
>>1507
It's called a "hex color" when you do something like #ffaa00, I'm talking about parsing colors from such text input. For example if my dialogue text has {#f00} in it, it'll change the font color to red, but I need the actual RGB color values.
https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
11fe5557789ccfbacdd5651e9888102536a731886da799f52555405c07492b26.mp4
[Hide] (548.7KB, 1912x1016, 00:19)
I finished a menu screen for my game, this is the profile creation screen, not exciting as a actual gameplay, next one is a the profile manager, followed by the profile menu, still have to create the textures for the GUI.
Replies: >>1512 >>1517
chat_2024-07-06.webm
[Hide] (4.5MB, 1270x710, 01:06)
Added factions. Currently they don't do anything other than have a name and badge, but no need to hardcode them into the chat anymore.

Added a global value storage, so I can just dump whatever random variables I want in it. Its basically just a hash table and memory allocator in one (languages like javascript would get this for free with objects), the plan is to store the values with your save game. I can use them for tracking miscellaneous things like whether you've talked to an NPC or tracking quest progress or check for unlocked whatevers. I don't actually have a proper concept of a quest yet, I kinda don't even want any kind of "quest system", but at minimum I need some kind of event tracker so I can for example track how many enemies you've killed.

Chat is now less hard coded. The way it currently works is that each NPC can have a chat callback, similar to AI state callback. You send the name of the chat you want, and then the relevant text and answers are added into the UI. This is incredibly anti-moddable since all the chat options for a given NPC are in a single callback function, including quests.

After implementing some test chats, I may have an idea for making it better. The idea would be to treat chat as a series of generic "spaces", each space having a text, a list of responses, and a list of events. Text is the text that is displayed, responses are the buttons you can press which take you to other spaces, and events do things when you enter that space like giving you items or changing the global storage values. Each 3 of those could then have conditions that determine which ones activate and which don't. I can vaguely imagine it working and being extremely moddable, you could just modify a specific space or add responses/events to it. You could maybe even attach a custom callback to any of the 3 or their conditions, so you could for example add randomly generated text, or some other more complicated logic that the default conditions aren't enough for.
Is trashchan shitting itself or is it my internet? Took like 8 attempts for my post to go through and it uploaded for like 10 minutes.

>>1510
Why did you create an on-screen keyboard? I haven't used a console since PS2, do they still not have their own typing solutions?
Replies: >>1514 >>1515 >>1539
>>1512
>Is trashchan shitting itself or is it my internet? Took like 8 attempts for my post to go through and it uploaded for like 10 minutes.
I haven't noticed any similar problems myself, Anon. I suggest you make a post on /meta's General help thread : (>>>/meta/214) , if your problem persists.
Replies: >>1517
>>1512
>Is trashchan shitting itself or is it my internet? Took like 8 attempts for my post to go through and it uploaded for like 10 minutes.
Is it better now? I think there was some connection problem between the proxy and the backend when you tried to post.
Replies: >>1517
>>1514
>>1515
The second post worked fine. My browser just mysteriously stopped uploading after loading for a few minutes (javascript disabled), it happened multiple times so I tried another browser which worked but it still took super long to upload. There was some crazy timing with >>1510 posting at the same time, I thought that maybe that was somehow related, but I was struggling for so long that I dunno. Maybe he was uploading for 10 minutes too and the server wasn't happy about 2 people uploading a webm simultaneously.
D6yQwI2UcAAiagb.jpg
[Hide] (117.3KB, 1200x675)
>everything works
>next day
>nothing works
Replies: >>1521 >>1524
ClipboardImage.png
[Hide] (769.3KB, 800x698)
>>1520
ps.  Forgot to allocate memory.
Replies: >>1523 >>1556
>>1521
>ps.  Forgot to allocate memory.
Classic case of why you never use raw pointers in user code. You're already using C++, Anon. Why not stop treating it like C ?  Wrap that sh*te in a simple RAII-compliant abstraction already!  :D

confer part III of PPP3 for more information.
https://www.stroustrup.com/programming.html
2024-07-08_travel_WIP.webm
[Hide] (2.4MB, 1270x710, 00:20)
>>1520
I started off yesterday(?) by compiling my game to remind myself of what I was doing, and was met with a black screen. I almost just went back to sleep, but it was because I had refactored some map-related stuff and forgot to set any map as the active map.

Not ready yet but I'm working on adding map-to-map travel. I'm anxious to work on proper content instead of just features, so I want to try to get all the core game features working in some manner. Map-to-map travel is the most notable thing missing.

I'm having trouble posting this again. Maybe my internet and/or browser just can't handle uploading files anymore.
Replies: >>1525
>>1524
It's not just you, my test file didn't go through either. Come to /meta/.
Why are C and C++ so retarded? Item ID is obviously not the same type as an inventory ID. I can't add an inventory into an inventory nor an item into an item, yet there's no way to tell the language that they're different things and not compatible. I refer to everything by IDs and it so fucking easy to mix them up by accident, like add_to_inventory(backpackid, bandageid) instead of add_to_inventory(backpack->inventoryid, bandageid). The only way to work around this is to turn all IDs into structs and then use "id.x" instead of just "id" if I want the value.
Replies: >>1527
>>1526
Why aim your angst at C++, Anon? It's a strongly-typed language. As long as you stay away from C-style usage, it's quite aware that a Foo != Bar , regardless.
Replies: >>1528
>>1527
Because C++ has the same problem.
Replies: >>1529
>>1528
>Because C++ has the same problem.
No it doesn't

#include <iostream>
#include <vector>

class ID
{
public:
    explicit ID(int const id) : id_{id}
    {
    }

    int id() const { return id_; }
    void id(int const id) { id_ = id; }

private:
    int id_{0};
};

class Foo : public ID
{
public:
    explicit Foo(int const id) : ID{id}
    {
    }
};

class Bar : public ID
{
public:
    explicit Bar(int const id) : ID{id}
    {
    }
};

int main()
{
    std::vector<Foo> foos;
    std::vector<Bar> bars;

    // OK
    foos.emplace_back(1);
    bars.emplace_back(1);

    // Not OK
    // foos.emplace_back(Bar{2});
    // bars.emplace_back(Foo{2});

    for (auto const e : foos)
        std::cout << e.id() << '\n';

    for (auto const e : bars)
        std::cout << e.id() << '\n';
}
Replies: >>1530
>>1529
What the fuck is this poo? I'm talking about something like this:
typedef unsigned short Itemid;
typedef unsigned short Propid;

Itemid do_something_item (Itemid id) {
	return id *= 2;
}

void main () {
	Propid wardrobeid = 100;
	wardrobeid = do_something_item(wardrobeid);
}
Replies: >>1531
>>1530
#include <iostream>
#include <vector>

class ID
{
public:
    explicit ID(int const id) : id_{id}
    {
    }

    int id() const { return id_; }
    void id(int const id) { id_ = id; }

private:
    int id_{0};
};

class Foo : public ID
{
public:
    explicit Foo(int const id) : ID{id}
    {
    }
};

class Bar : public ID
{
public:
    explicit Bar(int const id) : ID{id}
    {
    }
};

template <class T>
int do_something_item(T& item)
{
    auto tmp = item.id();
    item.id(tmp *= 2);
    return item.id();
}

int main()
{
    std::vector<Foo> foos;
    std::vector<Bar> bars;

    // OK
    foos.emplace_back(1);
    bars.emplace_back(1);

    // Not OK
    // foos.emplace_back(Bar{2});
    // bars.emplace_back(Foo{2});

    for (auto const e : foos)
        std::cout << e.id() << '\n';

    for (auto const e : bars)
        std::cout << e.id() << '\n';

    //---

    do_something_item(foos[0]);
    do_something_item(bars[0]);

    for (auto const e : foos)
        std::cout << e.id() << '\n';

    for (auto const e : bars)
        std::cout << e.id() << '\n';
}
Replies: >>1532
>>1531
You can come up with some kind of convoluted OOP/template workaround if you want, but I can also come up with a dumb struct workaround like this:
#pragma pack(push,1)
typedef struct { unsigned short i; } Itemid;
typedef struct { unsigned short i; } Propid;
#pragma pack(pop)

Itemid do_something_item (Itemid id) {
	return (Itemid){id.i*2};
}

void main () {
	Propid wardrobeid = {100};
	wardrobeid = do_something_item(wardrobeid); // Error
}
But I shouldn't have to come up with workarounds for something so simple and obvious. C is my favorite language and C++ does some things better and other things worse, but I'm not going to pretend that the retarded parts aren't retarded.
>>1533
I don't give a fuck about your college CS buzzwords, I want to do the thing I need to do.
Replies: >>1535
>>1534
My apologies Anon, that was uncalled-for on my part. I was just trying to help you solve things. Good luck Anon, I'm sure you'll figure everything out. Cheers.
Replies: >>1536
1626230247121-2.jpg
[Hide] (55.1KB, 351x258)
>>1535
It's fine. I can't really argue about languages without being mad because I just want the language to let me do what I want however I want with the least amount of syntax, but there's nothing that allows me to do that, so the only thing other people can do is try to suggest their own preferred tools/methods/habits which are usually even further from what I personally want.

This is probably why everyone (including me) wants to make their own programming language. Maybe we can get AI to make custom programming languages that work exactly like we want.
Replies: >>1537
>>1536
>It's fine
OK, good. This is about as close as I can manage for you, Anon. Cheers.

language c++
#include <iostream>

#pragma pack(push,1)
typedef struct { unsigned short i; } Itemid;
// typedef struct { unsigned short i;  } Propid;
#pragma pack(pop)

struct Propid
{
    Propid(unsigned short const i) : i{i}
    {
    }

    // copy assignment operator
    Propid operator=(Itemid const& other)
    {
        i = other.i;
        return *this;
    }

    unsigned short i{0};
};

template <class ID_type>
Itemid do_something_item(ID_type const id)
{
    return (Itemid){id.i * 2};
}

int main()
{
    Propid wardrobeid = {100};
    std::cout << "wardrobeid BEFORE: " << wardrobeid.i << '\n';

    wardrobeid = do_something_item(wardrobeid); // ~~Error~~
    std::cout << "wardrobeid AFTER: " << wardrobeid.i << '\n';
}
Replies: >>1538
>>1537
Oops. Line #15 should read:
    Propid& operator=(Itemid const& other)
0c81210e672fe62d4d81a0e9e319402e14e1f71b50dd98b5fd839fe4e89371ab.mp4
[Hide] (1.4MB, 1912x1016, 00:34)
Finished the profile manager for my game, still not sure how I'm going to implement these screens, I want to future proof the profile manager and the saving system so I can reuse in future games, but maybe I should just focus on the getting something working rather than wasting time wondering about future requirements.
I'm trying to use the MVC pattern for the GUI, the screen doesn't manipulate the data directly it just send the necessary things the background module via signals, this screen is just a visual representation of the data and the buttons and line edits are just manipulators for the user. 

>>1512
They do, but they all look like shit, they have that generic flat and ugly style that plagues modern games.
Replies: >>1540 >>1541
>>1539
>but maybe I should just focus on the getting something working rather than wasting time wondering about future requirements.
Oh God, yes. You might want to write a design document, though.
>>1539
>They do, but they all look like shit
My first impression was that it's a bad allocation of effort (partly because of how complicated it can get to accommodate different languages), but if you don't need fully proper typing and can do the menus without too much issue then it probably does make your game more "soulful" and immersive.
bluenoise.webm
[Hide] (1.9MB, 1910x590, 00:17)
Tried out making a blue noise generator, it's kind of fun to just click and look at it. Takes ~0.5 second to fill this screen if I don't animate it, feels pretty slow. Currently I use grid-based noise for my game (for every x*x square, generate y number of things), I wonder if there's some simple way to do a combination of both.
Replies: >>1545 >>1550
bluenoisegrid.webm
[Hide] (4.9MB, 1850x800, 00:13)
>>1544
Came up with a grid-based version, it's about 3-4x faster. For the same density and screen size, the original method takes ~287 milliseconds to finish, this grid-based method only takes ~78 milliseconds.

This takes advantage of the fact that when you fill the screen from top to bottom, you won't have to check for collision against points that are above a certain point. Looping through the narrower dimension (from left to right in this case) will take advantage of it even more. I could optimize this further by only checking for collision with points that were added from adjacent grid cells, but I don't know how to do that in a simple way.
Replies: >>1546
>>1545
I made a proper grid checker, surprisingly it's only like 5% faster at that size. However if I double the density, it suddenly becomes almost 2x faster, which makes sense since the previous method has to check collisions with the entire width, this one only has to check a certain area around the point.
Replies: >>1547
bluenoisegrid2.webm
[Hide] (5.2MB, 1850x800, 00:11)
>>1546
Nevermind, I revisited it and realized that I can do things in a much simpler way with this method, it's now 2-5x faster than the previous method. The denser the points, the bigger the benefit. It fills the screen almost in realtime, although I can fill some more gaps if I increase the number of times that a point is attempted to be placed per grid cell.

I don't know the technicalities of noise "colors", this is technically localized white noise with distance checks, don't know if that counts as blue noise.
Replies: >>1548
>>1547
I ran out of ways to improve this. Here's the code for it (it outputs points into the "points" array):
static void generate_blue_noise (Array_Vec2f* points, Vec2f canvas_size, float point_distance, int placement_attempts) {
	float grid_size = point_distance * 2;
	int grid_w = canvas_size.w / grid_size + 1;
	int grid_h = canvas_size.h / grid_size + 1;
	const int cell_item_count = 5; // A grid cell should only be able to fit 5 items at most with this configuration.
	
	Vec2f* grid = mem_alloc_zeroed(grid_w*grid_h*cell_item_count * sizeof(Vec2f));
	
	for (int a=0; a<placement_attempts; a++) {
		for (int grid_y=0; grid_y<grid_h; grid_y++) {
			for (int grid_x=0; grid_x<grid_w; grid_x++) {
				Vec2f pos = vec2f(grid_x*grid_size, grid_y*grid_size);
				pos.x += grid_size * random_positive_float();
				pos.y += grid_size * random_positive_float();
				
				if (pos.x > canvas_size.x || pos.y > canvas_size.y) continue; // Note: pos cannot be <0 so no need to check.
				
				bool blocked = false;
				int check_x1 = (grid_x == 0) ? 0 : grid_x-1;
				int check_y1 = (grid_y == 0) ? 0 : grid_y-1;
				int check_x2 = (grid_x == grid_w) ? grid_w : grid_x+1;
				int check_y2 = (grid_y == grid_h) ? grid_h : grid_y+1;
				for (int y=check_y1; y<=check_y2; y++) {
					for (int x=check_x1; x<=check_x2; x++) {
						Vec2f* griddata = grid + (y*grid_w + x)*cell_item_count;
						for (int i=0; i<cell_item_count; i++) {
							Vec2f point = *(griddata + i);
							if (point.x == 0) break; // Uninitialized.
							if (vec2f_distance_between(pos, point) < point_distance) {
								blocked = true;
								x = grid_w;
								y = grid_h;
								break;
							}
						}
					}
				}
				if (blocked) continue;
				
				int x = pos.x / grid_size;
				int y = pos.y / grid_size;
				Vec2f* griddata = grid + (y*grid_w + x)*cell_item_count;
				for (int i=0; i<cell_item_count; i++) {
					Vec2f* point = (griddata + i);
					if (point->x == 0) {
						*point = pos;
						break;
					}
				}
				
				array_append(points, 1, &pos);
			}
		}
	}
	
	mem_free(grid);
}
With 10 distance and 16 attempts it has similar distribution as that >>1547 (except the rainbow was caused by the order the points were placed, this new version is more random).
Takes 10 milliseconds to do that on a 1920x1080 window. With 32 attempts it creates ~10% more points, with 64 another ~5% more.
Replies: >>1549
>>1548
You trying to simulate air? To me it seems like something completely unnecessary, unless you making simulation based game. 
Just get a perfect grid and add some heavy jitter. Or a random grid a multiply by resolution and let the rounding up and down do the work. Or generate points once, and just add jitter to them, around original position (and you can offset entire grid by a random X Y value, each frame, if you can see artefacts). Noise is noise, who cares if its faked? 
>for every x*x square, generate y number of things
Why not simplex or voronoy, like everyone else? This blue noise seems completely arbitrary. And everyone just pre-generates this kind of thing (at least partially), instead of doing it entirely at runtime.
And if you dont want to do it, like everyone else, you might as well use particle simulation to distribute these points, it would look way more fun, and you can reuse it for any cool animation you want. 

https://ragingnexus.com/creative-code-lab/experiments/perlin-noise-flow-field/
Replies: >>1550
noise_comparison.png
[Hide] (65KB, 1203x648)
>>1549
>You trying to simulate air?
It's just noise, the animation was for demonstrating how fast it works. "Blue noise" has a more even distribution than just placing things completely randomly (white noise). It's useful for procedural generation and stuff.

I wanted to try it because of this: https://www.youtube.com/watch?v=Ge3aKEmZcqY
He used a sort of "disc" method, that was my original implementation which caused the expanding pattern shown here >>1544 I managed to speed it up significantly by storing the points into a grid, but the newest method that just generates white noise into grid cells is faster and much more consistent.
2024-07-16_fow,_sprint,_looting.webm
[Hide] (4MB, 1270x710, 00:26)
Testing a "fog of war"-style system; tiles that you've never seen into are dark. It's just a duplicate of the tile FOV value that walls use, except that it stays at it's max value. Not sure if I actually want it, I'll at minimum keep it as an option that players can turn on. There's 2 potential problems:
1. Some players will "optimize the fun out" by trying to sweep the whole map in a row pattern.
2. I have a feeling that it has a similar effect as minimaps: you rely on the fog of war to tell you where you've been instead of paying attention to the environment.
I do like the idea that you can't see into a building/room if you've never been there before, so maybe I can make only buildings have fog of war.

Redid my movement code. Many games have this problem where you always want to run, so you're never not holding down the run key, sometimes I wonder why running is a mechanic at all instead of it being the default movement speed. My initial running mechanic had lowered acceleration and deceleration in an attempt to make running more deliberate, but I noticed that I have still ended up conditioning myself to hold down the run key all the time. So I decided to replace running with a "sprint" mechanic: after a short charge, you take off at high speed, and it's hard to turn or stop while you're going. There's also a cooldown afterwards so you can't spam it too much. It's primarily meant for traveling longer stretches and for short dodgeroll-like dashes, hopefully it feels more meaningful and strategic this way. I just noticed a bug in the webm: holding shift charges the sprint, so shift clicking items in inventory causes it to charge and you get the cooldown.

Redid some of my particle code so I can make different particle types more easily, like the dust puffs from sprinting. Rain used to be it's own system but now uses normal particles, I wonder if I can move bullets into this system too.

NPCs can now be dead and looted. Not sure yet how to determine what loot to add, I guess I need to decide what kind of enemies exist first.

I discovered a game that looks kinda similar to mine: https://store.steampowered.com/app/1601970/Tunguska_The_Visitation__Enhanced_Edition/
I haven't played it, but it seems like much more of a survival RPG than my game, I'm going for more roguelite-y gameplay. It wears it's Stalker fanboyism on it's sleeve, I couldn't even tell if some of the assets aren't just straight ripped from Stalker. I take some inspiration from Stalker too but much more distantly.
breaker_2024_menu.webm
[Hide] (3MB, 1912x1016, 01:15)
Now I have a working save system, I can create, delete, activate and deactivate the profiles, the save files are structured like this.

_save(Directory)
          _save_x(Directory)
                        profile data
                        sub directories

I have developed a system that manages the GUI so that there can only be one exclusive GUI active at any time, this way I don't have to manually disable the previous GUI just to activate the current one, now I will work on the active profile menu so I can finally go back and work on the game.

In future I will add a Press Any Button before displaying the main menu to the user.
Replies: >>1557 >>1559
ClipboardImage.png
[Hide] (90.5KB, 228x221)
>>1521
Update, it happened again. I even knew it would happen, but I forgot to fix it. And I didnt fix it at the time, because it was mostly working.
Replies: >>1558
>>1555
The menu transitions remind me of an early 2000s Japanese horror game.
>>1556
Well, don't forget again Anon!  :D

>muh_raii.cpp
language cpp
using Muh_bar = int;

class Muh_foo
{
public:
    Muh_foo() : muh_bar{new Muh_bar}
    {
    }

    ~Muh_foo() { delete muh_bar; }

private:
    Muh_bar* muh_bar;
};

int main()
{
    Muh_foo foo;
} // Muh_bar heap objects all destroyed automatically here
Replies: >>1560
>>1555
I like how animated everything is, makes it feel like a real game even though all the graphics are placeholders.
ClipboardImage.png
[Hide] (4MB, 1902x932)
>>1558
It was mostly due to laziness. 
>I really should not use local variable for this, it will fuck me over, when I try to change anything
It was either use temporary variable, or make a whole class dedicated to it, which would probably require yet another class, going further away from what I was making at a moment. The only problem was my forgetfulness, and it become a problem when I started remaking it properly.  

>run exe
>works
>run again
>doesnt, invalid json error
>run again
>works
I even remember having this problem with SDL_GetBasePath() shit before. Sometimes it fucking works, sometimes it doesnt. I had to try and figure out why changing from x=x+32, to x=x+64 crashes everything, and it was because for fucking path issues, which randomly appear from time to time. 

But other than that, technically I have my own working sprite data format, and tools to create them. Just need to make a game out of it.
Replies: >>1561
>>1560
>or make a whole class dedicated to it
Well, that's pretty much the exact use-case for a handle, Anon. It serves as a lightweight wrapper around a resource, always ensuring proper allocation & initializations, maintaining invariants, and deallocations. I'd argue that this form of abstraction is the primary purpose behind C++ classes.
Replies: >>1562
direction0_W_frame_1.png
[Hide] (635.5KB, 1024x1024)
walker_gold.png
[Hide] (2.7MB, 2048x2048)
>>1561
You cant make everything at the same time, and make everything with every use case in mind from the start. And I decided against trying to, I add things when they become absolutely necessary. 
Lack of sprite wrapper wasn't even a problem. I actually needed a sprite loader, and I even had one, it just without a proper interface for this exact case. Because sprite loader is part of resource loader and manager. And it needs interfaces for each filetype I will use. And it needs batch loading. And it needs console/text interface for loading on demand. And it will require making text interface. Which requires making better gui options. Which require sprite loader. And to load sprites, I need to cut them first, and I was making sprite cutter in the first place. 

Still, I should avoid making such stupid problems for myself.
Replies: >>1564
walk_fast_cut.gif
[Hide] (1.3MB, 512x512)
walkTest.png
[Hide] (179KB, 1024x1024)
Rendering 800~ frames actually takes noticeable time, even if its around a second per frame. Still, its (autistically) pleasant to see thousands of images being generated and processed.
Replies: >>1564
>>1562
>>1563
Very cool stuff, Anon. Congratz on your good progress with this! Cheers.  :)
Replies: >>1565
walkTest.png
[Hide] (1.2MB, 1024x1024)
Spoiler File
(667.2KB, 1024x1024)
>>1564
Thanks, its just a placeholder I made to test stuff, and to replace 5 minutes older, uglier placeholder.  

Now I need to either make a proper blender addon, or make temp animation system, and animation layering tool. 
For animation layering I can use brute force, or learn shit about blender depth measurements, but the last time I tried, it failed, and I wasted time. And I already use bruteforce to cut sprites (really lazy unoptimal algorithm), so brute force it is.
2024-07-26_droptables.webm
[Hide] (1.7MB, 1270x710, 00:14)
I've been playing Night Raider doing research on similar games recently. More fun than it looks if you like hoarding items, very grindy (as expected from Chinese developer?) and too easy though.

I made a loot generation system, it's basically a linked list of entries. An entry can either select one from the child entries, roll for all the child entries separately, spawn an item, or defer to another drop table. It can also repeat the action between min/max times. I can create a fairly complex varieties of things with this, and I'm hoping it's easily moddable this way too. Another action I'll probably add later is rolling for random child entries until a desired total "value"/score is reached. That way if you want a super valuable treasure chest or whatever, you could just add a bunch of random items into a list and it'll keep spawning them randomly until a value quota is reached.

Here's how the loot in webm related is made:
// Create droptable.
int id0 = 0, id1 = 0, id2 = 0, id3 = 0, id4 = 0;

id0 = create(0, (Entry){.id="ammo_box", .minmax={1,1}, .action=SELECT});
	id1 = create(id0, (Entry){.weight=2, .minmax={1,1}, .action=ROLL_ALL});
		id2 = create(id1, (Entry){.chance=1, .minmax={1,1}, .action=SELECT});
			id3 = create(id2, (Entry){.weight=2, .minmax={1,1}, .action=ITEM, .item="pistol"});
			id3 = create(id2, (Entry){.weight=1, .minmax={1,1}, .action=ITEM, .item="pistol2"});
		id2 = create(id1, (Entry){.chance=1, .minmax={20,1000}, .action=ITEM, .item="ammo__pistol"});
		id2 = create(id1, (Entry){.chance=0.5, .minmax={10,200}, .action=ITEM, .item="ammo__pistol_subsonic"});
	id1 = create(id0, (Entry){.weight=1, .minmax={1,1}, .action=ROLL_ALL});
		id2 = create(id1, (Entry){.chance=1, .minmax={1,1}, .action=ITEM, .item="shotgun"});
		id2 = create(id1, (Entry){.chance=1, .minmax={2,200}, .action=ITEM, .item="ammo__shot"});
	id1 = create(id0, (Entry){.weight=0.5, .minmax={1,1}, .action=ROLL_ALL});
		id2 = create(id1, (Entry){.chance=1, .minmax={1,1}, .action=ITEM, .item="assrifle"});
		id2 = create(id1, (Entry){.chance=1, .minmax={10,500}, .action=ITEM, .item="ammo__assault"});

// Spawn prop with droptable.
Vec2i pos = vec2i(1, 1);
spawn_prop(map, pos, get_propinfo("wardrobe"), false, false, false);
spawn_droptable_into_prop(map, pos, get_droptable("ammo_box"));

The droptable creation part is super annoyingly ugly, but I don't know of a better way to structure it without parsing information from text. The most annoying part is having to keep track of the IDs, I have to do that so I can add an entry inside another entry. It's fine if modifying the table afterwards is a bit awkward, but having to initialize a new table this way is annoying.
Replies: >>1567
>>1566
All of it should be in proper Item class, with most of it pre-defined. 
You want a table with IDs to unique items, which can only drop once per game, such as unique weapons, equipment pieces, keys/quest items. Items will be removed from this table on drop, or in some cases moved to common loot pool. 
vector<items*> good_items = {&fancy_pistol, &fancy_riffle, &fancy_rocket}
vector<items*>generic_weapon = {&pistol, &riffle, &shotgun ...}
...
vector<items*>generic_loot = { &shovel, &food_item_1...}
Just shuffle the vector and pull few items from it. And if you drop a weapon, call associated function to drop ammo for it. And ammo function should only drop ammo for weapons accessible to player, to save his time. 
itemdrop(pos, good_items, amountmin=1,amount max=1)
itemdrop(pos, generic_loot , amountmin=0,amount max=4)
At least pre-define all properties for all items. Writing droprates per item, in the middle of random item code is a bad idea. And while making data files is a good idea, it doesnt seem to be necessary for you, you can easily define everything in code.
1628782186560.gif
[Hide] (742.1KB, 196x196)
>vector of a vector of a vector of a vector of a vector of an order of offsets, and relative offsets of global offset...
'''c++
struct animFrame {
std::vector<unsigned int>frame_order;//order for parts of the frame
};

struct animDirection{
std::vector<animationFrame>directionFrames;
}

struct animAction{
std::vector<animDirection>actionDirections;
}

class animation{
int currentFrame;
int currentDirection;
int currentAction;
std::vector <animAction> actions;
void render();
spriteSheet* mSheet;
HW_texture * mTexture;
}


'''
Maybe I should do it in simpler way. This shit looks like its about to collapse. Or maybe, if it works it works. Optimizing this shit at this point is a waste of time anyway. At the same time, its fucking annoying to remember animation>animAction>animDirection>animFrame since everything has Anim in its name, and I have to remember the difference between animation and "action". And it doesnt take into account animations with varied delays in them and other shit. 
I bet it would solve itself immediately after I get a full night of sleep.
Replies: >>1569
>>1568
Well, you're kinda over-complicating things to start with, IMO. This will build & run, and basically reflects your design rn, AFAICT:
language c++
#include <iostream>
#include <vector>

class spriteSheet
{
};

class HW_texture
{
};

// struct animFrame
// {
// };
using AnimFrame = std::vector<unsigned int>; //order for parts of the frame

// struct animDirection
// {
// };
using AnimDirection = std::vector<AnimFrame>;

// struct animAction
// {
// };
using AnimAction = std::vector<AnimDirection>;

class Animation
{
public:
    void render()
    {
    };

private:
    int currentFrame;
    int currentDirection;
    int currentAction;
    std::vector<AnimAction> actions;
    spriteSheet* mSheet;
    HW_texture* mTexture;
};

int main()
{
    Animation anim;
    anim.render();
}

I'll make another post later to show how I'd do what I think you're attempting.

In the meantime, this is a good read for Data-oriented-Design in gaming. Cheers, Anon.
https://gameprogrammingpatterns.com/data-locality.html
Replies: >>1570
>>1569
>I'll make another post later 
language c++
#include <iostream>
#include <vector>

class SpriteSheet
{
    // TODO: implement class features here :
    //...
};

class HW_texture
{
    // TODO: implement class features here :
    //...
};

// using aliases :
using AnimFrame = std::vector<unsigned int>; //order for parts of the frame
using AnimDirection = std::vector<AnimFrame>;
using AnimAction = std::vector<AnimDirection>;

class Animation
{
public:
    // constructor :
    Animation() : sheet_{new SpriteSheet}, texture_{new HW_texture}
    {
        // TODO: init/establish-invariants for all member fields here :
        //...
    }

    // TODO: very likely, add another ctor here taking param(s).
    //   For example, one that pre-establishes the number of frames the members may expect :
    //...

    // destructor :
    ~Animation()
    {
        delete sheet_;
        delete texture_;
    }

    void render() const
    {
        std::cout << "Performing an Animation::render() ...\n";
    };

    // TODO: here add several accessors/mutators for the private member fields,
    //   + more utility functions, to make this class actually useful :
    //...

private:
    int current_frame_{0};
    int current_direction_{0};
    int current_action_{0};
    std::vector<AnimAction> actions_{};
    SpriteSheet* sheet_;
    HW_texture* texture_;
};

int main()
{
    Animation anim;
    anim.render();
}
>output:
Performing an Animation::render() ...
I'm reminded why I hate C++.
Replies: >>1574
>>1571
> "There are only two kinds of languages: languages that people complain about, and languages that people don't use."  :^)
https://alogs.space/robowaifu/res/18749.html#21886
Replies: >>1575
d2fe1a573c98eb68dcec50e3b012eadb6ca421a29e30c4c4d0b9096f03b4b4bd.png
[Hide] (498.2KB, 600x800)
>>1574
Fair, but C++ is genuinely unfinished.
Replies: >>1577
Take the C pill: there's only structs and arrays.
Replies: >>1577
>>1575
Lol. Well, Bjarne regularly appeals for users to join the ISO C++ Standards Committee because "We have far too much representation by large organizations, and far too little by average users." Maybe you could be just that Anon, Anon? They meet 3 times per years, and IIRC, you can begin voting during your second meeting.

>>1576
 Ehh, it's OK if your a 10+yr Wizard-tier developer, Anon. But for beginners/mid-tiers it's far too difficult a language to use for non-trivial uses. Heh, even "arrays are too brain-dead to even know their own size!" Kind of a big problem I'd say, especially for beginners.
>t. Former Cnile, now happy Sepples devotee.  :^)
Replies: >>1578
>>1577
>But for beginners/mid-tiers it's far too difficult a language to use for non-trivial uses.
NTA but I did my first C project in the last jam here, it wasn't too much of a struggle and I'm not an experienced dev by any means, as most of my projects leading up to it were just little Python scripts here and there. Being able to meet a technology on its own level can be very helpful in getting somewhere with it I think, instead of trying to bend it to your will.
Replies: >>1579
>>1578
>Being able to meet a technology on its own level can be very helpful in getting somewhere with it I think, instead of trying to bend it to your will.
Fair enough. If you create an autonomous robowaifu written entirely in C -- one that is hard-realtime-capable, safety-critical-compliant, safe, private, secure, entirely-disconnected from the cloud; pleasing & capable -- then you'll have me convinced, Anon!! As is, C++ is currently our single best shot at doing so meeting it on it's own level.  :^)
Replies: >>1580 >>1581 >>1582
>>1579
And, I might state the obvious as well: it needs to be free as in beer, as well as free as in speech, too! After all, a man has to have some standards in life.  :D

Seriously, no other language but C++ offers so many advantages to Anons for such a monumental task as devising realworld robowaifus, unentangled by the Globohomo. C will have it's place as well, but C++ will provide the lion's share of higher-level abstractions that will prove vital to such an undertaking.

Vidya, sure. Write all your vidya in C... oh wait...
>>1579
>hard-realtime-capable, safety-critical-compliant, safe, private, secure, entirely-disconnected from the cloud; pleasing & capable
I don't see why that couldn't theoretically be done in any language at all. Doesn't it depend on the program rather than the programming language?
Surely such programs existed even before the advent of object-oriented languages?
>>1579
>hard-realtime-capable, safety-critical-compliant, safe, private, secure, entirely-disconnected from the cloud; pleasing & capable
You're just listing a bunch of random buzzwords to make it sound harder. The only one that C++ may arguably help you with (over C) is memory safety, but even that not inherently, depends on how you use it. C++ isn't exactly known for being safe in any way, if you want safety then someone could argue that you're dumb for using C++ over Rust or Ada or something.

>unentangled by the Globohomo
C is better for this because you're less dependent on a system that's impossible to fully understand and much harder to infiltrate. How do you know there's not some secret CIA backdoor in some C++ feature that nobody has noticed before because of how incomprehensibly bloated C++ and C++ compilers are and nobody's going to vet every inch of it carefully enough to notice some super subtle and esoteric top-tier-expert-programmer-designed vulnerability?

The biggest advantage of C++ for robowaifus are lambdas because they make it easier to handle different behaviors flexibly. There's some convenience features that don't necessarily give new capabilities, but make it easier to keep a large system in your head, like function overloading and templates. Those are useful universally, I don't know if even I would still be using C without some compiler extensions like nested functions, the biggest thing I would change about C is adding those syntactic conveniences that make it less pedantic.
If I make a mistake with c++ its 95% my fault, and lack of knowledge. C++ is just more convenient, even if becomes a bloat at this point. And c++ lets me do what I want. 
The only disadvantage for me, is that some libraries are just broken, and the constant choice between re-inventing something, and using potentially broken code.

>I prefer C over c++
Just use assembler. Or write directly into machine code. Or make your own machine. https://www.youtube.com/watch?v=efLzgweF958

But jokes aside, you should just use whatever works for you. There is no perfect tool for every job. There is no perfect tool for what you are doing.
Replies: >>1585
I was raised with BASIC and C and pure OO languages make no sense to me.
>>1583
>There is no perfect tool for every job. There is no perfect tool for what you are doing.
More importantly, there's no tool that is perfect for everyone. Even if everyone's making the exact same thing, different people have different personal preferences and ways of thinking.
Reminder that the original Elite was coded entirely in assembly.
maptest.png
[Hide] (342.8KB, 1160x1236)
I want to make some assets to put into my game, but I don't know what to make so I decided to try to design the home map first, and I got demotivated super fast. It's harder than I thought.

Making a map by itself isn't hard, but it's hard to figure out what I want the player to do. I have a vague idea of the player finding items for some upgrades/unlocks (like more storage containers or a better crafting table or something), but I'm not sure what. And when I started drawing a house, I feel like there's way too many containers, I want the player to feel very restricted by inventory space at first and then build/unlock more containers. It's as if I need to make the game first and then design the map, but then I'm running into a chicken and egg problem: I don't know what content to put into the game because I don't have a map design, but I don't know what kind of map to make because I don't have content.

Maybe I can just design a "final" map, and then remove most of it? Like I can put a fridge into my house design, but in-game it's not there and you'd have to first unlock it. Or an entire room is blocked/broken and you need to build it. Or you start out with a bathroom (which feels pointless, but also weird if there isn't one), but can upgrade it into an chemistry lab later.

There's also the problem that I kinda want the player to be able to build as many storage containers as they feel like gathering resources for (I don't think having a hard storage cap is very fun in this kind of game), but then you can't really use a house unless the player has a proper building system and can build more rooms. I don't really like the idea of making the player build rooms, even placing furniture feels meh.

--
I forgot to mention it last time (as if anyone gives a fuck about it anyway lmao) but I made a weird string connector system. I encountered a problem that seems fairly normal but I've never heard of it before so I'm not sure how people solve it. Basically the problem is that when I create an item with an inventory (like a backpack), I want to refer to the inventory by it's name, but during run-time I want to refer to the inventory info either by it's numerical ID or a pointer. Since inventories and items can be created/deleted/modified in an awkward order or even by mods, I need some way to convert the name into an ID only after all the objects have been initialized. It's also needed for droptables.

So now I have a system where I can submit the name of an item and the name of an inventory, and they'll get linked at a later point in time. Even if I do this, the item won't have to store the inventory's name string, and can just index into it with a numerical ID at runtime:
create_item({.id="backpack", .inventory="item__backpack"})
create_inventory({.id="item__backpack"})
Replies: >>1588 >>1589
ClipboardImage.png
[Hide] (72.6KB, 408x206)
>>1587
Are you trying to invent cataclysm:dark days ahead?

>backpacks
Why not just make everything into a storage? All existing items have to be stored somewhere, and a lot of items are both storages and "items". So simply register every item, by ID/pointer into its storage space. On loading, recursively load all used storages, starting from "the world". 
Its actually important part of the interface. Depending on number of items/buttons, game might start lagging, if every button pressed checks every other button location against it. You will need to separate them into containers anyway. 
And with everything being a container of their own, you can have "hidden" part, where item stores materials its made of.  

>how to ID
You either use half assed system, or make a proper all encompassing item ID system. 
> I want to refer to the inventory by it's name
You dont mean, you literally search all existing items via std::string or something like that?
Replies: >>1589
items.png
[Hide] (34KB, 752x483)
>>1587
>>1588
>create_item()
>create_inventory() 
I just realized that the way I explained it doesn't make any sense because I left out context. Those functions in reality are create_iteminfo() and create_inventoryinfo().

The way my stuff is organized is that I have objects and infos. The info represents the object's type and has all the static information about it, like name and description and sprite, you only modify those at game startup. The object has per-object information, like how many items are in an item stack, they are actual objects that exist in the world.

Pic related are the actual, un-edited data structures for my items. What I'm talking about is creating an Iteminfo, and connecting the relevant Inventoryinfoid into it. I don't need or want to store the inventory info's string ID into the item info, I just want the numerical ID, but the item info may be created before the inventory info so the numerical ID wouldn't exist yet.

>Are you trying to invent cataclysm:dark days ahead?
Not sure what makes you think that.
Test.
c0f9b45354cd49fbcb8f0395a73230637a76596de76df37bb70041c11c947e7c.png
[Hide] (60KB, 1200x1000)
New bread.
>>1605
>>1605
>>1605
[New Reply]
510 replies | 325 files
Connecting...
Show Post Actions

Actions:

Captcha:

- news - rules - faq -
jschan 1.6.2