AmpedRobot's Recent Forum Activity

  • Alright, guess I was having a brain fart.

    (This explains all the bad vibes I was getting <img src="smileys/smiley17.gif" border="0" align="middle" />)

    This is what happens when you post late and are exhausted.

    But thanks. This makes it clear.

    (I'm not a youngin btw, so things that seem obvious to people may not be so much for me.)

    I was going through some other examples where people were doing things in a fancy way with function calls and what not and I thought this was referring to some built-in functionality I could not find anything about.

    I still don't understand the purpose of the "scroller" sprite in the Space Blaster example and when you go to far up, the ship appears to jump down, but no biggie. I already set up custom boundaries.

    I'm still having trouble with custom touch controls. It works the way I set it up, but sporadically for one of the boundaries.

    I'll post an example in a bit for critique.

  • "Scroller" as in Scroller.Y would be another example from the Space Blaster demo.

    Absolutely nothing comes up in the manual on keyword search.

  • While I got the hang of some SC2 basics, I don't seem to be able to find some variable definitions by searching for them in the manual.

    For example:

    1) I was trying to understand the coding behind the Panning With Touch Controls example, which is pretty straightforward, but I could not find anything on the Touch.X("UI"). What is UI? Doesn't come up in the manual. I understand Touch.X, of course.

    Second example:

    2) This tutorial...

    Smoke Trail Tutorial

    refers to a lot of built in coding in SC2 itself (instance variables, indices...)

    In trying to understand the code, I could not find anything on "parent" and I searched all instances of it in the manual. I sort of understand it, but it makes me wonder how many other things I don't know.

    I would like to understand the code and what it's doing rather than just blindly copying people's examples every time I need something.

    I did some programming in BASIC back in Commodore 64 days, but as a top level language I figure SC2 should not be that hard.

    Where do I go to find out what's under the hood and how it works?

    Does a tutorial have to exist to describe it?

    Basically, rather than learning about everything piece by piece from other people's code, I'd like the whole breadth of it.

  • Ok, thanks.

    I did realize a bit after it was a highly loaded question which depends on the type of events.

    But yes. It's great to know SC2 is fast.

  • Anyone know how many events Construct 2 can handle efficiently at what resolution?

    I just don't want to get ahead of myself when programming.

    Mostly interested in Google Chrome with web GL.

  • Never mind figured it out today (no angles needed).

    Just gotta work on the scroll.

  • I think I've seen people solve this w/ INT, which rounds to a whole integer number as opposed to float or in your case whole pixel number.

  • Sure.

    1) Basically I'm trying to modify the existing template to do infinite scroll left and right; hence, I could not use the Bound to Layout or Bound by Edge behaviors for the Player sprite (I think).

    I was able to make custom keyboard controls based on my defined window boundaries. I'll modify the left and right boundaries shortly to about 15% from each edge, as I would want the player to see where they are scrolling to (right now it just mimicks Bound by Edge).

    2) I haven't yet gotten around to testing the scrolling left and right. Hopefully I can figure it out from the Space Blaster demo or some other code, but if someone has a tested solution that works, that'd be great.

    3) The problem I ran into was with the touch controls. I was setting a boundary if/then condition to begin with, but that just stops the touch controls from working at the boundary, so I think the solution is permitted angles.

    I would want infinite scroll left/right at the same speed for touch controls also (right now mimicked by left mouse click), so I think the permitted angle limitations would have to be set when player is right at my top boundary and bottom boundaries.

    I did a code testing window, as you can see, to test how angles work in SC2, but I have no idea how to set it up, so I could use the code. I'm not finding the manual all that helpful as many functions I see in code examples are not defined? (not a criticism, just makes it harder).

    I believe this is how angles work in SC2:

    1) Top left quadrant is -90 to -180 (-180 same as 180?)

    2) Top right quadrant is 0 to -90

    3) Lower right quadrant 0 to 90

    4) Lower left quadrant 90 to 180 (180 same as -180?)

    So basically I think I would need this setup:

    1) When Player sprite is at the top boundary, permitted movement angles for touch controls are only lower left and right angle quadrants (0 to 180)

    2) When Player sprite is at the bottom boundary, permitted movement angles for touch controls are only top left and right angle quadrants (0 to -180)

    If there's an easier way, that'd be great, but I think in theory this should work.

    The problem with setting up custom boundary limitations on touch controls I ran into initially was that the system conditions checking for Player.X for example in between two values (left and right boundaries) just did not work at all with the touch formula (no idea why as the logic seems sounds, but maybe they're not programmed to work with that code).

    One other weird thing I ran into. A global variable named AllowTouchControls as a flag made the code unstable, so I deleted thinking it was already some system variable. If true, it would be helpful to know others, so we don't inadvertently make unstable code.

    Here is the link to the capx:

    CapX

  • Yup, I just found it.

    Thank you.

  • Having trouble finding code.

    Need to be able to enable and disable groups of events (not by clicking while editing), but as code.

  • Revised link that actually works:

    Link

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi.

    I can't for the life of me figure out why this doesn't work.

    http://www.darksunpictures/public/Touch_Movement.jpg

    I'm trying to limit player movement, so it stays within my custom boundaries, so I don't have to use the default "Bound to Layout" behavior.

    I was able to do this with custom keyboard controls, but having a bit of trouble with the touch controls.

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