mekonbekon's Forum Posts

  • Hi all,

    After reading through this thread:

    tilemap-auto-tile-help_t92366?&hilit=tilemap+bitwise

    ...and working through R0J0hound 's neat system for 4-bit autotiling, I thought I'd have a pop at an 8-bit version and came up with this:

    dropbox.com/s/ff0tic8sw1cu0od/bitwiseTilemap_01.c3p

    It uses a full 48 tile map, which means all those corners get properly filled. I've set it up so that at start it'll render any initial tiles laid out in the editor; it takes a few seconds to redraw the starting layout, but after that you can left click to add new tiles and right click to delete.

    For this to work the bitwise values need to be mapped to the correct tile numbers - you can find the mappings in the tilekeys.json file

    For those interested in delving deeper I found these two articles useful:

    http://www.cr31.co.uk/stagecast/wang/blob.html

    https://gamedevelopment.tutsplus.com/tu ... -cms-25673

    EDIT: updated link to demo - improves initial tilemap generation (thanks to jobel for catching this) and fixes new tile creation on left click.

  • kiugetski

    Would this work for you?:

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

    Tap any key to toggle motion.

    You can add extra belts by duplicating the spawner object.

    Set the variables on the spawner object to alter the belt's properties:

    no = belt number - this will be assigned to the asteroids in that belt and is used to set the asteroid's frame no

    eOriginX & Y = the origin points for the ellipse that the asteroids in that belt follow

    spawnNo = the number of asteroids in the belt, determined by spawnMin/Max

    speed = the speed of the asteroids around the origin

    sizeMin/Max = limits of asteroid size

    eAngleOffset = angle of the ellipse

    angleMin/Max = limits for initial spawning of asteroids

    bandWidth = band within which asteroids will spawn, added to ellipse width/height

    eWidth/eHeight = ellipse size. Set these values equal for a circle

    I cribbed heavily off this thread, so shout out and big ups to R0J0hound and cincipon:

    viewtopic.php?f=147&t=80345&p=656028&hilit=ellipse#p656028

  • 1. Add a tiled background object

    2. Set its image to your repeating pattern

    3. Move the tiled background to the top left corner

    4. Grab the bottom right handle of the tiled background and drag it to the bottom right corner of the layout window

    5. Check that the size of the tiled background in its properties is the same size as the layout window.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No worries, glad it does the job

  • kiugetski

    Would this work for you?:

    https://www.dropbox.com/s/h0h7fjk5t8d3p ... e.c3p?dl=0

    Use up arrow to move forward, left and right to steer - you should be able to go in and out of the gates and teleport between them. You can expand this system by adding more portal instances and changing the gate.no and gate.target values. The target variable defines which gate.no you'll jump to. Each gate.no should be unique, but you can have multiple portals pointing to the same target.

  • Managed to get it working for multiple instances with an extra instance variable:

    Cheers again for your help blackhornet - you pointed me in the right direction.

  • blackhornet Thanks for the example, I hadn't considered that the extremes were at 0.25 and 0.75.

    This works great for a single instance, but how would you handle it with multiple instances at different cycle offsets? I can't get "trigger once" to repeat on objects, and using "compare two values" means that it fires for all instances every time one of them triggers the condition. If I had a fixed number of instances in the level then I could tie each of their cycle positions to a unique local variable, but if I'm spawning on the fly then using a local variable wouldn't work.

  • This is probably an easy fix, but I'm tired and my brain hurts:

    I'm trying to play a sound whenever any instance of an object reaches either the maximum or minimum of its sine behaviour.

    Currently I'm saving the cycle position to an instance variable "cycle" each tick and then testing every tick if cycle is less than 0.02; any less than 0.02 and the sample rarely plays, any more and it will trigger over successive frames, and even at this value it is temperamental, sometimes missing a play other times doubling up. I understand why that happens, but can't see a way around it.

    I also tried using "if object.cycle<0.02 trigger once | play sound" but this resulted in the sound playing once for each instance at the start (because they all start their cycles at 0) and then not playing again. I also swapped sine.cyclePosition for sine.Value but the problem is still the same.

    Thanks in advance for any help

  • ankas

    The points check is firing every tick, which is messing things up for you. I think this should work ok:

  • Ajbael You're welcome

    If you re-download the capx from the above link I've added in some comments to help explain what's going on, included an extra action in the last event to ensure the link positions remain correct and added a bonus feature: right click to rotate a piece 90 degrees.

  • Ajbael

    Would this work for you?:

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

    Can't take all the credit for this, justifun pointed me in the right direction in this thread:

    viewtopic.php?f=147&t=86613&p=824059&hilit=snap+to+imagepoint#p824059

    Also I get the feeling that my solution could be simplified, but this was the only way I could think of to get around situations where you are adding a module in between two or more modules.

    You can increase the size of the links to increase the snap range.

  • ankas I'm not quite sure what you mean - could you post a capx?

  • Cool! Glad to help out

  • You're welcome

  • Here you go:

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

    I had to fiddle around with the origins on the limbs to get them into place