RafaelMatos's Forum Posts

  • Hi. I would like to hear advice from you ... There are infinite levels, which are generated by objects in the environment. Will the game run faster if you create objects in advance and simply change their position, and not to create each time new and delete old ones? After creating objects also takes performance and change the position of old objects correctly?

    P.S. Sorry for my english ...

    When you load a layout with all the objects already, the performance is better than creating in a runtime. I think you only need to have them outside the layout and, on start of layout, destroy it if necessary. So, in your case, I'd keep all objects at the moment of layouts loading and then let the events do the rest.

    See:

    https://www.scirra.com/manual/134/performance-tips

    [quote:1ghq9ozv]Not placing all used objects in the layout

    If objects are not placed in a layout but are created by events, Construct 2 will load the textures for those objects the moment you create them. This can cause a momentary pause or "jank" and make the game feel less responsive. This can be avoided by placing any used objects in the layout. They can be placed off-screen and destroyed on startup to avoid interfering with the gameplay. Then Construct 2 will preload all their textures when the layout starts, avoiding any "jank" as they are created and destroyed at runtime.

  • It seams that your problem is not actually the touch condition. but two objects in the same place at the moment you are touching it. Make sure that any button is underneath your play button or just put in the event that, on touched Play button and if you are not touching anything else....

    Also I would recommend the tap gesture. Sometimes It's better when you want things to trigger only once.

  • try just re-selecting your icons and 25mb is great

    I did it several times. Well, I'll keep trying later

  • You can do what Somebody said, or use line of sight too.

  • socialpilgrim , volkiller730

    I've saw that before already and fixed it. It's about invalid character (non english characters). Yet, the build crash.

    Edit: It's working now. However, he is not recognizing the icons and splashes and the apk is about 25mb. Is it ok?Because It's a 7mb project.

    see:

    [attachment=0:2xg4btua][/attachment:2xg4btua]

  • does your game work using the Xdk built in emulator?

    Yes, it does. Did you see the build log?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could someone help me please??It always fails and also, now, the icons and splash screens are not recognized anymore and I didn't do anything different.

  • Sorry, volkiller730. Here it is.

    Buildfile: .../BowlingPetsTest/build.xml
    Buildfile: .../BowlingPetsTest/build.xml
    
    -set-mode-check:
    
    -set-release-mode:
    
    -check-env:
     [checkenv] Android SDK Tools Revision 24.0.0
     [checkenv] Installed at ...
    
    -setup:
         [echo] Project Name: BowlingPetsTest
    
    -release-obfuscation-check:
         [echo] proguard.config is ${proguard.config}
    
    -pre-build:
    
    -check-env:
     [checkenv] Android SDK Tools Revision 24.0.0
     [checkenv] Installed at ...
    
    -setup:
         [echo] Project Name: BowlingPetsTest
      [gettype] Project Type: Application
    
    -build-setup:
      [gettype] Project Type: Application
    
    -pre-clean:
    
    clean:
    [getbuildtools] Using latest Build Tools: 21.1.2
         [echo] Resolving Build Target for BowlingPetsTest...
    
    BUILD SUCCESSFUL
    Total time: 1 second
    [gettarget] Project Target:   Android 4.4.2
    [gettarget] API level:        19
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: .../BowlingPetsTest/bin
        [mkdir] Created dir: .../BowlingPetsTest/bin/res
        [mkdir] Created dir: .../BowlingPetsTest/bin/rsObj
        [mkdir] Created dir: .../BowlingPetsTest/bin/rsLibs
        [mkdir] Created dir: .../BowlingPetsTest/gen
        [mkdir] Created dir: .../BowlingPetsTest/bin/classes
        [mkdir] Created dir: .../BowlingPetsTest/bin/dexedLibs
         [echo] ----------
         [echo] Resolving Dependencies for BowlingPetsTest...
    [dependency] Library dependencies:
    [dependency] 
    [dependency] ------------------
    [dependency] Ordered libraries:
    [dependency] 
    [dependency] ------------------
    
    -code-gen:
    [mergemanifest] Merging AndroidManifest files into one.
    [mergemanifest] Manifest merger disabled. Using project manifest only.
         [echo] Handling aidl files...
         [aidl] No AIDL files to compile.
         [echo] ----------
         [echo] Handling RenderScript files...
         [echo] ----------
         [echo] Handling Resources...
         [aapt] Generating resource IDs...
         [aapt] nothing matches overlay file icon.png, for flavor 
         [aapt] nothing matches overlay file icon.png, for flavor xhdpi-v4
         [aapt] nothing matches overlay file splash.png, for flavor land-ldpi-v4
         [aapt] nothing matches overlay file splash.png, for flavor land-mdpi-v4
         [aapt] nothing matches overlay file splash.png, for flavor land-hdpi-v4
         [aapt] nothing matches overlay file splash.png, for flavor land-xhdpi-v4
         [echo] ----------
         [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.
    
    -pre-compile:
    
    -compile:
        [javac] Compiling 11 source files to .../BowlingPetsTest/bin/classes
        [javac] Note: Some input files use or override a deprecated API.
        [javac] Note: Recompile with -Xlint:deprecation for details.
    
    -post-compile:
    
    -obfuscate:
    
    -dex:
          [dex] input: .../BowlingPetsTest/bin/classes
          [dex] input: .../framework/bin/classes.jar
          [dex] input: .../framework/xwalk_core_library/bin/classes.jar
          [dex] input: .../framework/xwalk_core_library/libs/xwalk_core_library_java_app_part.jar
          [dex] input: .../framework/xwalk_core_library/libs/xwalk_core_library_java_library_part.jar
          [dex] Pre-Dexing .../framework/bin/classes.jar -> classes-f18c932846690b3757c20b54ace037fe.jar
          [dex] Pre-Dexing .../framework/xwalk_core_library/bin/classes.jar -> classes-c0ab19d49f8dc61342c4c02702b72e33.jar
          [dex] Pre-Dexing .../framework/xwalk_core_library/libs/xwalk_core_library_java_app_part.jar -> xwalk_core_library_java_app_part-5d30141e9a463b4c68732627d87ae0ad.jar
          [dex] Pre-Dexing .../framework/xwalk_core_library/libs/xwalk_core_library_java_library_part.jar -> xwalk_core_library_java_library_part-aa47c116fc9a4a502a5065d5cbe0c628.jar
          [dex] Converting compiled files and external libraries into .../BowlingPetsTest/bin/classes.dex...
           [dx] Merged dex A (58 defs/49.7KiB) with dex B (209 defs/314.7KiB). Result is 267 defs/441.7KiB. Took 0.3s
           [dx] Merged dex A (267 defs/441.7KiB) with dex B (21 defs/39.3KiB). Result is 288 defs/610.3KiB. Took 0.1s
           [dx] Merged dex A (288 defs/610.3KiB) with dex B (802 defs/924.3KiB). Result is 1090 defs/1941.7KiB. Took 0.3s
    
    -crunch:
       [crunch] Crunching PNG Files in source dir: .../BowlingPetsTest/res
       [crunch] To destination dir: .../BowlingPetsTest/bin/res
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-hdpi/ic_action_next_item.png => .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_next_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_next_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-hdpi/ic_action_previous_item.png => .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_previous_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_previous_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-hdpi/ic_action_remove.png => .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_remove.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-hdpi/ic_action_remove.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-hdpi/icon.png => .../BowlingPetsTest/bin/res/drawable-hdpi/icon.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-hdpi/icon.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-hdpi/screen.png => .../BowlingPetsTest/bin/res/drawable-land-hdpi/screen.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-hdpi/screen.png: 97% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-hdpi/splash.png => .../BowlingPetsTest/bin/res/drawable-land-hdpi/splash.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-hdpi/splash.png: 105% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-ldpi/screen.png => .../BowlingPetsTest/bin/res/drawable-land-ldpi/screen.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-ldpi/screen.png: 96% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-ldpi/splash.png => .../BowlingPetsTest/bin/res/drawable-land-ldpi/splash.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-ldpi/splash.png: 95% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-mdpi/screen.png => .../BowlingPetsTest/bin/res/drawable-land-mdpi/screen.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-mdpi/screen.png: 97% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-mdpi/splash.png => .../BowlingPetsTest/bin/res/drawable-land-mdpi/splash.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-mdpi/splash.png: 99% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-xhdpi/screen.png => .../BowlingPetsTest/bin/res/drawable-land-xhdpi/screen.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-xhdpi/screen.png: 99% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-land-xhdpi/splash.png => .../BowlingPetsTest/bin/res/drawable-land-xhdpi/splash.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-land-xhdpi/splash.png: 103% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-ldpi/icon.png => .../BowlingPetsTest/bin/res/drawable-ldpi/icon.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-ldpi/icon.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-mdpi/ic_action_next_item.png => .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_next_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_next_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-mdpi/ic_action_previous_item.png => .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_previous_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_previous_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-mdpi/ic_action_remove.png => .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_remove.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-mdpi/ic_action_remove.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-mdpi/icon.png => .../BowlingPetsTest/bin/res/drawable-mdpi/icon.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-mdpi/icon.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xhdpi/ic_action_next_item.png => .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_next_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_next_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xhdpi/ic_action_previous_item.png => .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_previous_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_previous_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xhdpi/ic_action_remove.png => .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_remove.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xhdpi/ic_action_remove.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xhdpi/icon.png => .../BowlingPetsTest/bin/res/drawable-xhdpi/icon.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xhdpi/icon.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xxhdpi/ic_action_next_item.png => .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_next_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_next_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xxhdpi/ic_action_previous_item.png => .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_previous_item.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_previous_item.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable-xxhdpi/ic_action_remove.png => .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_remove.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable-xxhdpi/ic_action_remove.png: 0% size of source)
       [crunch] Processing image to cache: .../BowlingPetsTest/res/drawable/icon.png => .../BowlingPetsTest/bin/res/drawable/icon.png
       [crunch]   (processed image to cache entry .../BowlingPetsTest/bin/res/drawable/icon.png: 0% size of source)
       [crunch] Crunched 25 PNG files to update cache
    
    -package-resources:
         [aapt] Creating full resource package...
         [aapt] .../BowlingPetsTest/assets/www/images/bot??oatirar-sheet0.png: error: Invalid filename.  Unable to add.
    
    BUILD FAILED
    .../tools/ant/build.xml:932: The following error occurred while executing this line:
    .../tools/ant/build.xml:950: null returned: 1
    
    Total time: 32 seconds
    
    .../BowlingPetsTest/cordova/node_modules/q/q.js:126
                        throw e;
                              ^
    Error code 1 for command: ant with args: release,-f,.../BowlingPetsTest/build.xml[/code:wh1oe12w]
  • Someone could help me? For the first time, I'm trying to build the project and actually install it on my friend's android and mine too just to test hwo the game runs. I followed Ashley's tutorial but 'im still having problems to build it.

    [attachment=0:3vvxg22v][/attachment:3vvxg22v]

  • I don't think you can. I had looked into this a little bit in the past for another project and couldn't find any way.

    Well, thank you :/

  • How do I change Sampling and Pixel Rounding properties using events?I'd wanted to allow the players to set these two options to yes or no, in case they are experiencing some lag.

    Thank you!

  • Someone?

  • volkiller730 This actually mess up everything to me and create some weird zoom focus.

  • When I zoom in, C2 always focus the closest border of the layout, and I'd like to focus to the center of the current view. This way I'd be zoming in where the view focus are at the moment. For an example, the player shouldn't be obligated to zoom in to the starting point (Layout's left border) if he's looking at the center of it.

    Here is an example of what I meant.

    [attachment=0:13cvgmd9][/attachment:13cvgmd9]

  • To do a infinite world you need to create a system that spawn objects on a certain place (or random place) and then destroy it when it's no longer visible again.

    https://www.scirra.com/tutorials/857/fl ... 10-minutes