John Cutter's Forum Posts

  • Thank you, thank you, thank you! My sprite is a simple rectangle so I assumed the collision polygon would automatically match the shape. Nope, my poly looked like a Picasso painting. Appreciate the help, guys!

  • I am making a web app and I have several rectangular sprites that I use as buttons. ALL of my buttons work great... except one. At first it seemed to fire off randomly when I tapped it, but there are certain places -- near the middle of the button -- that will never register a tap or click. But there are other spots on the sprite that will register a Touch event every single time. The buttons are all the same so I can't figure out why one of them only works part of the time...

    I'm sure this is an issue with my code but I don't know even know where to begin to start looking. Any suggestions? I have some invisible text objects in the same area, but they are all on the same layer so clicks should pass through, right? I made my button opaque in case it was a transparency problem, but that didn't help either...

  • It's my understanding that, in order to host an HTML5 game on Dropbox, you need access to Public Folders. As of 2012 this feature is no longer available unless you pay for a Dropbox account. (I think anyone who started using Dropbox before 2012 will still have access.)

    Just FYI.

  • Good to know, Ashley! It's possible that I was looking at a subforum when I saw that there were only about 30 people online. Sorry about that. (I don't want people to see my thread title and get the wrong idea, so feel free to delete this thread!)

  • UPDATE (and a few final questions): I finally tracked down my array/dictionary issue above. Due to an export error from Excel there was a leading space in front of all my IDs. SUE (stupid user error).

    Okay, a few more questions: For my Flashcard app to be truly useful to the other people in my French class *THEY* need to be able to enter their own words and phrases. Sounds like that might be pretty tricky, since I'm already using Local Storage to track "scores". I'm also concerned about someone losing all their entries if they ever have to clear their web cache. (That would happen, right?)

    Is there any [easy] way for me to do this? There are only a few people in the class so I'd be willing to upload their vocabulary .json files to my server. In my flashcard program is there a way for me to bring up a directory of filenames? (Then they could simply choose their own vocabulary word and use that.)

    Special thanks to blackhornet for his help, so far. It's much appreciated!

  • Strange, I just tried to post in this thread but my message didn't appear. Apologies if I accidentally double post.

    Ignaci, I noticed that your example file is using the older version of Construct 2. (I can't even open it.) You may want to update your link. Or I can post an example file if that would be easier. Let me know!

  • Thanks to blackhornet's help I have dramatically simplifed my app (and it's much faster now, too)! But I've got one more bug to fix and I'm completely stumped.

    I'm trying to update my dictionary using a value in my array and it's just not working.

    Here's my code. (I've verified that location 0,3 = "0"):

    Dictionary: Set key Array.at(0,3) to 300[/code:4k9r7w3i] 
    [i]NOTE: I've tried using: str(Array.At(0,3)) but that doesn't help.  [/i]
    
    And yet THIS works:
    [code:4k9r7w3i]Dictionary: Set key str(0) to 300[/code:4k9r7w3i]
    What am I doing wrong?
  • Wow, thank you blackhornet! I really appreciate your help!

    I haven't had a chance to look at your updates, but your response made me remember why I was prompted to write my post.

    It was my assumption that the Sort and Reverse commands for arrays would finish execution before falling through to the next line of my program. But I was running into problems when I Reversed the Y axis, and then immediately Sorted by X. My theory was that the Reverse hadn't finished before I started the Sort. When I put the delays in between (Wait didn't work), everything seemed okay.

    I think I read that some Events need a "tick" to complete. Is that the case here? Would "Wait 0" work?

  • Not sure if I'm doing this right, but here's a link to my .capx file:

    http://jmcdesign.orgfree.com/Flashcards.capx

    This is my *first* Construct 2 program... so go easy on me.

  • I thought a Flashcard app would be a fairly simple way to learn Construct 2, but I'm sort of struggling at the moment. I spend about half my time "coding" and the other half reading forum posts and looking at tutorials, but despite my research some things are just not clicking yet...

    1. If I create a function to manipulate an array, what is the execution flow? For example, let's say I have a 10 line program. Line 5 is a function call. The function is manipulating an array using "for each". Does the "for each" loop finish WITHIN the function before returning to the main program? Or does it process the loop once, increment the LoopIndex, return to the main program until it hits the Function again, at which point it process the loop, increments the LoopIndex again, etc.

    2. I try to put all my code in Groups. When one Group is finished I deactivate it and activate the next group. But what happens when I sort an array? Can I perform the sort and then immediately de-activate the group? How do I know when an array has finished sorting? Are these events asynchronous like Local Storage?

    3. Is there a way to tell how long other array and dictionary manipulation takes? I wound up writing some code like this to ensure stuff has time to finish:

    [GROUP]

    • initialize counter = 0
    • if counter = 0 reverse array
    • if counter = 15 sort array
    • if counter = 30 update array
    • if counter = 40 deactivate group
    • counter = counter + 1

    Is that necessary? Is there a better way to do it?

    Here's what I'm trying to do with my Flashcard App. If anyone has suggestions please let me know!

    DICTIONARY

    id: score

    ARRAY

    score, french phrase, english phrase, id

    I use AJAX to load data.json into my array. Then I use Local Storage to create my Dictionary object. After that I reverse the y axis of my array so the "id" is in the first column. Then I can sort the array by id. This makes it easy to update the array using the values in the dictionary object. (Everyone using the app needs to have their own "score" for each word.)

    After every card I basically do the opposite of the above to save back to Local Storage.

    It's mostly working but I'm getting weird values in weird places and none of it makes any sense. Perhaps I'm trying to sort an array before it has finished reversing, for example. Not sure.

  • That did the trick! Thank you SOOO much. It's sort of obvious now, but I sure wasn't getting it on my own. (It's late here so maybe I'm just tired...)

  • I've been running into lots of strange bugs today, and I'm quick to blame C2, but in the end ALL of them have been stupid errors on my part.

    That said, I'm completely stumped by my current problem and I could really use some help. I'm sure I'm just doing something wrong but I have no idea what it might be and I've been working on the problem for HOURS.

    My array has the dimensions 468,3,1 and I'm simply trying to change the first value in the last "column".

    Set value at (card_count,last_column) to my_rnd[/code:362kg8fk]
    
    To make sure I wasn't having an issue with my variables I simplified the code above to:
    
    [code:362kg8fk]Set value at (1,0) to 300[/code:362kg8fk]
    
    I ran my app and watched the array in the debugger. The first value changed to "300", as expected. Then I tried (1,1).  The second value changed.  (1,2) caused the third value to change. But (1,3) has ZERO effect.
    
    In desperation I tried setting the value to str(300), but that didn't work either.
    
    What on earth am I doing wrong?
  • I just downloaded Chrome and checked it out. Looks exactly the same: my app is in the upper left quarter of the screen, and some of my "off-screen" sprites are visible below.

    Probably an issue with iPad Pro's higher resolution?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was *just* getting ready to report the same problem. It's sort of an unfortunate bug because I'm making concept and feature prototypes for the people in my company -- and most of us just got iPad Pro's as company gifts. So while I'd like to think, "Oh, what are the odds that someone looking at my app will be on an iPad Pro?" Probably pretty good.

  • Hey, everybody. Nice to meet you.

    My name is John Cutter. I'm 56 years old and I've been creating games professionally since 1984. I have designed and/or produced over 60 titles, including: "Fairway Solitaire", "Defender of the Crown", "Betrayal at Krondor", "Might and Magic II", and a few more. If you are really curious you can find my design portfolio here: johncutterdesign.com

    I tell people that when it comes to programming I'm a really good designer. So when I want to mockup new game concepts or features at work, or I want to create some simple games at home in my spare time, I turn to tools like "Fusion 2.5", "GameMaker" and now "Construct 2". I've only been using Scirra's product for a few weeks but for the most part I really enjoy it so far!

    I'm sometimes an idiot on the technical stuff so please forgive my stupid questions. But expect a lot of them...