dmakinde's Recent Forum Activity

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 :)

dmakinde's avatar

dmakinde

Member since 5 Feb, 2013

None one is following dmakinde yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies