mekonbekon's Recent Forum Activity

  • Hi, I took a look at your code; here are a few suggestions that you might want to consider:

    1) Instead of spawning objects you could use a tilemap and change the tiles to when you click. This would only be a suitable option if you don't intend to animate placed objects (you can animate tiles, but it is fiddly to set up and kills your framerate).

    2) Your code in each object group is essentially the same - you could replace all of these with a single function and instead of having the booleans plantWheat, plantCorn etc just have a single global string variable "plantObject" that you set to the object type. C3 has the very cool action "create object by name", so you can pass plantObject in order to spawn the correct object type.

    3) Alternatively, rather than having individual shop objects and placed objects you could have one shop object and one placed object, and have the different types as separate animations. This would reduce your object count and also allow you to simplify the code.

    Hope that helps

  • Try using "is overlapping" and "every 0.35 seconds" instead of "on collision".

  • Also, your link is bust - copy and paste automatically contracts the link (notice the ellipsis towards the end) - you'll need to post the full link and add a space either side of the periods to stop it contracting again.

  • Stick all the objects that you want to register in a family and then test the mouse over for that family, rather than the individual object types.

  • You're welcome

  • One thing to note when using angles: when you look at sprite in the editor, 0 degrees actually points to the right rather than straight up, so you need to take this into account when using things like the angle(X1,Y1,X2,Y2) function. Check out how I've set up the hippo sprite and its origin in the editor to see what I mean.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi the_Shit_hawk (nice username - Lahey would be proud! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> )

    I wasn't exactly sure what you were after so I've included two schemes in this demo:

    https://www.dropbox.com/s/umqh6cnvtwuh3 ... s.c3p?dl=0

    Just re-enable the second event and disable the first to switch.

    I've set the hippo to invisible rather than destroy it, which should be a teensy bit faster at runtime - you would probably want to disable the collisions when it's invisible too.

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

  • Yeah, maybe a bug then - does it work properly in C2?

  • stevecameron

    Nice start! Maybe add in a collectable object for a score bonus? That would introduce a nice risk-reward mechanic. A couple of other suggestions for simple improvements would be to include an in-game timer so that player has an indication of their progress, and a death animation on the avatar. Looking forward to your next creation!

  • Have you tried "Set Canvas Size"? If you then want the pixels to scale correspondingly you can set the Layout scale.

  • I'm glad that the preloading worked for you - if it takes too long to load you can break up the preloading of sounds into groups using the preload action at the start of the different layouts rather than preloading them all at the very beginning.

    Thanks for sharing the link, the game is looking good - nice work!

  • Hmm...

    I set up a test demo but couldn't replicate the bug.

    A couple of other thoughts:

    1) Are all the sounds preloaded?

    2) Have you tried spitting out some debug text to check whether (i) the event isn't triggering, (ii) the audio action isn't triggering, or (iii) the audio event is triggering but no audio is playing? You could do this by including an action in the event playing the audio that adds the current time to a text object. If there are gaps in time sequence then it must be the case that the event isn't triggering, but if the time is always added then you know that the event triggers ok, so it must be an issue with either case (ii) or (iii), in which case you can run the game in debug, select the audio object and watch it - if the object registers as playing when you get the bug then (iii) is the cause, otherwise it's (ii).

    Apart from that I'm stuck too, sorry I couldn't be of more help :S

mekonbekon's avatar

mekonbekon

Early Adopter

Member since 9 May, 2014

Twitter
mekonbekon has 13 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    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

20/44
How to earn trophies