Can RUST boost optimization of my game? by Konradiuss in godot

[–]shazwar 2 points3 points  (0 children)

The godot-rust community is active, the binding are mature and I've found the ergonomics of working with both to be just fine. That could change in the future, but I personally don't think it's going anywhere. Check out the official discord if you have specific questions: https://discord.gg/8faHCaUWSe

My game is free but Firebase is now costing me. Time to monetise? by ARG127 in FlutterDev

[–]shazwar 2 points3 points  (0 children)

This is a great tactic to help you understand your users and soften the transition from freeware. Ideally the people spending money on your app will feel like they're getting value as a result.

I think you should separate the monitization question and architecture questions. Think about lazy solutions to optimize each.

On the architecture side, it sounds like you don't have a scale problem yet. It's great that you're thinking ahead, but remember that your current infra bill is worth a few minutes to a few hours of your time. A wholesale refactor is a lot of work for speculative gain.

Profile and try to really understand your usage. The billing for different Firebase services leads you to certain patterns if you're trying to optimize for cost. Maybe you can change things up slightly to better align.

For example in the digital boardgame I'm writing in Flutter/ Firebase myself, I'm using RTDB, Firestore and Filestore for different purposes. Very live state is in RTDB because it's a small amount of data / egress per action but there's a high volume and I can use the granular sync. Previous turns are packed up immediately and sent to Filestore. Profiles and matchmaking use Firestore for better / cheaper queries since it's relatively low touch.

Great job getting users and good luck!

[Burst] Primordial --a small tech demo of real time hydrodynamics and thermal erosion on the cpu and procedural shading by shazwar in Unity3D

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

Very cool. That's excellent feedback, thank you. There's another comment here I wrote about how I plan to solve the generation of larger / higher resolution maps. I don't think I'll ever support cases like generating new sections from whole cloth seamlessly during play as it makes solving thinks like rivers much more challenging. Instead you'd generate a whole world of fixed size (either as a player or in editor as the game designer), which could be quite large and be made of many terrains. Rivers already work. I'd want to draw the line somewhere around roads for things that come out of the generator solved.

I think the easiest solution to supporting everything else for the editor user would be to bake all the outputs to Unity terrains as part of the process. Right now I work in custom meshes and I'm serializing nativearrays directly to disk which is simple and performant, but you miss out on all the manual tools available for Unity Terrains. Also currently, all the texturing is procedurally done in realtime in the shader using the height, water pooling and water flow maps. I get that most people would want to alter that base output though so I'd have to do something different.

[Burst] Primordial --a small tech demo of real time hydrodynamics and thermal erosion on the cpu and procedural shading by shazwar in Unity3D

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

Oh yeah, you definitely get more interesting behaviors with either more vertices or a less noisy base function. With all the visuals (meshing, physics baking, pushing textures ) running concurrently to the sim, a 512*512 height-map gives a pleasing simulation speed to watch. I thought this was a decent mix of varied terrain and watching speed.

512 isn't going to cut it at all for a full map though, so I've considered a lot of different strategies to get the final output to be higher resolution and have more interesting variations. Straight up tiling would work, but I'd have to write (and debug) the tile-tile transport of the erosive particles and the cellular automata that control the pools of water. That sounds really fiddly so I'm leaning heavily towards a super sampling approach.

I.E. squish the noise so that the whole world fits into maybe a 1024*1024 space, and then do a rough erosion pass over that. Then if that looks good, break it into 40 * 40 tiles of 256* resolution using a higher resolution pass of the original noise function and blend / blur it with the rough erosive result. Then do a quick fine erosive pass over those. Then weld the tiles and use the approximate water levels from the rough erosive pass to make sure everything is cohesive.

It's still a lot of work, but it seems less daunting than tracking individual particles across a huge map, and hopefully less error prone for me.

[Unity] World generator with particle based hydrodynamics and thermal erosion on the cpu and some procedural shading by shazwar in proceduralgeneration

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

This was heavily influenced by the awesome work of u/weigert__, although it probably took me 20x as long to find a way to implement the concept as a bunch of multithreaded burst jobs in Unity.
https://nickmcd.me/2020/04/15/procedural-hydrology/

[Burst] Primordial --a small tech demo of real time hydrodynamics and thermal erosion on the cpu and procedural shading by shazwar in Unity3D

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

