dop2000's Forum Posts

  • I don't understand what do you mean by "misses the correct amount". You should probably post your code or the project file.

    Usually if you need to pick one instance, for example, overlapping a player you can do something like this:

    Player Is Overlapping Block
    Block pick nearest to (Player.x, Player.y)
    
    or 
    
    Player Is Overlapping Block
    Block Pick Top Instance
    
    or 
    
    Player Is Overlapping Block
    System Pick Random Block Instance
    
    
  • If you haven't used that keystore in a published game, it would probably be easier to create a new one with Android Studio or keytool. There are plenty of guides online.

  • 1. Use "System is between angles" condition and compare StickOut.a variable, not the sprite angle.

    System StickOut.a Is Between Angles 337.5 and 22.5

    2. You can easily limit the distance, for example:

    StickIn Move min(StickOut.d, 200) at angle StickOut.a

  • Use "System Pick All" condition.

    Sprite On Collision with Wall
    System Pick All Sprite instances : Sprite Set Platform disabled
    
  • Replace the second condition "If Speed=-52" with "Else":

    If Speed=52 ......
    
    Else ......
    
    
  • If you need to save the file "silently" without prompting the player, then yes, you'll have to use NWJS.

    In a web game you can use Browser Invoke Download action to download a file. Player will need to select the download location though.

    Also I suggest using JSON format instead of XML, it's much more versatile in C3.

  • Use Touch.X(layerscroll) and Touch.Y(layerscroll) expressions instead of simply Touch.X and Touch.Y

  • 3. Exactly. Only the images from the objects which are present on the layout are occupying memory. If you create and then delete a sprite, its images will remain in memory, so next time you create it on the same layout, there will be no lag and no additional memory usage.

    4. Hierarchy is a super powerful and useful feature in C3, I highly recommend studying it.

  • 1. Yes, it's better to use a single Enemy base object with 4 instances.

    2. The main object will be the invisible Enemy sprite, ideally it will be used in all game mechanics, AI etc. EnemyWolf, EnemyZombie are just 'skins', they will move with the base sprite and play animations.

    3. You still haven't told how big your animations are, how much memory they are using.

    If this is a web game, then I believe all graphics will be downloaded once on startup and cached. So the next time players launch the game, it will load quickly.

    Memory usage and download times are two very different things. To optimize memory usage you shouldn't create too many images on one layout.

    4. Pin attaches one object to another. Hierarchy is like an advanced version of Pin, I recommend reading about it.

  • I suggest using a single 'base' Enemy object, it may be just an invisible rectangular sprite. And create a bunch of 'skin' sprites containing animations for different monsters, for example EnemyWolf, EnemyZombie etc..

    Configure all behaviors and instance variables on the base object. And then in runtime spawn a skin sprite (say, EnemySkeleton) and pin it, or better yet connect it with hierarchy to the base object.

    This is a very common approach, you can find it in many tutorials and game templates.

  • Sorry for slightly misleading you with the "screen side", that's an old demo and you should have ignored that part.

    You almost fixed it, but not quite.

    I made a new simple demo, have a look:

    dropbox.com/s/h3oll7ewfjfh1j2/ThumbstickLeftRight.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can preload object images in advance if the sprite is large and you want to avoid a lag when it's spawned.

    load them ad-hoc as required from the server

    This I would definitely not recommend.

  • You can combine Car behavior with 8direction and use 8direction's "Set vector" action. Here is a demo, it's not very good but maybe you could improve it:

    dropbox.com/s/ic95ngmdxfe2jkj/CarExplosions.c3p

  • Like I said, the important thing is the average size of these animations. I'm working on a low-resolution pixel art game where images are small (50x50 px or less), so I have sprites with hundreds of animations. Storing multiple animations in one sprite helps to better organize the project and the code.

    I can load the entire sprite because it doesn't use much memory. But in your case you might need to put all these abilities into separate sprites and combine them into a family. Then only spawn the abilities which are required on the current level to save memory.

    Regarding the object EnemyAbility, I'm quite confused about making a copy of the same object. Does it mean that they will be distinguished from one another using a variable like "EnemyID"

    Yes, correct, use instance variables.

    I currently have Player1, Player2, Player3 etc objects all nested into a family with family instance variables. Should I be tweaking my approach to using clones of a single object instead?

    Probably not, if each player sprite has a unique set of heavy animations, and you don't need all these players on the layout at the same time, then it's better to keep them as separate objects.

    Every game is different and there is no universal advice. It's normal to re-think the way you organize your objects once you start developing the game, I do this all the time - combining/splitting sprites etc. It's good that you are using families and instance variables already, you are on the right path.