silkc2's Recent Forum Activity

  • There are tidy ups to be done any time a web is destroyed, regardless of whether there are now 0 webs left.

    1, If no webs are left, just destroy ALL joints

    2, If a web was destroyed, look for and destroy "Orphan" joints i.e. those which were attached to the web that is now destroyed.

    In order for either to work I need c2 to recognize that the web in question no longer exists, which it wasn't doing coded as per original screenshot.

    If there's a way to "fix" my code so it works like this without needing a flag to force it to execute on the next tick, I am all ears. I do not want to make any checks every tick that don't need to be every tick, as that goes directly against c2 coding principles (only use every tick if you HAVE to) - and in this case destroying a web is a fairly infrequent thing.

  • Hiya

    I can't see anything anywhere which specifies what the value ranges are on Touch.Gamma

    I know > 0 is tilt right and < 0 is left, but can I use the Touch.Gamma values to control how far my character moves?

    Like does it go up to 300 or so (guess!) for a bigger tilt right than say 30?

  • Yeah I can get around the "crop browser" issue by something like that.

    I think my main mistake is I was designing to a 4:3 ratio, have changed that to now work towards a widescreen ratio (16:9).

    The issue though is that it isn't centralizing the image on mobile when according to my settings it should be. And it works ok in browser.

  • Ahh makes sense.. mine is a single screen game. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm confused over how you can run a smaller window size than your layout, if I do that then preview, it scales the "window size" to fit the browser window so anything on the bigger layout isn't shown.

  • Hiya

    Has anyone experimented with the c2 "fullscreen" settings along with the cocoon project settings? There are so many combinations and not sure which are best.

    Put simply: I want to scale as much as possible but keep aspect ratio and support portrait/landscape.

    In c2 I've picked "letterbox scale".

    In Cocoon I've picked "portrait", "landscape left", "landscape right", and also "Scale to fit".

    This works fine in browser, but on phone it's showing the image snapped to the left and a big border to the right. I'd expect the image to be centered and two black lines down either side.

    I'd like to try "Scale" in c2 but in the browser this seems to show sprites that would otherwise be hidden off the right side, don't want that to happen.

    Has anyone found the sweet spot with these settings and if so can you share? :)

    Thanks.

  • You need to drop the function object in before you can use functions in your event sheet. Same as you would with mouse, keyboard etc.

  • mike can you create containers at runtime?

    theubie - In the end I had to set a flag to indicate when a "tidy up" is to be done, and do it at the start of the sheet. It works, that's the main thing. :)

    I did try having them as separate events but the whole function was only being fired one per sec, which meant I had a second event for "once per second" and having two "once per second" events didn't work as I expected. I think it did one, waited a sec, then did the other, but not sure.

  • I have experimented with setting positions at startup, but unless I am missing something this just breaks if you resize the window e.g. in a browser.

    I don't really want to have to code two versions of the same game for mobile and PC.

    C2 has so much potential I am surprised by the holes in layout options. There should be support for multiple layouts (mobile port, land), and support for "window resize" event.

  • I'm having real headaches figuring out how to make a "single code base" for PC and mobile games. If you move stuff about on startup (to fit a mobile screen) then you are screwed the second anyone resizes a browser window running it on PC.

  • Hiya

    I can't get something simple to work.

    I want to destroy an instance, then immediately check and do other tidy-ups if there are none of the objects left now.

    After destroying the object, the rest of my function seems to act like I have not actually destroyed the object.

    <img src="http://i.imgur.com/O3BBZHB.png" border="0" />

    It's causing me so many headaches. It's looking like I'd have to write a new function to "tidy up" on next tick which is horrible and dirty.

    Why does it work like this, surely I should be able to , in one function, add/destroy objects and do things as a result of that action.

  • I'm also looking for this, it seems pointless to have the other anchor options without the ability to set my main game window to the middle (I don't want it to change size, would affect gameplacy).

silkc2's avatar

silkc2

Member since 28 Jan, 2013

None one is following silkc2 yet!

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies