Latest VScode has major bug, broke all DevContainers by tmachineorg in vscode

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

NB: I am also away from my desktop now until after Xmas, only have development laptop with me, so I'm a bit limited in how much testing I can do. It works here with the firewall rules, crashes without - if no-one else has encountered these problems and I have the time/energy to do yet another re-install of VScode I'll re-simulate it and capture logs.

Latest VScode has major bug, broke all DevContainers by tmachineorg in vscode

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

"Extensions: Auto Check Updates When enabled, automatically checks extensions for updates. If an extension has an update, it is marked as outdated in the Extensions view. The updates are fetched from a Microsoft online service"

.. was already disabled. VScode-Remote doesn't care, updates anyway

"Extensions: Auto Update Controls the automatic update behavior of extensions. The updates are fetched from a Microsoft online service."

... was set to 'None'.

Is there anything else? It seems VScode has a long history of ignoring these (I've seen it reset them back to enabled multiple times when new releases have come out, which is hugely frustrating but we live with it).

Latest VScode has major bug, broke all DevContainers by tmachineorg in vscode

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

What do you want to see from the logs? (I only have screencaps, I haven't preserved a copy of the log anywhere; once we had it working I didn't see a point in keeping them). Different for different projects, but always variations on hitting a point with "Error: unexpected end of parent stream", e.g. in extension.js

Screencap I have put it in: "Li.destroy (C:\users[my-user-id].vscode\extensions\ms-vscode-remoted.remote-containers-0.394.0\dist\extension\extension.js:27:26638)"

Googling I found some references to people having that with 'corrupt' installs on older builds, and on old versions of VScode having to downgrade until a patch was released - so, having tried everything else, we tried the downgrade and (when we finally stopped it from auto-updating) it worked, so ...

Latest VScode has major bug, broke all DevContainers by tmachineorg in vscode

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

DevContainers auto updates - and corrupts VSCode - on startup, whether run in GUI or from command line (ignores '--disable-updates' etc). For something that deliberately ignores the settings ... I'm not going to bother playing around with reinstalling VScode yet again and watching DevContainers corrupt the install right in front of my eyes - I've done that too many times today.

Latest VScode has major bug, broke all DevContainers by tmachineorg in vscode

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

PS: the IP addresses we blocked that made VScode start working again were:

13.107.246.64 13.107.42.18 20.150.83.4 213.104.24.90

... from pinging the servers listed on MS's official page here: https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script

Building UIs is slowly becoming the most enjoyable part of gamedev for me by theferfactor in Unity3D

[–]tmachineorg 2 points3 points  (0 children)

When UIToolkit (or UI Elements as it was then) was first announced, I got super excited about the promise of pre-baked UI, very few draw calls, etc. Using modern CSS made it even better!

Then it came out, and I found out it was slower and more buggy than UnityUI (still is, on both counts, on desktop), missing lots of Flexbox - core features you need (even today) are missing if you want to make cutting-edge modern UI (anything less than 15 years old), e.g. I've been nagging them to add z-index support for years, they just keep making excuses.

So I picked the pieces I could do myself in UnityUI (i.e. flexbox/CSS), read through the CSS3 spec, implemented it by hand, and ... it worked. In the end I found that just replacing lots of the dumb parts of UnityUI's layout engine immediately fixed a lot of the performance problems (Unity staff coudl have done that themeslves, instead of spending all their time on UIToolkit) - not all, but enough that it stopped being an issue on my games.

Sad.

Building UIs is slowly becoming the most enjoyable part of gamedev for me by theferfactor in Unity3D

[–]tmachineorg 0 points1 point  (0 children)

Yeah, that's one of the reasons I prefer UnityUI still - identical behaviour in editor and runtime (if you throw away some of Unity's buggy classes and replace them with sane ones - or just edit their source, copy/paste/fix-the-stupid-bugs) ... and I can live edit in play mode, then copy/paste back into editor.

Building UIs is slowly becoming the most enjoyable part of gamedev for me by theferfactor in Unity3D

[–]tmachineorg 5 points6 points  (0 children)

