Peej42's Forum Posts

  • Nice little game there.

    I have one minor niggle though, if I may be so bold.... I think it needs a 'death' animation of some kind.

    I hit a baddy and was whizzed right back to the menu very quickly.

  • Hi guys.

    I have a problem with lerp.

    I have two objects that I've managed to successfully move towards a designated position using lerp.

    Using Set Position I have:

    lerp(Blocks.X,Den.ImagePointX(0),0.01)

    lerp(Blocks.Y,Den.ImagePointY(0),0.01)

    Where Blocks.X and Blocks.Y are the X and Y coordinates to the object to move and Den.ImagePointX(0) and Den.ImagePointY(0) are the coordinates of the target destination. 0.01 seems to be a good speed at which to move my objects. Unless I've missed something.

    Anyway, my problem is, my moving objects never seem to actually reach their destination.

    It looks to me like the distance between the moving objects is calculated, moved slightly, then the distance is calculated again.... Over a brief time, the moving objects get slower and slower and the distance travelled on each click is less and less.

    What have I done wrong?

    Cheers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a very cheeky question but, does anyone here have a simple three in a row engine (like Bejewelled) I can study?

    Or indeed, point me in the direction of something similar?

    Cheers

  • Thanks for the tips, guys.

    Yeah, I'm using the Pin Behaviour and I'm 90% sure all the random modifiers are at 0.

    I originally thought slight differences in sprite 1 and 2s collision boxes was throwing the sync out but I noticed it would just go out on its own free will from time to time.

  • Quick question....

    I've got a sprite onscreen that uses a sine movement to make it bob up and down.

    I wanted to overlay another sprite that acts like a pattern or design over the first sprite. I've set the sine movement to exactly the same parameters as the first and used an overlay effect on a higher layer but it keeps going out of sync.

    Is there something I'm missing? Any suggestions on what I should be keeping in mind?

    Cheers

  • blackhornet: A million times thank you. That is wonderful. You're a star.

  • Sorry to bother you again....

    BlackHornet: I've tried to integrate your rather excellent code into what I'd previously written.

    I have done something wrong as my results aren't the same.

    the calculations start off well, but something go amiss when the two different colours are combined.

    Would you please have a look at the linky here:

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

    ...and tell me where I've gone wrong?

    Many thanks.

  • Wow, that's good.

    I see I have much to learn about Construct as I couldn't even find a way to create the bookmarks that you have!

    Brilliant stuff.

    Thanks

  • Thanks for those links.

    It seems I'd have to convert from RGB to XYZ to LAB, average, then convert back.

    I wouldn't have a clue how to apply those formula though.

    Thanks for the help though, it made for an interesting read.

  • Red and blue make magenta.

    My problem is, when two cubes are put into the den, their tints are effectively added to the other cubes tint.

    To make pink, one would have to subtract a value from the red block. Not add.

    I know there are many combinations to Red/Green/Blue but, having not thought the game through enough, I realise it can't be written! If colours are only added, the values of each blocks tints do not go down.

    A random element would have to be added, but that detracts from the original idea of using colour combinations to make others.

    I want to that you for all your help, Xavier. It was your quick programming skills that have led me to the conclusion that I may well be barking up the wrong tree with this one.

    Cheers.

  • Wow, that is impressive. Your solution is so much more compact than mine!

    The combinations of coloured blocks works very well but still leaves me with a problem of what would be considered a short-coming in my original idea.

    How, for example, does one make pink?

    There's definitely very few combinations that one can achieve, especially considering how each RGB value has 0 to 100!

  • Where can I download your changes?

    Cheers

  • I have no idea what happened there. I've just run what I uploaded and it was just wrong!

    I've tried again and tested it this time. It's ok now.

    Basically, the idea is to grab one of the coloured blocks and drag it to the large pale blue square. This will eventually be the 'combining den'.

    Grab another and drop it to the same place.

    Press the 'combine' button and the two coloured blocks should mix together after a short wait.

    The combing isn't working as planned and so I've put this post on the forum in the hope I may get some help or better way of accomplishing what I set out to do.

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

  • Oooops, sorry.

    I think it's there now.

    First time I've done this so.....

    Anyway, it should be there now.

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

  • Hello again, guys.

    I figured I should post my work in progress question as I'm having quite lot of problems with it.

    I'm very new to Contruct and programming in general, having only been experimenting for a couple of weeks now.

    Would you lovely people have a look at this:

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

    (URL edited after confusion in following posts)

    The basic idea is to grab one of the little coloured box characters and drag it to the blue 'den'. The graphics are a little work in progress too, so forgive me.

    After dragging TWO coloured blocks into the den, I want them to mix in RGB format.

    This is where I've come unstuck.

    I just don't know how to do it.

    As you can see, by looking at the code, I have an array that stores the 'tint' values of each of the blocks onscreen.

    It's not finished yet, but I really don't know where to go next.

    Grabbing the three values of RGB from the array and adding them to the other block in the den, simply colours that block the same colour!

    That's not right.

    I've also realised that my way of doing things isn't gonna work well because I'd be left with only 4 combinations!

    Once I've added the red, green and blue, I'd be left with white and each array element would be 100. Therefore, no where else to go.

    I hope someone can help me out with this.

    It started as a simple idea in 'coloured block collecting' and ended up much more of a challenge that I envisaged.

    Also, is my programming ok? Can it be cleaned up at all?

    Like I say, I've very new at this and what you see here is two weeks or so of learning.

    Cheers.