PixelRebirth's Recent Forum Activity

  • Okay folks, part 2 is online now!

    I hope there are not too many typos or even crude mistakes in there.

  • Great fix! Advanced Camera has become obligatory in all of my projects. One of the most essential plugins around. Can't wait for more!

  • Oh linkman I love you! I could have a use for this right away, will make things handier for sure! Thx so much!

  • Thx to everybody for commenting.

    Just went through it, I noticed you referenced an object as to where to start creation, not totally necessary if you're designing with a grid, you can just do array's current x + 32 for example and it will fill in every spot until it runs out of space. Though your method works just as easily, I don't think one way is better than the other. The tiled bg does make it more 'mobile' for editing where it lays in the layout.

    You're totally right. It's just the way I prefer to do it. You could get rid of the tiled bg with some adjustments anytime.

    Thanks a ton for the tutorial. It's gonna help me get my 'action' puzzler finished up. Just need to figure out if an array is the right way to create my blocks since there will be a constant generation going on from the bottom.

    Spawning of blocks will be the topic of the third part. It should be adjustable to a constant spawning too, depending on the game mechanics you aim for. I don't think an array will pose a problem with that, at least not the (pretty limited) way I use it.

    Expect the second part to be online later today or at least tomorrow.

  • Oh, great that you mention this. I don't know why it is in there. Removed and updated.

    Btw Contrast Plus is a very good FX by jeffro11 you should get it asap!

    http://69.24.73.172/scirra/forum/viewtopic.php?f=16&t=4835

  • Due to popular request: This is a tutorial/example from which you can learn how to make a puzzle game in Construct. One of the kind where you have to match three or more blocks horziontally or vertically.

    Let me briefly mention that I wouldn't recommend this for absolute beginners. So if you installed Construct just yesterday, you should probably get a little more familiar with it before you check out this tutorial.

    This is just my personal approach and doesn't claim to be the way to go.

    <font size="5">Part 1 - Playfield Generation</font>

    <img src="http://dl.dropbox.com/u/2306601/puzzexam1.png" border="0">

    First things first. So we start out with the generation of the playfield. Simply randomized blocks won't do, because we don't want three or more blocks being matched in the beginning.

    So let's use an array, some sweet sweet loops and basically crazy stuff.   <img src="smileys/smiley17.gif" border="0" align="middle">

    All in the cap, all commented, there you go:

    DOWNLOAD PART 1

    <font size="2">(File created with version 0.99.42 of Construct)</font>

    <font size="5">Part 2 - Swapping, Matching & Destroying</font>

    <img src="http://dl.dropbox.com/u/2306601/puzzexam2.png" border="0">

    Now we get to the really important stuff. After all a cool puzzle game can't work if matching blocks aren't even recognized. It's not quite as simple this time, but nothing to worry about either.

    Expect more loops, crazy Else events and... you name it! <img src="smileys/smiley1.gif" border="0" align="middle">

    DOWNLOAD PART 2

    <font size="2">(File created with version 0.99.42 of Construct)</font>

    Oh, this time you will really need the Contrast Plus effect. Go get it here:

    http://scirra.com/phpbb3/viewtopic.php?f=16&t=4835

    <font size="5">Part 3 - Spawning</font>

    <img src="http://dl.dropbox.com/u/2306601/puzzexam3.png" border="0">

    What's left to do is filling up those unwanted gaps with brand-new blocks.

    How is it done? Of course with some nasty events, featuring loops and all the other stuff your parents warned you about! <img src="smileys/smiley4.gif" border="0" align="middle">

    DOWNLOAD PART 3

    <font size="2">(File created with version 0.99.42 of Construct)</font>

    <font size="5"><font color="red">Part 3.1 - Now it even swaps back!</font></font>

    Here's the functionality some of you have been yearning for: blocks are swapped right back if there hasn't been a match. Thank sweet baby jesus!

    Note: All of the newly added comments have green text color on black ground, so you can easily spot them.

    DOWNLOAD PART 3.1

    <font size="2">(File created with version 1.2 of Construct Classic)</font>

    Also still available: alternative first part

    DOWNLOAD ALTERNATIVE PART 1

    <font size="2">(File created with version 0.99.42 of Construct)</font>

  • It may not be always apparent; are you using two instances of Mouse and Keyboard object?

    Hey, that might also explain the old bug I had in the back of my mind. If only I could figure out which cap that was and revisit it...

    Need to keep this in the back of my mind from now on!

  • Where can I download this ''cap'' file?

    It's hidden inside that thread.

    Here you go: Download

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pseudo code:

    +For each block

    - Are any of its four neighbors of the same color?

    - Check that block's adjacent block, that is in the same direction

    > Mark these blocks for demolition

    >When done checking all blocks, DEMOLISH! Then re-check all blocks until NONE are marked for demolition and wait for player's move.

    Mipey's theory would absolutely work. But you probably wouldn't want to check all blocks. Just those that have been moved or rather the rows and columns of those blocks.

    That's the stuff I added to mattdubs cap in the mentioned thread. It's just not destroying there, but changing opacity for testing.

    It's not a whole lot different from what I'm doing anyway. I just happen to involve an array to a certain extent.

  • Hey cow_trix, that's a cool game!

    In your base event sheet in event 39 try to substract 0.5 from ammo and not 1. That seems to work for me. Probably you would have to do the same for event 38, which I assume is when the weapon is upgraded.

    Don't ask me why that is, but I had a situation like this before and when I substraced half the amount it logically should be, it worked. Then again I don't have full overview what's going on in your events. But the change seems to make it work!

  • Try using """hello""". That seemed to work for me.

  • Okay MJ, thanks for sharing!

    It remains to realize only two things: destroying pieces when the same three together, and resp. spawning of new blocks.

    Actually you would still need to set up the playfield generation in a way that there wouldn't be 3 matched at the beginning. Unless you want that for some reason.

    If you know how to make this please help me.

    I do know. I can't simply explain it in a few phrases I'm afraid. Will take a little more than that.

    For starters: Add an array, use X and Y size of the array as the dimensions of your playfield.

    In your cap it's 8x8 for example. Now don't put any blocks in your layout at the beginning, but create them on startup for each element of the array. For positioning you could use any object as reference point. Now loop through the blocks X over Y ascending and check always for the blocks which are positioned one and two units left and above the current block. If for one direction both match you'll randomize the block until both don't with a while loop.

    That would be the beginning generally speaking... but as I mentioned typing everything out like that is very theoretical and I'm not a novelist either.

    So what I will do is either implement it in your cap or more likely create a basic commented example of my engine. Either way, it'll take a bit of time. I'll see to it over the weekend. Have a little patience.

PixelRebirth's avatar

PixelRebirth

Member since 26 Mar, 2008

Twitter
PixelRebirth has 1 followers

Trophy Case

  • 16-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

23/44
How to earn trophies