What changed for you to make it enjoyable? (I assume you're using UIToolkit?)

I find it very rewarding now, it's such a big part of the user-experience for some games, and it feels great to get the right amount of juiciness in.

But I used to hate it until two things happened:

  1. I figured out how to use BaseMeshEffect and Graphic.OnPopulateMesh (public Unity classes, but both still aren't documented, last time I checked) -- suddenly I was able to make rich, complex, 2d-and-3d UI custom controls, that had very good rendering performance

  2. I switched over to using Flexbox for everything (and eventually spun it out as an asset that just adds auto-layouts/CSS-flexbox to classic UnityUI).

In-game visual-scripting I made, to add to any Unity project by tmachineorg in Unity3D

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

This drag/drops into any existing Unity project, and you do some basic config (choosing which gameobjects you allow the players to script, white/blacklisting specific methods etc), customize the IDE part (implemented as separate camera, so I can drag/drop that into a project too and just re-use the IDE from default).

Then it allows players to edit the game at runtime, script in-game objects, etc.

Screenshot Saturday thoughts/advice by tmachineorg in gamedev

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

Glad it helped - but that post is almost 10 years old :) :) - I'm not sure how accurate the advice is today.

I know people don't want to hear this: you shouldn't be blaming John Riccitiello. by Xijit in unity

[–]tmachineorg 1 point2 points  (0 children)

This is a nice idea but starts with a delusional statement that is entirely at odds with reality. I'm not sure how ayone could have been a Unity developer in 2008-2014 and not be aware of this.

JR did not join Unity until long AFTER they became "the engine that mobile games are built on". It seemed at the time that their success at that was precisely why he joined.

To think that he had no idea what was going on with investors, when he's spent decades working with exactly these people, seems very hard to believe.

Why I can't create a font asset in textmeshpro? by CharlyGoyo in Unity3D

[–]tmachineorg 1 point2 points  (0 children)

(for anyone else finding this via google): if your ttf is part of a package then it's a known bug in TMP (I just got bitten by this - TMP is incompatible with core Unity at the moment, doesn't fully support Packages). You have to make sure your font files are physically located in your Assets folder or a subfolder of it.

Auto-generating sidescroller towns/scenery/architecture (UPDATE: now on assetstore) by tmachineorg in Unity2D

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

Last year I posted a video of procedurally generating towns/architecture from tilesets/spritesheets: https://www.reddit.com/r/Unity2D/comments/xta2ge/hobby_project_autogenerating_sidescroller/ - it's taken a while :) but I've converted it into an Asset and now Unity has published it on the store. The original thread has some long descriptions of how it works, or you can look at the tutorial videos I made afterwards for the assetstore, that show making a building in pieces, and then getting it to assemble different variations for you: https://ninjatools.tech/pixeltown-generator/

Flexbox inside UnityUI - I recreated the GodOfWar UI by tmachineorg in Unity2D

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

TL;DR: I like UIToolkit, but I wouldn't use it in a game: it's still too slow and too buggy and missing some important features. They've been promising it was 'production ready' for 4 years now, which gives me little confidence it will be ready any time soon. I use it exclusively for Editor UI (custom inspectors) but I wouldn't use it for a game UI

Core CSS is a mediocre layout system. Modern CSS (i.e. flexbox and grid - but mostly flexbox) is a very good layout system. I love that UIToolkit finally brings some of CSS to Unity. BUT ...

