mekonbekon's Recent Forum Activity

  • Sure, here you go! The style is (ahem) charmingly simple

    Main splash:

    Story:

    Gameplay:

  • ,

    Whichever behaviour you're using, it'd be worth familiarising yourself with the 'clamp' expression - it's very useful for a bunch of situations in which you want to constrain a variable between a minimum and maximum value.

    It takes the form clamp(value, max, min). The handy thing is that the 'value' part can be a variable or expression itself. So in your case, for example you might have a 'speed' instance variable on Mario. You could then use the following code:

    On right arrow down: Set Mario.speed to clamp(self.speed+1,-10,10); Set Mario.X to self.X+self.speed

    On left arrow down: Set Mario.speed to clamp(self.speed-1,-10,10); Set Mario.X to self.X+self.speed

    This would increase or decrease Mario's speed by 1 each tick depending upon which direction key is held down and then move Mario in the given direction.

    Remember to reset the speed to 0 when no key is pressed, or divide the speed each tick after release to allow deceleration.

    Alternatively check out the 'max' and 'min' expressions in the manual - they can be used in a similar way to limit the range of a variable.

    You should also familiarise yourself with using dt time to ensure frame rate independent movement - there's a bunch of tutorials, forum posts and manual entries on how to use it - a quick search should point you in the right direction.

  • LaurenceBedford

    This is the basic idea:

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

    The code I discussed above is in Event 2; the rest of the code is only there to get the cars moving.

    You can make the positioning more accurate by adding more trackSections in.

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

  • Don't know how NG is exactly handling the games, but if it lets you upload an update to your game by the new end date that will be fine.

    Tom thanks for clarifying

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've already submitted my entry, but would like to make use of this extension to add a few tweaks; will I be able to resubmit without any hitches?

  • In fact the track section sprites don't need to be touching, as long as each spans the width of the track and they're deep enough to register a car passing at speed i.e. the car isn't moving further than the depth of the section in a single tick.

  • 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

  • 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)

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies