dmakinde's Forum Posts

  • I attempted this and it still didn't work when you say dt expressions does that also include every tick and every x seconds events?

  • Sorry to bump this, but I may have found some more information on why the layout won't switch on cocoonjs. made a simple two layout project with a button to tap that switches between layout and that worked just fine. Could my game's inability to switch layout have to do with too many files being loaded at once or something like that?

  • Did you ever find the solution to this issue? I'm having a similar problem on my game

  • Problem Description

    I'm not sure if this is a genuine bug or a result of something I've scripted wrong, feel free to delete this post if it turns out to be the latter. As it stands, when exporting my Capx to cocoonjs and compiling, the game launches, but when I tap the start game button, the game is meant to load the next layout, but instead, nothing happens. To further diagnose the issue I changed the default layout from the main menu to the game itself and re-exported; the game played fine but when I attempted to return to the main menu or restart the game, nothing happened. Interestingly enough, this problem does not appear to manifest when launching the game from a zip using the cocoonjs launcher.

    Attach a Capx

    https://drive.google.com/folderview?id= ... sp=sharing

    The above folder contains a link to the Capx as well as the signed APK and zipped CocoonJS export

    Steps to Reproduce Bug

    • Launch zip file with CocoonJS Launcher
    • (after the countdown has finished) Press the pause button
    • Attempt to restart the game or switch menus, observe that the game allows you to do so.
    • Install the signed APK and attempt to carry out the above instructions

    Observed Result

    The game does not respond to the restart and quit button, but still allows you to unpause

    Expected Result

    If the restart button was pressed, the game should have restarted

    Affected Browsers

    • None. This problem only happens on device

    Operating System and Service Pack

    Windows 7 64 bit

    Construct 2 Version ID

    173

  • Is that the only way to get it working? Crosswalk's performance seems to be quite laggy compared to cocoonjs

  • Hi Guys, I have a strange problem with my game so far. For some reason while the game performs perfectly on my PC, when I compile the project and create a signed APK to test on my android device, I can't get past the menu screen.

    To further diagnose the problem I changed the first layout option on the project properties from the main menu to the game proper and after compiling that, I was able to play the game just fine but was unable to restart the game (which was a restart layout function) or go back to the main menu (Switch layout function). The strange thing is this problem only seems to occur when the project has been compiled into an APK. Testing the zip using the CocoonJS launcher yields no problems at all :S

    Can anyone help?

    Thanks

  • Thank you! I haven't gotten round to implementing the tutorial check yet, but with the webstorage object I managed to create a way to store your high score locally. I can't imagine the methodology to implement a tutorial would be too different, so I'm going to go ahead and mark this as answered. Thanks again

  • (ANSWERED)

    Hi all,

    I'm trying to create a tutorial level for my game, and I would like the game to prompt the user to try it if they have not done it before. I can think of a pretty simple trick to detect that using a boolean variable that toggles once the user has played the tutorial level, but the challenge for me is that I want this game to work on a mobile device, and as such I would like the detection to persist even through the game closing. Would achieving something like this involve storing data on the device itself or something like that? I have no idea where to start with that really, but any assistance would be appreciated.

    Thanks

  • Thank you

  • Try Construct 3

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

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

    I want to start working on a iOS android game with Construct 2 with cocoonJS. The only thing is while I'm quite familiar with the engine now, I haven't really attempted working on a game specifically for mobiles before... so I'm not quite sure where to start with the screen layout. What is the recommended layout/window size for a mobile project?

    Thanks guys

  • Hi all,

    First off I just want to say I have been working with Construct 2 as a prototype/level builder for a few months now and ever since you guys helped me with an export problem it has made my life so much easier, so thanks for that!

    Currently I'm curious about ways to make my level exporter more efficient. In my current project I have made a level creator that represents the level as an array which is then downloaded as a JSON file.

    Before the engine the programmer is using can read in the data from the JSON file I have to run it through a macro I made on Notepad++ using regex to clear away some of the unnecessary factors (such as {"c2array":true,"size":[25,40,1],"data":, quotation marks, square brackets and commas) , then sort the data into rows as C2 just prints the whole thing on one continuous line. Is there any way this can be done within Construct 2?

    Any assistance would be appreciated.

    Thanks all!

  • Well you pretty much answered your own question there ^^; During the loop check if an object is at the position of the current x,y of the array and write some data to it. (If you're using a grid, then cur.x*tilesize, etc.)

    Personally I'd just use a dictionary and "for each" on all the objects I want to save.

    Thanks for the affirmation :) While I get the logic, I can't quite understand the syntax. Are there any examples of this system you can provide? I've tried looking around myself but haven't been able to find anything

    Here is my attempt, is anyone able to offer some assistance?

  • I've made some progress but I would still appreciate some help. I've created a 2d array that has the size set to the width and height of the level. I've also created a function called save level that has a for loop that goes through the y axis, and within that loop there is another one that goes through the x axis. What I would like this to do is go through each row and search for a particular item. If it find the item on that coordinate then it will assign a value into the array. Once the loop is complete I would like it to some how save that information. Is that at all possible?

  • Hi Guys,

    I have a bit of an odd request. I have a level prototyped on C2 that I would like exported into a text representation. I was wondering if there was some sort of custom script or local save file I could write that could take the position of certain items in my level (such as metal blocks, wooden blocks etc) and create a sort text document grid with those elements represented as letters?

    Thanks guys

    --EDIT--

    Ok guys, I figured it out. If anyone wants an example of how I did it, click here to download my working sample. As I said, my needs were quite specific but I'm sure there's probably someone out there with a similar problem to me. Instead of using an array I decided to go with dictionary as the resulting json file from the download is much easier to process and read as a human being, thanks for all the tips guys :)