citron2010's Forum Posts

  • Thanks for this very instructive topic !

    So you gave up xcode export to cordova export ?

    In tour second post, you write :

    > I got Cordova installed

    >

    > Then cordova prepare (had to install several dependencies to get this to work)

    Could you detail the whole install process including the 'several dependancies' ?

    I'll in the process of making my own app in a few weeks and your progress are veray useful to me. thanks !

    Hi Laurent. Yes, I need to hide the home bar indicator and the only way to do this is to export to Cordova then use the Cordova plugin from the Github repo before completing the build (then importing into Xcode).

    When you run cordova prepare it warns which dependencies are missing and gives commands to install them - I can't remember exactly but write here if you get stuck and I'll try to help.

  • Just to follow up on my progress. I've been testing on real devices using Xcode but decided to try the simulator and tried an iPhone 15 where I noticed the "Home indicator bar" so searched on how to hide it and came across this post:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/include-cordova-plugin-172165

    Which lead to these instructions:

    https://www.construct.net/en/tutorials/building-mobile-apps-locally-21

    I got Cordova installed

    Then cordova prepare (had to install several dependencies to get this to work)

    cordova requirements showed no issues

    cordova build failed with "Value for SWIFT_VERSION cannot be empty"

    Figured out that I needed to open /platforms/ios/<project name>.xcworkspace, go to Build Settings and change "Swift Language Version" from "Unspecified" to "Swift 4.2" (similar to above post)

    cordova build succeeded so reopened the .xcworkspace file again and managed to test the app OK again.

    Then realised I'd not read that original post thoroughly and hadn't installed:

    github.com/chipbell4/cordova-plugin-hide-home-indicator

    (or updated config.xml to include a reference to it!)

    Once that was installed and I'd updated config.xml, cordova prepare and cordova requirements ran OK

    But cordova build failed with the same Swift version error plus another "'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.2.99" error. So back to the xcworkspace file in Xcode to fix the Swift version error again. Haven't needed to fix the other error yet - the project's building OK on the simulator.

    And the result? I think it's working - I'm using the mouse to simulate clicks and I think iOS shows the indicator bar when it detects mouse activity. I can also control my game with a keyboard in which case the bar isn't show - so I'm hoping that's the case when using a real device with touch.

    Maybe a "Hide home indicator" option in the build settings? (Godot has had this for a while).

    Also wondering whether the build process needs updating to address some of the other issues I've described in this thread?

  • Not sure if C2 can do this, but C3 can - see the "Load image from URL" section here: construct.net/en/make-games/manuals/construct-3/plugin-reference/sprite

  • Maybe different animation frames? One with dirt and one without?

  • Not sure, but adding the "no save" behaviour to the object the timer belongs to might work.

    construct.net/en/make-games/manuals/construct-3/behavior-reference/no-save

    Otherwise, store everything in global variable, or, if you need data to persist between restarts, you'll need to write each value out to local storage individually. If you have many parameters, storing them in a dictionary first then writing that out to local storage simplifies things.

  • Try going to chrome://flags in Chrome, search for "dark mode", set that to "enabled".

    Works for me in Windows although the contrast between selected/unselected is maybe now a little too low.

  • This thread might help - I wanted to calculate where a projectile would land but you know where you want it to land, so you could use the formula to calculate the x and y velocity you would need to give to the projectile to make it land where you want:

    construct.net/en/forum/construct-3/how-do-i-8/help-calculate-range-179892

  • Just an update to 3. above - if I export a new, empty project to Xcode, and view Assets.xcassets, it shows that it's using the default Cordova icons and not picking up the C3 icons that are present in a new project.

    It's fairly easy to fix - I just deleted all the icons and then uploaded a 1024x1024 icon for and set iOS = "All Sizes" in the dropdown.

  • Fixed my issue by applying a zero force if the object is sleeping. This first appeared when I started my current project in C2 years ago. Thought C3 had fixed it, but not completely. Fixed now though - I'm delighted!

  • I used the inspector to determine that the balls that get stuck were asleep. Not sure why the engine did that though. Found this post that suggests you can check if an object's asleep and apply a force of 0 to wake it up.

    construct.net/en/forum/construct-2/how-do-i-18/prevent-physics-object-104541

    I've also noticed some physics objects occasionally sticking in one of my own projects - so will check if they too have gone to sleep and will try to fix similarly.

  • Try Construct 3

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

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

    I'm seeing several issue when building an Xcode project. I've tested it with an empty project, but still getting the following issues:

    1. The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 17.0.99. - easily fixed by manually setting to 12.0

    2. Could not find included file 'Pods/Target Support Files/Pods-xcode test/Pods-xcode test.debug.xcconfig' in search paths - fixed by removing:

    #include "Pods/Target Support Files/Pods-xcode test/Pods-xcode test.debug.xcconfig"

    From pods-debug.xcode (but that file starts with: "#include "Pods/Target Support Files/Pods-xcode test/Pods-xcode test.debug.xcconfig"" so not sure how safe deleting that line is?)

    3. App icon isn't being used - instead it uses the default Cordova icon

    4. In the project I'm working on, I also get an error about Swift version not being set - it's easy enough to set it to 4.2 in Build Settings, but thought I'd report it too.

    Thanks!

  • Thank you so much - it works! I found this website that allows you to enter values and will calculate the result:

    omnicalculator.com/physics/projectile-motion

    Which I used to confirm your gravity x 50 tip so realised the error must be in my code. Was just about to debug when I noticed you'd posted above.

  • Thanks for taking a look - I need to spend some more time investigating - will see if I can implement your code to see if I get a different result.

  • Hi,

    I want to be able to determine where a projectile (a ball) will hit the ground.

    So I'm trying to implement a formula I found on WikiPedia:

    en.wikipedia.org/wiki/Range_of_a_projectile

    It's the formula under "Solving for the range once again"

    But I can't get it to work. I've made this CAPX to help as follows:

    1. A ball is moved to a fixed position then its x & y velocities are set to random values that cause the ball to be launched upwards and to the right

    2. after 0.2 seconds, I snapshot the ball's X & Y positions and velocities

    3. I feed these into what I think the formula on Wikipedia dictates and display the result

    4. When the ball lands, I show the actual distance travelled.

    Problem is that 3 =/= 4 and I can't figure out why.

    Pretty sure I could have figured all this out from first principles whilst at school - but that was 40 years ago!

    Thanks!

    drive.google.com/file/d/1PWaQTllN5PN0pDyYR67oDmwGKxzySIfi/view

  • The real question is, why do you need to detect if both shift keys are down?

    I wanted a pair of keys, one on each side of the keyboard, for a 2 player, single button game that are both present on any keyboard regardless of layout/localisation (including Chinese Cangjie).

    Have now swapped to Left CTRL & Right arrow.