spongehammer's Forum Posts

  • Yttermayn

    This reads the colour data from the canvas into the array

    Canvas2.rgbaAt(loopindex("xloop"), loopindex("yloop"))

    In each map group this is simply comparing the data at any given location in the array with a set colour.

    "rgba(0,255,0,1)"

    Green in this case.

    Hope that helps <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Tekniko

    It stutters a bit in Firefox although shows 60FPS. Chrome is fine though here.

    Why have you got a physics behavior on the ball?

  • Yttermayn

    The code is set up to pick up only 100% RGB colours so Red is 255,0,0 Blue is 0,255,0 and so on.

    rgba() just means Red, Blue, Green, Alpha which is the transparency of the pixel.

    Hope this helps.

    If you need any more info then make sure you put the symbol in front of my name <img src="smileys/smiley1.gif" border="0" align="middle" />

  • TELLES0808

    Ha thats great, thanks so much.

    <font color=blue>@Magistross lol, did!</font>. True but i am afraid it was way too complex for me to understand <img src="smileys/smiley4.gif" border="0" align="middle" />

  • TELLES0808

    The more i look at this the better it gets. Using the method you have used would it be easy to have the junctions act like switches on/off.

    Although your code looks simple i still cant figure out how to do that. <img src="smileys/smiley9.gif" border="0" align="middle" />

  • LI0NHART

    Hi

    Not sure if this is what you want..

    Floor Switch

  • TELLES0808

    Thanks ! Thats great. Thanks for your time <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    i dont know the answer to your question, but i did see Ashley reply to another performance related question recently and he pointed to this.

    scirra.com/blog/83/optimisation-dont-waste-your-time

  • TELLES0808

    Thanks for the demo. Its close but the way i envisaged it would be that if there was another power route to the light and a junction was removed the light would still come on.

    Magistross

    Thats much closer although its very complex <img src="smileys/smiley1.gif" border="0" align="middle" /> I didnt want the connecting wire to disappear but i suppose thats an easy fix.

    I would need to concentrate very hard to see how you had done it Ha.

    Thanks to you both for your effort.

  • TELLES0808

    Right i think i get the idea, never really thought about it being a 'real' connection but i guess it should work. Thanks

  • TELLES0808

    I sort of tried that but i ended up with something very fixed which only applied to the circuit above. I wanted something which would apply to any circuit with multiple paths ( within reason of course ).

    It may well be part of the answer but everytime i think about it my head fills with mud <img src="smileys/smiley5.gif" border="0" align="middle" />

  • vee41

    Thanks for the quick response. Never used pathfinding but will take a look <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hi,

    i am trying to figure out the logic to make the circuit work. Any suggestions gladly accepted.

    <img src="https://dl.dropboxusercontent.com/u/1685424/circuit.JPG" border="0" />

    The red box is the power source, blue circles are lights and the black circles are junction boxes. Ideally i want a way create a way to turn off the relevant light when one ( or more ) of the junction boxes is removed.

    The logic would need to apply to any circuit created not just the one above.

    I cant get my head around where to start really.

    Thanks

  • BreadCrowns

    As far as i can see there is nothing wrong with your logic. The pin behavior may not be accurate enough.

    Also the detection you are relying on is not ideal either. Part of the problem is that if anything is out on the first rotate then its all compounded from there.

    I would suggest a different approach to moving the blocks, more like moving each one a set distance from the center of the current square to the center of the next. This will do away with relying on the collision detection.

    When i get a few mins free i will make a capx to show what i mean.

  • Link to the game?