pcfernandesjr's Forum Posts

  • Hi R0J0hound!

    Just passing by to let you know that I managed to adapt our code with success. Turned out that I forgot to declare that "i=0" at the top of the code. Now it works like a charm.

    Thank you so much for your help and patience!

  • pcfernandesjr

    Doesn't the original example do that too? Like alextro said it just positions the eggs where the player was a certain time in the past, so if the player stops they will all stack on him.

    I don't have a solution to keeping the eggs from stacking. I've tried stopping time advancement when the player doesn't move, but then the eggs are just frozen in space.

    One idea could be to think of the eggs as a chain attached to the player. So maybe leveraging the pin behavior to link them together and drop them with gravity and bounce them a bit.

    Hi R0J0hound!

    Yes, I expressed myself badly. The eggs indeed are supposed to overlap each other while they're idle. That is fine.

    What happened is that they were overlapped while in movement. But this was due some mistake I did.

    The issue now is that, for each egg that joins the line, the LERPing gets more and more screwed up. Here is the current code:

    If you want to take a look on the real thing running, I uploaded the demo on my dropbox:

    https://dl.dropboxusercontent.com/u/129 ... index.html

    Cheers!

    This is an example of what I want to achieve. If anyone can help, this will be usefull for other people.

    Hi , maybe you should do this:

    have a way to check this before starting the following part of the code:

    1-which direction your character is facing

    2-if the x position of your character is greater or smaller (depending if the player will start walking left, or right.) than the x position of the follower

    I think that should work, but as we can see I am not an specialist <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi R0J0hound!

    I followed your suggestion, but there is one problem. The eggs are overlapping each other, instead of positioning one behind another. Maybe this is something about the variables involved on LERP, or maybe the 'set target_time' part?

    Just to clarify, here is my code (the hidden bit is the 'while' part, forgot to expand it):

    Cheers!

  • R0J0hound

    Yeah, I though about something like you suggested on the code field. But I just got stuck there.

    I will try edit my code. Hope it works fine.

    Cheers and thanks for the help!

  • Hi Tokinsom! I recently saw your game on GAMESFODA E3 special. Congrats for the awesome work! Can't wait to play it.

  • Hi guys, sorry to unbury the thread, but I am currently working on an old project of mine, which uses a similar functionality. I successfully implemented R0J0hound solution, but I am struggling with one detail:

    The programming was made for a group of eggs already caught by the player, but let's say that I caught one more egg. What would be a good way of programming it to join the the other eggs as the last in line?

    Cheers!

  • Maybe you could test using a smaller layout size (therefore smaller images as well), and set the game to fit the screen useing letterbox scale.

    It could be easier to help if you post a screenshot of your event sheet

  • Nobody?

  • I tried to open my game exporten with CocoonJS on a Android 2.3 (Galaxy Y / Galaxy Player) and it stops on Ludei's Splash Screen.

    Also happened with Motorola RAZR D3.

    I think it's a lucky shot to make your game work with older versions of Android...

  • Hi there fellows!

    I am implementing a "share my score" event in my game, and I would like to know if it is possible to call the facebook app of one's cellphone instead of opening a browser with facebook's website.

    Thanks for the attention!

  • > I am getting obsessed with programming my games as much "mobile friendly" as possible. (Severe trauma from the last 2 weeks when I'm failing miserably in porting a simple game to mobile, and worried about my other games that are filled with potential memory consuming events)

    >

    > I know that besides the "Every Tick", there are others that constantly checks every tick if the related objects reaches or not their trigger conditions. For example checking collisions

    >

    > Is there any list available of these conditions? it would be nice to have one, together with the best practices tutorials and articles sprinkled over Scirra's website/forum.

    >

    Basically, every condition other than true triggers (like on created, on function, on start of layout), is checked every tick, the goal is to reduce the calculations needed by the device, collision is a pretty heavy condition compared to check if a variable is equal to something, or if a grouo is active, or something else, and even more if the number of collision to check is big, deactivating collisions and behaviors on objects that aren t on screen (or that don t need them active at a given situation) can help, not abusing of loop also is mandatory (you can still use them in cases they are really needed of course), lowering the number of points in the object hitbox can help too (pixel perfect like collision is rarely needed), some object can have on collision active only one tick out of two without breaking the game, at the end, a synthesis is:

    If you are using a behavior, do you really need all it s functionnalities, and if not, can you reproduce what is needed in events only? If so try it

    Keep calm, make a scenario in your head, then read the event sheet yourself, from top to bottom, reading the includes too, with that particular scenario, if somethings seems redundant, or looks line it could be avoided, maybe it is indeed.

    Functions are great, and can make the code look cleaner, and so is easier to edit and optimise.

    Groups help organize events, and they can be deactivated and activated by events, learn what is always needed, and what is only conditionnal, for exemple, the ennemi AI is only active if the ennemy exist, and in some cases, if it is on screen, you could play around with that.

    Maths can be pretty heavy when done a lot of times, so try to simplify the calculations if possible.

    For a clean work, do not use global variables only, instances variables for instance, local variables for what is only needed in a group for exemple.

    Includes can be dragged inside sub events, which can help deactivating an entire event sheet when for exemple, the game is paused.

    Workarounds are a bad pratice and so, if needed, should always be isolated inside functions and such, since they can broke pretty much from one version to another.

    It is only a concise and non exhautive list of how I do in C2 that works.

    Great tips, thanks Aphrodite!

  • I don't know. I never got how to use the Ludei's LAN preview or their test app properly... Is there a way to print it on the game, like FPS?

  • Uhm...I think I am facing a similar problem. So if you guys don't mind in helping me as well...

    My game have a 32x32 tile that is used as a 480x1280 background.

    The game runs fairly well on my device (Samsung Galaxy tab 3 Mini), but on some of my friends devices (Samsung Galaxy Player 4.2 and a Motorola RAZR D3) what happens is that the game freezes on Ludei's splashscreen.

    Could this be the reason of it? Or it would by other issue?

  • I am getting obsessed with programming my games as much "mobile friendly" as possible. (Severe trauma from the last 2 weeks when I'm failing miserably in porting a simple game to mobile, and worried about my other games that are filled with potential memory consuming events)

    I know that besides the "Every Tick", there are others that constantly checks every tick if the related objects reaches or not their trigger conditions. For example checking collisions

    Is there any list available of these conditions? it would be nice to have one, together with the best practices tutorials and articles sprinkled over Scirra's website/forum.

  • That's weird. Does it only occur on mobile? or does the penguin pass right through in desktop as well? Does it happen for the popsicles too?. You exporting using cocoonjs?.

    It seems fine when i tested on my android.

    You sure you didn't change the code, The for each block loop is still present right.

    Amazingly yes. It only occurred on mobile. What is happening is that randomly the Penguin is passing through ice blocks and popsicles as well.

    The only thing different I did was changing some collision points that were different from what you set up (you changed it to bottom instead of middle, but forgot to do the same in other objects frames, such as the left and right penguin frames)

    I exported the game using Cocoon JS (Which by the way worked way better than Crosswalk), and the device I am using is the Samsung Galaxy Tab 3 Mini.

    One thing that I was thinking about is if setting the Every X Seconds from the blocks/popsicle generator to "0.5" has something to do with it.