Rhindon's Forum Posts

  • it is my understanding that all SOUNDS in the SOUNDS folder should be automatically preloaded so that playback is instantaneous. However, every time I go to play a sound effect there is a brief lockup/delay in the whole project when the audio file is first begun. I even added an event that tells all other actions to wait until audio preloading is complete. The ONLY sound effect in the whole project now is no more than 10-11 seconds long.

    What could be causing the audio (and the whole project) to delay/lockup upon initial playback?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • teacherpeter - Yeah, originally I thought it might be a For Each loop I had going... SOMETHING that was demanding a LOT of checks per tick.

  • .CAPX: https://www.dropbox.com/s/x0raalfkw3rku3z/Pacman%20Rush%200-2-1.capx?dl=0

    C2 RELEASE: r221 (stable)

    ISSUE: Prior to adding any events or objects for the Ghosts in my Pacman remix game, everything seemed to be operating okay in terms of overall game speed. But upon adding the Ghosts (there is supposed to be 16 total, 4 of each color), the CPU usage amps up to between 90-100%+.

    I toggled all event lines for the Ghosts as disabled, removed the Ghosts from the layout entirely...nothing helped. So I saved the .capx and restarted C2. At first, it seemed to work. But when I re-added all 16 Ghosts and re-enabled the event lines (incomplete as they are), the same problem resumes. After several seconds, the game seriously bogs down. It's playable, but the framerate hits near-bottom and is basically slugging.

    None of my past projects have really gotten so far to the point where I've encountered this problem seriously, and even those past projects had DOZENS of objects with particle effects, no less. So I'm at a loss as to what's causing this slowdown. Your insight would be greatly appreciated. Thank you.

    UPDATE: I think I have solved the problem.

    In the in group (line 111) "Ghosts At Junction", I added a condition that checks for the lerp value of the shifting walls and then told it only to update the junction values just once while true. I re-ran the game and it is still going fine after a couple minutes.

  • blackhornet - As always, the obvious eludes me. LOL Thank you, sir. I should be able to do that easily.

  • I'm working on a remix of Pacman.

    So far, I've got the control system for Pacman working fine.

    I'm using JunctionCheck objects to determine which direction Pacman can go next. Each instance of JunctionCheck has a variable for each direction which states if that direction (north, south, east, west) is true/available or false/not available. (I probably could have set it up in an array, too....ah, but that that's 20/20.

    But now I need to set up a system for the Ghosts which will be very much like the controls for Pacman, but which will be operated automatically instead of by the player/manually using the same JunctionCheck objects.

    My dilemma is that there will be a mixture of 1-4 directions to choose from and, obviously, each combination will be different. It will be easy enough to manually enter which directions are available for the A.I. ghosts to choose from (that's already set), but the number of directions to choose from will be tedious to enter in without creating too any event lines.

    What I'm after is something like this:

    Ghost On Overlap w/ JunctionCheck | Set GhostDirection to choose(Direction 1, Direction 2, ...)[/code:eyy2o9ri]
    BUT, the code will only list those directions which are true/available. If a path doesn't have and optional east path, then that won't be part of the list of options to choose from.
    
    Any suggestions on how I can do this concisely? Thanks for your help!
  • This post freakin' SAVED. MY. LIFE.

    THANK YOU!!!! I lost just a small amount of work versus the ENTIRE PROJECT!

  • LittleStain - I actually started doing that on line 199. And even for line 200 at one point. That didn't fix the issue. I've read the manual regarding how events work but it doesn't always seem to work 100% for absolutely every case. Meaning, there seems to be exceptions when the event line assumes "all instances that meet these conditions".

  • LittleStain - Thank you. I do believe I caught that shortly after my last comment. I did, actually, get it working by adding a For Each to event line 194. Go figure... I hate that I can't always tell when a For Each is needed. It has been my understanding that a condition like 194 automatically checks FOR EACH instance that meets the criteria and then equally does FOR EACH instance of any other related object that relates to those initially-selected instances as it goes down the sub-events. Ah well. I've got it worked out.

  • gumshoe2029 - Well, I don't have any toggling of variables going on. What I've got pictured above is all that's involved with this particular case. There are no other event lines in action. But, based on what you said, are there any other conditions that you see that might line up with what you are thinking?

  • First, thank you to everyone who has reached out to help me in the past.

    And if you're one of those people, you know my requests for help are probably on the complicated side (at least when I try to explain my issues clearly). So, please bear with me... THIS time, I've included pictures!

    SCENARIO:

    FINN: Mobility Run is a stealth game for the mobile platform. During each stage, FINN must activate switches to open doors, etc. The Switch objects, using their own UID, are associated with multiple instances of Conduits (two types - straight and angle put into a Family) and with a Door or other object if the Conduits do not come to a dead-end.

    On the main screen during gameplay, there is a touchscreen button - Interact - which will turn fully opaque when FINN is on or near something he can interact with or activate.

    Pressing Interact while overlapping a Switch instance will set off a chain-reaction of Conduit instances, each with a manually-entered sequence number, thus creating the appearance of segment after segment "charging up" as it proceeds to the end of its line.

    Once the counter for the Switch reaches the maximum number of Conduits in its associated chain (zero-based), it either stops right there or it activates whatever object is connected to it (ie: Door).

    This is where I have problems...

    If I activate a Switch, it will work just fine, with or without an ending piece like a Door. But as soon as I activate a second Switch, it doesn't appear to do anything. It might initiation the first Conduit instance in its chain, but no more. I cannot determine where the problem is coming from.

    In Bug Test preview, all Switches register that they can be activated when the conditions are met but I do not see where the other two are being prevented from being activated.

    Thank you again for your help!

  • You two are miracle-workers. That's exactly what I'm aiming for.

    I'll just adapt what you worked out to reference the Family object I have and swap out the instance variable for the local variable instead. I think what was throwing me, in particular, was the use of the Pick All system condition. That didn't make sense to me since I didn't want to go backwards (as it seemed) and select every instance yet again. But now that I see it on the Event Sheet, I believe I see the logic behind it now.

    Thank you both so much. You've always been patient and kind and supportive. GOD BLESS AND MERRY CHRISTMAS!

  • Okay, maybe I'm not understanding how you described your suggestion above, but I'm not getting things to work.

    At best, I'm able to get groups of instances (when they're related by group #) to shift as I intend. BUT, when FINN is overlapping two groups that are side-by-side (such as what I attempted to describe in my OP), so long as FINN is overlapping the first group, the second group remains unaffected until FINN is no longer overlapping the first.

    And that's to say nothing of getting the groups to go back to opaque when FINN is no longer overlapping any instance of a group.

  • R0J0hound - I thought I tried something like that earlier day, buuuut, maybe not THAT.

    I'll test out your example and see if that flies. Thank you, good sir... I'll get back to you if it still fails.

  • I'm working on a stealth game, and what's a stealth game without secret passages that have to be discovered?

    As such, there will be Sprites that will fade to 50% opacity when the main character - FINN - overlaps them.

    I have two types of Sprites that I have put into a Family, called Passages. Since the level design will be set in a robotic facility of some sort, I plan to have at least two types of hidden passages (for example, a hidden passage that leads also to a vent shaft - a hidden passage in a hidden passage).

    Visualize a room with four passages; two on the left, two on the right, and where the first passage seems to end, there's a passage that continues on farther. Each passway is covered by multiple instances of a particular Sprite (this is so I can manage corners more effectively). When one instance of a Sprite goes transparent, all other instances IN THAT GROUP also go transparent, even if FINN is not overlapping them. It's AS IF those group instances are "one".

    So we have passage one (L1), the passage it connects to deeper in (L2), and the two on the right (R1 and R2).

    L1 uses Sprite 1 and has a Family instance variable labeled Group with a value of 1.

    L2 uses Sprite 2 with Group variable value of 2.

    R1 uses Sprite 2, value 3.

    R2 uses Sprite 2, value 4.

    Now, individually, I can get any group, regardless of which Sprite is used, to render transparent when FINN overlaps that group. My problem is when FINN overlaps two different groups simultaneously. Such as in my illustration here where one passageway connects to another passageway directly.

    I'm using an instance variable in FINN in the following way:

    FINN overlaps [instance of Sprite] ==>> Set FINN.Group# to Sprite.Group#

    PICK all Sprites where Sprite.Group# = FINN.Group# ==>> ......and so on.

    I recognize that this set up only allows FINN to recognize ONE passageway to be identified.

    And that's where I'm having my trouble. I need to have all applicable groups activated.

    Can someone suggest a solution, please? What am I not seeing? THANKS!

  • I will check on that, too. I've gotten help from a friend who set up a system that I was trying to employ, too, using instance variables and picking by UID. My friend used JUST picking by UID while I was using it WITH what I have presently. But I'll try isolating as you suggested. Thanks for your help and I'll get back to you if I have any further issues.