tulamide's Forum Posts

  • 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.

  • I surely was amazed by all of the demos but "evOlution" ...

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

  • Very Nice tulamide!

    Thank you

    Feedback is always appreciated, and approval more than ever.

  • Yeah, now that you mention this. The game could be just bundled with the needed version of DirectX like the Construct Installer. It's not really necessary for Construct to have the newest version of DirectX. Right?

    But that's exactly what you would do with NSIS. I don't see, why it is ignored? It creates an installer and you can package it with whatever is needed...

  • I don't think this is necessary nor should it be forced. Almost every professional application or game comes with an installer not the game just zipped or something.

    You should set up an installer packaged with DirectX to distribute your games. There are a few installer creators out there, the best known open source is the one from nullsoft I think.

    Nullsoft Scriptable Install System

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cant open it it says that the unknown error occurred while accessing an unnamed file.

    That's why I told you the version it was created with. You seem to have v0.99.62 installed, but the cap only works with the newer version 0.99.84. Just download this newer version and install it to a seperate folder, both version may co-exist without problems.

    Link to version .84 thread

  • How can I insert into a Construct?

    The example is a .cap file, the native Construct format. Just open it within Construct (or doubleclick the file in the explorer)

    Made with version .84

  • Here is an example.

    It is a analog watch with a digital display too. Makes use of the date object, and various sprites for animating both watch types.

    Download

  • I've done another cap, showing three different movements. Maybe it is of help. Covers only the basics of course, there are way to many possibilities to get sprites moved

    Download here (.84 used)

  • + Every Tick

    > Add 500 * TimeDelta to 'Y Speed' (the acceleration)

    > Set Y to .Y + 'Y Speed' * TimeDelta (the speed)

    That there is from the Timedelta article, is it not multiplying by Timedelta twice?

    We are talking about different approaches here. In your example it was all about a constant movement, whereas the above example generates a variable (accelerating) movement. The latter is what I wanted to show with the simplified comparison of your approach and mine a few posts above.

    Remember the formula?

    AmountPerTick = TimeDelta * DesiredAmountPerSecond

    If DesiredAmountPerSecond is a constant value you only apply TimeDelta once. If you want it to change over time, you force another TimeDelta calculation. Let's say, DesiredAmountPerSecond shall raise by a constant value per second, then the formula is:

    DesiredAmountPerSecond = DesiredAmountPerSecond + TimeDelta * DesiredRaisePerSecond

    putting this into the first formula:

    AmountPerTick = TimeDelta * (DesiredAmountPerSecond + TimeDelta * DesiredRaisePerSecond)

    This can be stacked endlessly. Maybe DesiredRaisePerSecond shall lower over time. That would be:

    DesiredRaisePerSecond = DesiredRaisePerSecond - TimeDelta * DesiredLoweringPerSecond

    putting this into the first formula:

    AmountPerTick = TimeDelta * (DesiredAmountPerSecond + TimeDelta * (DesiredRaisePerSecond - TimeDelta * DesiredLoweringPerSecond))

    There are easier ways for acceleration or deceleration or smoothing, etc., this is just to show the "straight forwardness" of using TimeDelta

  • If that number is a private variable or some such, you still need the TimeDelta! It makes no difference if that number is hard-coded or a variable, you'd still need to do it like this:

    Set X to .X + Object('Speed') * TimeDelta

    Don't confuse him. In his example, that was not the problem. TimeDelta was already taken account of and stored within the variable ("Add 1*TimeDelta to 'Move'"). If he would now multiply it with TimeDelta again, he would get wrong results...