tulamide's Forum Posts

  • Be careful though, I'm not working with this feature but remember that removing an attribute does not work.

  • Don't be too afraid. Most of you math should be easily adjusted by adding a multiplication factor. For example, if your new resolution is a quarter larger than the old one, multiplying 1.25 to your current calculations, parameters, etc. make them work with the new resolution. A resolution double as big would have a factor of 2 etc.

    Should be a simple (but boring) process of copypaste :)

    p.s. if your new world should also have another ratio, you might need two factors, one for all vertical and one for all horizontal parts of your math. Note, it's only valid for another world ratio, not resolution ratio.

  • It depends on how the world changes relative to the new resolution.

    1) Sizes of objects keep the same, you just see more of the scene: No changes needed.

    2) After resolution change the scene is zoomed in to show the same as in the lower resolution: No changes needed.

    3) With the new resolution, all graphics are revamped. The objects are larger now to show the same as in the lower resolution but with more detail: Changes are needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's a tad hard to point fingers at the issues since personally I'm too used to working with CC and its quirks, really. One that instantly comes to mind though are some annoying event sheet editor problems, like drag'n'dropping of events being a surgical operation or issues related to selecting events and such.

    I've also ran into some shaders that need minor fixing by hand, like changing the defined pixel shader version. Some plugins are buggy too and have been for years. There's a lot of this kind of things on the bug tracker.

    Generally some things don't work like you'd expect them to but like I mentioned you'll get used to them.This! <img src="smileys/smiley1.gif" border="0" align="middle">

  • Apart from the family trick (that I never really got^^) you can always work with variables:

    + MouseKeyboard: Mouse is over Sprite

    + System: Sprite ('pid') Equal to 2

    -> System: Set global variable 'toOpen' to 1

    + System: Is global variable 'toOpen' Different to 0

    ++ Sprite: Value 'pid' Equal to global('toOpen')

    --> Sprite: do whatever needed to open the door

    ++ empty condition

    --> System: Set global variable 'toOpen' to 0

    One sprite with several instances. They all share a private variable named "pid", which is set to 1 for the first instance, 2 for the second, and so on. If you setup the pid wisely, you can simplify the first event. For example you could give all switches the lower numbers, and all doors numbers + 10 (or whatever many doors you have) So a switch with pid 2 belongs to door with pid 12, 3 belongs to 13, etc.

    Then the first event would read:

    + MouseKeyboard: Mouse is over Sprite

    + System: Sprite ('pid') Lower or equal 10

    -> System: Set global variable 'toOpen' to Sprite ('pid') + 10

  • I'm a great fan of CC.

    But from a beginner's view I'm not so sure, if it is the right tool to start with. It is full of issues that need workarounds. And as a beginner you can't be aware of them. C2 on the other hand is actively developed. Even if there are issues, they get fixed very fast.

    It's cool to have 1000 Sprites on the screen, with bump and height maps, while running with stable 60 fps. But it is a long way until you get those results. Not because CC is complicated (it isn't), just because of the issues. With C2 you might have to limit yourself (say, 100 instead of 1000 Sprites and no bump or height maps), but you can be sure (or almost sure) that C2 does what you expect in every situation.

    In the end, it may all come down to two questions:

    1) Do I want to create a DirectX9 supported .exe with pixel shader, or do I want to comfortably create a browser game, with access to channels of distribution like Kongregate and the like?

    2) Do I have the energy to work around issues, or do I prefer active developers frequently fixing bugs?

  • I'm glad you made it :)

    It is a solution with much less effort event-wise and it frees me from creating an example ;)

  • If you haven't created any global variables then there is no folder entry in the Project tab to right click on.To what Construct version do you refer to? Construct Classic or Construct 2? For Construct Classic this is not true. There's always a folder entry named "Global variables".

  • That's done simple: Let your char rotate in a circle while constantly decreasing the radius.

  • Always been a great fan of turnbased games or a mixture of realtime/turnbased

    One that worked really well for me on the rpg side was "Star Wars: Knights of the old republic" and on the strategy part the "Total War" series.

    I just prefer having time to think about situations and then come up with a tactic or strategy. I also hate games that use a timer whenever developers run out of ideas. And worst of all are those "quicktime events". Boringly hitting keys, when the computer tells me so. Wasn't good, when Dragon's Lair came up and isn't good today.

    But back to topic. I would love to see the old school turn based games getting a new chance. And I don't think it is difficult to accomplish this in C2. I don't know much about C2, but I know for sure, it isn't difficult to do in CC.

  • Just don't get irritated by the resizing of the arrays. The algorithm itself does nothing else than loop through the array to match a position based on a value given. So, to sort a pre-existing array, you would need to call the sorting again and again, for every value. Just retrieve the value to sort, replace the cell with a value that won't normally occur (e.g. -1 in an array that only stores positive values, or a string in an array that stores numbers) and add an exception condition that ignores such replaced cell. The position value you get, is the exact position (no need to +1 it). Copy the cell at that position to the replaced one and enter the current value at the new position.

    I will try to do an example for pre-existing arrays, but I'm very busy with a project right now, so please be patient (Or maybe you figure it out for yourself? Would like to hear it then, so I wouldn't need to do the example)

    Happy developing :)

    EDIT: I just read a bit more about Timsort, the algorithm used in Python. It actually is a quite clever one, recognizing already sorted parts and working only on subsets that need to be sorted. Not a bad choice to use it.

  • To the first paragraph: Everything is heavily commented and all the questions are answered in the explanation of the sort algorithm. Yes, the array grows as more and more elements are added to the hiscore. But the algorithm doesn't care about the size of the array. All it needs is a value to find the correct position for. Works just the same on static arrays, too.

    An easier way is the bubble sort algorithm. I already linked to it.

    When you are willing to use Python it gets even easier for you (but I'm nt sure about speed issues with larger iterables). Just use the built-in function sorted() or the list's built-in method sort(). They both work the same. Here's an example using sorted():

    + System: Start of layout

    ++ Python script: a = sorted([5, 1, 3, 2, 4])

    ++ System: For "" from 0 to 4

    --> Text: Set text to .Text & Python("a[" & LoopIndex & "]") & NewLine

    It will output

    1

    2

    3

    4

    5

  • Thanks you for that. Is the "or" function in general a bit bugged, or only if you use it wrong?Well, it does not work as it should, so I'd say in general.

    Basically it is a time issue. Here is a description of how to get 'OR' working, or why it does not work correctly:

    http://www.scirra.com/forum/why-using-or-seems-to-fail-often_topic40925.html

  • Using 'OR' to combine conditions can cause problems. To avoid them, you need to find a way to compare logically without using 'OR'. There is a way, and it is the system object's evaluate condition.

    Instead of one event with 3 conditions, like so:

    + System: Is global variable 'keyDown' Equal to 0

    + System: OR

    + System: Is global variable 'keyDown' Equal to 2

    You'd use the evaluate condition, like so:

    + System: global('keyDown') = 0 Or global('keyDown') = 2

    That looks great, and it works, too. But what to do, if you need to 'or' triggers? You can't access them in expressions. But you can do an intermediate step to convert a trigger to a variable.

    + System: Always (every tick)

    -> System: Set global variable 'keyDown' to 0

    + MouseKeyboard: Key Right arrow is down

    -> System: Set global variable 'keyDown' to 1

    + MouseKeyboard: Key Left arrow is down

    -> System: Add 1 to global variable 'keyDown'

    + System: global('keyDown') = 0 Or global('keyDown') = 2

    -> do something, when both or no keys are down

    The logic behind this example is that on every tick 'keyDown' is first reset to 0, then set to 1, if the right arrow key is down. After that, 1 is added to 'keyDown', if the left arrow key is down. Here are the sequences of setting 'keyDown' before it is or'ed:

    left and right both not down:

    0, 0, 0 -> 'keyDown' = 0

    left is down, right is not down:

    0, 0, 0+1 -> 'keyDown' = 1

    right is down, left is not down:

    0, 1, 1 -> 'keyDown' = 1

    right is down, left is down:

    0, 1, 1+1 -> 'keyDown' = 2

    The last step now compares if either one of 'keyDown' = 0 or 'keyDown' = 2 is true (which stands for either no key or both keys down) and gets executed only, if it evaluates to true.

    You can do this or any similar way (you might prefer working with dedicated variables per trigger), wherever you need to 'or' conditions.

  • English is not my native language, so I might have chosen an inaccurate expression.

    With time-stable I mean that the presented "divide&conquer" algorithm in Verve always needs the same amount of time to sort per cycle, no matter if there are, e.g. 100 or 100000 elements to sort, while bubble sort uses much more time per cycle if there are more elements.

    EDIT: For example, with 100000 elements the algorithm in Verve always needs about 8 cycles to sort, while bubble sort in the worst case needs 99999 cycles.