tulamide's Recent Forum Activity

  • Thank you.

    I sent you a pm, but I'm afraid you're thinking too complex. The frames are not updated every Construct tick but only in certain situations and only once then. Would be a remarkable coincidence if the processor load would be too high at exactly those moments repeatingly. But I am fond letting you proof me wrong

  • You should probably upload an example. There's no way to tell if this is v-synced, or how to tell how your updating function parameters.

    But honestly I just don't think you can get the precision your wanting in a tick based system.

    All I can say is you cant count on having precision down to less than 10 milliseconds, and when it comes down to timedelta that will make a big diference, and even if you get the timing right on your system, it could vary wildly on others.

    One thing I could suggest is using some sort of interpolation, or percentage to set your animation.

    I'm afraid I was misunderstood completely. Maybe I'm explaining it wrong or my language skills are not sufficient. Sorry for that.

    The music engine has its own timing, independent of the UI one.

    I don't care about or need timing precision with the user interface of my app. On the contrary, I rely on the fact that I can change a sprite's animation frame whenever I want to, not at a specific time. It doesn't need to be changed on a special tick, it can be updated a few ticks later, even updating it a second later is ok. But I need it to be changed at all

    I still see no logic in the circumstance that one calls a function and the sprite's frames are changed within this function, and just because your project grows in size you have to delay the very same function a week later to make it work again. Besides, it is still working without delaying it, just the sprite's frames are not changed. Text boxes changed within this function work, as an example.

    According to that logic, I guess I need to raise the delay time as soon as my project grows by a certain size again. IMHO that's not acceptable.

    Last but not least: The problems occur with whatever you do or use. It doesn't matter if you use v-synced or unlimited mode (delaying it by TimeDelta makes the Time Display work under both modes and not delaying it makes it not working under both modes) Also, order of events don't count for this particular problem.

  • Pretty sure a function within a function will be another tick. In fact I often use "call function after delay" because it takes another tick to retrieve something from the gpu. Probably the same sort of thing happening with the font thing as well.

    Please believe me, If it were that easy I never would have created the post. It is more than this. You can't rely on something working, because a few days later the same code without changes suddenly doesn't work anymore.

    Besides, we shouldn't be forced to wildly guess when to use a delay of a function. Construct should handle it automatically or at least give a error message.

    The examples show the randomness of the problem and that is contra-productive. If it were a matter of delaying a function, then why the heck are 6 of 8 instances of a sprite correctly updated while the other two are simply ignored? No matter what you change.

    No, if there are problems for Construct executing something I need feedback about it to handle it.

  • This is more of a general wish than a special feature request.

    Don't let Construct just ignore my instructions!

    If something can't be done I want to be informed. But with the size of a project growing also a deviant behavior occurs more and more. Some things are just ignored. No error message, no crashing, nothing but just not executing an action. Posting something like this to the tracker wouldn't help much, as the occurences are like random. Here are two examples from a quite complex project:

    (A) The ballad of the cursed Tempo Display

    I was working on a Tempo Display. The user may click on the panel thus making it editable. Keyboard input then is converted to a value which is stored in 's'. By hitting 'enter' this value is used to display the new Tempo by switching frames of a sprite.

    <img src="http://www.mediafire.com/imgbnc.php/d8d9d39158415446cb2a0c053f3c56352g.jpg"><img src="http://www.mediafire.com/imgbnc.php/f6db1d67ee0cca0f4872f59d6914d40b2g.jpg">

    I1: The Tempo Display

    It was one of the first things I implemented after the core engine, and it worked like a charm. I was working for almost a week on other parts of the project, and one day the Tempo Display suddenly didn't work correctly anymore. The frames were still updated during editing, but as soon as hitting 'enter' the old value was shown. I first thought that I messed it up unintentionally and looked at the code. But everything was as always, no change at all. Even more, if I used a textbox instead of the font sprites, it worked as intended.

    <img src="http://www1.mediafire.com/imgbnc.php/449cd1f396a87babdcfb232f795cd31e6g.jpg">

    I2: One Event of the Tempo Display with the action that is igored

    For days I tried to get this working as it worked before but had no luck. Then, totally desperate, I thought:

    "Well, this is ridiculous, but what if Construct had not enough time to do all of the instructions within a tick. But instead of doing it the next tick then, it just ignores the instruction?"

    I know, it seems like nonsense, like a delusion of a tired out man smoking to much, but nevertheless I gave this idea a chance. I changed the code accordingly...and it worked! Unexplainable. And you have to find the clue without any help from Construct.

    <img src="http://www1.mediafire.com/imgbnc.php/4b1b66bc18972aa04187b5140763bb9c6g.jpg">

    I3: The same event of the Tempo Display with the action working

    (B) The jinxed Position Display

    At least I found a workaround for the Tempo Display. That's more than I can say about this one. This time, a Position Display shows the musical positon while music is playing. No user input implemented yet. Every musical tick a position value is updated, converted to a special format and finally shown in the display.

    <img src="http://www1.mediafire.com/imgbnc.php/4a8cd42c6cb1e32a23f48569ed45d37c6g.jpg"><img src="http://www3.mediafire.com/imgbnc.php/cb289bc83581a9a0bc648034b917a8aa6g.jpg">

    I4: The Position Display

    Again, it worked. Unfortunately I embedded the code for the conversion directly in the event that is responsible for the display. But I need it to be seperate because the conversion is done in other situations, too. Well, I changed the positions of some events (and not the content) and called the events seperately. For the life of me I can't figure out, why it's happening, but the last two digits now get ignored (and only them). Again, when using text boxes it works, just not with the sprites.

    <img src="http://www2.mediafire.com/imgbnc.php/7c340ff94d668ec0c7491ae69326ed556g.jpg"><img src="http://www1.mediafire.com/imgbnc.php/4adee969f4dca5855dd9d8dd67e538f26g.jpg">

    I5: The Position Display with the last digits never updated

    It's not the order of events. I tried several combinations (even reversed order) and it always resulted in the last two digits not being updated. I could isolate it to the one event responsible for displaying the digits.

    <img src="http://www4.mediafire.com/imgbnc.php/fdcb8204611250f07482303f28bb3aa26g.jpg">

    I6: The event for the Position Display

    <img src="http://www.mediafire.com/imgbnc.php/46e926f9ba18c461a5af98afd7567be66g.jpg">

    I7: The event for the Position Display like it is not working

    Again, there is no feedback from Construct. It just ignores my instructions. So let me please repeat my wish from the beginning of this post:

    Don't let Construct just ignore my instructions!

    Thank you

  • You are right. For the test I switched to unlimited. That's because if I use v-synced I get exactly the monitors refresh rate and therefore would not be able to see differences.

    Effects use quite a bit of the VRAM initially, but they shouldn't add. (Language difficulties here) What I mean is: Create a new empty DirectX game. Now add "Additive Plus" as layer effect and run it. It uses 4.69 MB. Now go back to construct and add some other effects. Run again and you'll see that the space required didn't change. It's still 4.69 MB.

  • You control a mass of micro-cellular organisms. Your goal is to rule the world. To achieve this you have to take over the control of mentally suggestible people. You have three chances, if you fail the game is over. Your chances are

    Ron

    Georgie

    Arnie

    ew, wait a minute...

  • Basically, what you would need is something like a one-directional blur. A pixel shader is not aware of movements, so you would need to change the strength (and therefore the length) frame by frame according to the velocity of the sprite. The problem is that pixel shader are limited in instruction slots. A loop that would create such a long tail would exceed the limit (I'd guess 4-8 instructions per iteration, max slots of shader 2.0 are 64, a for-loop would be limited to 9-16 iterations)

    But maybe I'm thinking too straight forward ans someone comes up with a solution?

    Anyway, as for the time consuming: I made a simple test. Your cap as provided drops from 2300 fps to 430 fps when spawning the sprites. Deactivating the spawn action and applying ZoomBlur to the layer leads to constant 592 fps - and ZoomBlur is an expensive effect. Also, you would apply such an effect to the sprite and its dimensions not to the whole layout. So I would say it would have better performance with an effect than with the spawning sprites technique.

    EDIT: I'm not quite sure what you mean by 150 extra objects? When I tested your cap 1000 extra sprites where spawned at max. Or do I get it totally wrong?

  • The problem I have with things like these is that they are founded on the property of one company instead of an independently developed standard.

    If Mr Ford had done what Microsoft is always doing we would all drive Fords nowadays. We have proof of that until 1989, when there existed Eastern Germany. If you wanted to drive a car you had to order a Trabant and if you were lucky it was delivered 15 years later (and it wasn't sure, you could even afford it).

    Why is it important to use a specific operating system? It should only make possible to get the results I want out of my computer not forcing me to use special software. I can buy an apple at the nearest local farmer or at the supermarket. Either way I get an apple!

    Why do you think students get Microsofts developing software for free? Because that company wants to be a philanthropist? Or because you can't bind people early enough to your software, so that they will develop for their products exclusively?

    See PhysX as another example. It is a de facto standard although it doesn't run on the hardware of NVIDIAs competitors.

    Don't be so greeneyed with such things.

    Btw, I remember Ashley saying it is much easier to develop for OpenGL and that C2 will use it.

  • First you have to decide wether your levels should be pixel-based or grid-based. Either way you don't have to set up an array of huge sizes.

    1) Pixel-based

    Easiest way is to use S. (http://www.scirra.com/forum/viewtopic.php?f=2&t=4791&hilit=lucid+s&start=47) If you don't want to use S, you can do the following:

    Let the user place the objects. When it comes to saving, you count the objects on a global scope and so creating an id (object A 20x = 0-19, object B 12x = 20-31, etc) and then "misuse" a hash table. For every object you create 3 keys named

    -"whateveryoulike" & str(globalcounter) (content would be the id for the object type, like wall or player start point)

    -"whateveryoulike" & str(globalcounter) & "x" (content would be the horizontal position)

    -"whateveryoulike" & str(globalcounter) & "y" (content would be the vertical position)

    When loading, you use HashTable.KeyCount / 3 to get the number of objects. Then in a for loop you access the values via "whateveryoulike" & str(LoopIndex) and create the objects according to their type and position.

    2) Grid-based

    This version has fixed positions on the layout, depending on the cell size the grid represents. So you have to make sure, the objects are correctly placed at the fixed positions. The rest is easy. When the user wants to save, loop through your grid size to see what object is at that position and add the value to the array. Assuming the grid is 16x16, representing cell sizes of 32x32, and the objects hotspot is upper left, this would be:

    +For loopx from 1 to 16

    For loopy from 1 to 16

    ++objectwall.x equal to (LoopIndex("loopx") - 1) * 32

    objectwall.y equal to (LoopIndex("loopy") - 1) * 32

    -Array: Set index (LoopIndex("loopx"), LoopIndex("loopy")) to 'yourobjectidforwall'

    ++objectplayer.x equal to (LoopIndex("loopx") - 1) * 32

    objectplayer.y equal to (LoopIndex("loopy") - 1) * 32

    -Array: Set index (LoopIndex("loopx"), LoopIndex("loopy")) to 'yourobjectidforplayer'

    ++etc for all your object types

    When loading you do as newt wrote.

    If your objects hotspots are not upper left just add the distance from upper left to the hotspots position like this:

    objectwall.x equal to (LoopIndex("loopx") - 1) * 32 + 'distanceX' (for example 16, if hotspot is centered)

  • I like it

    But, I had a crash after about 5 minutes of watching, placing and dragging around...

  • Another way:

    S saves encrypted, so it's hard to get values in a readable format. Given that, why not restrict the playing time? Use S to add the running time to a variable that is saved as soon as the game quits. If a certain amount exceeds, the game refuses to run, as well as refusing to run if the file is non existant.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I surely was amazed by all of the demos but "evOlution" ...

    Couldn't resist. Can anyone beat my iteration record?

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies