TheInstance's Recent Forum Activity

  • What do you guys mean ? Set two objects to the same angle ? Thats easy. So i guess i am not with you. Plz explain ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dude you still in that mess ? Or did you found the problem? Honestly, wish i could point you to something.

    Sometimes see another ones mess, lol , relativates your own.

    A week ago, i had some kind of virus. Well i think it was a virus. I can not really know. Since, well...

    It ate ALL my files not in use on the C: drive and on the D:drive.

    Lucky not on my E: drive holding all the backups for my important docs.

    But i had to redo my whole system, my vista was half gone too. Plus apply that slow ass vista SP2 update.

    I did not even install 1/10th of all my precious programs back.

    But live is beautiful.

  • Plus, as far as i know, the people targeted by construct are the creative people. Those that hate to code, but love to make sprites.

    Hahaha, now that leaves me out.

    But yes, at the end, there will be more need for code snippets, then for a sprite library.

  • Now what j0h ?

    Are you saying that loops are useless ?

    No sir !!!

    Loops have there place in constructing. I would not want to miss them.

    Here is an example of good use of a loop.

    There is not a more simple way to create those instances of an object, then using a nice Loop.

  • wah

  • This ...

    is the correct way to do what we wanted to do with the loop at start of this topic.

    This time using The Big Brother loop !!!

  • mm

  • Now back to where i started.

    The loop. First allow me to illustrate The Big Brother Loop waiting on a V-Pulse.

    Download this, and fire it up.

    1 object. 3 events.

    Event nr 2 moves the object 10 to the right.

    Event nr 3 moves the object also 10 to the right.

    Event nr 4 moves the object 20 to the left.

    If you run this. The object is not moving at all. Thats because the Big Brother loop waits at the end of every tick for the video to complete a frame.

    And the video will not be updated in the middle of 1 tick.

    The 2 events moving the object to the right happen inside 1 tick. Since the video will refresh only After a complete Tick.

    We only see the result of a complete tick !!!

    Remember, and accept this. Dont be a Rebel by trowing the V-sync in the application properties to "unlimited". That is asking for big display artifacts.

    And the loop ? Well the same thing is happening here.

    The loop happens INSIDE 1 tick. WE WILL ONLY SEE THE RESULT OF A LOOP CONSTRUCTION. because, the video dont get refreshed at the rate the loop is running.

    The video gets refreshed only once every Tick. And the loop completely happens inside 1 Tick.

    So now ? How do we make objects move by loop constructions in a way that we actual see the objects move ? Well make use of The Big Brother loop. Since this Loop is already V-synced by design.

  • OK now.

    Lets say an average computer will be able to display 80 frames / second.

    Or 80FPS.

    But The Big Brother Loop is able to run like 2000 Ticks / second, also depending on the speed of your hardware.

    Thats more then 200 times faster !!

    If we give The Big Brother Loop the freedom to run uncaged, it will possible encounter 2 problems.

    1/

    On beam based monitors (not LCD's), it will happen that the events are in a different Tick on different places on the screen.

    Since it will pass the beam in speed several times, on top of the screen we will be in tick1, in the middle we will be in tick 2, on bottom we will be in tick 3.

    This will show as flicker. As horizontal moving objects to move in 2 pieces. As 1001 artifacts. As vertical moving objects to be twice on the screen.

    2/

    It will choke the GPU. Since it offers the GPU new material while the GPU is still rendering the last image. The GPU will not accept, and will do this in a kinda random way. Because some images take more time to render then others. Result: shaky movements.

    The only solution we have with todays devices is to CAGE The Big Brother Loop so it will be exactly as fast as the Frame Rate for your computer.

    We know when every device in the computer is ready to accept a new image/frame when those devices generate a Vertical Sync. A vertical sync is no more then a electric pulse identified by its form so we can read it as " The pulse that says this is the end of 1 image".

    There are other electric pulses that say "this is the end of a line". They have a different form. That between the lines.

    So, in reality ...

    The Big Brother Loop completes 1 Tick, then waits patiently till it gets a V-pulse. When the V-pulse happens, it starts over at the top of events to complete its 2dn Tick. At the end of the 2nd Tick, it will wait again for the next V-pulse.

    This process of waiting to get in step (in sync) with the displaying device we call V-Sync.

    And you can forget all i said, if you see it as Video-Sync.

    As The Big Brother Loop waiting for the Video to display a complete frame.

    THIS MEANS ALSO THAT THE SCREEN GETS REFRESHED EVERY TICK. BUT NEVER IN THE MIDDLE OF A TICK.

  • I stole that description from "the Net".

    Its well explained, not 100% correct, because its messing up a bit between the places monitor and gpu take in this story.

    But it will do.

    Yet, lets simplify some.

    First lets say V-sync stands for Video sync.

    Lets forget which one exactly limits the amount of images/second we can show.

    De monitor that needs time to build the image by image.

    And/or the Gpu who needs time to render the image that will be presented on the monitor.

    Also image by image.

    Lets also forget that due those limitations in the amount of images that we can present / second,

    we do something completely weird,

    namely: we are displaying a continue movement (a movement by behavior by example) trough a non continue device !

    Just accept that, depending on your total hardware & devices, we can only show a certain images, also called frames, /second.

  • V-Sync = Vertical Sync

    A CRT monitor draws the screen one line at a time, from top to bottom.

    When it reaches the bottom, it pauses for a moment, while the electron gun is pointed up to the top again.

    If you have v-sync enabled, then that is the only time at which a new frame may be presented to the monitor. Then the monitor gets the whole frame, and can render it in peace, knowing that the GPU won't give it a new frame until it's done.

    With it disabled, the GPU can literally overwrite the frame data while the monitor is drawing it. So you can easily end up with the top half of the screen showing a different (older) frame than the bottom half. That can lead to tearing, and v-sync avoids that.

    Of course, v-sync forces the GPU to stop and wait, so it limits your framerate. (It never gets higher than the screen's refresh rate, and if it dips below, then it has to skip a screen refresh, and wait for the next one before it can get to present the frame it's working on. Then you get a framerate of half the screen's refresh rate. And if that's not enough, then a quarter.)

    The actual feature still makes sense on LCD's, but the name is derived from how CRT monitors work.

  • Download this, and fire it up.

    It has only 1 objects.

    And 1 event, moving the object by its own X + 1

    Run it, and watch the object keep moving by 1 pixel to the right, each tick.

    But ? we moved it only 1 pixel ? in 1 event ?

    Well construct runs top down. And then starts over again at the top.

    Meaning: there is a Loop already. This is the loop that keeps construct running and running.

    There is not one moment in making a game that you can forget/ not take in account this loop.

    So to set it in the spotlights that it deserves, i have to give it a big bombastic name. To make you see the importance.

    I call it: (deep commercial voice) The Big Brother Loop !!!

    The entity representing The Big Brother Loop to execute all events just once:

    we call a "Tick"

    Now do not imagine The Big Brother loop as a wild running animal that runs as fast as it can trough the events from top to down, to start this process as fast as it can over and over again.

    The Big Brother loop is very patient. Well it has to !.

    Because it is caged by the V-sync. The second actor in this story.

TheInstance's avatar

TheInstance

Member since 5 May, 2008

None one is following TheInstance yet!

Trophy Case

  • 16-Year Club

Progress

16/44
How to earn trophies