jtlindeman's Forum Posts

  • 15 posts
  • Just wanted to ask an additional question in reference to this topic. Is it possible to directly manipulate all Box2D settings using the SDK? Seems like this would be very convenient.

  • I'm working on a project and I've ran into an issue with an object colliding with walls in a zero gravity environment. The issue is that if the object collides with a wall going slowly enough, it will not bounce regardless of the elasticity of the wall and object.

    I did a bit of research and found that this is related to a property in Box2D called b2_velocityThreshold. Basically what it does is if an object's velocity is below the threshold it will treat it as having an elasticity of 0. After some quick testing it appears it occurs if the velocity is less than 50 (for the perpendicular direction at least).

    Is there anyway to modify this value in C2, or get around it by modifying other physics properties? I can create my own collision events if absolutely necessary, but I'd prefer to stick with all physics. I'd like the object to bounce even if it is moving very slowly, only coming to a stop once the linear damping causes it to.

    Link to capx

    Thanks for any info/ideas

  • Ok I just tested the same demo built through AppMobi and Phonegap, and the apk built with AppMobi runs roughly 10 FPS faster. However, I'm almost certain that the AppMobi version is running at a lower resolution as I had a text object that said the viewport was 800px wide on Phonegap and 533px wide on AppMobi. So they are definitely building the apk files differently, but it would be difficult to determine which one is better at this point.

  • Yea I'll try that the first chance I get... I'm also interested in whether or not there's a difference.

  • Thanks, switching to fullscreen did the trick. After switching to that it worked on my android phone. Performance seems to be much smoother than Phonegap from what I can tell. However I am having issues with collision detection between very small objects (2x2 px) which I'm guessing is a result of the lower framerate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmm... thats interesting. It's nice to see that apparently someone has got it working. I'm not concerned about the hyperlink as its a feature of construct free and I plan on purchasing a license in the very near future.

  • I know that AppMobi isn't officially supported but I saw some people mention that are working with it and having success. I was just wondering if someone who had luck getting it work could shed some light on how exactly they went about it.

    I exported my game from C2 as an HTML project, then simply loaded the resulting folder into the AppMobi XDK as a new project. To my amazement it worked on the built in iOS and Android device emulators flawlessly. However, my excitement was premature as when I built the project as a native Android .apk and tried running it on my phone all I got was a black canvas. The hyperlink to the Scirra website was still under it tho.

    So has anyone has success building your C2 project into a native app using the AppMobi XDK? It was so promising seeing my game run perfectly on that little emulators screen lol.

  • Well thanks for taking the time to look into it. For the mean time I'm going to stick with a strict layout size and not run in full screen that way I can least continue to work on the mechanics of the gameplay. My main concern is how will various screen sizes and resolutions on mobile devices affect this, as my end goal is to turn this into a native phone app at some point.

  • I get what you're saying Yann, so how would you suggest I set up my layout and window properties so that the game works properly and scales to correctly spawn lilypads just off the screen on any display? Should I set the dimensions based on the smallest resolution I want to display (mobile devices) and stretch it?

    I'm just not sure what the issue is. I tried changing the dimensions to the actual resolution of my desktop (1366,768) and it says the pads are spawning at x = 1398, but they are still spawning inside the window noticeably. Could this possibly be a bug with the scaling feature?

  • Well the issue is that some of the lilypads are spawning off of the screen, or further away than they should be. I know it's not the values I'm using because I tried the same expressions with a fixed window size in non full screen scaled mode and they worked fine. Could this possibly be because I have a wide screen monitor?

  • So I have a game where I want to spawn objects right outside of the screen and have them move across it. The problem I'm having is exactly how I should go about determining where to spawn the objects. I've tried spawning them using the layoutHeight and Width properties but in fullscreen scaled mode it ends up spawning them inside the window. When I use windowHeight and Width it spawns them inside when in windowed mode and much too far outside when in fullscreen mode. I want my game to work on all screen sizes consistently and it doesn't seem to be possible. I've ran all my tests in full screen scaled mode.

    I included my

    capx

    Thanks for any input.

  • Lol.... sorry to waste your time, but thanks for the effort. Your second example actually gave me an idea for something else so it wasn't a complete loss :P

  • That's a really nice way to implement a waypoint pathing system, but it's still not quite what I meant. The behavior I'm looking for is basically what I have in my example (all clicks while the frog is moving are ignored), the only issue is that once in awhile the sprite won't stop when it collides with the destination sprite and it just keeps moving off of the screen. So far I've only seen it happen if I click while the sprite is moving, however it seems to do it randomly.

    Thanks for the examples though, sorry I wasn't more clear on what I was going for.

    EDIT: Well looks like it was much simpler than I expected. Instead of using the toggle boolean action I just changed it to set the boolean to true or false directly. Thanks though Yann, your first example is what actually gave me the idea to try this.

  • Thanks for the response. However, the issue is that I don't want to the frog to respond to another click until he has reached the position of the previous click.

  • Hey everyone, I just downloaded Construct 2 and started working on a little project. Seems like I've already ran into a snag and I just can't figure out what's causing it or how to remedy it. I figured I'd post on here and see if another set of eyes could spot the problem.

    Basically I have a frog sprite (which is currently using the facebook icon as a placeholder lol) that I want to jump to the location that is touched or clicked. Everything is working properly for the most part, the only issue is that sometimes when I keep clicking while the sprite is moving it will never end its jump and simply continue on its current path off the screen. It only happens once in awhile while clicking during the jump. I should also point out, the LZ sprite seems to be destroyed appropriately, but the jumping boolean isn't toggled in the same event.

    Here's a link to the .capx:

    http://dl.dropbox.com/u/16884361/Test.capx

    Thanks in advance for any help.

  • 15 posts