AmpedRobot's Recent Forum Activity

  • This is great, but it bugged for me after 2 chickens. Great idea!

    Alright, I take it back. It wasn't a bug. A little primer on reloading in the beginning would be helpful.

    This is by far the best game I played on here. I got to the tank where the game did bug for real. Obama just wouldn't turn in the right direction and would get stuck either pointing up or down.

    Still really really amazing game.

  • Patronizing the player not a good idea.

  • Fun game, but this is a Schizophrenic cat!

  • Nice, Kenny. Some alien plants maybe? There is a 3D plant alien making software out there, which could be used to make cool 2D versions.

  • Hey, guys. I tried a few of these. I found the little archer game pretty addictive and the pirate kid one. With the little archer not sure what you're supposed to do later to avoid or kill the enemies as on the second horse they all show up on top (outside screen and always kill you.)

  • Ok that was weird. It wasn't really an LOL type situation.

    From playing around, I guess my question is: has anyone figured out the relationship between the slope of a perspective line and a scale algorithm?

  • Well, I wanted something cooler.

    My current idea is to draw out lines from the perspective center point with an array [auto spawn] (about a quarter of the way down the screen), then sort of a radial from that point to all the points on the bottom of the screen.

    That takes care of perfect perspective lines.

    Then I guess I would have to make sure there's no overlap depending on the drawn line, which is some accuracy loss, maybe not, I'll have to see.

    Then depending on where the object is spawned, like a rock, there would be collision detection with that perspective line (not sure how to make it stick so it would travel along the line, I'm sure someone here has done something similar. I just hope they're reading and will chime in hopefully).

    Then I could also play with scale (depending on how close to the bottom edge of the screen) depending on position or collision with a scale object, but again by trial and error.

    I was hoping there was a perfect math solution for this (easy code).

  • Hello, all.

    Have a quick question.

    Has anyone found an easy coding solution for something like a semi FPS shooter motorcycle type game objects scrolling past?

    Let me explain this better.

    I have a great top down solution from this site for towers, which is basically done ingeniously with layer scaling of the same sprite (slightly larger scale on stacked layers) and just scroll to behavior on the player sprite produces amazing effects on the towers, totally believable fake 3D perspective.

    For this, imagine something like a motorcycle driving on a road in less than first person, so the road basically takes up 3/4 of the screen with a sky above. Has anyone come up with a coding solution for say trees, rocks, or other sprites going by which is efficient, easy to code, and highly believable?

    I imagine this would involve some sort of scaling of the objects going by like rocks or maybe layer scaling as well.

    Also, the road would take up the whole screen horizontally, so I guess the perspective lines would be different.

    One way to do it manually would be to draw out all the perspective lines maybe as a reference, from a central point maybe a quarter of the screen down and then use LERP to estimate in between positions? But this sounds awfully coding intensive, so thinking someone who knows this process better mathematically may have already done it in a jiffy.

  • Err, I figured this out.

    I was dozing off when it came to me.

    The loopindex is 0 based (it has to be since regular access of 1d array works), so:

    loopindex 0 1 2 3

    x index 0 1 2 3

    loopindex 0

    1st iteration

    x index1 0

    x index2 1

    loopindex 1

    2nd iteration

    x index1 1

    x index2 2

    loopindex + 2

    So the code makes perfect sense.

    Guess, I'm just a newbe .

    And again, I'm talking about accessing 2 consecutive numbers at a time from an array in a loop (matched pairs in this instance).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess another helpful question would be, how does Construct 2 compute the loopindex, say for the x index, in a Repeat X times loop and does this differ across array types and when accessing more than 1 number at a time?

    In a 1D array, this seems fairly straithforward, at least for accessing 1 number at a time.

    But what happens when you want to access say 2 consecutive numbers from a 1D or 2D array in the same repeat loop?

    I haven't tested this yet in a 1D array and I couldn't find much on the internal workings of the loopindex.

    1 post apparently states you can get the current loopindex via the loopname and something else, but how to do it was beyond me.

    And apparently this is internal in at least some other programming languages, so you'd have to program your own counter to figure out what the loopindex reads with each iteration of the loop (to use it properly or at least figure out how the Construct 2 code works).

  • I realize that buddy.

    Mine is a conceptual point (the code works, I just don't understand why it has to be different).

    Basically I'm accessing 2 different numbers from a 2d array (yes, by using the appropriate x, y1 or y2 indices) and rather than having to use:

    loopindex (1st number)

    loopindex +1 (2nd number)

    I have to use:

    So something like X=0, and then

    Repeat X Times

    loopindex + X for first spawn

    loopindex + X + 1 for 2nd spawn

    Set X + 1

    (for looping through the x indices)

    ...which did not seem intuitive to me at all based on my 1D experience (with which you helped enormously).

    Admittedly, I never tried accessing 2 numbers at a time from a 1D array, so I only know loopindex works (I don't know if loopindex+1 would work) in the same Repeat loop.

    I'll try to post a capx eventually.

    I have a weird bug with a 0 value/0 spawn in there too I can't track down and I was always able to figure these out before.

  • That does not make sense.

    I'm not setting anything, just accessing data.

    My point is access through the x indices seems to be completely different for a 2d array vs. 1d array.

    I don't know if it's a programming bug or if I'm missing something else.

AmpedRobot's avatar

AmpedRobot

Member since 4 Jul, 2013

Twitter
AmpedRobot has 1 followers

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies