August 4, 2020

Layers

Hey guys!  Today I focused on this task from my MFAGA plan:

Clean up the layer architecture. Reörganising the layer architecture would make conversion from Illustrator to the main game much less of a chore. The reason we haven’t considered doing this before is that it would also require rewriting the avatar code that’s in the game. This is a pain in the ass, but I think we need to bite the bullet.

I redesigned the layers, adopting a new system that will be more flexible and elegant (if Hyneman can make it work).

🤓 NERD SECTION 🤓
The layers are currently displayed using if statements, e.g.:
 If def avatar.leftBracelet
   Display avatar.leftBracelet
 /If

This is a little clunky, because we need so many layers (one for the left bracelet, one for the right bracelet, one for the tattoo on her hip, one for the tattoo on her other hip, etc).  I don't think this has a runtime impact, but it sure bloats the avatar code, and makes adding new clothing items complex for Jeff.

I think we can do something smarter with arrays and for loops, e.g.:
 If avatar.jewelleryArray length GT 0
   For i etc
     Display avatar.jewelleryArray[i]
   /For
 /If

That way we'd just need to add jewellery items to the avatar.jewellery array, and the game would display them automatically.  (We'd need to add code to remove/prohibit conflicting items, of course, but we already have that in the dress-up sections – note that if Kate puts on a skirt, she automatically removes her leggings.)
🤓 ––––––––––––––– 🤓

This idea should help simplify the art production process, which is another key objective from my MFAGA plan.

We've been working on other things today as well, but more info on them soon.  Okay, that's all for today, I intend to post another update tomorrow.  See you then!

Comments (10)

L
Lawhorn · August 4, 2020

All jokes aside though - preesh the update :P

L
Lawhorn · August 4, 2020

Am I the only one who tried to pronounce "MFAGA"? and felt like Samuel L Jackson?

A
Anand · August 4, 2020

Interesting decision to work on the avatar first given the breadth of the MFAGA analysis.

C
Crushstation · August 5, 2020

Yeah, my "human brain" task map is organised by dependency – these things floated to the top of the list, even though they aren't what I would have instinctively gone towards (which is revealing).

B
Breadloaf · August 4, 2020

Can't you use a function, or am I missing something obvious?

C
Crushstation · August 5, 2020

If a function is the same thing as a macro...yes 🤠

P
Patternless · August 4, 2020

That's a step in the right direction. Later your array should contain layer objects which contains image_id, overlay location/zone, and other metadata. Having an overlay zone will help with conflicts and identifying what should be used or not used. e.g., there's no need to add the panty layer (zone torso.pelvis) if the agent is wearing a dress (zone torso) or a skirt (zone lower_torso.pelvis). This is just a suggestion, and you may already have something like this, but if you do it right you can have almost unlimited possibilities.

C
Crushstation · August 5, 2020

Hmmm location zones are an interesting idea 🤔

e
elmagio · August 4, 2020

Any chance we get our first look at the new avatar this week?

C
Crushstation · August 5, 2020

Victoria's currently in the "vectorisation" stage. I'm excited to share it with you guys so I'll publish it as soon as I can :-)