pandabear7413's Recent Forum Activity

  • 2) Sorting tabs in multiple rows needs some work.

    If you think any of those things will improve C3, you can file a couple of issues in our bug tracker and they will be looked at.

    I like this as a solution -- if sorting tabs works properly then it's not a big deal if you accidentally close one, you'll just need to open it back up and drag it to the right spot.

    FYI I submitted this as an issue, #5499.

  • What's a good way to manage what players and enemies can do based on their state?

    Context - In my platformer, the 'player' character does many standard platformer actions - shoots, runs, jumps, crouches, aims, reloads, kicks, etc. I've been using a "state" instance variable to determine what the player can do (and what can be done to the player) based on their current state. E.g., when state = "good", the player can move, jump, and aim. If state=aiming, the player can fire. If state=good, or aiming, or reloading, or throwing, or kicking, the player can be hit by an enemy. I set the state variable when something happens - ie., the player fires, or an enemy is hit.

    At first this was manageable, but as I add capability to the player/enemies (and features to the game) my logic is starting to get unruly. My conditions are getting complicated, with lots of or's and inverted conditions, and whenever I want to make a change or add a new state in the code, something almost always breaks. It's brittle spaghetti code.

    This article https://gameprogrammingpatterns.com/state.html does a great job explaining the problem, and offers a fairly sophisticated set of solutions. Unfortunately a) it's beyond my ability, and b) I don’t see how this can be implemented with C3.

    Can anyone recommend an approach that works well with C3?

  • Thanks! Glad to see see it's not a bug. Definitely need to wrap my brain around this, but it may explain why some of my other code is acting funny.

  • I'm seeing some weird behavior with 276.2. The following code works as expected, and in the debugger I can see Player's animation being set to "collapse" in either scenario.

    However, if I combine the conditions into an OR block, like this...

    ...this is what happens:

    - the "set animation to collapse" action executes when either of the conditions is met (expected)

    - Player's animation changes to "collapse" ONLY when the hitCount>= player.hitMax condition is true. In other words, if lifeBar (a Progress Bar) has progress <= 0, the "set animation to collapse" action is still called per the debugger, but the player animation doesn't change.

    I've had the OR block (2nd pic) in my code for many months now, and only recently started seeing an issue with it. I split it into the code shown in the 1st pic and now it works. Is there something about OR blocks or Progress Bar objects that I'm not considering?

  • Thanks - I feel silly for not thinking to do that.

    I created/exported a sample project to test it out. For anyone that's interested, the answer is 'yes'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm OCD with the tab order as well. I have 3 rows of tabs in my project and I get pretty stressed if I accidentally close something on the first row. I'd love to have a way to lock the tabs and keep them from accidentally closing. I'd even be happy with tabs that can be properly dragged and dropped across multiple tab rows.

    But I'm in the camp of keeping the tabs, using the project bar every time to select the item to view would be too cumbersome in my opinion.

  • Very excited about these new features!

    I have a request... For operations that have the option "apply to all animations" (e.g., setting image point coordinates), would it be possible to add an option "apply to all animations in folder"? Basically applies the changes only to the animations in the folder/sub folders, but the other animations are untouched.

  • Say I import image A.png into the animation editor as a frame, and then use the 'crop' feature on that frame. If I was to import that same A.png file into another frame/animation, and again used the 'crop' feature on that frame, is C3 deduplication (on export) smart enough to know that these 2 frames are the same image?

    I would think the answer is 'yes' since the crop feature should generate the same pixel data each time... right?

  • Whenever I first preview my layout, or when I change images in certain sprites, "preparing images" shows up and takes a good amount of time (~2 minutes). I have a lot of high-res images that I'm trying to optimize, so I'm sure that will help, but can someone help me understand what "preparing images" is actually doing? Knowing that may help with my optimization.

  • Great idea, I never knew about that! I'll add that action to my printToErrorText function and play around with it.

  • Sometimes the layout editor in C3 stops rendering the layout and instead just shows a sad face in the upper left corner (pic below). When this happens, none of the 10+ layouts in my game will render properly. The only solution I've found is to close the project, restart the browser (chrome), and reload the project. Any idea why this may be happening, and is there anything I can check to track down the underlying cause?

  • For the more experienced programmers in the community: what are some best practices for logging debug-type data in C3?

    I use some simple logging in my code for debugging purposes. Basically I have the simple function below that prints to a text object, which is in a layer called 'debugLayer'. Every layout in my game has a 'debugLayer' layer, and pressing the 'd' key toggles visibility of that layer. I call printToErrorText throughout the code to log what I feel may be helpful or relevant for debugging, but other than calling it once at the beginning of every function (with the function name and parameter values as the str argument) I don't have any consistent rules on when to use it.

    This method has been helpful, but I have to think there are better ways to tackle logging with C3. Would love to hear what's been working for the C3 veterans out there.

pandabear7413's avatar

pandabear7413

Member since 9 May, 2021

None one is following pandabear7413 yet!

Trophy Case

  • 3-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x4
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

10/44
How to earn trophies