LukeW's Forum Posts

  • So removing all the sounds in my project made it load instantly. The loading bar did flick on for a frame before going straight to the first screen before the bar even had a chance to animate, so essentially instant.

    Likewise, setting the project to not preload sounds has the same effect.

    I'm wondering if I screwed up the encoding with one of my .wav files. This didn't happen until I loaded in my second set of sound files, so maybe I have one in there that's not playing along.

    For now, I think I'll just leave preload sounds off.

  • Thanks for the reply. Not sure it's possible to test the log in APK is it? Never had this issue launching from pc.

    Having said that, I also noticed that sjrya says this: '-After some trial and error, I converted all my audio files (Sounds) back to .m4a from .webm and that seems to have solved my problem.'

    Which makes me wonder if this is somehow related to my issue, which only started after I added some sounds. In fact, I didn't even get the loading bar prior to importing the sounds, it would load instantly into the game.

    Going to do make a test version of my game with all the sounds removed and see what happens.

  • So this is a weird thing. I noticed it once on my Android phone (S7) after downloading a new update where I had added bunch of sounds and music to my game. On the first time load of the newest version, the game froze at the Construct loading screen. A restart of the phone fixed the issue and I didn't have it happen again for any new updates.

    Then today I opened up access to my game for testing. One of the first comments I got was that the game doesn't get past the loading screen (OnePlus 5), and that the bar freezes about 2/3s of the way across, pretty much exactly where mine froze that first time. So I suggested a device restart and, sure enough, the problem went away.

    Now obviously this is not an ideal situation. If the game requires users to restart the first time then you can imagine how bad this looks. I'm not sure if this might be related to loading of sounds (currently the game preloads sounds at startup) but that's my gut feeling based on the fact that this didn't happen until I added a bunch of new sounds/music. The game itself is small in size at 10Mb so I don't see what's causing it to hang (corrupted sound file maybe, if that's possible?)

    A link to the game is below. While I won't post the c3p, if a member wants to have a look inside I'm happy to communicate via pm.

    play.google.com/apps/testing/com.lukewebster

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Yo, this is finished :)

    play.google.com/store/apps/details

    apps.apple.com/us/app/cracked-crusaders/id1464660516

    Cracked Crusaders, A SNES-inspired platformer designed specifically for mobile play. You are a hero attempting to free the land of evil. Delve into a hundred different dungeons across multiple environments as you search for the origin of the critters overrunning the land.

    With over 100 levels and a dozen bosses, you'll need to make the most of the weapon and item upgrades available for purchase between levels. Earn extra stars by beating dungeons quickly or by clearing out all the baddies in a level so that you can buy the best gear and increase your chances of survival.

    With multiple endings, can you beat all the dungeons and unlock the true dungeon master?

    Subscribe to Construct videos now
  • Hi

    So I kind of feel like the manual is a bit lacking with regards to the persist behaviour, but I thought I would do some tests and see if this is something that I could use instead of my current system.

    Anyway, I have chests that only spawn the first time a specific level is beaten and they hold an upgrade for the player. If the player has already beaten that level, the game goes straight to the next screen.

    I thought I would have been able to add a persist state to the chest and have a boolean that lists if it's been opened or not, then check each time that level gets beaten.

    It works as long as I leave the program running, but as soon as I close the program down and re-launch it, the chest reverts to its original state.

    So I'm wondering, is there a way to make a persist instance save its state even after a program relaunch?

    Ta

  • lol, I'm such a dork. The answer was in my question.

    Just added a second variable which is the difference between 100 and distanceToOwner and set opactiy to that. Sure enough, it works.

  • Well, I already know how to do the first bit. I've got a shadow and it measures the distance to its owner and sets opacity according to that value. The bit I'm getting stuck on is that it's working in the reverse as to how I want it to happen. Basically, the closer the object, the darker the shadow should be, not vice versa. Added a gif to demonstrate.

    And here's the code:

    I feel like I need an expression that can take a number and flip it within a range of 100. So 3 becomes 97, 30 becomes 70 and so forth. But I don't know how to do that or if it's even feasible.

    TIA

  • Saw this in the beta and some pretty excited comments about it, but never having done much animation stuff outside of frame-by-frame stuff, I'm wondering what exactly timeline animations do and how this works in a program like C3?

    I saw "This allows you to design animations in the editor by creating sequences of tweens - for example moving an object along a path, or making some elements of the title screen appear one after another."

    And I just wonder how this is different to the current system of triggering through events or when an object reaches a certain position?

    As this is all new, there's obviously not much in the way of documentation and examples, but I'd love to hear a better explanation of what timelines are and how they work in C3 if someone feels like explaining.

    Cheers

  • Okay, thanks guys. I'm not sure why, but I find managing state machines in C3 to be so much more confusing than in other languages. Maybe it's related to the event sheet system, I don't know. Anyway, think I've got it all sorted now, guess once you know what the problem is, you can start looking for a better solution.

    Cheers

  • In typical fashion, I found an effective work around to this as soon as I posted all of that ^. However, it still doesn't answer my question regarding the 'trigger once' block.

    If I take all the stuff from the trigger once blocks and move the to the state that is triggering the change of condition (so exactly how I'm handling the animation changes) then it all works as intended.

    But like I said, why would those trigger once blocks not register if there is more than one instance on the screen?

    ...

    Is it because the 'trigger once' has no other condition in the same block? Surely not?

  • So for some reason, I'm really struggling with state machines in C3, specifically relating to when there are more than one instance working in a layout. I have a typical example below which, to my eyes, should work.

    Basically, each enemy has an 'enemyState' variable (which is assigned at the family level). This particular enemy is idle until having LoS to player, at which point they move to 1. During state 1, enemy flies around and starts counting down to release a burst attack. Once the burst attack is over, enemy goes back to state 1 and flies around a bit more.

    Should work fine. And it does, until a second bat instance enters state 1. At this point, the bats will move between states but not run any lines that are inside the 'trigger once' blocks. In the past, I had my set animation lines in there until realising that they weren't being activated unless I moved them out.

    Logically, I can't see why this works when there is one instance in play, but breaks as soon as a second one enters. Surely the condition is selecting the correct instance that is triggering the state machine? I thought that maybe I needed a 'for each' block in there, but that made no difference whatsoever, whether I put the 'for' block in each state condition, or make one parent 'for' block and have all the state conditions to be sub-events of it, makes no difference.

    So either I'm missing something very obvious or I don't know what. But I'd love a bit of help on this one just to stop me making similar mistakes in the future.

    Cheers

  • Alright, this happened again today and I was able to isolate what causes it.

    Turns out that if you have instances through your project that are on different layers in separate layouts, changing their layers to be the same actually moves what layout they're on.

    This is the reason why I was able to break some of my levels without ever actually opening them up (thought I was going crazy).

    Anyway, I recreated it in a separate project and uploaded it to the bugs github, so maybe it'll get fixed. At least I know not to change what layer an object resides on from the project bar.

    github.com/Scirra/Construct-3-bugs/issues/2523

  • Hi,

    Was wondering, when it comes to placing tiles, whether in the editor or through Tiled, you can rotate and flip on the x/y axis. This is pretty convenient for getting tiles to fir quickly in a level.

    But my question is, is there any sort of performance overhead doing this, or any other reason not to do this?

    Cheers