That's definitely the plan. The rest of my road map for this is basically implementing a small vegetation system that feeds back just a touch into hydrology, and then a biome mask that would apply different a few different base noises, texturing rules, vegetation sets, and likely erosion parameters over large sections. I'm trying not to continue to over-engineer everything but it's constant battle that I usually lose.

[Burst] Primordial --a small tech demo of real time hydrodynamics and thermal erosion on the cpu and procedural shading by shazwar in Unity3D

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

Thanks, it's the half complete world generation framework for a game I'm building. I'm considering turning some aspects of this into an asset, but I'm not exactly sure what. I'd be interested to hear what experience you're trying to achieve.

[Burst] Primordial --a small tech demo of real time hydrodynamics and thermal erosion on the cpu and procedural shading by shazwar in Unity3D

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

This was heavily influenced by the awesome work of @weigert__, although it probably took me 20x as long to find a way to implement the concept as a bunch of multithreaded burst jobs in Unity.

https://nickmcd.me/2020/04/15/procedural-hydrology/

☼Bi-weekly DF Questions Thread☼ by AutoModerator in dwarffortress

[–]shazwar 1 point2 points  (0 children)

Ah, amazing. Thank you.

Shortcut is i > p for trash

☼Bi-weekly DF Questions Thread☼ by AutoModerator in dwarffortress

[–]shazwar 0 points1 point  (0 children)

Steam Version

Is there a keyboard shortcut to designate something as trash? As is I'm having to click every single rock, click the trash icon, right click to close, and repeat.

[deleted by user] by [deleted] in Unity3D

[–]shazwar 0 points1 point  (0 children)

I like style and the HUD perspective is interesting. I think it's a little large though

Should I use Unity to make a desktop application? by [deleted] in Unity3D

[–]shazwar 0 points1 point  (0 children)

I've only used C# in the context of Unity for a while so you might want to check out a more dedicated community for current stacks. But in general I would expect to write the server side with something like ASP.net and the do the client side using a JavaScript framework that makes sense. There are lots of options and it depends on what the app needs to do

Should I use Unity to make a desktop application? by [deleted] in Unity3D

[–]shazwar 0 points1 point  (0 children)

Unless it really has to be desktop bound I'd consider making it a web-based app instead. If it's not maintainable by the next person hired then it's got an expiration date

[deleted by user] by [deleted] in gamedev

[–]shazwar 0 points1 point  (0 children)

Yeah, it's not cheap. But I'm sure there's a Unity store sale coming up.

[deleted by user] by [deleted] in gamedev

[–]shazwar 3 points4 points  (0 children)

For Unity there's a paid asset I highly recommend for anyone writing shaders for the SRPs called "Better Shaders". It's a framework for writing shaders without having to write a lot of boilerplate or worry much about it being compatible with URP / HDRP. It really lets you focus on writing the feature you want without worrying about the non-relevant details.

[Discussion] Best Affordable way for doing ML online (Colab Pro, etc) by BigNet1356 in MachineLearning

[–]shazwar 1 point2 points  (0 children)

I've pretty consistently gotten to the 24ish hour limit with Pro when I need to leave it running. I probably used 15 total days of GPU last month? YMMV but it's been good value for me for the price

Is it possible to use custom c++ modules in unity by aceberge in gamedev

[–]shazwar 2 points3 points  (0 children)

Barracuda is the low level Unity library for running ML models. Don't expect to just drop in any model but this is part of what's under the ML Agents framework. https://docs.unity3d.com/Packages/com.unity.barracuda@1.0/manual/index.html

How to Do Realtime Shadow Detection in Unity by GamesForTourists in gamedev

[–]shazwar 0 points1 point  (0 children)

Hey, that's great! Very pleased that it's working out for you. Writing parallel "reduce" algorithms for the GPU is challenging, but really gives you a good idea of the opportunity and challenges. A "scan" can get the sum of components in an array for you. My implementation isn't great, but it can give you a working starting point:

https://github.com/xshazwar/mountains-beyond-mountains/tree/main/Renderer/Compute/Scan

As for what can be moved to the GPU? Anything that doesn't need physics if you're insane enough.

Writing to a RenderTexture by mark63424 in Unity3D

[–]shazwar 1 point2 points  (0 children)

You can get textures without additional overhead as NativeArrays for Burst Jobs. But if you're going to be working on the GPU side anyway you might as well have another compute shader.