cymrix's Forum Posts

  • Oh and don't forget to post it in the bug section

    I guess that's what I'm trying to say, I don't think it's a bug.

    Thank you for your input though, It's always nice to get a fresh thought process on an issue.

    :)

  • I had another thought. I understand now that "every x seconds" is a system event, so it has to be separate from the object/instance events (or that seems to be the idea anyways)

    Question:

    Could we get an additional event added to object (sprite) events list?

    -Every X Seconds

    The idea being is the same as the system events, but for the objects instead. As well as, having it be instanced (otherwise they wouldn't be different from the system version).

    I guess I've noticed that in every game I've made I've had at least one (but usually several) objects that I use in an "instanced" fashion, and giving them small randomness to their actions seems to bring a little life to the project. Not that it's hard to make a timer (now that I know how), but it'd be easier and more straight forward with an object based event option.

    Just thinking out loud...

  • You can work with it for now ...

    I'm sure the devs will find a solution soon enough

    I hope I'm not coming off as though I'm looking for someone to "fix" this, I'm only trying to figure out if my experience is abnormal, which it seems to be.

    I'm also hoping that if there are others with similar/same issues, they'll be able to learn from what I've been through.

  • Speaking of custom button mapping....

    I don't have a stripped down capx, sorry, but I'll try to explain what I did.

    I made a button that shows up when I hit the esc key. This button can then be clicked to start the "button mapping" process.

    An on screen prompt will tell you what to do.

    Push (A) button,

    Push (B) button,

    Push (X) button,

    and so on...

    Using the "any button pressed" gamepad event and the "last button" expression I record the button that is pressed and store it's code in a variable for each button.

    variable: buttonA

    variable: buttonB

    variable: buttonX

    and so on...

    this way you can always use the variable for the button you want and it will use the corresponding "mapped" button code.

    and to go one further with it...

    I then have it go through the actions to map buttons to.

    "Please press the button to map for Jump"

    "Please press the button to map for Run"

    "Please press the button to map for Shoot"

    and so on...

    I had to build in a check for each action mapped, so that if you hit a button that has already been mapped to an action it will clear the previous button.

    So the first part maps my buttons correctly, and the second part maps the actions to the buttons I want.

    again, to go further...

    I also set up other buttons on a menu that allow me to see what button is mapped for what action, as well as clickable buttons in the menu that let me map each action individually.

    So each clickable button just calls the one specific event related to mapping that action.

    This was all incredibly time consuming, but it's really helped me through development (cause I can change what my buttons do instantly), and I think it will be best in the long run for the end user/player, so you know that everyone will be able to play it (as long as their button presses are recognized by chrome anyways)

    in the future...

    Eventually I will flesh it out to be more polished. I'd like to include it as part of the options menu, and then also separate the mapping from the assigning of actions to buttons.

    If I can figure some way to strip down a copy of my capx without having to redo the whole thing I'll post it here for reference. I don't have all the buttons in variables, etc, but enough to get the idea.

  • I used the newest driver on both computers. My OS (win7 x64) installed built in drivers when i plugged it in the first time on both computers, but I then went through and installed the newest software package (includes drivers).

    I only seem to have problems with the button being off on the one computer, but I built a custom button mapping process into my game so it works no matter what (once I map the buttons of course).

    Support Page:

    microsoft.com/hardware/en-us/p/xbox-360-wireless-controller-for-windows/jr9-00011

    Software:

    download.microsoft.com/download/6/9/4/69446ACF-E625-4CCF-8F56-58B589934CD3/Xbox360_64Eng.exe

  • Use a instance variable instead of "every X seconds".

    Add an instance variable to enemy2 and call it "timer". Then replace your event 12 with these two events:

    enemy2 : timer > 0

    ------- Enemy2 : Subtract dt from timer

    enemy2 : timer <= 0

    ------- enemy2 : Spawn plasmaBullet

    ------- enemy2 : Set timer to enemy2.fireRate

    Thank you for this. I was having a problem using the "every x seconds" as well. It's a shame you can't combine this with (or after) a trigger that selects a single object (like "overlapping an object", or "health <= 0). Was seriously driving me crazy.

    Really though, it'd be a lot easier to use the built in timer (every x seconds) if you could have it reference each instance of an object individually, like most of the other conditions. I mean how often are you going to have multiple copies of the same object? Seems like every game has a few of those, and then to make them all not be the exact same you set some randomness. In my case I just wanted them to all jump a little different than each other, so a random timer would solve this perfectly. Too bad the built in one references all instances of the object, even if picking using a instance variable. I guess this just plays into the whole "not needing to program, template, reuse, repeat, instance based sprite system". I guess it's either been overlooked, or just isn't possible?

  • Interesting. I tried it on a different computer, just for fun. Same OS, same browser version, same gamepad, but the buttons are what they indicate, in Construct 2, on the other computer.

    I'm not sure what is happening, but I re-installed the gamepad drivers just in case. Didn't change anything for me.

    I'm sure I'm missing something, but lack of replies on this thread seem to indicate that this is not an issue for anyone else.

    A good workaround I could think of was allowing custom button mapping. Though this seems to be a pain to set up in Construct 2. And I've not found any forum posts on the subject (though the forum search results are inundated with "help test the new gamepad object" when doing any search that includes the word "gamepad".

    Anyways, ima work on the custom button mapping. I'll post my idea here after I think it through a few times.

  • For me I have not found the right analog stick's index. 2 and 3 are the trigger buttons, i started going up from there but didn't get a response so I stopped. Not sure if it's my controller (xbox360 wireless).

    As for your original question (if you are still looking for an answer), Since the center of the stick is 0,0...

    I was going to try getting the angle like this:

    angle(0,0, Gamepad.Axis(0, 2), (Gamepad.Axis(0, 3))

    also, i was going to trigger it with an "OR" block. So that it would only calculate it when the user was moving the stick beyond the dead zone. I had put in a custom dead zone for both axi. (rightAnalogDeadX) and (rightAnalogDeadY).

    Condition:

    if right analog y axis is greater than "rightAnalogDeadY"

    or

    if right analog y axis is less than "-rightAnalogDeadY" (negative)

    or

    if right analog x axis is greater than "rightAnalogDeadX"

    or

    if right analog x axis is less than "-rightAnalogDeadX" (negative)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I recently bought an xbox 360 wireless controller (the "for pc" version). According to what I've read it should have the best chance of compatibility (for wireless controllers). I tried searching the forums for anyone else having this issue.

    I'm using chrome 25.0.13 and Construct 2 release 111

    The button mapping does not seem to be accurate.

    -------------------------------------

    X in Construct 2 is actually A on my controller

    A is B

    B is X

    Left shoulder trigger is Back

    Right shoulder trigger is Start

    Back is Left analog button

    Start is Right analog button

    Left analog button is nothing

    Right analog is nothing

    --------------------------------------

    everything else seems mapped properly

    As well as, sometimes it seems Chrome does not recognize the gamepad until i hit the a/b/x/y buttons.

    Anyone having the same issue? Or can point me in the right direction for resolving?

    Thank you,

    Cym

  • additionally, it seems the full screen issue is being address in the current update, though no fix yet.

    http://www.scirra.com/construct2/releases/r105?utm_source=Email&utm_medium=LinkToRelease&utm_campaign=ReleaseSubscription-3-10-2012

  • Well, I think I've hit another snag, one that has no work around, though I'd still like to know if there is one for the touch issue.

    My new snag:

    It seems that there is no way to make your page full screen, unless you have that option specifically in your mobile browser, which is kind of an issue for default android browsers as the option is rare if at all available.

    In light of this new snag I'm going to go the route of cocoonJS and see if this is a decent solution.

  • Hello,

    I've not tried to do much with mobile yet, and most of my POC stuff has warranted more power, but recently I have tried to do a simple app (less than 20 sprites, no effects, no movement).

    I ran across an issue though, and I thought I would share to see if anyone has found a way around it. The only other post I found with anything relative was this, and it's been closed for almost a year.

    Note: This only happens with the default android browser. I've tested on Galaxy S2 Skyrocket and Galaxy Tab 10.1

    When using the default browser every touch input seems to lag behind actually doing anything by around 1 second. I have a simple app to where you press one button and a number increases. It's just a simple counter. FPS is around 40, unless I set up a drag/drop sprite (to test only), then it drops to 15 or so, but that's fine as I'm not doing any movement.

    I've installed Firefox, Chrome, and Dolphin browser, and all of them do not have this issue.

    Has anyone figured out why this happens in the default browser and if there is anything that can be done about it?

    I know that the common idea for mobile deployment is to make it a native app, but my goal here is to just use the web as a platform as I've no need for high FPS or any special effects.

    Everything seems great otherwise.

    Thanks for your 2 cents.

  • This is exactly what I was looking for, thank you!

    Note:

    for layers that have parallax that is positive, be sure to subtract the difference between the layers, not add as above.

    Parallax is less than 100:

    enemy x on layer 1 = enemy.X + ViewportLeft(1) - ViewportLeft(0)

    enemy y on layer 1 = enemy.Y + ViewportTop(1) - ViewportTop(0)

    Parallax is greater than 100:

    enemy x on layer 1 = enemy.X - ViewportLeft(1) - ViewportLeft(0)

    enemy y on layer 1 = enemy.Y - ViewportTop(1) - ViewportTop(0)

  • I've been looking for the same thing. I thought I saw it one time, so in my planning I didn't look again, but I guess it doesn't exist :(

    The polling of current screen width to a global variable that stored the last screen size is working for me accept for when the window is maximized, then it freaks out :(

    of course, it could just be that my brain has shut down for the day and I'm missing something. I'll give it another go tomorrow.

    I would like to say though, that it's kind of silly that an engine that is (currently) purely html5/javascript/web-based doesn't have an "on resize" event. Maybe not enough people care? Though I'd like to know how they manage a full screen HUD (or any HUD) if the window size is smaller than the canvas? Maybe they just keep it in the 800 x 600 range and forget about it? Maybe I'm just missing something?

  • Sorry for deleting the last post, but I thought of something else to check, and it made my post inaccurate.

    Anyways... good news is that what I came across here, makes what I was trying to accomplish a lot easier.

    You can calculate angle of movement and then apply force to adjust for the object it is colliding with. Like if a cue ball hit a bumper you could apply additional force with the angle of movement.

    Here is a pic of my event:

    <img src="https://imo.im/fd/B/k6cPrZ5UIm/Construct%202%20beta%20release%20r99%20%28Administrator%29%20-%20Event%20sheet%201_2012-08-10_11-14-08.png" border="0">

    Here is how I calculated the angle:

    angle(0,0,Sprite6.Physics.VelocityX,Sprite6.Physics.VelocityY)

    I apply force in the direction my object is moving on collision and it gives my object an extra boost.

    At least, I think this is what you are looking for.

    Hope it helps.