inejwstine's Forum Posts

  • Ashley gave a reply to the bug I wrote to any who are interested. Long story short, it won't be fixed because it's a cross-browser issue. The solution is to use a sprite font, which will render the same across all browsers.

  • I created a bug for this issue, because I highly doubt it's the intended behavior.

  • Problem Description

    When I create a multi-line text object in Construct2, the space between the different lines is different in editor than in browser.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/326 ... ement.capx

    Description of Capx

    I've got three text objects here. The paragraph of black text, and two highlights, one blue and one green. I've placed the highlighted words so that they cover up corresponding words in the paragraph (or as closely as possible). The font size, family, and style are all the same, it's just the color that's different. And as you can see, it's pretty close. Here's a screenshot of what it looks like in the editor:

    https://dl.dropboxusercontent.com/u/32626868/Construct2/textPlacementIssue/constructCap.PNG

    But once I run it in a browser, it looks like this:

    https://dl.dropboxusercontent.com/u/326 ... serCap.PNG

    The blue highlight is okay, but the green one is no longer lined up. There's a grid behind the text, and when you compare the two screenshots, you can tell that the second line of black text is higher in browser than it is in editor, causing it to no longer line up correctly with the green text.

    Steps to Reproduce Bug

    • Create a new project and create a text object that spans multiple lines. Place a grid background if you wish.
    • Create another text object that has the exact same font size, style, and family, but a different color. Choose just a word or two from the bottom line of the original text object, and position it so that it exactly covers up those same words in the original.
    • Run in any browser.

    Observed Result

    The colored text will not line up with the original text.

    Expected Result

    They should line up in the browser since they do in the editor.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Internet Explorer: Yes
    • Opera: Yes
    • Safari: Yes

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Release 173 (64-bit)

  • Ah, I realized what's going on, though not how to fix it. The multi-line paragraph isn't spaced the same in editor as it is in browser. I added a grid behind it so you can more easily tell. So the highlighted words are in the right place, but since the paragraph isn't spaced as much as it should be, they end up not being in the right locations to cover up the words.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's true, but the problem is that it isn't the same between them. I end up having to nudge each one a bit at a time until they're all lining up, which is kind of a pain. Why aren't the positions the same in the browser as they are in the editor?

  • I'm having a peculiar issue. When I run my project in a browser, things aren't positioned the same way they were in my project. Specifically text. Here's an example of what it looks like in Construct2:

    I've got three text objects here. The paragraph of black text, and two highlights, one blue and one green. I've placed the highlighted words so that they cover up corresponding words in the paragraph (or as closely as possible). The font size, family, and style are all the same, it's just the color that's different. And as you can see, it's pretty close. But once I run it in a browser, I see this:

    One of the highlights seems to be okay, but the other one is completely off. It's as if the position changes once I start running it in browser.

    This isn't a resizing issue because I've turned off fullscreen mode (meaning it stays the same size no matter how I resize the browser). Any idea why this is happening? Is this the intended behavior, or possibly a bug?

    You can download the capx here if you'd like to take a closer look:

    https://dl.dropboxusercontent.com/u/326 ... ement.capx

  • A good convention to follow. I'll have to keep that in mind. Thanks again for the tips.

  • Ah, thanks For some reason I hadn't thought of that. Probably cuz I'm still pretty new at this.

    Of course, that means if you ever need to rename the audio file, you'd need to change all the events, so each approach has its pros and cons I suppose.

  • I recently found out that it is possible to replace audio being used in a Construct project without losing any event associations, but to do so currently you have to manually replace the .m4a and .ogg files in your computer's file explorer. If you try to import a file with the same name as an existing audio file, it just renames it, giving you two audio files, the newer of which wouldn't be associated with any existing audio events.

    It's not a huge deal to replace them manually, but it would be nice if when importing an audio file with the same name as another already in the project, that Construct would ask if you would like to replace the originals instead of just renaming it.

  • If I might make a suggestion:

    Importing audio and having Construct2 do the compressing for me is very convenient, but if I need to replace it later I have to find some other way of compressing it. What I ended up doing was importing it as a different name so it would be compressed, and then renaming them and replacing the originals. It works, but it's a bit of a hassle.

    It would be nice if when importing a file with the same name as another already in the project, that Construct would ask if you would like to replace the originals or rename the new file.

    Either way, I'm glad there's at least some way to replace audio; saves the trouble of having to recreate audio events. Thanks again!

  • The .ogg and .m4a should be there as well! They're stored in the same place.

    Ah, I think I know what the problem was. I had my project saved as a single .capx file, so only the original audio file that I had imported was there, not the compressed versions (which I'm guessing were zipped into the .capx file somewhere). When I tried the same process again this time saved as a project (not a single file) then the files appeared, and replacing the audio worked as expected.

    Thanks for the help.

  • Construct 2 only plays .m4a and .ogg files. If you only replace the .wav file, it will have no effect. You need to replace the .m4a and .ogg files as well.

    Okay. How do I do that? Only the .wav appears in my project folder. I can only access the .m4a and .ogg files from within Construct2 itself, and when I try adding a file of the same name, it just appends 2 to the end of it instead of replacing the old one.

  • Problem Description

    According to Ashley in this thread: construct.net/en

    if we want to replace already existing audio in our project, we should just replace it in the project's folder in windows explorer. I tried that, but it still plays the old audio after replacing it.

    Attach a Capx

    dl.dropboxusercontent.com/u/32626868/Construct2/Bugs/AudioTest/audioTest.capx

    Description of Capx

    The project contains nothing but the Audio object, one audio file, and one event that plays the audio when the layout starts.

    Steps to Reproduce Bug

    • I created a new empty project and saved it to a new folder.
    • I added an audio file called audioFile.wav to the project folder (in windows explorer). This file simply plays a chime sound.
    • I right-clicked on the Sounds folder in the Projects view, clicked Import Sounds, chose audioFile.wav, and clicked Import.
    • The file was successfully imported, leaving me with three audio files in the Projects view: audioFile.wav, audioFile.m4a, and audioFile.ogg.
    • I added the Audio object to the project.
    • I created a new event: System - On start of layout | Audio - play audioFile
    • I ran the layout, and it works as expected; upon opening in Chrome, the sound plays.
    • Next I took a different audio file (this one just says the word "yes") and also named it audioFile.wav; I moved it into the project folder and replaced the other audio file with it.
    • I ran the layout again, but the new audio file did not play; it's still playing the older one (the chime sound).

    Observed Result

    The original audio still plays.

    Expected Result

    I expected the new audio to play.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 SP 1

    Construct 2 Version ID

    Release 168 (64-bit) (Free edition)

  • [quote:z1ob1vqy]Also can we please get a replace sound with another sound function?

    Just overwrite it in the project folder.

    Ashley

    I realize I'm resurrecting a rather old thread, but I'm having the same issue czar was having with the Audio, even after following Ashley's advice (unless of course I'm doing something wrong). That is, the only way I can update the audio in a project is to delete the current audio file (and unfortunately all the associated events with it) and then reimport the modified audio file.

    I tried just overwriting the audio file in the folder, but it still played the old version. I tried importing the file again, but instead of replacing the files already in the project, it created new files (each with the 2 suffix tacked on the end). Now, I am using the free version of Construct2. Could that be the reason why? If not, is there some other way to reimport modified audio files?

  • Yeah, it looks like you're right. I've been doing it that way though, and it's not so bad.

    Thanks.