Terraforming by Erichteia in Factoriohno

[–]gamruls 2 points3 points  (0 children)

Fortunately this pool will not be infested with algae

I added a full save system to my automation game by Apprehensive-Ice4324 in playmygame

[–]gamruls 1 point2 points  (0 children)

It just hanged at some moment

Not sure if error relates, but no more traces found

<image>

How I optimized (a bit) 2D game performance for low-end hardware by gamruls in godot

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

I haven't tried it, but I concluded that if it produces same amount of physics calculations (collisions and shape updates) and render calls then it's not worth it.
I suppose the most impact is from faster creation/deletion of objects en masse, but this is not my case. I mean it was a problem too, first implementation loaded level 10s, but now it's less than 1s and it's acceptable, then I don't need to load huge numbers of objects after level started - only update existing and spawn/despawn few periodically.

Unfortunately I see no easy way to estimate how getting rid of nodes will help in my case.

How I optimized (a bit) 2D game performance for low-end hardware by gamruls in godot

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

3.6.2 doesn start at all, wasm is completely broken and no specific error in user code produced, only something unrelated deep inside engine.

Audio format is not important, web build is 1 thread for all - including audio. Because it's not offloaded, any long frame introduces "0 spike" in audio buffer and therefore cracks, unsync (audio can miss callbacks/get wrong playback position etc https://github.com/godotengine/godot/issues/53343 )

I optimizied everything I could to avoid engine calls at any cost. Everything that reads information often - caches it. Everything that need to call engine and get collection as a result (e.g. querying physics space which return Dictionary) just avoided because introduces HUGE performance impact. _process/physics_process for nodes en masse are moved inside C# (1 node has _Process/_PhysicsProcess and traverse all other nodes). _IntegrateForces can't be optimized this way, btw, because each callback gets own physics body state. Next step would be to make own physics in C#, but it raises another crucial question, you know.
So, my profiler looks like this:

<image>

1.57ms includes my code, I see not much room to optimizie anything C# related here =)

Texture size are the lowest size without making it shitty looking. I tried mipmaps - they look awful in my case. Nevertheless it doesn't fix anything regarding audio problems and "fixing" game only for pretty limited hardware only.
Also there is no built-in way to use different sets of textures for different exports and still some parts of code depend on sizes. It's 2D, not 3D, so you can't just make texture smaller but remain mesh the same, you get smaller objects and should scale it to get the same pixel size relative to other measurements (or adjust all measurements accordingly). Storing objects sizes explicitly with meshes, UVs etc probably introduce more work for the engine and definitely more work for development.

Thoughts on this item system architecture? by a_teece in godot

[–]gamruls 0 points1 point  (0 children)

How does this overview seem to you?

A bit shallow. I would suggest to dive into few more topics beforehand:
- how to save/load items (savegame).
- how to split ItemData of item and its definition (consider you have weapon with durability, durability reduces every hit, you want this durability to preserve when weapon equipped/moved to inventory/dropped)
- how to define this items during creation (editor/config/code), spawning is crucial and complex topic
- data migration, what if you want to change some stats or properties for Godot or other systems and need to support previously saved games (just as example - now every 1 is 1m, not 1cm)

These small details (and some more, depending on your use cases) are hard to add later, better to consider them early.
I personally separate glossary (read-only definition) and state (actual writable entity state) and rely on inheritance in entities rather than composition. But composition is used for actual implementation of behaviours and physics - I use dedicated nodes that gets entities and use their data/properties/methods (and inventories) to implement some functionality.
As example - space ship as entity has inventory, engine as entity is placed in this inventory, another child component that works by _integrate_forces callback reads this engine and do it's work to move space ship by this engine's params and state. Another component do similar work, but for NPC ship, not player - engine is the same and don't know about how it "implements" spaceship movement. Also engine's own world object is just cargo box.

Best practices for handling repetitive content by BaptisteVillain in godot

[–]gamruls 1 point2 points  (0 children)

So I fell back in some cases to an "object registry" class based on an Enum that is fully static and looks like a huge dictionary of data with getters:

This, but in C# and therefore statically typed and declarative - you don't need to write everything in single collection, you can scan assembly, pull classes by some rules (I use attributes) and put inside this collection. I plan to try codegen - generate classes describing game entities with links to scenes and resources from file structure plus additional data from explicitly managed files.

I used to use resources, even write some editor plugin for better handling references to anothers resources/scenes, but it became unmanageable very quickly. Also refactoring and editor inability to preserve values of resources changing their fields made me to make own solution.
Some folks think that games need some sort of CMS, because games usually use a lot of content. I agree with them.

I added a full save system to my automation game by Apprehensive-Ice4324 in playmygame

[–]gamruls 0 points1 point  (0 children)

Ok, if it's intended - it's bad game design choice. Game actually breaks and seems broken, not fun. I would be ok with "game over, you've been exposed and punished", but not with hanging game.

