oosyrag's Forum Posts

  • Should be able to.

    Although I think there were some platform specific issues a bit ago regarding precision timing for playing sounds, but I'm pretty sure that got patched out.

  • Without plugins: https://www.scirra.com/tutorials/940/ho ... -a-project

    Advanced: Convert each part of the date/time to an integer (total time in seconds). You can then store or compare this value upon startup or save.

    Dependent on system time, so can be cheated by adjusting date/time on system.

    There may be a way to get the current date/time from a time server, but I am not familiar with the method.

  • Parse was a popular method before it became discontinued as a service (you can still set up your own parse server), and I believe Firebase has the same basic functionality. You can get plugins for these platforms.

    I don't have much experience with them myself so maybe someone else can give you more info or other suggestions.

  • I generally store the associated peerid in an insurance variable for the object that can be owned. To disassociate, pick the object by comparing the correct peerid instance variable, and clear the variable.

    You don't necessarily NEED to do this, but it keeps things logically clean. It depends on how you set up your events. Usually peerid is the most used form of picking the correct insurance in multiplayer, so I'd say it would be good practice.

  • Conditions

    Compare two values ExpVariable > CertainAmount

    Run Once

    Actions

    Create PopupTextObject at x, y

    Set Text to "LEVEL UP"

    Optional - Add Fade Behavior to PopupTextObject

  • On all objects, add a "type" instance variable. On creation of any object, set the variable to object type. Now when you pick by UID, you can look up self.type by expression.

    ... maybe? Just an idea.

  • Although I am an huge fan, I do feel Scirra could put a little more effort in keeping tabs on community projects and their progress, and by extension keep their showcase updated.

    Or it could be the matter of relative difficulty exporting finished products which has been discussed often.

    I find it more likely that successful long time C2 developers are busy being successful, rather than promoting the engine they work on. I imagine for the developer making the blockbuster there is little incentive for them to promote the engine they created their product on. It falls back to Scirra to promote the success stories.

    On the other hand, Scirra may be making enough from licensing and the store to not even care about pulling in (and supporting) more users, and focus on C3 instead. It all comes down to economics and incentive/motivation.

    Edit: PS - There are actually many more reasons for people to want to NOT show the "Powered by Construct 2" splash screen, given that they are not REQUIRED to, unlike some other big name engines like Unreal ect.

  • Ah ok now I understand, thanks. For the other solution, object count was going insane, so I fixed it by adding on Start of Layout. I might go deeper into your solution after so I can have a better control ( and understanding) of it. I'm still trying to figure out why it worked with new sprites rather than old ones. had to adapt my events to it.

    *Actually is because I set in the sprite properties Collision to Disabled, then it spawns helpers on every one of them since it no longer detects overlapping. I was using a small sprite of 4x4 pixels that I scale up to use as collision since it reduces collisions.

    I'm going to try and adapt the same to this mask instead, or is there any better way to do this?

    Right sorry about that, normally I would put something like this in a function to call on start of layout, or to update during runtime by trigger in case your blocks can move and you need to reposition the corner helpers.

  • https://www.scirra.com/tutorials/37/beg ... onstruct-2

    https://www.scirra.com/tutorials/253/ho ... tform-game

    These are the best beginners tutorials. If you go through them, you will be well on your way to making games.

    As for videos, check out the C2 Academy channel on Youtube.

    https://www.youtube.com/playlist?list=P ... 6HHrKJi95r

    I myself have no patience for videos, so unfortunately I don't have a recommendation on which video may be the best to start with, sorry!

  • Didn't get a chance to check out 99's solution since I'm not on latest beta, but here is one working to my satisfaction. It uses the spawn helper itself to check for open spaces around the blocks, then moves them to the correct image point.

    https://www.dropbox.com/s/jy04myos0p47s ... .capx?dl=0

    This bypasses the issue where adjacent collision boxes count as overlapping (the helper sprite is smaller than the block sprite), and you don't want to shrink the collision box on your block because you need it for your platforming behavior.

    Pseudocode:

    For each block, check if space above is empty with a helper.

    If it is not empty, destroy helper sprite (and try next block).

    ELSE if it is empty, destroy the helper above

    Then make a new helper to the left of that block and pick all blocks to check collisions.

    If collides, destroy that helper. Else, move it to the corner.

    Repeat with a helper to the right of the block.

    By the way, this should totally work if you manually set instance variables defining left/right corner, so I'm not sure if you're interested in troubleshooting why that wasn't working. The method I'm using right now is meant to save you the hassle of manually setting corners (as variables) in case you have a large level in the future.

  • It seems like when you have object bounding boxes directly adjacent to each other they count as overlapping, so this solution might not work as I expected to at all. Gonna think of another way. But don't worry, I'm sure it can be done

  • Here you go. I got to experiment a bit and realized I left out the Pick All. Originally when you do For Each, only the active block is picked, so when you check if its colliding with any other blocks around it, it wouldn't because the only instance it sees in that event is the currently active one unless you use Pick All.

    https://www.dropbox.com/s/88osdmr15uv1m ... .capx?dl=0

    Not quite finished, as you can see with the one at the bottom of the U, but hopefully it will get you going in the right direction.

    Edit: Still broken in several situations, I'll try to refine it a bit...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok so here is a method to spawn helpers for sprite objects. It will work even if every single tile is the same, but will reduce the loops required if your corners are already defined. Basically you check if your block is a corner, and then you check the space to the left or right of each one to see which side is open. Then based on that you will spawn your helper block at the correct position.

    Set up: For your corner animation frame in your block object, make two image points, one in the top left and one in the top right.

    Event:

    For each BlockObject

    Compare Values AnimationFrame is CornerFrame

    BlockObject is NOT overlapping at offset BlockObject.Y+BlockObject.Height (Check to see nothing is above it)

    Subevent 1:

    BlockObject is NOT overlapping at offset BlockObject.X+BlockObject.Width (Check nothing is to the right)

    Action: Spawn HelperBlock at BlockObject's imagepoint top right

    Subevent 2:

    BlockObject is NOT overlapping at offset BlockObject.X-BlockObject.Width (Check nothing is to the left)

    Action: Spawn HelperBlock at BlockObject's imagepoint top left

    Note that for this method if there is a single block by itself, it should spawn helpers on both sides. Up to you if you want that to happen or not. If you don't, you can add an ELSE to the second subevent.

  • Is that a tilemap? Are all blocks the same or do you have specific corner type blocks, floors, and walls?

  • Have you tried it? I don't expect any performance issues, either way you do it. Just whatever is more convenient for you.

    You can have each of your corners spawn a helper sprite. Or you can put them in a container and use a system-create at x,y to create the corner and helper together. Or you can use a tilemap position of your corner tile to spawn a helper object.

    You're going to need to be more specific, there are a ton of ways to spawn an object. How to do it depends on your situation.