farflamex's Recent Forum Activity

  • This solves half the problem at least. Putting the timer in allows me to position the 'Please Wait' message correctly. Problem now is, when do I remove it? It needs to be removed when the functions have completed (also buttons deactivated and activated again). I'm thinking right now of setting some booleans to say the functions have started, then have them reset to false on the last line of the function (presumably that's the 'end' of the function?). Then I can test when they're all false and reset everything. I'll see how it works out.

  • Ah thanks, this looks like what I was looking for. This should work for my game, with a few alterations, thanks for your time

  • Ok, hopefully this Dropbox link will work. Hopefully it demonstrates where I'm going wrong. There are no functions, but what it does is, when you click the pink square, it 'should' change colour to blue (frame 1), then, when the loop has ended, change back to pink (frame 0). You can see that there's a pause due to the loop on line 3, but you can't visibly see the square change colour, as it's instantly changed back on line 4, while line 3 is apparently still processing.

    So my confusion here is, how can I get line 4 to execute AFTER line 3 has finished? It's not the functions that are confusing me, rather, how do I know when a group of instructions are finished, so that I can then do something else (e.g remove the 'Please wait' message as I said above).

    https://dl.dropboxusercontent.com/u/112519761/func.capx

  • Well, my game is turn-based. On my PC, the functions complete fairly quickly, but on my phone, they can be very slow. So what I wanted to do was to disable any buttons, put up a 'Please wait' message, run the processing functions, then remove the message and re-enable the buttons.

    So I guess my misunderstanding is in thinking that if the function takes a while (say 1 second) to complete, the whole game locks up while it's processing (actually, I've noticed that sprites stop moving etc in tests when I do this). But what you're saying is, even if the function takes a second to complete, the rest of the program continues to process? So how does the function process, is it processing in the background on a thread?

    To solve my problem, how do I know when the function has completed processing, so that I can remove my message and restart the next turn?

    I have capx to demonstrate but not sure how to post it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've forgotten how to post a screenshot, but in short it's like this...

    Call Function A

    Call Function B

    Call Function C

    Set Variable to 0

    All in the same event.

    A later event, then tries to respond only when the variable is set to zero (i.e 'after' the functions have completed), but it responds immediately even though the functions still appear to be processing. I basically need to set the variable only when the functions are done with their processing.

  • I have an issue where I want to change a variable only when a number of functions have completed. They're quite slow (about half a second to process them all). When they're done, I want to reset a variable, but if I put the variable reset after the functions, it seems to reset immediately, while the functions then dawdle along. I was under the impression that the final instruction wouldn't complete until the previous ones had completed, in order. Are functions threaded or something?

  • One of my games doesn't even have addons, but it looks like other people have been able to play them, since they've been played and rated. Also, I can hear the music, but I just get a white screen. So it looks like they do work, but I simply can't see them on my screen (though I can see games that other people have submitted).

  • Uploaded my game to the new arcade but all I get is a white screen.

    The game is quite large in size and contains an add-on behaviour. Are these allowed? Is there a size limitation? It uploaded fine and I can play other games, but I just get a white screen for mine.

    https://www.scirra.com/arcade/strategy-games/korelos-34

  • Thanks Ashley. I did have my own capx to demonstrate it, but Ramones beat me to it while I was trying to work out how to upload it - besides, his is better

  • One thing I've noticed on my mobile is that when I select an item in a listbox, and then select another listbox, both boxes remain highlighted with a blue background. In fact, if I select an item in all 10 boxes, they all remain highlighted. I don't know how to turn this highlighting off. Unfocusing the box doesn't work, nor setting the selected item to an odd number (e.g -1). I thought it might be just on IE since my mobile uses IE but it doesn't do that in IE on my PC. Any ideas how to unhighlight the listbox text?

  • Wow, thanks dude. I was thinking I might have to abandon the listboxes and use something else but perhaps this is doable after all

    Perhaps something for Ashley and co to look at? I know listboxes aren't crucial to most games but it shouldn't be a huge job. Or does the browser do all the work, so it's not a C2 issue?

  • I've been using a few listboxes on my new project and was struggling with performance. At first I thought the problem was either filling the listbox with too many items, or the way I was filling them (from objects). For example, if I had 1000 objects and tried to put an attribute from each object into several listboxes, it seemed to take several seconds to fill.

    However, I tried a new, very simple project and I noticed that the performance is actually very good except when clearing the listbox. If I clear 10 listboxes (with 100 items), it takes about 2.5 seconds to complete (the more items to clear, the slower it gets, it's not noticeable with the 3 initial items). Filling the listboxes with 100 items only takes about 0.025 seconds. Even doing a fairly complex fill is very fast, it's just clearing the boxes which is so slow.

    Is this to be expected and is there anything that I can do to speed things up a bit?

farflamex's avatar

farflamex

Member since 7 Oct, 2012

Twitter
farflamex has 15 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies