R0J0hound's Recent Forum Activity

  • Ah, I was hoping there was more to it. Last I looked I couldn't find any issues with the code at that line and I haven't been able to reproduce it.

  • heliogame

    "angle()" is an expression so I mean using the expression

    angle(0,0,self.vx,self.vy) [/code:3yxzni2q] when setting the angle.  Also I didn't mean using the bullet behavior.  "bullet" was just the object name I used.
  • I don't think regex is suited for that. A better way would be to add each number to a dictionary to eliminate duplicates. for example:

    global string list1= "112, 113, 112, 114, 113, 112,"

    global string list2=""

    repeat tokencount(list, ",") times

    --- Dictionary: add key tokenat(list, loopindex, ",") with value 0

    dictionary: for each key

    --- add Dictionary.CurrentKey&"," to list2

  • If I enjoyed doing it (which I did), then it was time well spent.

  • You can find a equation by googling the distance between a line and a point.

    If a and b are the two points of the diagonal and p is the other point then the distance from p to the line would be:

    Abs(((P.x-a.x)*(b.y-a.y)-(p.y-a.y)*(b.x-a.x))/distance(a.x,a.y,b.x,b.y))

    Edit:

    Oops you wanted y distance, that would be this:

    Abs(Lerp(a.y, b.y, (P.x-a.x)/(b.x-a.x))-p.y)

  • jobel

    With 8 instead of 4, then with one ray it would do twice as many intersection tests.

    In general if there is no culling, the number of intersection test will equal=

    (number of rays) * (number of image points)

    So if you increase either then the amount of time will increase proportionally.

  • Yes you can, it becomes much simpler to do physics when it's just in a line like that.

    The motion is simple: increase the speed with gravity and move down with the speed.

    Collision detection is done by looping over the blocks from the bottom up. If the current block overlaps the block below push it up and set it's speed to the speed of the block below ...and repeat.

    https://dl.dropboxusercontent.com/u/542 ... olumn.capx

    ps. the speed change isn't physically correct when the objects collide. The actual speed of both blocks after a collision should be the average of the speeds, but it would add some complexity to the events.

  • looking at it again you'll probably want width>400 since by subtracting from the width it should be shrinking.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Repeat 1 means the animation is played once. I tested using 0 instead and it's the same, so it would seem 1 is the minimum number of times an animation will play thru.

  • For that simple case, yes.

  • Use max() and it will stop exactly at 400.

    +-------------------+
    | sprite: width<400 | sprite: set width to max(400, self.width-10*60*dt)
    +-------------------+[/code:2ox87p20]
    
    If the value is increasing instead you can use min().
  • Google is in the business of collecting data. Data from everywhere it can get it's hands on, and as much as possible. In a similar fashion to this latest privacy violation, a few years back google got it's hand slapped for using it's street view cars to also collect data off of unsecured wireless networks. I don't know what their intentions were, but there's no reason for them to have it. They probably don't even know what to do with it yet. They'll figure that out later.

    That is just them taking information from us without our permission. Google already gets lots of data from us whenever we use it's products. They get data and we get services in return. After they get the data they analyze it.

    For some known examples:

    If you use google search they know your search habits and interests. Why? Well, to show you ads that appeal to you is one reason.

    If you have an android phone and you use google maps they know where you are and where you go. One use of that is so google maps can have an idea of the traffic speed and find a faster route around slow areas.

    Why they would want to listen in on you at you pc? Don't know, but they also has all sorts of data from you that we trust them not to inspect. Gmail is one example. Laws keep them from using some data, and even forbids even collecting it, but that doesn't mean they don't have it somewhere.

    Too bad this whole data collection is becoming more and more common. Governments do it, but lack the efficiency that a private company can have. Even Facebook, Apple and Microsoft are data collectors. We aren't as anonymous as we once were.