How the Conditional Pathfinding project's going:
How the Conditional Pathfinding project's going:
I was your mother, Pathfinding System. I brought you into this world, nurtured you, loved you.
Why you gotta do me like this...
NVM my dumb ass forgot to prevent tiles from flagging themselves as ledge-grabbable, if the tile you're moving into is solid.
TL;DR, characters could hop into and out of otherwise solid terrain, so long as they had hands, and they were free for climbing.
Working now!
More Godot 4 prototype progress!
For one, basic game agents exist now. This one is currently picking a random nearby space to wander to every few seconds, and tries to get as close as possible to it.
Red orbs mark invalid destinations, where the agent can't quite reach a tile, or if it's not a stable place to stop (like when standing on ground, or hanging on a ledge). Valid places to stop are marked with a blue orb.
There are no proper animations yet, but I found some brilliant tweening and noise equations compiled by http://www.demofox.org/, which I'll be making more use of. I particularly like their quick Bias and Gain for configurable easing, as well as Cubic and Quadratic Beziers! There's some great resources for building intuition for these things there too.
Bonus camera update:
Over the weekend, I put together a camera system, which can be set to free scrolling, or locked to always keep a focus character in view. It uses an ellipse matched to the window size to constrain the pan distance from the focus point, and works in 3D at any zoom level.
How does it adjust for 3D zoom and perspective, you ask? I don't know!
I tried to work out an equation that accounted for FOV, distance, etc., but after a lot of trial and error I just brute forced the answer. Apparently dividing the camera distance by screen height * 0.0108625 keeps camera movement 1-to-1 with mouse movement in 3D, at precisely FOV75?
Funny enough, it's probably faster on the CPU than whatever trig I'd have needed to do to calculate this, so I'm counting it as a victory for dumbasses everywhere.
Also, shout out to the camera techniques recently shared by @jupiter at https://gist.github.com/thygrrr/8288cabeb5cd25031ce6132c4a886311, which are an excellent framework to build off of! <3
Been playing around with some clean, pixelly 2D/3D looks for this project. What do we think?
Also, once it's further along, I've been thinking about maybe trying to crowd-fund regular development on itch io or something, and building it out into a proper little platformer/city-builder game. Is that something anyone would be tentatively into? I'd love to put more time into this.
Dusting off this undergound city sim project, with some work on a Sims-adjacent character need tracking system.
General physical wellness is tracked as "Stamina", with low Health, Food, Water, and Rest levels depleting it. If Stamina hits 0, they pass out until rescued. That sort of thing, with similar for emotional wellness and fulfillment.
It's just the backend done, and this probably doesn't mean anything to anyone, but I like how colorful nested Resources and Arrays are in Godot. Makes it very readable!
Made a basic UI, for representing the physical and mental needs of a character!
Needs influence what a character chooses to do, and may trigger other effects when very high or low. Each need is represented by a bar, and has arrows to show how quickly they 're currently draining or filling. Actions and ambient conditions can influence this; for now, I just made it so Stamina drains 3 times faster whenever a character is moving.
Still prototyping things out, so none of this is final, but the System seems to be working as expected!
A bit of an experiment in stylized lighting.
It uses a normal map, palette map, and an indexed palette of 4 colors that display based on light level. It works on both 3D surfaces and sprites, and accepts point lights and adjustable ambient lighting.
Been trying to make more organic tile-based environments, without needing hundreds of unique tiles for shapes and boundaries.
Finished prototyping a procedural mesh system, inspired by Oskar Stålberg's Dual-Grid tiling technique, adapted for 3D in Godot.
It starts with a map of 3D tiles that can be painted in editor, that needs only 5 base tile shapes per terrain type.
Each chunk of the base map is then parsed into a single combined mesh, using a new set of terrain tiles at a half-tile offset. Instead of representing each tile, they represent the *intersection* of 4 tiles, which hugely reduces number of unique tiles (went from about 1,000, to 70).
Since it's a 3D mesh, I can also change the textures of each corner of the dual tiles, to draw borders between different terrain types, without needing a ton of textures either.
The prototype looks a bit Dreamcast-ish in a way I like, but I'm really looking forward to trying it with proper textures!
Made a little update to my dual-grid map parser, to support additional half-tile shapes along with ramps, and add full support for smooth and sharp-faceted tiles.
Had to make strict rules for them, to keep the number of combinations down; players can either place cubes or generic half tiles, and whether it becomes a half-bump, ramp, or half-divot is based on what's adjacent to it. But it should give a bit more shape variety to environments, and allow for both smoothly winding or craggy cave formations, and more angular artificial terrain.
Hope that keeping the palette of shapes simple and tile-based will help players quickly read and reshape the environment, without too much fussing too!
This kicked my butt, but I managed to work out a terrain texturing system I'm pretty happy with!
The shader samples from 2 sprite atlases for terrain fill textures and border textures, and layers them on the geometry using different UVs and UV2s, to pick which part of the sheet to render.
I'm usually more of an Array person, but I've been making extensive use (misuse?) of Dictionary data types for the first time; mostly to make lookup tables for mesh data, directionality, what borders have priority over which other borders or what new sprites they should combine into, etc.
Ended up being a fair bit of work up-front, but now it's trivial to add new sprite sheets for new terrain types. Quite pleased with it!
Been giving some thought to world generation, overland travel, and ways to better connect my plans for world-scale travel/company management, and character-scale expedition gameplay.
Realizing that this plan would need to handle about 37,000 tiles worth of game world in active simulation... and doing pathing calculations over that might be a *little* ambitious. Even if I don't end up limiting simulation distance, still gonna have to make a more efficient hierarchical pathfinding system of some kind, for agents to navigate over large distances.
The current scale, with the world being about 200 tiles across, is about as small as I'd want to go, though; the Biomes are already only a few screens wide. I might end up squashing the game vertically to double the width or something? Will see how it goes once I start generating bigger worlds.
Nevermind, lol.
Just tested worldgen and nav-mesh generation on a map of 50k tiles (a 384 x 128 tile world made of 8x8 tile chunks), and it only takes about 20 seconds to initially generate both the terrain and navigation grid. And on the most expensive frames, calculating a navigation path only takes about 20 milliseconds.
(For reference, the player character would be 4 pixels tall here, and each set of dots marks an 8x8 tile chunk)
As much as I like billboard 2D sprites in 3D environments, having a lot of characters and variant outfits and such means LOTS of animations. I thought about doing rigged 2D sprites, but I want to spend a little time trying out a lowpoly 3D character with swapable textures and body part models first, to see how it goes.
Pretty happy with how it bends already, despite being a smooth-skinned mesh. Liking how the digitigrade legs came out too!
Wanted to get some work done on player controls and test in-game terrain editing performance, so I made a basic point-and-click terrain editing debug tool. Needs some better handling for determining which semi-tile to use where (some ramps or half-tile bumps/divots don't render because they *should* be impossible) but I'm glad it works without any hitching!
Seems like batching the terrain geometry into 8x8 tile mesh-chunks makes regenerating the terrain pretty much instantaneous, even when the mesh data for the world is very large!
(P.S. Please ignore Max poking her head in peridocially. She's just curious what's going on in this part of the level)
#GameDev #Godot #GodotEngine
Unfortunately, Windows 10 ate half of my Godot project, but I suppose it's as good a time as any to rebase the whole thing.
But before that, I turned this cute bit of birthday gift art (courtesy of @lovelyMia) into a little splash screen. Now I get to see it every time I boot up the editor. :3
Working on a little pixel-perfect (-ish) clock, inspired by old sprite scaling/rotation techniques.
Rendering the pixels at their actual resolution ended up a little too jaggy, so I'm cheating by upscaling UI elements and rendering the subpixels at the screen's resolution, to smooth movement and rotation without anti-aliasing. The dials also swap sprites based on angle, to minimize edge distortions as they rotate!
UI Design! It's sorta fun actually!
Spent some time learning Godot's control node system. Finally got these bits working on the front end, and responding to screen size. Pretty happy with the readability and information density of the crew panels in the top right. And even if the tab menu is a bit Greybox still, it does a lot to organize and declutter things, which is great.
It's wild how adding a bit of UI makes this feel like a proper game, instead of a bunch of invisible systems.
Chipping away at a base model, so I can try out lowpoly pixel-textured characters in this, instead of sprites.
Even if I don't end up needing it, I'm pretty pleased to have managed a fully articulated, poseable hand in 126 triangles!
Finally worked up the chutzpah to rebuild my terrain system.
This time, I'm trying out a new level editor that uses CSG to sculpt tile-based terrain, and applies one of 8 textures based on the surface angle.
It's also good for making cute shapes.
I was a little disappointed by the limitations of my single-tile-deep terrain system.
I've been thinking about ways to include depth, while maintaining the simplicity and readability I like in 2D platformers.
I tried keeping it to a few layers of depth, and limiting hollowed-out chambers so that they're contiguous from the front to whatever depth they're dug out to. Foreground walls should never be able to occlude background chambers, but it still allows for limited 3D movement, and placing things at various depths.
Shout-outs to Diggles: The Myth of Fenris for the inspiration!
I appreciate your work, author of the NavigationRegion3D node, I really do... but can you please not be so opinionated about how much floating point precision you think people need? So much so that you even override the user's floating point precision settings to round numbers up to 2 decimal places?
I can't even set the cell size to 1/8th or 1/16th, without this tool rounding cells up to an irregular value that creates all kinds of artifacting and errors in the navmesh of my otherwise nice, orderly grid tiles.
I'm about to just write my own navmesh editor, I swear...
Anyway, I ended up making my own nav-mesh generator, to satisfy my need for nice and orderly shapes.
It uses the vertices and surface normals in a given mesh, to decide what surfaces should be part of the nav-mesh.
And far as I can tell, it's working beautifully.
Made a low-poly gremlin.
Still trying to decide if I want to pre-render some billboard sprite sheets from this, or put some Megaman Legends-ish unlit pixel textures on this in full 3D.
Either way, pretty happy with how this hair topology bends!
Been playing with Pixel Composer (https://pixel-composer.com/), and it *does* make rotating and posing a pre-rendered spritesheet a lot more doable, for animated pre-rendered billboards...
Could probably work this into something a bit Shining The Holy Ark, or Golden Sun.
Much to consider.
Using some old sprites to work on a billboard-style character animator.
My stars, trying to finalize this edge-collapse mesh simplification technique has been kicking my ass, but I've finally got the last necessary rule (I think).
This probably doesn't make sense to anyone but me, but I'm so happy to have cracked it! Huzzah!
Working on some smooth low-poly 3D tiles, for subterranean environments.
Having trouble with Blender, getting the sharp seams/normals to be shared across different tile shapes that they'll tile with. It's tricky to get the edges pointing the same kind of forward, but keep the vertical smoothing. I do like the general look though!
Wanted to take some downtime tonight to finalize Tile Variant generation for the marching cubes voxel system I've been implementing.
Far as I can tell, the important part works; it can create new meshes with rotated or flipped geo, generate UVs appropriately, and splits the mesh up into different faces. And the voxel "points" used to pick a mesh based on what corners are solid or empty are working fine.
...but Past Me decided to be rude and careless, and leave a bunch of cryptic bugs in the code. Parsing what needs doing is a bit like running brain-first into a brick wall.
Slowly getting there, with this Marching Cubes terrain overhaul.
A cloud of points is being fed into each Chunk of terrain. For testing, blue dots are solid, and red dots are empty space.
Each 2x2x2 cube of solid and empty dots is used to look up a particular tile shape from an atlas, and add it to the chunk.
Still debugging the tile generator, I'm afraid; some of the tiles are rotated the wrong way around, and I don't know why! But It's good to see it working somewhat!
Quick stress test of real-time terrain editing/geometry generation.
I'm shifting the terrain data one voxel to the left, and regenerating the geometry for the entire test map, 4 times per second. Camera and input are chugging a bit, but this is entirely unoptimized.
This Marching Cubes thing really is quick and efficient!
#Godot #GameDev #ProcGen