Digitalsa's Forum Posts

  • I am a web developer for my day job and I'd tackle this in HTML through the use of nested elements around particular words in a sentence. Maybe the same approach can be applied to the creation of a plugin for Construct 2? I'm quite new to this program myself, but I'll gladly take a look when I get the time and see if I can make something.

  • I tinkered with an attempt ...

    capx

    Wow, that works really well. Thank you very much.

    It seems as though fading colour values on a single layer isn't achievable, using your approach I am doing this and it works the way I wanted it to.

    Have two layers with randomly generated colours

    Every ten seconds hide the current layout and show the next randomly generated colour layout by fading the previous one out and fading the next one in at the same time

  • An anti cheating measure I've been thinking of taking is actually storing numeric values as text. So if you have a score that's 120, you could store it like this: onehundredtwenty — not sure how feasible and easy that would be, but I think it would be a nice multiplayer protective measure.

  • It's me again. This will hopefully be my final question, but I am just wondering how I would go about fading between layer colours?

    At the moment I am setting a layer background colour to a random, R,G and B value and every 10 seconds the colour will change to another random colour, but I want this to be a soft fade effect not a hard and sudden colour change. How would I go about fading between layer colour changes without there being a glimpse of any transparency or background colour showing?

    I thought of a two events at once with delay approach, but it seems hacky in that if any of the events go out of time, then the other event won't be perfectly in time.

    Help is gratefully appreciated.

  • The easiest way I've found you can achieve this is the following:

    * Create a global variable and call it something like: "ActionHappened" and set it's default value to 0.

    * Create a timer that runs every x seconds if the variable ActionHappened = 0

    * Elsewhere you would have your action set the value of ActionHappened to 1 whenever the action you are waiting on has been triggered

    * Then on your earlier timer function I would put an else and then perform whatever code actions you want to perform

    If you need further explanation, just ask.

  • I definitely vote the escape key for pausing. Instinctively it's the key everyone presses first when they want to pause a game. You could even go as far as making the "Pause/Break" key on the keyboard the pause key if you really wanted too and as suggested, you can have multiple ways of pausing the game, not just the one. Just don't have too many pause options or it could get annoying for the end user if they keep accidentally pausing.

  • A method I am using in my games that allows embed code like the above to be pasted, is Pode's HTML iFrame plugin you can find here: viewtopic.php?f=153&t=69356 — there is a handy little guide here that explains what to do after you've downloaded the plugin: https://www.scirra.com/tutorials/740/ho ... ur-appgame

  • Just taking R0J0s code I get :-

    https://www.dropbox.com/s/j2js9jokjs5sn ... e5d4m.capx

    If this is what you want and if you were serious about a small sum of money then please place this small sum into a children charity box.

    Thanks for the link mate. Will check that out shortly. And yes, I was serious about the cash and I completely agree with donating it to a children's charity, I will do just that. There is one fantastic community here!

  • Sadly replicating the above code was a difficult experience for me. Would it be possible to get a little help with this? I would be happy to pay a small sum of money for the right solution. I want to learn, a simple bounce that touches each side without doing weird things like bouncing side to side or up and down. It seems like it shouldn't be that difficult, but it is and after countless searching it seems that this is an issue many have struggled with.

    Just let me know what you need and I'll supply it. I can talk over Skype if that helps.

  • Digitalsa

    Why not do it just like your code?

    You have this:

    if (x + dx > WIDTH || x + dx < 0)
        dx = -dx;
      if (y + dy > HEIGHT || y + dy < 0)
        dy = -dy;
    
      x += dx;
      y += dy;

    Which is all doable with events.

    This tutorial may be of help to get you up to speed: scirra.com/tutorials/37/beginners-guide-to-construct-2

    I feel so silly, but you're right. After giving it a little more thought, the code in the JSFiddle I posted isn't all that difficult in Construct 2 using events. I'll let everyone know how I go. I'll give it a shot converting over my fiddle code to C2.

    Thank you for your help. I think the long stressful week just fried the logic part of my brain.

  • You asked, so you get:

    * Rabid dogs that fire bees at you when they bark at you

    * Ninjas that rope down from the ceiling with boxcutters in hand

    * One of the big bosses could be Lance Armstrong trying to jab you with a steroid needle

    * As for gameplay mechanic, have you played Fez before? You could be inside of the house and as you progress through you get this pseudo 2D/3D level spin effect: en.wikipedia.org/wiki/Fez_(video_game)

    My brain is fried at the moment, there you go though. Please put Lance Armstrong in there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add Solid behaviour to your wall spite - make four and place at each side. Give ball sprite Bullet with 'Bounce off solids' behaviour. Set a starting angle (let's say 40) - done.

    I essentially tried the same thing, but the bounce doesn't consistently hit each wall. The bounce either becomes too predictable (pattern never changes) or it doesn't do the sine effect I am after where the ball should hit each wall once, just a different spot each time.

    As you can see in my posted JSFiddle, the ball consistently touches each side. With the bounce behaviour and movement set to bullet, the ball could bounce up and down, side to side, corner to corner, but not achieve the sine bounce I am after.

    I want there to be somewhat of a pattern in movement, but hit a different point each time. This will allow users of the game to use tactics because the movement will be the same touch each side of the wall once movement, but it will slightly randomise the path roughly every 5 seconds or so.

  • I am quite new to C2 myself, but I am currently making a simplistic game that uses a timer as a score.

    The way you would do it however is using a variable:

    Define a variable and call it Score and default value to 0

    In your layout add a text string and call it ScoreDisplay with default text "0"

    Whenever an action increases the score, in your event you would go System > Add to (under variables section) and then add whatever score value you want to the variable.

    System > Every tick set the text value of ScoreDisplay to your variable.

    This should get the job done.

  • Uh, isn?t that the reason why plugins exist? Anyway, I?m testing with crosswalk now, I should have an answer shortly

    I am curious how you went testing iframes with Crosswalk? I'm almost at the monetisation stage of my game.

  • Have you looked into drag and drop behavior? You can define a drop area and an item that is a draggable element. You can then detect when an element is dragged over the top of the defined droppable area and then add or subtract from variables.

    I struggled a little bit to understand your question, so forgive me if I am misunderstanding.