Aphrodite's Forum Posts

  • >

    >

    > I don't think it would be a good idea, It is logic right now, it is like having the same set of event (not only actions) placed one after another:

    > https://www.scirra.com/tutorials/56/how ... ait-action

    >

    Consider this, the entire purpose of a loop is to execute a set of events over and over and over and over until it has done it enough times or stopped by some event. Logic, and the standard way of thinking in most programming languages, I believe, would dictate that loops, intuitively, are simply repeated actions.

    If I want to rotate a wheel 90 degrees clockwise, then I would simply rotate a wheel 90 degrees clockwise. You don't need a loop for that. If I want to rotate a wheel 90 times, one degree at a time clockwise, then I'd use a loop. I'd only put a command in the loop one time at one degree and then the loop would execute that 90 times. So, whatever I put in the loop code block, intuitively and logically, I want that to run for as many times as the loop runs. Whatever happens behind the scenes is all up to the creators of Construct. They can choose to program the Wait command any way they want, but I believe that the more intuitive you make something, the better the product is and the happier the users are!

    Right now, I believe most new users of Construct, especially those who program in other languages, would find it a headache to wonder why their instructions in a loop execute "all at once". Certainly they can look into the matter spending a few hours searching the manual, looking through many tutorials which aren't cross referenced and even wait for someone to answer "that same question again" on the forums, but that means the user interface isn't as intuitive as it could be. There is room for improvement.

    For me, I read the manual many times looking for the answer but couldn't spot it. I was looking through the tutorials, but I didn't think the problem was the Wait command, I thought I was structuring my loops the wrong way! I was doing all kinds of searches on LOOP STRUCTURE! I thought I had the conditions and sub events with my actions in the wrong place!

    I wasn't saying that your though was wrong, I was explaining the "why it was like that", to precise that it wasn't a bug of some sort If I can say so, also I think changing that would break project unfortunetelly.

    Also a loop always run during one tick itself, that is maybe why I think it was more logic that it was though this way with the wait, it is more a personnal thing at the end.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > TheDoctor

    > I understand your confusion now.

    > In unity and java, python, etc, you can use some kind of wait or sleep to tell the thread to just stop execution for a (more or less) specific amount of time.

    > But you don't really have threads in javascript (or rather you only have one), so the wait can't work the same.

    >

    > What the wait does is registering a set of actions to be called after a certain amount of time.

    > But doing this registration happens in one go. The repeat 90 will register 90 set of action to be executed after a given time (hence the wait loopindex * 0.3)

    >

    > If the wait was really blocking the thread, all the game will stop receiving inputs (:

    >

    Thanks! I get it now. Never programmed in one thread before. Now I understand why the loopindex works!

    Thinking about it though, wouldn't it be easier and simpler to have Construct just automatically multiply your delay by the loop index? I mean, generally when a programmer puts a delay inside of a loop the programmer is looking to have whatever is in that block of code repeated from top to bottom as many times as the loop executes. If the Wait command was outside of a loop it could default to running once. To me that would make the coding a lot clearer. I'm betting this is a headache with a lot of people new to Construct. -at least those that want to understand it well.

    I don't think it would be a good idea, It is logic right now, it is like having the same set of event (not only actions) placed one after another:

    "Repeat

    Simply repeat the event a given number of times. This tests any conditions following it on every repeat, and if those conditions are met also runs the actions and any sub-events on every repeat."

    it works exactly the same way, it might not be straightforward to you, but it is coherent with the rest of the actual engine, and also to the way it is defined in the manual.

    Also this tutorial by ashley explains the wait, and how to use it in loops too : https://www.scirra.com/tutorials/56/how-to-use-the-system-wait-action

  • Anyone knows why other players in my game cant shoot but when i shoot all logged in players are shooting at the same time?

    Could be wrong, but that really looks like a picking problem, how do you handle the shooting part for the host, and for the others?

  • I do not understand (I guess you are using a automatic translation program), So I may be wrong on what you want to do.

    I think you want to know if you can preview on mobile, if it is that, then this tutorial could help you, it works also with the cocoonJS app.

  • For C2:

    I'm more of a dropbox + Google drive guy personnally, but mostly the event code itself should contain every information so only one person work at the same time on something, I'll admit that I didn't yet really worked at the same exact time with someone on the code (too much afraid of version conflict for that), That is why I suggest to do a local version of the file that you work on, with every change highlighted/written, so you can apply them in the final file at the end.

    Also I like to work in a "blocky" way: I mean that each part of my code is potentially an independent block that can be fully modified without perturbing other parts.

  • Is this true? I can't test this yet, but I recall a beginner's tutorial stating the array starting at 0,0.

    I am talking about the size of the array, not the coordinate

    If the array is 10,1,1, then it'll go from 0 to 9, 0, 0

    (and since he doesn't use the z axis, he might have set it's size to 0, which will not work at the end)

  • CocoonJS doesn't support WebRTC at the moment (WebRTC is the tech used for the multiplayer object)

    Crosswalks should support it (not sure about now, but since chrome for android supports it, crosswalk should have it soon if not now)

  • Hello all,

    I have a quick question about changing from a 32 bit format to a 64 bit in Construct... If you purchase a license, can you switch from 32 to 64 bit without any sort of problem? By "problems" I mean I wouldn't have to re-register any info on my end??? I'm fine with re-downloading the software, but I'd like to not have to re-enter any info... Thanks for any light shed on this topic...

    The license is a particular file you add to C2 (it can be obtained when C2 is bought, and can be downloaded multiple times), It should work in any version of C2 (32 or 64 bit)

  • The main thing I want to know the difference between arrays and dictionaries and that's because I have detected a problem in arrays:

    First Test: Condition: When Object dragdrop drag start ==> Action: Set Array.at (0,0) to Object.X and Array.at (1,0) to Object.Y

    Condition: When Object dragdrop on drop ==> Sub-Condition: (Invert) Object overlapping object2 ==> Action: Set Object position: X= Array.at (0,0) Y= Array.at (1,0). Action: Array: Clear.

    Conclusion: When I tested the game, On drag start the Array Save the position, on drop instead of putting the object on it's saved position, it took it to X= 0 and Y=0 . I don't know why.

    Second Test: Condition: When Object dragdrop drag start ==> Action: Add key "PX" with value Object.X Action: Add key "PY" with value Object.Y

    Condition: When Object dragdrop on drop ==> Sub-Condition: (Invert) Object overlapping object2 ==> Action: Set Object position: X= Dictionary.Get("PX") Y= Dictionary.Get("PY") Action: Dictionary: Clear

    Conclusion: The same test, but this time, the dictionary plugin in has saved the right positions and when dropped it returned them on the right position .

    the main question: Is the error from me or the C2 and Why that happened?

    What was the size of your array? (if one of the dimension is 0, then the array won't work)

  • In my opinion, the only thing Ashley needs to change is:

    • Develop a command-line exporter
    • Create a new editor using web tech - this is not a website or a "cloud editor", but a normal software just like the one we use except instead of C++ it's made on javascript. The current editor is quite simple so it's not like it would be difficult to port. It even makes development faster, since you can share code between the runtime and the IDE.
    • Open it up for developers to create IDE plugins (say, and IDE SDK) - stuff like dialogue tree editors, AI editors, finite state machine creators all would suddenly become possible with ease. Currently those kinds of tools can exist, but they'd rely on modifying the XML, which could cause corruptions. Examples of the kinds of things possible are the spriter and tilemap plugins, which only exist because scirra supports them officially.

    For the javascript editor, I think they though about it a long time ago, and it wasn't possible at the time

  • Fimbul : I read your post, so you are suggesting that scirra actually stick to HTML5 since it is what they does best, right? Because I agree if it is that, It seems I'm the only one here to not complain about mobile performance, I did think it would be far worse than that, yes I have little experience in mobile, but really C2 does the best HTML5 output out there, and for a price that is really cheap, "you still have to know how to program to be able to pull out good perfs" I don't call that programing but game design decisions personnally.

    however, tomsstudio is doing a good job, and I encourage him to continue because this is really showing how really great C2 is, and also could prove that a native output could be unessecary or could be great, but I don't encourage people to use his work to say that scirra does a bad job or takes bad decisions!

  • Hello again guys =)

    Will you help me think?

    I'm developing this board game where the board is way too big to fit on the screen, so I made it "click and dragable" so the player can move the board and see everything on it.

    But the thing here is, the board moves, the pieces doesn't and this mess up everything.

    Do you have any idea how can I make a sprite relate it's position to another sprite position or anything like that?

    I'm attaching the .capx so you can have a look at what I'm talking about.

    Grateful since now o/

    You have the Pin Behavior that does it (it lock position and angle relative to another object)

    Mainly I'd recommand (if you want to try it of course) that you try to scroll the actual viewport instead (with a sprite with a scrollto behavior or with the scroll to system action)

  • Hi, I'm just curious how CocoonJS vs CrossWalk compare to each other. I can only get CocoonJS to work for me and it works quite well. When I use Crosswalk I can't upload my .apk file I get a error every time. So I been sticking to CocoonJS, but I keep reading about how much better the Crosswalk for Android is then CocoonJS. Has there been a legitimate Pro vs. Con comparison of the two?

    Not experienced a lot with them, but:

    From what I've understood, CocoonJS seems faster on the logic of the game, but has bad memory management, but crosswalk is based on chrome for android, so the memory management is better on their side (I'll always suggest to try to optimise your logic if possible in both cases!), also the android's versions targets aren't the same (and for iOS, crosswalk is just incompatible)

    The companies behind are also one argument:

    -Ludei seems pretty much to be like talking to a closed door in case of problem, intel does a better job at that.

    -The cocoonJS plugin is only updated by Ludei now (I remember that scirra couldn't handle it well because of the lack of communication on ludei's side).

    -Crosswalks is far younger than cocoonJS, but it improves quickly it seems (and since it is based on chrome for android, you can expect the same improvement over time as chrome for android)

    -CocoonJS forced ugly-blinking splashscreen, seriously.

    On my part, I'll always try to stay away as far as possible from cocoonJS as I can, for preferences reason (I plan that my games can be played on mobile browsers, since crosswalk is based off a browser, It suits me perfectly, and also the blinking-non-editable splashscreen is something that I just cannot accept)

    Only my little experience with them (I don't plain on using wrapper really for now), but hope someone more experienced than I will help you decide on that

    PS: never actually uploaded crosswalks .apk so I cannot help with your problem

    So as I understand it then. C2 tool is just a programming IDE. The plugins themselves at this time are pretty much useless? So if I use say Dictionary, WebStorage, Platformer those are in effect not used at all.

    Well good luck

    jayderyu

    C2 does not have any program language before exporting/previewing, just some xml file to retain the "state of the editor" combined with ressources, plugins are only really used when creating the Javascript (aka previews and export time). They are (by default) loaded only at the opening of a project, However, their non javascript part (list of actions and conditions) are still used.

    So yes, C2 is the combination of:

    -A powerful IDE that just references the plugins used (can save the project with "organising file" if I can say so)

    -A exporter/previewer that can interpret the references used, and will call corresponding behaviors, effects and plugins (this is why you can update plugins so easily when updating C2 for exemple, because they aren't used in the IDE by default, just referenced)

    (I am not being ultra precise here, just explaining)

    here, the IDE part is still handled by C2, but the other one is handled by something else that tomsstudio is creating, and since the official plugins are likely to change not in their list of actions/conditions, but more in the way the javascript is at the end, that is not a problem (because the Monkey's exporter does not use the JS produced, if the JS produced changes, the Monkey's one will still load normally, maybe it'll need maintenance from time to time though).

    EDIT: to be more clear: the exporter is reading the event sheets, the layout views, the ressources, and converts that to monkey language, I'm pretty sure a series of monkey equivalent of official plugins could be done in monkey language, so not a problem

    EDIT2: Also I am wondering about using it in commercial project, I do not know if anything you are using is free to use for commercial projects or if there are conditions that apply/can apply one day

  • I could be wrong but I think that chrome for android works the same way:

    -Sounds aren't played until the user touch the screen