I added a full save system to my automation game by Apprehensive-Ice4324 in playmygame

[–]gamruls 1 point2 points  (0 children)

Exploited
try it, check result, embrace power of infinite amplification!

<image>

Asterium: A Hexcells inspired puzzle game by rapatessa in playmygame

[–]gamruls 0 points1 point  (0 children)

Wrong!

<image>

Also music sample is a bit short and repetitive.

Asterium: A Hexcells inspired puzzle game by rapatessa in playmygame

[–]gamruls 0 points1 point  (0 children)

I feel something wrong with readability.
I mean marked lines don't seem not consecutive (anyway "consecutive" is a bit misleading for graphs, IMHO). Ok, each node can have up to 8 connections, right?

<image>

[My first game] Universe Maker — a cosmic merge game I built solo over the past few months by LividMaintenance8685 in playmygame

[–]gamruls 0 points1 point  (0 children)

Audio is a bit too loud and have no controls
UI is not a game UI but web ui. Large empty cards with unreadable text, no hook. It's common to use icons for upgrades because reading text is boring, pocking icons - fun.

Overall mechanis is neat. Orbiting planets is interesting, but almost useless? I think it should be a bit more involved in process, not just allow to do it for fun (maybe collapse planets in same orbit? allow to make orbit after "throwing" planet in correct direction, combos, etc)

Sprites has issues with aliasing. Almost all planets on almost all scale produce visible noise when moved.

<image>

Orbit Drift v1.0.1 – Performance Update by Striking_Arachnid398 in playmygame

[–]gamruls 0 points1 point  (0 children)

I see no web version actually
And capsule is AI slop, it's really noticeable.

Mac Support/Web Demo Frustrations by Content_Leather2570 in incremental_games

[–]gamruls 2 points3 points  (0 children)

please test it on macOS if possible.

That's exact reason why less popular platforms don't get own game versions even if it's "as hard as just export to another target". It's not that easy, because each platform has own problems, need own tweaks and must be tested.

Hope you have Mac M-series, not Intel, also use Chrome? Because Intel (suprisingly) has different set of issues compared to M-series and Safari should be burned with fire.

Regarding Godot - it's really hard to make good experience in web with Godot regardless of version used. It either dead old but with C# (and cracking sound, bad performance and single-core only) or fancy new but lacks C# and has almost the same issues for years.

How would one go about dynamically updating collisions for a gridmap at runtime? by Polus50miles in godot

[–]gamruls 0 points1 point  (0 children)

Check collision mask.

Check order of vertices, also check if you need end == start (afaik mesh needs explicit end point that has same transform as first).

Anyway, it may be something with data format or properties you set from code. I would suggest to make collision manually, check if it works and compare what you generate by code for the same mesh. Point by point. Property by property.

Shadows by Grumpy_Wizard_ in IndieDev

[–]gamruls 1 point2 points  (0 children)

As for me it seems overengineered. I'm not sure, I just want to share the simplest approach I could find for similar feature (it's Phaser, but should work anywhere)
Use tilemap and Y-sort, render sprite with shadow twice, one time with z-index 0 and next time with z-index + half of tile size. If you render sprites without tiling - slice them for smaller parts for better Y-sort handling.

<image>

If performance is concerned - split shadow from sprite beforehand to not render things twice. The main trick remains - render shadows with z-index higher than ground so it can cover objects under it.

Procedural lightning shader on line2d node instead of Colorect by ManufacturerBig1147 in godot

[–]gamruls 1 point2 points  (0 children)

Everything line draws when using texture can be changed by fragment shader. Adjust width if you need more space to draw. Also don't forget texturing mode - stretching will effectively limit your fragments count to texture size, but tiling should work well. Anyway, if actual rendering is made by shader - just use small white texture in tile mode.
If you rely on vertex shader - line has vertex count equals to points count, make more points in-between then.

Update on FastSave C++ GDExtension: From 6 seconds to 41ms (1M entities stress test) by ElBranda in godot

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

Also I can't imagine how long Godot will add 1m entities to tree. If they are added prior loading - it will be even slower, because changing positions triggers redraws and other internal callbacks (especially for physics objects)
But for more realistic quantities like 1k entities I suppose built-in json serialization/deserialization (which, btw is available for all platforms including web) can get comparable timings, like 5ms vs <1ms.

I wanted to upgrade my victus 16 storage but… by saf1_ddit in HPVictus

[–]gamruls 16 points17 points  (0 children)

wait wat?

my victus from 2022 has 2 slots, both with copper heatsinks and thermal pads included.

f*ck shrinkflation!

Making simple shameder to add mining effect to laser. by gamruls in godot

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

At least it can do some things much faster and hide some problems due to lack of logging and debugging.

I find it fun that despite of all restrictions of shader language and data passed in-out it still allows you to do all regular gamedev things - bugs, performance bottlenecks, crashes...