template Eat 'em All

0 favourites
  • 2 posts
From the Asset Store
Fruit Slicer Template & Quality fruit and slice graphics (c3p,png,illustrator files)
  • I think there is not enough documentation (/explanation) in the templates.

    Example 1:

    int(Ghost.X / Game.TileSize) * Game.TileSize + (Game.TileSize/2)

    I know what "int" does, but I believe you should mention what it does and why you are using (and/or perhaps mention the manual for further reading).

    However, I do not know what "/game.tilesize" does and why you are doing it. There is no explanation in the template.

    Example 2:

    game sprite.

    Why are you using it to store the "global variables"? (why not use global variables or, if possible, local variables?)

    I think the templates help beginners (and me) more, if you add more "what does this do and why am I using it"-explanations.

    Thanks for doing the templates!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "/" means divided by.

    Where you put variables is something you will get if you just dig in and start using construct. The clue is mostly in the names but there is some flexibility in how to use them.

    Instance variables are variables related to object instances. Player health, enemy shield ect and much more.

    Globals are for things that are not related to object instances or are numbers that need to be allways available to the game. ( But as you can see there is nothing stopping you put things you might deem global into an object instance (or vice verser) but if that instance is destroyed then those variables won't be available. (and a global variable is no good if you want to have different values for different instances of an object).

    Locals are places to store for small sections of code under an event or function, maybe to hold values while other calculations are performed. Or just to provide values for that section of code. Once the code moves onto the next event these variables essentially do not exist and can't be used by other parts of code. They can be initially set and will retain their value for the next time if you make them static.

    You'll get it after a bit....at the end of the day variables are just places to hold numbers or letters,

    Although they each perform slightly different roles there are really no hard rules to observe (someone will probably kill me for saying this). but IMO, Its really about whatever works for your game.

    to make even more interesting you can store and retrieve variables to/from dictionaries and arrays and probably other things I havent discovered yet.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)