SYN TIP: Keeping track of your own logic.

synthesissynthesis Member Posts: 1,693
edited November -1 in Working with GS (Mac)
I was helping someone else tonight and decided to pass this tip on to everyone.

One thing you should always do (if you don't already) is making your attribute names relevant and specific.

For example...
you are trying to make a Galaga style shooting spaceship that is locked in its Y position on the screen and the X position is variable.

When setting up your tracking attributes...use naming structures that make sense to you and explain their use parameters. Make attributes for each unique use...don't share containers.

For example...here are a few attribute names that I would use in the above game example:
shooterShipCurrentXPosition
shooterShipNewXPosition
shooterShipXMoveToSpeed
shooterShipYLocationFixed
shooterShipRateOfFire
shooterShipFireRequest
shooterShipHasFired
shooterShipHasDied
shooterShipHasBeenHit
shooterShipMaxDamageAllowed
etc.

By being descriptive...as you develop the logic sequencing...you will better be able to understand your Rule Structures...and finding bugs will be easier or finding something out of sequence will be more noticable.

Then once everything is ABSOLUTELY PERFECT. Save the game and then save it again to a new version name. Then in the new version...you can simplify or abbreviate the attributes.

Using this TIP in conjunction with my previous RULE DISABLE tip will assist you in finding many of your own errors and reduce frustration in trying to locate bugs.

RULE DISABLE TIP LINK:
http://gamesalad.com/forums/topic.php?id=3913#post-22935

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    good tip...

    Does having a long attribute name add heavily to the running speed (processor usage), or when it is packaged, would GS not slim things down where it can.
  • synthesissynthesis Member Posts: 1,693
    Trimming will help a very small amount...
    But you can always trim names at version 0.9.9.9.9.....as a last step before publishing to v1.0
  • rebumprebump Member Posts: 1,058
    I don't think trimming names in size will help performance at all. The GS engine does not reference your attributes by name but by an internal ID number. This is why you can have two attributes in the same actor with the same name (confusing but they are treated differently because GS uses the ID number).

    If you look into the gameproj's various XML files, you will see this.
  • synthesissynthesis Member Posts: 1,693
    ahh...good to know rebump
Sign In or Register to comment.