AnD4D's Forum Posts

  • I think I may have cracked it... after realising that it was based on seconds rather than frames, and C2 defaults to 60fps... I set it so that each time a bullet is spawned, it stores the gun's x and y vector divided by 60. It then adds this data to its position every tick. Then when a speed is applied to it, the motion appears to work as expected.

    Looks a bit odd at times, but it looks pretty accurate.

  • Colludium Very strange. When I apply this to my project, the bullet appears for 1 frame, and then vanishes. When I go through the debug menu and take a look at what the bullet is doing, it's X/Y vector and X Y coordinates are replaced with NaN (not a number).

    In addition, I note that the angle of motion is applied to the Y vector only. Would the same action work if the gun was moving only on the X axis aiming up as well, or would I need a new bit of code for that?

  • Colludium Thanks! I'll have a look at this now! I think I was being thrown by velocity being based on per second rather than per tick.

  • Sorry if this has been asked before. I can barely think of how to word it, so please bear with me.

    I have an object that is controlled using physics. Said object can fire a sprite with the bullet behaviour.

    When the object is stationary, and fires facing right, the bullet will move as expected. However, when the object is falling and it fires, I want the bullet to retain the vertical motion/speed, and then continue to move to the right.

    This is most noticeable when the object is facing down and it fires. The bullet can sometimes appear to be moving up, as it's moving slower than the "gun".

    As the object is physics based, I can't figure out how to apply the vector to the bullet behaviour. If I was using the physics behaviour as the bullet, I'd simply set the vector to the same and then apply an impulse in the direction I want it... but I don't want to use the physics behaviour for this.

    Hope I've made sense. If not, please let me know and I'll try again.

  • Problem Description

    Error saving 'New Project' - the project has NOT been saved to disk. We apologize for any loss of work. you may want to report this to scira.

    Message: Failed to move .capx.tmp to .capx

    I am working off of a cloud drive, but nothing new has happened or changed, as far as I am aware. Was fine with a previous version.

    https://www.scirra.com/forum/failed-to-move-capx-tmp-to-capx_t77456

    Someone else brought it up here...

    Attach a Capx

    It's the save button in Construct 2... not sure a capx would help.

    Description of Capx

    NA

    Steps to Reproduce Bug

    • Open C2
    • Save
    • Watch the program delete your CAPX
    • Save as in order to recover your work

    Observed Result

    It fails to save, and error message appears, the capx is effectively deleted.

    Expected Result

    It to save

    Affected Browsers

    NA

    Operating System and Service Pack

    Windows 8

    Construct 2 Version ID

    206

  • Don't suppose C2 will be one of the permitted engines...?

  • Great stuff! Thanks a lot! Took collision checks down from 300 to just 30

  • sqiddster I don't suppose you still have this do you? The dropbox link is broken. I have the version R0J0hound created set up, but notice that it's doing around 400 collision checks a tick.

    I plan on having 4 characters running around with these lasers, so I'm interested in checking out the other method to see if it produces less checks.

    I tried recreating it using what you've described in your post, but don't see where the increment variable is reset. As far as I can tell, it just reduces down to 1 and then stops.

    I know we're now 3-4 years down the line...

  • I'm afraid not. Things may have changed, but I've moved away from Prototypes onto larger games now.

    I'm sure I'll come back to pathfinding in the future, but not yet.

  • Aphrodite - I agree. I released 2 games on Android using Cocoon, and I thought iOS would be just as easy, but when I got around to using it, Scirra stopped support. Same happened with Ejecta today. I have learned not to expect from Scirra, but I'd have thought text input would be a standard thing.

    Ejecta had it, and so does another exporter I use. I hope it gets added to the plugin. I imagine it's a simple addition.

  • I thought CocoonJS was pretty much finished with.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • $3 for something that I'll use once, and should already be in the software? Geez...

    I'm such a cheapskate

  • So I was building my game with Ejecta, but I'm having issues, so I figured I'd see how things work so far with PhoneGap.

    My question is, how do we invoke the digital keyboard? With Ejecta, they had their own plugin that allowed me to do that, but PhoeGap appears to only have Game Centre, and that doesn't have a similar action.

    Am I missing something?

  • 1. Change "Fullscreen in browser" in C2 to "Scale inner" (letterbox scale was probably the cause of the black screen)

    2. In Xcode, on the General tab, Device orientation, uncheck portrait/upside down and check Landscape Left and Landscape Right, or on or the other.

    3. On the info tab, find "Initial interface orientation" and select "Landscape (left home button)" or right home button.

    KFC I followed your directions in combination with Ashley's tutorial, and I still get a black screen. I'm not minifying my project, it's just not working.

    Are you testing it on a simulator, or a device? May I ask how long the app took to load on yours? I sat and watched it this time, and after about 1 minute, the iPad retina simulator rotated 90 degrees and an iPad menu appeared (maps, etc). After about 30 seconds, all the icons apart from Safari vanished, and it rotated back to portrait. 2 minutes after that, XCode informed me that it had lost contact with the device.

    I'm exporting it as Ejecta, not HTML5, and I'm downloading the Ejecta project from the link in the tutorial. Copying the export into that folder and replacing the name of the folder as "App". Once done, I'm double clicking the xcode project, setting the settings as you say, and then running the build (which says it's built successfully).

    I've done a fresh OS upgrade, as well as a new xcode install. There must be a step somewhere that I'm missing.

    I should say I have WebGL on, as I read that Ejecta supports it now.

  • KFC - Thanks! It's a rubbish game, but I did what I was told... *sigh*

    I'll give this a go tonight