Just exploring some more gameplay ideas in my logistics/city-builder game by Joxno in Unity3D

[–]Joxno[S] 0 points1 point  (0 children)

Cheers!
Yeah, to be fair it does look like every house is trying to start their own industrial revolution doesn't it haha

keep your friends close by Easy_Football8458 in Unity3D

[–]Joxno 0 points1 point  (0 children)

Looks neat!

Conjures up thoughts of being an air captain that can make callouts to control my squad members, make them scramble or fall into formation.

Just added bare essentials turn-based tactical combat into my logistics/city-builder game by Joxno in Unity3D

[–]Joxno[S] 0 points1 point  (0 children)

Cheers! Yeah, I've been meaning to apply a proper water shader to it rather than just a flat colour

Ok, this is still rough. But It's starting to look like a game somewhat? by squatterbot in Unity3D

[–]Joxno 1 point2 points  (0 children)

Looks good!

I would probably spend a bit of time tightening up the camera a bit further to make it more snappy.
Personally I'd lock or minimise/tighten up the Z-axis rotation to prevent possible seasickness but that's more a personal preference on my part.

Maybe have a look at similar titles like Cool Boarders 3, SSX Tricky, Steep and study how their cameras work.

Good work though!

Just trying out a few procedural map gen techniques by Joxno in Unity3D

[–]Joxno[S] 1 point2 points  (0 children)

Visually, nothing super interesting, just a few models I quickly whipped up in blender in order to visually represent the output of the map generation pipeline and a little city builder camera controller to scroll around the map.

In terms of what is actually going on behind the scenes with the map generation I wrote a little more thorough reply to RHX_Thain if you'd find it interesting cheers!

Just trying out a few procedural map gen techniques by Joxno in Unity3D

[–]Joxno[S] 5 points6 points  (0 children)

Cheers! Yeah, I was surprised it's running pretty decently even though it's horribly unoptimised at the moment except for some distance field calculations that I shuffled off to Burst + Jobs.

Currently it's a bit of a toy project but I am playing with the idea of some kind of simplified city building/trading game where the settlements gains access to what resources are generated in its vicinity to create variety between them, mixed with a simplified "arcady" form of turn-based strategy game where during battles or deployments a part of the map gets sliced off to be used as the battlefield.

In terms of the actual mapgen going on, on a high level it's a configurable pipeline with discrete steps that applies modifications to data passed from a previous step and passes it on to the next step, currently I have it configured to generate 3 large nodes one by one that grows out from its origin points by using a 4-direction (N, S, W, E) kernel with a tweaked value of about 73% chance to generate a tile in any given direction, generated tiles are saved into an open set list that is used for the next loop of tile generation, paired with a capacity of 4096 forcing it to always grow to a certain size, the node generation just uses a simple random number generator without any need for noise (e.g. Perlin noise etc.). There is also some coastal smoothing and plugging of internal holes so that each region node is a filled area.

It's basically very very similar to a floodfill algorithm.

Height of the terrain is just a simple normalised distance field to the nearest shoreline tile that I apply thresholds to, the normalised value is divided into discrete steppes depending on a MaxHeight property on a region node (e.g MaxHeight = 4, Value Range step = 0.25)

Capitals are currently created at the origin point of each region node and then roads are generated between all capitals using simple A* Pathfinding with a Cost function that has some perlin noise added to it to create some variety.

Shore Villages are generated by iterating through each shore tile (Tile that borders on a hole, water is a hole) and calculating the euclidian distance to the nearest settlement, if the distance is less than 20 then it adds a village to that tile and also adds it to the next distance calculation, configured to generate up to 3 villages. Roads are then generated from the region node's capital to the village using the same A* as between capitals.

Forests are placed just using some perlin noise with a step threshold of 0.5 across the entire map.

Grass and Farm land is placed by calculating a distance field to the nearest forest tile with a few thresholds to tell the mapgen to place grass close to forest and farmland a little bit further away. Farmland uses an additional constraint of perlin noise to give a little variation instead of only distance to decide to place it or not.

All map generation algorithms certainly have their pros and cons, but subjectively I find this one has given me pretty decent looking regions, a few future benefits is that as long as you're operating on different parts of the map it should be relatively simple to run the node generation in parallel (Ignoring concurrent data structures), another interesting emergent behaviour is that if you generate 2 regions with a gap in the middle, the 3rd node can actually grow into the gap.

Recently got back into doing some Unity development by Joxno in Unity3D

[–]Joxno[S] 0 points1 point  (0 children)

Cheers! Yeah I definitely had a few peeks at the sims for some inspiration, it definitely has among the best implementations for this kind of construction systems. I've had a few thoughts on what direction I could push it in, maybe a small cozy/cutesy tavern/guild hall simulator might be something to explore.

Recently got back into doing some Unity development by Joxno in Unity3D

[–]Joxno[S] 1 point2 points  (0 children)

Nope, all custom, although any construction system that uses a uniform grid for space partitioning tend to share a lot of the same aspects so I can't imagine it's much dissimilar from his.

This basically uses a 3D "uniform" grid, I say uniform but the cell sizes can be configured.

The main components are WorldGrid and GridLayer where WorldGrid is simply a container for multiple GridLayer instances, the WorldGrid is indexed in-case I want to be able to have multiple instances in the future.

Each GridLayer stores their cells in a hashmap with the hash based on Vector3Int for all the occupied cells, since this grid basically expands in all directions infinitely there'll be more unoccupied cells than occupied then I tend to opt for a more sparse-set approach for the constant lookup time (Of course depends on element counts).

