mekonbekon's Forum Posts

  • Hi LaurenceBedford, assuming you have a looped track, this might work, haven't tried it out yet though:

    Create a sprite object called "trackSection" and give the object two instance variables called "position" and "sectionNo" Place instances of this sprite contiguously around the track setting sectionNo=1 to the first section and stepping up by one for each subsequent section. You can set the sprites invisible.

    Give your cars instance variables of "sectionNo" and "position" as well, starting both on 0.

    Use this code:

    If car is overlapping with trackSection & car.sectionNo<trackSection.sectionNo, trigger once:

    set trackSection.position to self.position+1

    set car.position to trackSection.position

    set car.sectionNo to trackSection.sectionNo

    As each car passes over the section it tags itself with the current position value of that section which steps itself up for the next car. Tagging the car with the current section number and checking to make sure that it's less than the current section that its on prevents bugs from the cars backtracking into a previous section.

    Essentially what you're doing is running a sequence of small races and check the winner for each section. You want to keep each section fairly small so that it captures place changes quickly.

  • Hi Fradno , in addition to imhotep22 's comment:

    1) Try some experiments: reduce the image size of the object or simply remove the object, run in debug and see what impact that has on the performance. Save these experiments as different names so you don't mess up your original project. Use information on the debug Profile tab to identify which areas of code are hitting the CPU hardest.

    2) Export the project and have a look in the images folder - you can get an idea how the images are being laid out on the spritesheets and it might give you an idea which ones can be reduced in size slightly to optimise memory usage.

    3) Read through these if you haven't already:

    https://www.scirra.com/blog/112/remembe ... our-memory

    https://www.scirra.com/blog/83/optimisa ... -your-time

    https://www.scirra.com/manual/134/performance-tips

    https://www.scirra.com/blog/87/under-th ... onstruct-2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 3DPiper Thanks for letting me know. Just checked and I appear to have the same problem as you with the Newgrounds link on my Nexus 5X, but this:

    http://c3gamejam.bitballoon.com

    ...is the same export as I've uploaded to Newgrounds and works fine on my phone. Weird.

  • Triple Triple Bagels, to be precise: my entry for the C3 Jam <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    http://www.newgrounds.com/portal/view/694045

    Do you like bagels?

    Can you stick food on a spike?

    Do you enjoy working for tips?

    Does the risk of possible prosecution due to unsanitary premises excite you?

    Yes?! Then come and join Triple Triple Bagel Pop-up, where the hours are long, conditions are cramped and the staff turnover stratospheric! All the triple bagels you can eat and not much else!

    Instructions:

    Flick the fillings onto the stacks and serve hipsters their bagel orders: be quick, be right, earn big tips.

    Please vote for my game and free it from Judgement Purgatory!

  • khelaghor

    You're welcome

  • khelaghor

    An extra tip: to enhance the sense of depth add a ball shadow sprite that scales at the same rate as the ball and matches the ball's X value and Ymax value. Fade out the shadow based upon the ball's current scale (bigger scale, more faded shadow)

  • khelaghor

    Add an instance variable to the ball called Ymax and give this the highest Y value that the ball reaches (e.g. if you kick the ball at Y= 400 then Ymax = 400)

    Add an instance variable to the ball called scaleFactor and give this the value the maximum increase by which you want the ball to scale (e.g. if you want the ball to scale to 1.5 its size then scaleFactor = 0.5)

    Every tick set ball scale to 1+(1-ball.Y/ball.Ymax)*ball.scaleFactor

  • yuji567

    There are three different techniques I often use to make smoothly scrolling backgrounds/floors on a loop, depending upon what the project requires. Assuming right-to-left movement:

    1) Use two instances of the same sprite the width of the screen and wrap them around each other

    2) Use one instance double the width of the screen

    3) Use a tiled background one tile larger than the width of the screen

    I've demo'd each here:

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

    The main thing is to reposition with respect to the current X, otherwise you can start to get seams and stutters in the scrolling.

    Hope that helps <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • imhotep22 cheers I just noticed that my link was automatically contracted! D'oh!

    JoshSenpai It should look like this:

    https: // www .dropbox.com/s/h8pmfmjgfkvu8zl/arrayShuffle.capx?dl=0

  • Nope, still not working - it should look like something like this: https://www.dropbox.com/s/h8pmfmjgfkvu8 ... .capx?dl=0

    Notice that there is no ellipsis before ".capx"

  • HI JoshSenpai, I'm afraid that link doesn't work - you can generate one by clicking the share button for the file on dropbox, clicking the "copy link" button.

    I won't get a chance to check it tonight, but I'll have a look tomorrow morning.

  • JoshSenpai

    You can post the link with spaces in it so it doesn't register as a link.

  • Nepeo

    Thanks for the quick reply. I guess that means I'd better not delete it

    I'll have a fiddle around with my loading layout and preloading tonight to see if I can narrow down the issue, and log it as a bug.

  • Hi all,

    The size of my project exports has jumped from a tiny 500kB to a whopping 3.6MB. I'd added in about half a meg of audio, but that shouldn't have caused such an increase.

    On looking in the export folder I notice there is now a new JS file called "ffmpeg" in there that accounts for the bulk of the increase (about 2.6MB). A quick google suggests that this is some sort of multimedia handler so I'm guessing it's there because of those new audio files I added. This is quite a big jump - I like to try and keep my projects to under a couple of MB if possible to keep downloads super quick, so is this file necessary if I'm dealing with just audio files and not other media or can I delete it?

    I also noticed that this latest export was having trouble loading on my iOS devices (iPad2, iPad mini2), getting stuck on the loading bar but not on Android, Desktop, Silk. I'm using a loader layout and preloading sounds. Could this be related? If it's not, I'll report it as a bug.

    Edit: I'm using Safari on iOS and Chrome on everything else to test.

  • Hi JoshSenpai,

    Do you have a capx you can share? Off the top of my head it sounds like there's an issue in the conditions selecting enemies or perhaps the assignment of values to enemies when they are spawned, but this would be easier to assess from the actual code.