Digitalsa's Forum Posts

  • Plugin has arrived and is now open source: https://github.com/ludei/Construct-2-plugin

  • Ludei is in charge of all of this, releases, announcements, etc. From what I've seen they do not communicate that often with Scirra. We need to keep on them in the forums, twitter, email, etc and just wait for it.

    They were supposed to open source the plugin and basically leave it up to us, but as we know, Ludei doesn't share roadmaps with the public.

    <rant>

    Let's remember, they are a start up, with a small team, and they are giving us a free product. They only have one goal and that is to get another round of funding to keep going, so they are really targeting the product to investors or potential buyers, not us. I feel once the product is more stable or they get bought out, they will become more consumer focused.

    </rant>

    Ah, I see. I thought because the plugin comes bundled with Construct 2, they would be in contact with Ashley and the team. As for roadmaps, Ludei publicly responded to my Tweet telling me very soon and most likely last week. This means Construct 2 is being paid attention and they have a plugin that is ready to roll. Ludei have a bigger team than Construct 2, they're a startup in the sense they need VC funding to keep going, but they've got the resources to at least respond a little more.

    It would be in Ludei's best interests to give developers the required functionality to leverage their platform because I know there are a lot of developers out there waiting for Google Play leaderboard support before they release their games (myself included). There will be a flood of games Ludei can use to bolster their portfolio, "Hey look at what all these people have made using our service and not Phonegap" more users equals a better chance of them getting more VC funding.

  • I Tweeted at Ludei last week and they told me that it was most likely coming last week. It has almost been a week on since that Tweet now, but hints that a newer version of CocoonJS exists and is ready. My game is being held back because of lack of Google Play Leaderboard as well.

    This is my Tweet and Ludei's response: https://twitter.com/ludei/status/453177151362039808

    Maybe I'll drop them an email. If everyone were to do the same, they might release the plugin sooner. Even just Tweeting at them might help.

  • I Tweeted at Ludei last week asking when they would be releasing a newer version of their CocoonJS plugin for Construct 2 and they responded, "Sometime this week" that of course was last week and still no word on release.

    Are the the C2 developers and by developers I mean Ashley able to tell us when the newer plugin is going to be featured in a Construct 2 release? The newer plugin will bring a few missing features the plugin currently does not have like support for Google Play Leaderboards amongst others. This is actually holding back a game I am waiting to release which has implemented iOS leaderboards, but because of the lack of Android Google Play leaderboard support in the current plugin, Android doesn't get a native leaderboard.

    I would email Ludei directly, but they seem to be very busy given they just released version 2.0 of their service which has received a lot of positive press and presumably they're refining the current version even further.

  • I would pay $20 for a starter template that allowed you to build a mobile friendly game that worked on all aspect ratios and screen sizes. Considering screen sizes on mobile are a big issue for beginners and intermediate users of Construct 2, I think that kind of template alone would be a game changer.

  • What you can do if you add it to a function is simple call the function with a random number. And based on that it will change the color.

    Input: Random number from 1 to 5

    On Function Change_Color

    If Function.parameter(0) = 1

    Set background color to Red

    If function.parameter(0) = 2

    Set background color to Blue

    etc.

    When you call the function you simply write.

    Call Change_color

    Parameter (0): int(random(5)+1)

    If you are not sure how to use functions, here is a small guide I wrote, They are fairly easy to use and a absolute must to learn if you want to make anything decent in my opinion - https://www.scirra.com/forum/viewtopic.php?t=97305&p=743528#p743528

    Brilliant. Seems using a function is all that was needed, does the job well. Thank you very much for your help and to everyone else who answered.

  • Thanks for the reply Nimos. I didn't explain myself well enough.

    I have an array of 5 pre-chosen colours I want to randomly use in my game as the layer background. The reason I use an array is because my understanding is there is nothing else fit for the purpose of storing multiple values and then selecting one.

    On start of layout

    Choose random colour from the array in RGB format.

    Apply this colour to the background colour of the layer.

    My problem is stored strings of RGB values in an array don't seem to work when I randomly pull one out and try and apply it using the above code. I don't want random colours, I want to randomly choose colours I've chosen that work well with my game and apply one.

  • I am currently building a test game where an array is populated with colour values in the format of: "255, 255, 255" and at the moment I have an array that has 5 colours inside of it.

    When the layout first loads, I am wanting to select a random colour from this array and then apply that to the background color property of a particular layer at index 0.

    At the moment I have a global variable called: Color and on layout start I set its value to a randomly picked colour from the array like so: Array.At(random(Array.Width))

    I then attempt to set the background colour of layer 0 to the variable, but nothing happens. My understanding is the layer background colour excepts a string of RGB values, but all I see is a consistent black background: no colour.

    Any examples of choosing colours from an array and setting a layer background colour from a randomly picked value would be fantastic. Thank you in advance.

  • Yann,

    You sir, are amazing. So glad I bought Construct 2 and joined this community, I'll give it a shot. My layers are set to scale 100%, so it shouldn't be a problem I presume to position things. I hope to be able to give back all of the help and some more when I get a firmer grasp on this tool.

  • This seems like it should be such a simple problem to resolve, but I can't get my elements to sit X amount of pixels from the left of the window and X amount from the top of the window in my project, don't get me started on perfectly centring something.

    I did find a line of code somewhere for centring something horizontally and vertically, but it doesn't seem to work. ViewportLeft("Layer") + ViewportRight("Layer") / 2 is meant to centre a sprite or object horizontally centre, but I find my element is either too far to the left or too far to the right. I am using scale mode, "Scale Outer" my project window size is 640 x 960 and the subsequent layouts are also the same size, each layout has unbounded scrolling set to yes.

    I want to perfectly position an element centre, I want to position another element at the bottom of the screen which from my understanding should work using ViewportTop("Layer") + ViewportBottom("Layer") - offsetvalue, however I find my element is being positioned from the top down, not at the bottom of the screen. Am I doing something wrong here? Perhaps the scaling mode is breaking things.

  • Two words my friend: global variables.

    Global variables are persistent over different layouts, so you can store a global variable of score when you die and then fetch it on the game over screen or score screen. The latest version of Construct 2 comes with a Flappy bird template you should look into.

  • Oops sorry, I still have link restrictions on the forums and pasted the correct one initially only to have it removed and then I accidentally pasted the private URL. Here's the public link: copy.com/SD2LKtm2qbO2

    I'll have a look at your example Guizmus, 4k sounds reasonable for buggy behavior. I am only keeping the ball at 850px/s, so with your example it should theoretically be fine! Your example works well until as you say, it gets so fast it just disappears from the screen. I don't think I'll ever run into that problem on this project, thank you for all of your help everyone.

  • copy.com/browse/copy/Test%20Bounce.capx

    Thanks for the help everyone. I've posted up a CAPX online here:

    It won't happen every single time, just sometimes, but enough for it to be considered a final release stopping bug. The thoughts around pixel speed and framerate are interesting. It doesn't seem to happen on desktop as much as it does when I test on my Samsung Galaxy S4 and it's a little more prevalent when viewing on an iPhone 5 as well. The framerate being at fault here would make some logical sense.

    View the above CAPX on your mobile phone and you'll see the issue I am talking about. This is going to be a mobile game, and so, this can't happen.

    In regards to preventing the ball overshooting and or getting stuck on a wall, is there some pre-existing code elsewhere (perhaps another project) that I can implement and test with? I am getting better at Construct 2, but by no means a ninja when it comes to resolving issues using events and messing with positioning coordinates.

  • Yes. It is bouncing behaviour related thread no #89218301 on the forums.

    I've been cruising along with C2 and I've learned a lot of things, I feel as though I have a firm grasp of things but there is just one little bug I can't shake and it appears to be a bug with the bullet behaviour.

    I have done extensive trial and error with the bullet behaviour, I've also extensively searched the forums, looked through example CAPX files and still have yet to solve this issue.

    The problem:

    I have a simple ball sprite with bullet behaviour. The speed is set to 850 and I have 4 walls surrounding my canvas (all belonging to the same family). The walls are set to solid and the sprite ball is set to bounce off solids. The speed remains consistent and never changes. Acceleration is set to 0, as is gravity.

    Now it doesn't happen right away, but when the ball sometimes hits a side wall usually on the X axis (left and right walls), the ball will get stuck and end up sticking to the wall and sliding around the canvas. Eventually it unsticks itself, but this isn't the kind of behaviour I want in my game.

    I've tried toying with the gravity value and every other parameter to no avail. Is there a definitive fix for this problem?

    I've read of others with the same problem and solutions range from custom movement to using physics. For performance reasons, I want to keep using bullet behaviour and I couldn't find any solution for bullet behaviour.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How are you doing those touch hotspots? This looks awesome. Would love to see a CAPX to see how you handled the finger drag lag and whatnot. Nice work man.