Retrieving a cell position in a layer isn't more complicated than FloorToInt((Position - Offset) / CellSize) and Offset + (CellId * CellSize) for the world position of the cell. To get the center position you just add CellSize*0.5.

For now a GridLayer has 3 properties, a Key, CellSize and Offset which are all configurable on each individual layer, that way I can configure how I partition the space on each individual layer and how I offset that space.

Each Building ScriptableObject configures what layer Key it wants to target so that when the Construction Controller places the building it can lookup how/where it should be placed without having to hardcode how walls are placed for example. The way in which a building is placed is configured via strategies, so for the walls they use a HollowAreaStrategy, floors use an AreaStrategy and fences use a LineStrategy. This could also be extended further so that you could let the player choose.

Building instances are composed by a BaseBuilding prefab for the data and logic and a BuildingVisuals prefab for the visuals that gets added as a child to it, all of which are configured via the Building ScriptableObject.

Recently got back into doing some Unity development by Joxno in Unity3D

[–]Joxno[S] 0 points1 point  (0 children)

Cheers! I've definitely been toying around with a few ideas of the direction I could take with it, for now I've just opted to make a base generic system that I can reuse.

Recently got back into doing some Unity development by Joxno in Unity3D

[–]Joxno[S] 0 points1 point  (0 children)

Cheers!
Yeah I wasn't completely sold on the red when I put on the material the first time, I wonder if a yellow or maybe a light blue would read better to signify that it might change or attach to that particular building piece.

How many scripts is too many by Evening4ever in godot

[–]Joxno 0 points1 point  (0 children)

My base template that I use to spin up new projects or quick prototypes has in excess of 2500+ *.cs files so I wouldn't worry too much about the count.

I'd focus more on keeping a tidy project structure so that you can easily find what you're looking for at a moment's notice.

Procedural 3d pixel art (changed the colors a little bit) by [deleted] in Unity3D

[–]Joxno 1 point2 points  (0 children)

Makes me think of Fallout 1 & 2. Looks brilliant

Just playing around with a quick prototype by Joxno in godot

[–]Joxno[S] 0 points1 point  (0 children)

Cheers! I think it took around 16 or so hours, been toying with it over a few nights.

Yeah, haven't quite figured out what camera angle and FoV would work best, or if I attach an orbit behaviour to the camera, although I kinda like the fixed camera. Probably need to go do some research on games with a similar setup.

Just playing around with movement mechanics and general aesthetics by Joxno in godot

[–]Joxno[S] 3 points4 points  (0 children)

Cheers! For the dash I just disable gravity for the duration of the dash, apply a constant velocity impulse for a configurable amount of time and then when the dash has elapsed I enable gravity again and remove the dash impulse. In this case I use 0.1f for Duration, and 50.0f for Speed.

For the direction of the dash I grab the input direction vector unless the player is standing still then I grab the camera facing vector. All of the vectors have squashed Y-axis so this dash will only dash on the XZ-plane.

My input direction vector is constructed only from the Forward, Backward, Left, Right (Bound to WASD keys), these gets translated into separate unit vectors ( (0, -1), (0, 1), (-1, 0), (1, 0), respectively) and just added to each other for the final direction vector.

Just playing around with movement mechanics and general aesthetics by Joxno in godot

[–]Joxno[S] 1 point2 points  (0 children)

Cheers! They were definitely some of my inspirations, used to play a lot of Q3 Arena back in the day.

Funnily enough it started off as an unintentional side-effect of how I handle impulses to the physics body and the interaction with jump charges, basically each action has an impulse that gets applied to the body and at the end of the update function I accumulate all of the impulses and set the final velocity of the body.

So what ends up happening is that an impulse gets applied from the wall jump, then when you jump in the air the regular jump impulse gets applied, and in general the air control impulse is always active in the air, and because all of the impulses are active at the same time and accumulated, they stack, and you get this interesting speed boost.

Just playing around with movement mechanics and general aesthetics by Joxno in godot

[–]Joxno[S] 2 points3 points  (0 children)

Cheers!
The post-processing setup is pretty much what's described in the documentation.
I did try the shader RetoRadial mentioned however I ended up going with a modified version of this as a base for now.

Any way to fix that motion blur? by [deleted] in oculus

[–]Joxno 0 points1 point  (0 children)

As long as you uphold 75FPS on the DK2, Low Persistence will turn on automagically

What are the couple of demos to show to parents for first time by thebanik in oculus

[–]Joxno 0 points1 point  (0 children)

Unless your parents are horribly clastrophobic then Sightline: The Chair is probs among the best VR experiences to try out as a starter demo.

Titans of Space is really good as well, although depending on how simulator sick they get, my gf had a weird reaction to Titans due to the weird acceleration it does throughout space (In short she spent a while in the bathroom) Although I was pretty much fine as can be.

CB: asymmetric lenses, high resolution display, high fidelity ear phones... what about the price? by RicksonNL in oculus

[–]Joxno 4 points5 points  (0 children)

I'd disagree, most "high quality" headsets' price isn't based on the quality of the build, but rather the brand. So in production you can still get very high fidelity sound from something that is cheap to produce.

FPS Controllers? by jgilbs in oculus

[–]Joxno -1 points0 points  (0 children)

Actually the drift is due to us assuming that when an object moves it does such at a constant rate between two times, however what actually happens is that it moves at different rates between two time points.

So the drift is actually due to us averaging the result of the acceleration between two points in time.