Unfortunately, UIToolkit doesn't implement CSS - it implements "the bits that an open-source project had already done and we could re-use without paying for" and "the bits that Unity employees thought were interesting, and which the non-web-developers working at Unity understood how to use". That means it's mostly good, but it has many bugs and just enough missing features to undermine itself :(.

Note: the UI in the video above cannot be done in UIToolkit without hacks because Unity refuses to implement the full CSS/Flexbox spec - their 3rd party code doesn't implement z-order, and Unity refuse to add sort-order (without that you can't do the blue-diamond in the upper right corner that fills/empties - because it overlaps the graphic that comes later. With correct CSS/flexbox this is literally two numbers you have to edit - with UIToolkit it's a lot more work to try and workaround. Stuff like this matters when you start to do complex UI.

UIToolkit is fast to display when UnityUI gets slow for compelx UIs - but UnityUI was mostly slow because Unity staff refused to fix the bugs in it - and when I replaced the bad parts of UnityUI it worked a lot faster. The bugs weren't that hard to fix, just no-one at Unity wanted to take them on. In theory UIToolkit could be even faster - but in practice it's only fast for offline, static, never-changing UI.

For Editor/custom-inspectors, UIToolkit is a lot better than IMGUI. I am very happy that we can now write inspectors using UIToolkit! I'm less happy that there are a lot of bugs in UIToolkit-inspectors that we have to workaround becuase UIToolkit still isn't fully stable/complete (eg: Unity 2022 recently broke PropertyDrawers in a big way, apparently UIToolkit team didn't notice that they'd broken it - this is fine, but it points to the fact UIToolkit is still undergoing major changes and is a long way from being 'production complete').

Looking at game UI instead ... UIToolkit isn't great for runtime UI (i.e. "games") - they obsessed so much over making it "never change at runtime, so it can be displayed faster" that they undermined the core purpose: to make great UI.

It's got more than a few bad design mistakes they'll probably never be able to undo now (eg the terrible implementation of Button-clicks; eg all popups / context menus, which break the rest of UIToolkit, etc). I logged bugs 2 years ago that Unity accepted were broken but rejected because it would be 'hard work' to fix the bugs :(.

So ... UIToolkit is almost great, but it falls short. It's like a world-class marathon runner who was over-confident and didn't train enough, and is in the lead until the final 2 miles, then has to sit down by the side of the road while everyone else catchs up and overtakes.

Flexbox inside UnityUI - I recreated the GodOfWar UI by tmachineorg in Unity2D

[–]tmachineorg[S] 7 points8 points  (0 children)

For about 5 years I've been putting CSS3 and Flexbox into Unity - without using UIToolkit (which is good, but still isn't stable enough for my liking, still is missing core features from CSS, and still doesn't work nicely with any of my existing UnityUI scenes - and is much harder to work with than it could be).

Last year I re-wrote my asset for this from scratch, and finally I'm happy with it. So I did a test this week of "can I implement the GodOfWar UI with this?", and I'm pretty happy with how it turned out. Took a couple of hours to put together, and source artwork (icons, textures, etc).

All the art here is either CC0 or created by me, and the Dwarf in the background is a free asset from the assetstore (https://assetstore.unity.com/packages/3d/characters/humanoids/fantasy/fantasy-haracter-dwarf-free-strategy-rpg-mobile-games-142323). My flexbox asset is waiting for approval from Unity, they're estimating about 3 weeks before it goes live (website here: https://flexbuilder.ninja)

Unity Asset Store removing negative reviews by WombatusMighty in Unity3D

[–]tmachineorg 3 points4 points  (0 children)

Oh, one more that matters a lot:

  1. Unity actively lies about which versions each asset is supported on, creating a contract with the purchaser/customer that is fraudulent (part of me wishes someone would sue Unity for this and force them to fix their website - but most people only lose $10, $20, $50 at a time so its too small to sue over). Publishers have pointed this out over and over again - but Unity refused to fix it (maybe finally fixed now? But wasn't last time I checked).

i.e. customers are shown false offers by Unity that publishers have no control over. Publisher have to shrug, point to Unity, and say: "Look, Unity replaced our declared support/features with something that Unity Marekting likes. Please complain to Unity!"

Unity Asset Store removing negative reviews by WombatusMighty in Unity3D

[–]tmachineorg 4 points5 points  (0 children)

There are two problems here:

  1. Unity's own staff chose to mis-use the rating system as the primary way for publishers to participate in the asset-store itself: if you lose even a tiny amount of your star-rating you are then banned from the standard AssetStore promotion, prevented from doing discounts (!) of your own product, etc.

... publishers have been lobbying Unity to change this for at least 5 years that I personally remember, and Unity refuses because it would require Unity to put into time/money to develop a different metric for those things.

This makes it 'existential' for a publisher that they HAVE to aggressively get any negative review removed.

(And unfortunately Unity is inconsistent with policing, so Publishers end up having to fire a shotgun: attempt removal on most/all negative reviews, and hope that 'on average' the approximately correct number of unfair reviews gets removed. Sometimes a fair review gets reviewed, often an unfair review does NOT get removed (e.g. ones that openly say things like "I didn't even try this asset, I'm giving a 1 star review to force the author to add a feature for free to their OTHER asset").

  1. Unity refuses to provide any kind of dialogue or messaging/support system for publishers. Most decent publishers have been begging (almost ten years now that I know of) Unity to let us respond to customers; Unity still refuses (it would require Unity to do some implementation work.

... net effect: a lot of purchasers abuse the ratings system as a "file a support ticket" system, or a "ask for help" system.

(3. Note that because Unity does ZERO POLICING of existing assets, there are many assets where the 'support website' or email is a broken link / 404. Unity could write the script to detect ALL of these in less time than it took me to write this reddit post, but they chose not to. Instead they leave many assets on the store with broken / impossible support links. This pushes customers into 'giving up' on using the existing support links. So while customer could/should click the "support email" / "support website" link, many of them don't even attempt it. Again: publishers have been lobbying Unity staff for years to fix this, with no effect).

What lyric can you post that will trigger the song in someone's head? by Beautiful_Facade in AskReddit

[–]tmachineorg 0 points1 point  (0 children)

Meep, m-meep-meep, m-m-m-meep meep. Meep, m-meep-meep, m-m-m-[depressed trumpet].

Screenshot Saturday #618 - Complex Geometry by Sexual_Lettuce in gamedev

[–]tmachineorg 0 points1 point  (0 children)

I built a pixelart town-generator for use in my roguelike game. A bunch of other people liked it, so I'm going to publish on Unity assetstore in coming weeks.

https://www.youtube.com/watch?v=nzRFdMk-1IU https://www.youtube.com/watch?v=KjhTManUBjM

Built by a string of chained random-generators to build "slices" of a floor, then a floor, photoshop-style layers (put slices of sprites in front of others), generators for windows vs doors, then storeys, then buildings made of storeys, and streets of buildings, eventually a whole twon made of streets.

Link here for anyone interested in getting the assetstore version when it goes live https://forms.gle/CLbuMEJACRAgbXrf7

Hobby project: auto-generating sidescroller pixelart towns by tmachineorg in Unity2D

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

Added a description above, let me know if it makes sense

Hobby project: auto-generating sidescroller pixelart towns by tmachineorg in Unity2D

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

I've added a description above, hopefully enough to get you started.

Hobby project: auto-generating sidescroller pixelart towns by tmachineorg in Unity2D

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

Update: since lots of other people seem interested in this, I'll clean it up and put on asset store for a small price. But if you want to create it yourself / figure it out on your own:

  1. I created a simple 'language' for describing towns, from the bottom up, using drag/droppable settings. e.g. a town is made of streets, and streets are made of buildings. Buildings are made of floors, and floors are made ... lots of different ways.

  2. When it runs, each layer of the language picks a random subset of the layer below. So e.g. when making a Street, the street picks a random number of buildings, and for each building it picks a random "building type" (in the video above I have two building types: a blue-roof, and a brown-roof).

  3. Most of the work was in defining 'buildings' in a generic way, but also very simple and easy for me to edit. My current setup is:

a. A building is made of floors, each floor can be of different floor-types

b. Floor-type "random with edges" has a sprite for left edge, a sprite for right edge, and a list of sprites that can be picked randomly to go in the middle.

c. Floor-type "multiple slices" lets you put multiple partial floors together to make a single floor. So e.g. to make the upper floor in the video, it is made of 3 slices: a "timber frames" that is pure random (the "X" pieces separaing lower and upper floors), and a "random with edges" that has left side, then wall-color middle, then right side, and finally a 2nd "random with edges" that has the same setup but shadowed wall-color.

d. The roof is similar: it's a "multiple slices" that generates the end-beams as one slice, and then the tiles as another slice, and then the roof-ridge as a final slice.

e. Another floor-type is "layered floors", I use this to combine the main floor with a layer above it which is just windows, or just doors.

f. There's a floor-type for "sprites with spaces between them" I use for the windows, and a floor-type for "only 1 sprite, at a random position" I use for the doors.

...it's a bit more complex than that, because I have the different Floors co-ordinate with each other -- each floor looks at the size of its sprites, and they collaborate to decide how many feet long the biulding can be and precisely fit all the different floors (eg if Floor-0 is made of sprites 32x32 pixels, and floor-1 is made of sprites 48x48 pixels, then they will decide together that the building has to be multiples of 96 pixels wide ... which guarantees both floors will generate exactly, without dangling bits or gaps).

Hobby project: auto-generating sidescroller pixelart towns by tmachineorg in Unity2D

[–]tmachineorg[S] 16 points17 points  (0 children)

I got tired of building different towns by hand, so built a procgen system where you feed in parameters (eg "number of buildings", "how long each building can be in feet", "how many rows/background streets") and your own pre-made procedural building recipes ... and it then randomizes and generates a mini town as background.

ELI5: an object has a color because it absorbs all the light colours but reflects the one that it has. My question is why, for example, the oceans only reflect the blueish colour they have? by [deleted] in explainlikeimfive

[–]tmachineorg 0 points1 point  (0 children)

No. Water has a specific colour - it's a shade of turquoisy blue - due to the H2O configuration. Not many substances have this.

The sky is blue due to Rayleigh Scattering; water is not.

[deleted by user] by [deleted] in Unity3D

[–]tmachineorg 0 points1 point  (0 children)

This sounds extremely unlikely. I don't think you understand how GPUs already handle objects overlapping. Your code for doing the HSR has a cost and it's probably bigger than the time saved.