About Monkey 2 › Forums › Monkey 2 Development › Should "asset::" be plural?
This topic contains 17 replies, has 12 voices, and was last updated by
Danilo
2 years, 8 months ago.
-
AuthorPosts
-
July 24, 2016 at 11:54 pm #2402
Hi,
One thing I find a bit annoying is I keep mistyping ‘asset::’ as ‘assets::’ – anyone else encountered this? Should I change it?
Not sure why I went with ‘asset::’ in the first place, but ‘assets::’ seems more natural to me now as it generally maps to a folder that contains multiple blobs. Also, that’s what the source dir is (usually) called.
I’ve also been playing around with adding ‘fonts::’ and ‘images::’ prefixes and the same issue arises – these will map to ‘asset::fonts/’ and ‘asset::images/’ and it seems to me these should be plural. And if they’re plural, why now assets?
If ‘asset::’ could NOT be followed by something containing ‘/’ – ie: a path – then I think it would make sense to stick with the singular.
If it does get changed, I can always leave the old ‘asset::’ in there for a while.
Thoughts?
Bye,
MarkJuly 25, 2016 at 12:22 am #2404I can see why you used ‘asset::’ as you are loading one asset for each call. I also think ‘asset::fonts/’ etc as plural makes sense based on the folder/multiple blob scenario.
July 25, 2016 at 12:30 am #2405For developers include and src directories aren’t plural so i’m not sure resource, style, font, asset paths should have any reason to be different in nature. Although I definitely prefer scripts over script folders so hmmm.
July 25, 2016 at 12:42 am #2406a) i prefer singular, b) dat(a) over asset, c) copy&paste it anyway, d) i still prefer scope type var var over scope var type var type, … z) plural would be bloated.
July 25, 2016 at 12:43 am #2407‘asset::fonts/’
Except it’s not – it’s just ‘fonts::’ eg:
Local font:=Font.Open( “fonts::myfont.ttf”,16 )
Meh, not really bothered mainly just wondered whether other people found it weird too – the physical dir is called ‘assets’ but you access it with ‘asset’.
July 25, 2016 at 12:50 am #2408You could rename the folder.
The way i understand asset, it’s just right. Problem might be, that the term, in connection with video games, is used in a inflationary way. So what?!
July 25, 2016 at 1:06 am #2410According to the AssetsDir documentation it already is the assets folder. So to avoid confusion I think you should pluralise it.
July 25, 2016 at 2:13 am #2413Why not allow either?
July 25, 2016 at 2:24 am #2414Singular makes sense to me, as it’s an identifier to a single asset. Kinda like the “file://” URI prefix. I would recommend against allowing both singular and plural. Just pick one and stick with it.
July 25, 2016 at 3:00 am #2415For “http” they changed it also to plural, so
while “http” will stay for a while (compatibility),
the new and future-proof spelling is plural: “https”.Personally I read it as “location::file.ext”, so
“fonts”/”images”/”assets” is fine as location.July 25, 2016 at 3:05 am #2417For “http” they changed it also to plural, so
while “http” will stay for a while (compatibility),
the new and future-proof spelling is plural: “https”.lol
July 25, 2016 at 3:43 am #2418For “http” they changed it also to plural, so
while “http” will stay for a while (compatibility),
the new and future-proof spelling is plural: “https”Please say you are joking
(s = secure)
OT: I prefer singular… but I’ve yet created a super large project where I wouldnt want to use assets anyway…
July 25, 2016 at 5:59 am #2419I wonder what an asset means to people. An asset is not the same as an image or a sound. An asset can contain many different elements already, like a resource, a container or a package. Assets are more of these containers then. The Unity folks made it hip saying assets instead of data and naming single elements with asset only.
Exciting times, maybe Mark wants to democratize game dev now too. :O)
July 25, 2016 at 11:46 am #2429One thing I find a bit annoying is I keep mistyping ‘asset::’ as ‘assets::’ – anyone else encountered this?
Meh, not really bothered mainly just wondered whether other people found it weird too – the physical dir is called ‘assets’ but you access it with ‘asset’.
Yes, I have found it weird and have been “caught” by it. I would suggest offering both plural and non-plural variations.
July 25, 2016 at 12:55 pm #2437Local font:=Font.Open( “fonts::myfont.ttf”, 16 )
So if “fonts” here maps directly to a folder by the same name then the same name would make sense. However if it always maps to a folder called /fonts/ then why not just leave it out? And if .ttf is also something that cannot change then leave that out as well?
Local font:=Font.Open( “myfont”, 16 )
-
AuthorPosts
You must be logged in to reply to this topic.