nutmix's Forum Posts

  • I have been searching for some time for a nice way to swipe in layouts from the left and right.

    Here is a working single layout version which smothly scrolls between screens like on the ipad.

    https://www.dropbox.com/s/i0tnhmtb1nx3nlm/swipe_on_one_layout.capx

    If anyone has any suggestsions about performance, code style or better ways of doing it I would be happy for the feedback. E.g. is it better to put all those globals as instance vars on a dummy object?

    Its hard coded for a window of 480x800, but you get the idea.

  • Ok, dont get both events: if get touch start, dont get in touch, horay!

  • If you have two events:

    1) touch->on touch start

    2) touch->is in touch

    Im guessing that they will both fire on the first touch.

    I need to not fire the second, if the first fires.

    I tried experimenting with else, but I dont think that works with events (only conditions?)

    I thought about using a state variable in the on touch start, the question is, are events always processed in the same order, and from top to bottom, and in sequence (i.e. one at a time)?

  • If one upgrades, the recommended approach is to uninstinal then reinstall.

    Is there a way to do this without having to find and re-copy the plugins?

    E.g. can one set the plugin directory in a registry setting, then have the plugin dir in another location (not in program files)?

  • Kyatric - you must be sick of me by how - sorry!

    A wiki we could contribute to would be an interesting Idea, kind of like your FAQ list would point to how to articles, rather than discussions. This could be the missing user guide with examples counterpart to the manual which is the refrence part.

    Have you not been tempted to write a user guide for dummies like me and sell it for �40 a pop? There is an oreilly book for Impact titled "HTML5 game development" which is only 100 pages, but seems to sell well (I read it anyway).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, getting there slowly.

    1) create a layout 3x the width of the window.

    2) in "System->start of layout" do "System -> set scroll X to (half your layout width)

    3) on your event to scroll left/right, do: "System->Set scroll X to scrollx +/- 10

  • FYI, I tried doing:

    System set scroll X to scrollx -10

    and

    System set scroll X to scrollx +10

    based on input, but neither of these does anything (visible at least).

  • I feel very stupid asking this, as it seems so basic, but cant find it in the manual and doing a tutorial search for "scrolling" or "layer scrolling" doesnt turn up any relevant results.

    In the quest to simulate swiping left and right to bring in layouts from the left and right, I created 3 layouts, one for the game, and one left and one right. I could not find a way to scroll the layouts left and right (or even swap them).

    So now Ive created one large layout, plasted in a big bagroud image, and added some objects.

    There is no "player" or similar, its a puzzle game.

    1) The first problem is the window outline (in the editor) is always in top left corner of the layer outline. How do you move the window area to the center of the layer (which is larger than the window)?

    2) How could I scroll the layer ralative to the window based on user input? I can move an image on the layout by changing its X & Y, but then none of my objects move - only the image You cant select a layer as an object to increment or decrment its X. I saw a system->layers->set scale etc, but there is no set X.

    3) assuming there is an easy answer to 2) above, how do I stop it scrolling off into blank area? Do I have to keep a copy of the amount they have scrolled, and compare it to the width of my image on my layer etc.

    4) I went through the examples with came with the app, and I can see one called "platform 7(parallax). It manages to scroll the layer under the window, but there are no actions to do this, only actions to move a player which I dont have. Space Blaster also does it vertically, but cant see where - its magic!

    Does this mean I need to create an invisble player/spacechip to scroll the layer? If so how do I go about this?

    If someone writes a user guide for construct 2, I would buy it immediatly.

  • The tutorial scirra.com/tutorials/73/supporting-multiple-screen-sizes says that you can use a backgroud instead of the black bars, but I can't find a way to do this.   Doesnt matter where or how big my backgroud is, it still puts black bars in.

    Even if I could change the black bars to a different colour it would help. This is a showstopper, as the customer doesnt want black bars, but needs aspect ratio preserving scaling.

    I could only fine one post related to this with a partial solution with a project called SKELETON, but cant find the post again. Its close, but im not sure if its the right approach to take, or if it will work well with scaling and windows which are exactly the target size.

    Embarrassingly, I dont undestand the difference between layout size, window size and viewport. Is there a tutorial on this does anyone know?

    Has anyone writen a "letterbox-scale with custom background" plugin - I would only ever use this, it would save weeks of trial and error.

  • I added audio to a game - if you hit a button it plays a sound.

    It works find in FF, but doent do anything on Android 2.2 browser.

    Is android supported for sound does anyone know?

    Thanks!

  • E.g.

    variable X = 9

    OR

    (button touched

    AND variable Y = 0) -> do a long list of actions.

    then have one list of actions.

    However, If I do the what appears to be right, then I have to duplicate the actions in both blocks (which is horrible).

    I havent worked out how to share a capx yet. I have dropbox, but the only option to share a folder it gives is to share with a specific person, not everyone. Below is a link to the file, but I really hope noone can download it otherwise everyone can see everything!

    dropbox.com/s/o89d19qbbjzyphp/and_or.capx

  • I've never been able to get any of those 'hide address bar' snippets working with C2's engine, can you link me to one that you know works?

    Ok, I'll try some out and let you know what I find.

    I saw that google.co.uk and will-hill.mobi managed to do it. I was thinking of using charles proxy to peek at their code.

  • Tried them all, and "on touched Object" coupled with "Use mouse input" property = yes seems to work.   The manual page descriptions of these events didnt mean anything to me, so could not go by that.

  • Brilliant, thanks. Got the Ajax working a treat too.

  • Wow, nice tutorial, thanks!

    With luck, the next version of C2 will have full screen suport on Android without adress bar ;) There is lots of js floating about to achieve this.

    I will look into the cocoon.js exporter.

    I just found the tutorial search page, this will save me a lot of posts!

    There is no tutorial yet for how to write apps for android (only ios) :(