Rhindon's Forum Posts

  • RicoD - Thank you for the input. :)

    My question was really about if they could picture what I was trying to describe. I pretty much got everything set up just fine, including transparency with another program like the ones you suggested.

    I wanted to know if anyone could visualize what I described and if that seemed like an interesting graphical presentation.

  • Certainly an odd subject line, I'm sure. I'll try to clarify.

    As I'm learning to better use C2, I wanted to get creative and have the gameplay BEHIND what might otherwise be considered a bg image, the hope being it would display an interesting visual as you watch the action take place behind it...obviously, it would have to be see-through in some respect.

    Since I'm not much of an artist, I drew a grid on MS Paint, then filled in the blank spaces to make a "pixelated" stickman (making editing animation frames much easier for me). I called him Mr Stick (he has an arch nemesis called Dr Box...be afraid). Each "large pixel" is roughly 9x9 pixels in Paint...I think. I forget the exact dimension. Anyway. The individual spaces in the grid are large enough to see through, while the grid lines are only one or two pixels thick, so they can be rather easy to see, too.

    So imagine standing on one side of a fence and watching the action on the other side, with minor portions of the characters hiding behind the fence links, while at the same time other portions are equally coming into view. All of this, of course, in the form of several tiny squares but a couple of pixels separated.

    I've set the "background" grid as Layer 1 and the paralax to "0,0" with "Yes" transparency, and the gameplay action as Layer 0 ("100,100" paralax and no transparency).

    Can anyone picture this? What are your thoughts? Does this sound like an interesting graphical presentation? (I'm not inquiring about if I did it right - the technical/programming elements are working fine.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley - Ooookay... So, I tried to add an Event or Action to set the text object to display the LastButton value. I'm not sure what all I'm doing right or wrong at this point, but I am not seeing how I can bring up the GamePad object's button value. What instructions can I input to the Event sheet, por favor?

  • Ashley - THANK YOU! Once again, you're awesome.

    I'll test the mapping with text you instructed to me and I'll get back to you if I still need help.

    I THINK I get the zero-based index... So, say I have two USB controllers plugged in, and index numbers 1-10, for example, correlate to controller 1, numbers 2-20 would be controller 2...yes?

  • I have an SNES USB gamepad - I bought it for the Mega Man X Street Fighter game (FREE - check it out...just Google it). Sometime later I discovered C2...so I'm not just yet willing to spend more money for an XBox 360 gamepad (which I hear is ideal for using with C2). I also favor Google Chrome for my browser, but I'm not clear yet based on the forum posts as to whether or not that's the best option. Anyway..! Onto my main problem.

    I've checked the manual and searched through the tutorials and forums, but I cannot find a clear answer.

    In the Events sheet, I'm trying to set up basic control movement - left, right, jump, etc. I've created a gamepad object named SNES_USB (snazzy name, eh?). It brings up the parameters window and prompts me to enter two values: the "zero-based index of the gamepad to test", and the button.

    I leave the gamepad zero-index value at zero and the button as Button A - I don't change anything. Then I add the action to simulate a platform jump. All the other preliminaries for a basic platform game are set - I tested it with the keyboard object and it worked fine.

    My main confusion is how to recognize what buttons on the USB gamepad have what zero-index values so C2 will do the correct action per button. Frankly, this is one aspect I'm just totally lost on.

    UPDATE: I missed this in the manual - I was using the downloaded version during my initial search. I did find something about raw values for non-Xbox 360 controllers. Can someone help me with that as well? How do I obtain raw values?

    PS - please be patient with me if I ask a TON more questions to any gracious replies. I just want to make sure that I'm SURE I'm understanding this. THANKS!

  • I have no wifi access where I live...I rent an RV and the paneling literally blocks the rare signal I receive from my landlord's house despite being within 50 ft from the wireless router.

    So unless I'm at a wifi cafe, I have either nothing OR the not-so-mobile-friendly Web site on my smartphone.

    Any plans to remedy that?

  • This was quite helpful. I was JUST about to post a question about this very topic. Thanks all!

  • *CHUCKLES* This is one topic that I wish there was a comparison/side-by-side chart showing how ticks/FPS and dt and screen refresh works and differ.

    whiteheat - In theory, I definitely understand now, especially when it comes to making sure objects do what they ought to WHEN they should. In practice, I'm not there yet. Just the other night I got my test/learning program (not an actual game I'm building) implemented with dt so that it runs as before, but without tick dependency. I think the the obvious next step is learning to THINK in dt and not confuse it with ticks/FPS.

    Ashley - "dt is literally only the time in seconds since the last tick"...THAT clears that bit up nicely. Thank you.

    Whenever the "n*dt" gets brought up, one thing I keep forgetting is that dt is typically (always? ...I believe always) a fraction, which is why it usually adds up to 1 every second. (My apologies, it just helps if I can try to explain the same thing told to me in my own words to check that I understood accurately.)

    So, with the Every Tick --> Set sprite X to Self.X+1, if the tick/FPS is 30, the sprite will only move 30 pixels. Or 60 if the tick/FPS is 60. Thus the dependency. But, as I believe you just stated, dt correlates with the screen refresh - that is, an update to the present images on the screen as they should be at any given time.

    Heh, I know I may be complicating this more than need be, but this is the odd way my brain filters information. Thank you, as well, for bearing with me.

    How'd I do...again? LOL

  • Kyatric - I think I'm clear on #1 and #3. Back to #2...

    Maybe my confusion on the "60*dt" is that I'm thinking this is a GENERAL thing when it's really just a reference to an element for movement in pixels (well, per the example) regardless of FPS. (This is an example of me having trouble even clarifying what exactly my confusion IS.)

    So I'm thinking... If "60*dt" moves a sprite 60 pixels per second, if we changed it to "30*dt", then...30 pixels?

    Okay...let's see if I can't work this out and answer my own question.

    Just to make things simple ("simple"...coming from me? Yeah right)...let's say we've got an absurdly slow computer running at 5 ticks/FPS. (Can you say "GIANT paperweight"?)

    C2 runs through all the Events...we have one tick...and so on...

    RUN TIME: dt 0

    Tick 1: dt .21 (Total dt .21)

    Tick 2: dt .19 (Total dt .40)

    Tick 3: dt .20 (Total dt .60)

    Tick 4: dt .22 (Total dt .82)

    Tick 5: dt .18 (Total dt 1)

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

    TOTAL dt: 1 second

    Now, every tick, we multiply that by 60.

    Tick 1: 60 * .21 = 12.6

    Tick 2: 60 * .19 = 11.4

    Tick 3: 60 * .20 = 12.0

    Tick 4: 60 * .22 = 13.2

    Tick 5: 60 * .18 = 10.8

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

    TOTAL: 60 (kind of a "duh")

    So! *a light suddenly starts to grow brighter this very moment* Every TICK - whenever C2 makes it's pass over the Events...THEN!...it checks to see how much time in a SINGLE SECOND has passed, and passes THAT VALUE to the action to tell it to move the sprite that many pixels. Soooo, basically, we're passing a value that is a FRACTION of the total of 60 pixels we want it to MOVE after one second. So even if the FPS were slower (say, the near-frozen 2 FPS), while the individual dt would be a larger amount, in of itself, after ONE SECOND, the SAME number of pixels total would still be passed - that is, 60. For at 2 FPS, each individual dt would be roughly .50, HOWEVER, 60 * .50 dt * 2 FPS STILL adds up to 60 (yay for math!).

    I think the #1 point I need to REMEMBER is that dt is "the amount of time passed BETWEEN ticks/FPS DURING a SINGLE SECOND".

    Thank you for bearing with me here. Initially, I just didn't get why the whole "60*dt" was so important. It was JUST a way around slower framerates to still present a 60 FPS flow...

    That's pretty much it, yeah? LOL

  • These questions stem from the scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1 that I read. I understood the information in general, but I had a few questions regarding the nature of dt that didn't quite seem to be answered.

    1) A tick is what, exactly, compared to FPS? I get the impression they're the same thing, but I wasn't sure...

    2) Why the "60*dt"? I'm assuming that's to accommodate for 60 FPS even if it's closer to 30 ticks on slower computers? How would you translate "60*dt" in layman terms?

    3) With timescaling, you're basically manipulating the realtime value of dt, correct? So a slow-mo would be telling C2 that the dt is 1 when the real value is 2...something like that.

    I do understand that dt is the amount of time in seconds passed since the last tick (usually, if not ALWAYS, a fraction of a second).

    I also understand that dt is better than counting ticks as ticks can greatly fluctuate on slower computers, whereas dt can still keep track of the amount of time passed without hardly any interruption.

  • Richard Stennett - Will code actions that are told to run On Loading Finished ever run again? Or is that the only time they will be processed for the duration of program?

    For instances, at the start I want a random number to be generated and stored to a variable, but I don't want that action to occur repeatedly every tick - just at the start-up. Is that how On Loading Finished works?

  • Ashley - Ah, I see. That'll have to wait until later. Documentation is one thing I know I don't know a thing about... But thank you, at least that filters out some of the confusion for when I'm ready to implement controller schemes.

  • Ashley - Is there a quick-list of what USB controllers C2 supports and on which browsers?

  • blackhornet

    THANK YOU! That pretty much solved the present dilema... I'm just glad I already had figured out how to insert sub-events (that indented black line with the arrow showing where the event is being sidled into). I think I had something similar in mind at ONE point while trouble-shooting, but yeah, I believe this is the solution I'm ultimately looking for (until nested-boolean comes around).

    I appreciate your feedback. :)

  • I'm trying to set up certain animations to take place when individual and multiple buttons are pressed. When a single button is pressed, one animation will occur. But when that same button plus another is pressed together, a different animation will happen. What I want to do is test for different instances of conditions for the same possible event. It would go something like this:

    ==============

    | CONDITION 1

    | [AND]

    | CONDITION 2

    |

    | [OR]

    |

    | CONDITION 1

    | [AND]

    | CONDITION 3

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

    | --> EVENT 1

    ==============

    I'm basically wondering if it's possible - in some way - to set up a combination of Boolean conditions to result in the same event.

    I've try setting up groups - something I apparently need to learn more about and how they function - but that hasn't yet solved my current problem.

    My THINKING would result in something like this:

    ==================

    | CONDITION 1

    | GROUP

    | - CONDITION 1.1

    | - CONDITION 1.2

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

    | --> EVENT 1

    ==================

    Does that make sense?