part12studios's Recent Forum Activity

  • sweet thank you so much for this sample! I'll be tackling this head on tomorrow (monday) and report back how it turns out!

    Sincerely,

    Caleb

  • I will definitely look into this and let you know if I get hung up! Thanks for the added explanation! you've been a great help!

    Sincerely,

    Caleb

  • ok so i have the cvs plugin and i see i can load a "cvs string". I have a test.cvs file I exported from Excel.

    I'm just not clear how i "read" the data in a given text file from json. Where would the file reside so that when the app launches it grabs the data? would it go in the generic "file" folder?

    for example.. i found this cool site thanks to a coder buddy of mine.. http://www.convertcsv.com/csv-to-json.htm

    and it gives me this json data:

    [ { "Joke 1":"Joke 2", "Punchline 1":"Punchline 2" }, { "Joke 1":"Joke 3", "Punchline 1":"Punchline 3" } ]

    but then it's like.. where do i stick THIS? and how would I access it still.

    I didn't see any tutorials that talk about "import data ajax"

    Maybe XML would be possible? the code above reminds me of it a little.

    you mentioned "I found putting data in json and loading it into dictionary worked well." how do you actually do that?

    Thanks!

    Caleb

  • yea that sounds good. and i think if you look at the play options there is something in there that lets you know the sound is done playing..

    yea if you go and add an event you'll see audio has an "On Ended" which could allow you to string sounds together based on sample length rather than time.. just an option to check into

  • my first thought on this would be to associate each sound to be played with a series of numbers.. and making a variable for that.. so imagine

    PlayNote = 0 (this is your global variable)

    every 1.0 seconds

    set value - Play note - Random (1,12)

    then you'd have

    system - Play Note = 1 Play Note 1 sound

    once while true

    system - Play Note = 2 Play Note 2 sound

    once while true

    etc..

    This would of course just create a bunch of random sounds.. but you may get the idea.. you could manually set the order of what notes you want..

    On start of layout

    Play note 1 sound

    Wait 1.0 second

    Play note 5 sound

    Wait 0.5 second

    Play note 3 sound..

    etc..

    Also you might want to check out the midi plugin someone made (you'll find it under tutorials, just look up "midi"), but bear in mind its only known to work on web. I was unsuccessful getting it to work on iOS, but i'm not too savvy with it and didn't write the plugin.

  • you might be able to achieve that with webstorage? you might not need something that fancy to achieve that specific goal.

    I'm looking to better understand how to store data in the app like extensive text and such without using webstorage.

    Also I know that in some past testing with my coworker, we were able to get C2 to talk to the Google App Engine to pass text data using the AJAX object.. so that might be what you would use to pass json data back and forth.

  • Bump, has anyone used Clay.IO to any extent? There are many popups that can be accessed it seems. When an X is clicked.. how do you capture that action in order to take another step?

    it's not just facebook share.. look at the login screen.. there is an X in the upper right corner.. if you click that x the window goes away and it also doesn't stop click through from happening (stuff behind it on the C2 canvas respond to the click as well.

    it seems like there must be some way to indicate that a Clay.IO popup has been canceled rather than one of the popup options clicked.

  • Hi there,

    I'm working on an app that has Jokes. I've been looking at C2's data and storage options and I'm just not sure which would be the right way to handle it. I'm trying to keep it as simple as possible. I don't want to access an online database. what i would love is just to import a spreadsheet or text file. I just want the data baked into the C2 app.

    doing something like. random(1,100) = 54.. go grab line 54 and display the Joke(54a) and punchline(54b) in Joke Text Object and Punchline Text Object.. next joke.. random(1,100) = 63.. etc.. etc..

    I see array's and dictionary, but looking at the actions they have, I didn't get a clear sense of how i'd get the data into C2.

    What would be the most straight forward approach to this? In the past I did a project that had numerous text bodies, but made them actual text objects with unique text in each and copied that data over to the display text. this was "ok" but it was really unruly and while i got through the project, it was a pain and that was dealing with a lot less bodies of text.

    Any advise or tips would be much appreciated

    Thanks!

    Caleb

  • yea that article is great.. and yes 1920x1080 and all graphics that go with it are all going to be too massive for mobile via C2 (because of the lack of memory management)

    yes read the article.. but in short the way memory is used with graphics is that memory is allocated in chunks of data scaled by powers of 2.. so imagine.. 32x32 pixels takes up so much memory.. or 64x64.. or 62x32.. all powers of 2.. 512x128.. etc etc.c

    now if you have a graphic that's say.. 34x34.. this graphic jumps up to the next power of two which means now that you're using 64x64 memory (which is 4 times as much).. now let's look at your 1920x1080 background.. that alone jumps up to a whopping 2048x2048 of memory! because all of your graphics are probably just sized to whatever works for 1920x1080 many of them are probably occupying a LOT of unused space which still takes up memory and therefor crashes..

  • from my experience, XDK has worked well. I only say this to confirm that it can work well. how big is the project? Sometimes some apps can use up too much memory and crash.. often Retina quality apps can be problematic for android devices.

    in my experience any time android or iOS apps crash is because of memory management issues. Unfortunately with wrappers no matter what kind you use, memory management is pretty much non existant.. so what works on a browser may not work on mobile.

    Is all of your art optimized for mobile? (using powers of 2 for all graphics)

    do you have many graphics that are excessive in size (over 512x512 pixels.

    I had a project that would crash using various different wrappers and they would all crap out while it would run fine on a browser on a pc.. what i had to do was reduce all of the art by about 47% (the game was running at 1920x1080) and doing this fixed the problem.

    If you're game is say.. 1mb or something.. then none if this would likely apply

    Also consider making a simple game as well.. something very "hello world" and run it through XDK and see if it also crashes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow I'm not experienced in how plugins work exactly, but I wonder if you could look into the latest Ejecta wrapper. I'ts a really really nice iOS wrapper, however rex_tagtext seems to simply not work. I believe Ejecta is going to gain more popularity as CocoonJS seems to not updat

    When I tested it, using a typewriter effect, I noticed that it did work in terms of masking the <class> type stuff as the type writer effect typed out in real time (i had to increase the type text speed to mask the brief time you could actually see the <class> stuff appear, but when the <end> part appears the other side the <stuff> would vanish but the text in between would still not appear bold and/or italics.

    This same plugin ran through a browser shows the text fine. So it just seems like for whatever reason, using Ejecta ignores the bold / italics request

    Thanks!

    Caleb

  • I'm not a seasoned coder, but it would see to be possible. if you can get the code into the c2runtime.js file and not break the existing logic.

    i think squeezing something like an api call in would be doable... what i think would get hairy is trying to manipulate game logic and actions with code.

    Also keep in mind that you might also want to look into making a plugin. plugins are basically just snippets of javascript. plug in your custom code and access it from C2.

part12studios's avatar

part12studios

Early Adopter

Member since 24 Dec, 2012

Twitter
part12studios has 1 followers

Connect with part12studios

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

19/44
How to earn trophies