Constructicon1985's Recent Forum Activity

  • I've noticed in a lot of sample games I've seen that developers use two sprite objects to represent the player and/or enemies. The "base" is generally a simple square sprite, and the "mask" is the actual character sprite with animations. They are generally pinned to each and/or put in a container together and act as one unit on the layout.

    I understand why you would want this when you are using the Physics plugin (from reading the tutorial), as it allows you to have an animated sprite with a changing shape while still maintaining a simple collision box for the physics.

    However, I still see this done even in games that aren't using Physics, such as the example game Demonaire in the construct recommended examples. Is there another purpose to this practice?

  • Thanks for the explanation!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks guys, it sounds like maybe I'm overthinking it and should use the feature natively put there for that purpose until I find a reason not to. dop2000, by coincidence I happened to be reading a comment of yours from a few years ago where you said something like "Dictionaries have the benefit that you can cycle through them, which you can't do with Instance Variables". I would have to search around to find the exact quote, but do you remember what you were referring to and explain it? I didn't understand that statement at all.

  • Hey Everyone,

    I have a very broad question about best practices for storing enemy attributes or other sprite instance object. I am making my first game and my Family "Enemies", which contains all my various enemy object types, has gotten up to 31 attributes that I'm tracking in the Family instance-variables. I've been reading about Dictionaries, wondering if they were a better way to store all the enemy attributes and figured I should make that decision sooner rather than later. So with that in mind, I'm open to any suggestions and/or explanation, but my main questions are:

    • If I have lot of enemy types with lots of differing attributes and I have an "Enemy" Family containing all of them. Is there any reason NOT to put all the enemy attributes in the "Enemy" Instance Variables, vs using the instance variables on each individual enemy object type? Does it make a difference if many of my enemy types will use unique (or only in a small subset) attributes that won't be used at all by the other enemy types?
    • Is the Dictionary vs Instance decision based on the number of variables? At what number of variables would you switch?
    • In general, what advantages do Dictionaries offer over Instance Variables?

    Thanks for your time if you respond to this.

Constructicon1985's avatar

Constructicon1985

Member since 9 Sep, 2024

None one is following Constructicon1985 yet!

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies