part12studios's Forum Posts

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

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

  • pringrod Hey so I'm really liking Clay.IO more and more from my experience so far, but i'm a bit behind you on some of this.. I will be wanting to do the same thing you are, but i'm working through another question that maybe you can help me with

    I'm trying to understand how to handle when popups (specific case, the X button in the share fb post). It seems fine if the player clicks "share". that's no problem. but what happens when someone clicks the X on a popup? It seems to go away and I don't see how you can capture that event.

    The sooner I can wrap my head around the Clay.IO basics the sooner I'll be in your boat publishing to windows 8..

  • i would look at the platformer template as a starting place.. your ball would be the character.. the real challenge (and its not too bad with a little effort) would be to have the platforms spawn randomly at the bottom and all have a behavior to move upward (because you're ball is going down).

    Also look at the infinite jumper template which is kind of the opposite of your game, but the mechanics are very similar. that should help you understand how to move your pieces vertically.

    If you can analyze those two template games i would imagine you could pieces together a game close to what you showed.

    good luck!

  • I can't imagine how that would be possible. when you add a new image to C2, that's it.. C2 auto collision detects and you have to edit from there. Perhaps you could look into looking at the images perhaps and see if there is anything you can do to them to make the images more defined?

    I don't know what the images look like that you're using and I know that C2 can definitely mangle images sometimes, sometimes ones that even seem pretty clearly defined.

    Sorry I don't have a solution for you that would help your situation. Someone else might know something I don't (not unlikely) but my gut tells me the answer is no.

  • Hi there,

    I'm exploring Clay.IO which seems very powerful and full featured.. I'm new to it and know very little about it. I've got a game uploaded pending publishing but it's not using any Clay features just yet.. that's next.

    I was able to get a share popup to occur which is cool, it works and that's always exciting to see. However what I'm noticing is that I don't see any way to capture an action if the player clicks the X button to make the popup go away.

    If I click the X... it just goes away and i'm stuck in the "post" layout view i created (just easier than doing a bunch of UI disabling).. The popup is not dynamic so the idea of hiding some kind of invisible clickthough button behind the X to do a "go to layout" command would not work.

    I'm just not sure where I would "listen" for the X being clicked so I could take the appropriate next action.

    Thanks!

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i think you need to have windows 8.1 to use 2013.. you might want to consider upgrading as well.. there is little reason (that I know of) to stay on windows 8. It's a free upgrade.

    Also you might want to back up and just publish as is before making any changes just to see if you do in fact get a the build file and that would help isolate where the problem is.

  • gonzdevour I'm not using CocoonJS, I have been using Ejecta as my wrapper of choice. it works very well (other than this plugin) overall.

    I was using the courier new font. I believe I tested another font and it didn't matter. Just seems like this plugin gets ignored by the Ejecta wrapper.

  • you might want to explore a instance variable.. imagine "Is_Solid" and you put in the conditions that require an object to have that be 1 not 0.. or if you want to use a bool.. though i've found just using numbers works fine.

    there is an "initial state" which seem like a good thing that you might be able to toggle.. or maybe you could have a duplicate object one that has solid and one that doesn't.. and when you switch, you destroy one and spawn the other..

    That's what comes to mind for me. There are other ways probably that I don't know about. I'm not an expert C2 user.

  • do all of these devices have different resolutions or aspect ratios? you might want to look at your project properties.

    the default is "letterbox scale" which is usually good, but when dealing with different resolutions it can create some black spaces appear.

    what you're showing makes me think its not set to letterbox.. maybe something else. I like (for landscape) scale inner.. although this does cause some information on the left and right to get cut off, it always fills the vertical space so you have no black space. just takes your game to be a centered design that accounts for missing space.

    This is a bit extreme and shows a lot of different aspect ratios, but it does demonstrate how the black boxes can appear when you use different screen sizes and different aspect ratios http://www.rtings.com/images/black-bars ... mawide.png

  • basically what would be easiest would be to set a series of single frame animations.. each named a particular color.. "red" "blue" "green" for example and then when you click your store color options.. it would tell the particular player shirt color or whatever to reflect the choice they made. This would instantly cause the shirt to change from whatever color it is.

    There probably is a way (i just haven't bothered to look deeper) to set specific colors.. starting with white objects, then allowing C2 to dynamically change the color. This would be be a little more efficient, but I haven't done it before so I can't tell you how this is done or even if it's actually possible with C2..

    The how to make a shop question is too vague.. and could be very simple or complex.. are you implying that you want this stuff to be saved and recalled later? You probably should start with doing the webstorage tutorial https://www.scirra.com/tutorials/266/we ... nformation

    If you can understand the color system I explained above and understand how to do webstorage, you should be able to connect the dots to build the store how you want it.