tulamide's Forum Posts

  • [quote:3rghogoj]PAP - Plastic Animation Paper

    Specialized on animation (no coloring or compositing) and completely free since July 23

    Oh god! that interface!

    Hehe, yeah, reminds me on the old atari st os

  • Care to post system specs? My game has over 1000 events but previewing and stuff is almost instant. I think the number of objects in a layout and resolution of sprites matters most in terms of IDE performance.

    I guess there might be a big difference. Arima said 3500 events in one event sheet. You may have over 1000 splitted to several event sheets?

  • Nice links (Synfig gives 404, but if you use the server adress -www.synfig.org- only it works). Synfig looks very promising!

    Here is another one to add to the list:

    PAP - Plastic Animation Paper

    Specialized on animation (no coloring or compositing) and completely free since July 23

  • > There also is pyVST, but I don't know if this can be used to any advantage for these particular problems.

    >

    Did you get pyvst to work?

    No, but that doesn't mean much, because I generally have problems with python + Construct (I hate the conversion part, there's always something refusing to work and I have no clue why). I was trying to get it to work for that music project, where I ran into issues, if you remember. Anyway, it is a wrapper only and needs the ctypes-package (to access the dll) - but that is all I can say, I'm afraid.

  • There also is pyVST, but I don't know if this can be used to any advantage for these particular problems.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just would like to calculate time after object X has been destroyed and when time has passed for 12 seconds (equally 1200 milliseconds) after that, something happens :S

    That's not, what "every x milliseconds" is designed for. It should be used to repeat actions in regular intervals (like a stop light flashing red every 20 seconds, etc.).

    For actions like the one described you have other tools. I suggest using the system expression "Get timer". It returns the amount of time the current layout has been running. I am used to create a pv/global I call "timestamp". Just fill it with "Get Timer" whenever you want to mark a point in time. To test if 12 seconds have passed you compare "Get Timer" - "timestamp" >= 12000.

    If you are dealing with many objects you should setup an index for every object and a 1-dimensional array, where the x-dimension corresponds to the index of the object. Instead of just comparing one object you then need to loop-compare. Or, if you just make the objects invisible and place them outside the layout instead of destroying them, you could test for the passed time via the above timestamp pv example and destroy them not until these 12 seconds have passed.

    Edit: typo, 1200 corrected to 12000

  • Don't know about the rest of the world, but in germany it's not f2p or free of charge - you can only dl a "demo" giving you a peek until level 10.

    Have fun playing it, loved the series

  • This is often asked. I've started a thread, that may help understanding the work flow within Construct and why branching is the way to solve problems like this.

  • Quite often people ask one question (well, the phrase changes, but it boils down to this): "Why isn't the state switched?"

    The answer hides in the way Construct works. The event sheet is executed in a loop. The start of the loop is a new tick, then every event is executed until the end of the sheet. The changes are reflected and then the next iteration starts.

    Here is a rough sketch of what is going on during one tick (I'm no professional, so this is in no way a real flow chart, but it makes the progress more visible and understandable):

    As you can see, changes you make with actions are updated, but not reflected until the whole sheet is processed. "But how does this prevent my state being switched?", you may ask. Let's take a simple example that will make it clearer.

    Start Construct, create a new Direct-X game, insert a sprite, the mouse&keyboard object and a textbox. Clear the text of the textbox. In the event sheet, do this:

    Now have a look at the diagram. Let's say the sprite is clicked. Now this is snapshotted as well as the fact that the current text of the textbox is "".

    The event sheet is executed. There is only one event. The snapshot says "Yes, the sprite is currently clicked on", so the action is performed. The text of the textbox is now updated to "hello world", but we don't see any changes yet.

    There was only one event so the changes are now reflected, a new tick begins and the new text will be drawn by the gpu in this new tick. This is important to keep in mind.

    Now let's see another example. We want the text to be changed to "hello world" on one click and changed to "" on the other and so on. Straight forward, you may think this is the solution:

    Again, let's have a look at the diagram. The first event matches the click (remember the snapshot). The second condition means: Execute only if the current text is not "hello world". According to the snapshot, the text currently is "" so the condition is met.

    Both the trigger and the condition result to true and the action is performed. The text of the textbox is now updated to "hello world". But remember, the event sheet is still executed, a new tick has not begun yet, so we don't see any changes!

    There is a second event, we are going back to "execute sheet". The click is still part of the snapshot, "On Left Clicked on Sprite" still results to true. But the text in the snapshot is updated by the first event and is now "hello world". Uh, we met the condition and as both the trigger and the conditon result to true, the action is perfomed. The text of the textbox is now updated to "".

    This was the last event, the changes are reflected, a new tick starts, and the gpu draws the new text. But hey, the new text is "". We will never see the change to "hello world", because it is changed again to "" within the execution of the sheet!

    But how can this be solved? The easiest way is to use branching:

    If condition is met do something, else do something different. This is done in Construct this way:

    The difference is that now the text is only tested once for both actions. We can't do any wrong changes to it.

    "Is there another way to get this working? I'm not familiar with branching." Well, yes, but the other ways are less efficient and less elegant. Look at this example:

    It works, but uses an additional global and more lines of code. You should definitely consider branching.

    I hope this will help you with switches and such. I know the text is not nice to read, but together with the images it should make sense to you.

  • Enemies are spawned randomly every x milliseconds, it's not tick based i think.

    Bullet are spawned every 100 ms if mouse button is down.

    I still think that this is the problem when picking the objects. You have to make sure the sprites are already created before you can safely access them (e.g. to access a pv of sprite x, you need to wait at least one frame after sprite x was spawned)

    If I recall right, the timing conditions are dependent of the frames whereas the function object has its own timing. That could lead to situations where your order of events is right, but they are still executed in another order. When spawning and accessing a sprite meet in the same frame it does simply not work, without an error message or debugger salience.

    I can't help with python, but I used a trick for the functions (delaying the access to a sprite by at least 1 tick) to avoid that problem in my auto zoom engine. Maybe you can integrate and adapt it. (you find the events of interest in "Camera Control":"HighLevelFunctions":"Camera Creation/Deletion" plus event 14 of "Camera Control":"LowLevelFunctions")

  • newt's question plus:

    "may be it's due to the time when they were spawned"

    Are you spawning them in the same tick, when trying to access a pv of the enemies? Sprites are created at the very end of a frame. Maybe that is causing problems in some situations, because the function call takes place the moment you call it.

  • It's hard to tell without a cap, but I guess it is a picking problem, not the function object working incorrect.

  • Hmm, I prefer style 1. But it depends on the surroundings, story, etc. If it is a cold world, harshness, then it should be style 2 - but you shouldn't detail it too much.

    And please, let her give the impression that she eats at least sometimes

  • Compare time compares the game time not the system time. But the date object is your friend. Have a look at this example. Of course you would replace the text actions with whatever you have in mind:

  • I'm currently working on an effect that may help you.