Rable's Recent Forum Activity

  • Hi,

    I just finished reading the 59 pages of this thread to be able to resolve my problems. The first one seems to be a known XDK bug, but I will still explain it here.

    My bug seems to be similar to this one : https_://crosswalk-project.org/jira/browse/XWALK-2655 (delete "_" as I'm not able to post links)

    My game runs perfectly while previewing over wifi on Chrome for Android, on my two devices : Samsung Galaxy Young GT-S6310N and Samsung Galaxy Tab3.

    In the emulator of XDK, it works fine.

    When exporting with Crosswalk for Android, then playing the APK on the devices :

    1) On the tablet, I can see the title screen, then it crashes most of the time. I'm back on the menu screen of the tablet, then if I check the running apps, I can still see my app running there. When I click on it, I'm back to the C2's loading screen, which sometimes freezes, or it either crashes the game again, or succeed to launch the game.

    2) On the mobile phone it's the same, except that I'm not sure the game started even once. It crashes nearly always.

    I tried XDK beta and stable, it behave the same way.

    I send the exact same build to a friend which tried it on a Samsung Galaxy S3 mini, and up to now, he has no problem playing the game. Everything runs perfectly.

    The project is quite big (around 9000 event for now)

    I read some people saying that they have problems with the sounds. I didn't test to delete the sounds yet, but I have a music (placed in the "sound" folder, not "music", because I want it to preload) during the title screen, and the sound plays on both devices, so it's probably not related to sounds.

    I also read that there was problems with the blacklist of webGL on some devices, including some devices from Samsung. I did the following test : created a new project that just displays the name of the renderer, and it returns "webgl". Don't know if it helps.

    I'm also facing another bug, which seem to be related to webStorage : When I activate the loading of webStorage (loading of about 60 number global variables on my title screen) and runs the game on my tablet, it's behaving correctly on preview over wifi running in Chrome for Android (IIRC, need to retest, but at least in Construct preview it works fine), but here, even in Intel XDK's emulator, I'm experiencing another problem. The title screen works ok, but when the game launches, some object simply doesn't appear. On one level I had all my characters diappearing, on another I had the background disappearing. When I turned off all loading of webstorage, this bug was resolved... But I will need webstorage to publish my game...

    One last note : I'm not a programmer at all, and I don't know how to display the error message in XDK, or when trying on the device. Could someone explain, so I can eventually give additional informations?

    Thanks !

  • Hi everyone,

    I'm having troubles with the "export for Crosswalk" option. First of all, I read in the manual "how to export to android with crosswalk" page that there are really minimal difference between this export and the preview over wifi played on chrome (on an android device).

    However, the preview over wifi works perfectly, but when I'm doing an export with crosswalk that I export via Intel XDK, all my characters simply don't appear on the first level... That's on the tablet, on the smartphone, the app simply shuts down as soon as the first level start. To be perfectly clear all of this also works perfectly when exporting over wifi.

    I really need help with this, everything worked perfectly up to now, I really don't understand what's going on.

    Maybe is my project just too big? There are 8500 events now, is there any limit?

    I also use a loading layout, but even this layout takes a LOT of time to appear (sometimes more than 30 seconds), even though I just have a single sprite and the loading bar on it (I read that we should keep it as small as possible).

    FYI the tablet on which I play the app is a Samsung Galaxy Tab 3. Any idea of what's going on?

    Thanks !

  • Try Construct 3

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

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

    Thanks for your replies. I'll definitely keep the whole game in only one layout.

    To answer your question I started the game about 2 month ago, and it's not an MMO or anything like that. I suppose an experienced construct 2 user would do the same game with much less events. Still, I have many characters/enemies and most of them need a good bunch of events to describe their behavior.

  • Hi everyone,

    I'm currently working on a project that uses only one layout (except for loading and title screen). I was just wondering if this was possible or if I need to make transitions via another layout with maps or such things, to keep everything running smoothly.

    To give you an idea the project is around 6000 events and will have about 100 levels, so it's not a small game. There are sort of world maps (not animated) between each level that I create on a foreground layer, then delete them when going back to the game (which is still running in the background).

    My question is to know whether or not this has technical downside. Will the game start to slow down after a while because I use always the same layout?

    Thanks !

  • Thanks, I'll try that !

  • Hi Everyone,

    I've run into a new problem that I didn't manage to resolve by myself. Here is the simplified code :

    When spriteButton is touched (trigger once), set Object.instanceVariable to true (can only be triggered once by half second, with a cooldown mechanism)

    "Object" spawn object "icon"

    wait 4 seconds

    "icon" start flashing for 1 second

    wait 1 second

    delete icon

    set object.instancevariable to false

    This works perfectly as long as I never repress the button while the script is running, but I would like the player to play the script multiple times during the initial 5 seconds.

    As it is, when I re-run the script while it is still active, a second icon will be created and the instancevariable will be set to false 5 seconds after the first launch, because the first script is still running and will set the variable to false

    So my question resumes to : How can I cancel a wait time (or a whole event) in order to start a new one with the wait time back to 0?

    I tried putting the wait part inside a group and deactivationg the group then reactivating it, but it doesn't seems to work.

    Thanks for your help !

  • Thanks a lot for your time, inquiesco. Indeed your solution works fine, but sadly it is not usable in my complete code. The reason is that I simplified the code to have only one instance of the enemy object, while in the complete code I need 2, or 3 instances.

    So, starting from your version, I duplicated the actions in order to create 2 instances in the same "every thick" event, like you suggested. It works just fine. The problem is that when I need to put the life bar's width to be the same as the health, if I put the actions in the same "every thick" event, it applies logically only to the last instance, not all. So I need to create another "every thick" event at the root, and when I do that, it doesn't work at all... :-/

    Here is the capx demonstrating the problem :

    dropbox.com/s/6s9xegcic5nyl1u/project88_debug2.capx?dl=0

    Any further idea of how I could make it work?

    I also tried to put the "set width" action in a "pick all" event at different places in the hierarchy (root level), none of it works...

    ----

    EDIT :

    Ok my problem is solved. I moved the "every thick" (or pick all, it's the same) event, containing the set width actions, at the same root level of the "level=25" event. This implies that I can't change it based on the level, but I don't need to do that. So It's solved ! Thanks a lot inquiesco for your precious help.

    Still, some things are behaving weirdly and I'll be happy if someone can tell me how I could have done that if I needed to apply this effect on only some given levels, not all...

  • Here is the link to the simplified capx :(seems like the forum removed the link... Maybe you can help based on the description below?)

    ok, workaround : to download the capx, just enter

    dropbox.com/s/4ibtr46yhpy8avd/project88_debug.capx?dl=0

    with something at the beginning of the adress

    Curiously, the symptoms are different now, but there is still a bug with the "set width to enemy.health" action. The health bar just keep its default size and isn't resized.

    I found out another cusious thing : I defined a global variable named "level", and added an event :

    if "level" = 25 (default value) play the events.

    If I remove this condition of "if level=25", everything works fine ! The problem is that I need it, as I would like to create different enemies in regards to the level...

    ---

    Edit :

    As it seems like I can't post links, here is the detailed events and actions

    enemy has instance variable Health put to 100

    lifebar has width of 50

    global variable "level" = 25

    Event sheet 1 :

    start of layout :

    delete enemy

    delete lifebar

    include eventsheet2

    ---

    eventsheet 2 :

    if level=25 :

    create enemy

    create lifebar

    put lifebar width to enemy.health

    ---

    the result :

    it creates enemy, it creates the lifebar, but lifebar's width is still 50, not 100.

    If I remove the condition "if level = 25", everything is fine and lifebar's width becomes 100...

    (removing the "destroy" actions at the start doesn't help)

  • Can't do it right now, but I will do this ASAP.

    Thanks !

  • The health variable is an instance variable so its base value is not defined in the code but on the object. The variable call by the healthBar object is done after destroying the enemy, as the destruction occurs at the start of layout.

    The include sheet is in an "every tick" + "trigger once while true" event that is placed just after the "at the start of layout" event, in order to create the objects I need immediately after destroying all the objects that I don't need.

    Thanks !

  • Hi everyone,

    I have a strange bug occuring in one of my project. I simplify everything but it stands like this :

    ---

    object type Enemy has Health instance variable defined to 100 (default value of the object type)

    start of layout:

    • destroy Enemy

    (inside an included event sheet)

    create Enemy

    create healthBar

    set healthBar width to enemy.health

    ---

    At that moment the Enemy health value is 0 (checked in debug mode)... Which shouldn't be the case, as I never told the code to put it to 0.

    I created a new project, entered the simplified code, and it works fine ! Enemy.health is 100, and it sets healthBar width to 100. Just in my bigger project, it doesn't work, and I can't understand what's happening.

    I found two workarounds :

    disabling the event "destroy Enemy" at the start of layout makes the health be 100 at the moment the healthBar needs to read its value.

    adding "set enemy health to 100" before setting the healthbar width also works.

    I already looked a couple hour for the solution, but I can't find any spot in my code where I ask to put the enemy's health to 0. Moreover, by not destroying the object at the start it works just fine.

    Any idea of what's happening?

    Thanks !

  • This is great news ! Thanks a lot !

Rable's avatar

Rable

Member since 6 Aug, 2014

None one is following Rable yet!

Connect with Rable

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies