Momio's Forum Posts

  • As a suggestion, for an user friendly engine as construct, it would be nice a new type of string variable on wich we can store predefined strings, kind of a 'multi-choice' text variable.

    This way, when checking or setting this variable we could choose from this predefined value from a drop-down menu, improving readability and ease of use.

    This would be very useful when checking events based on stuff like difficulty level ('if difficulty is hard') or any other multi choice option, or when a character has a 'state' variable ('if state is taking cover').

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From the vid I'm pretty sure it's a gpu issue.

    Yeah, it could very well be (That's why I titled the thread with a question mark )...did you try the capx? It would help to know if this happens on other computers.

    For example, I do a lot of medium/advanced image editing on this computer (Photoshop, Illustrator, etc) and never had issues like this as far as I can tell...

    My graphic card is an old-ass ATI Radeon HD 4300/4500 Series, if it helps.

  • Problem Description

    Sprites put (or created) into layout after certain conditions appear wildly out of its bounding box (Only in the editor, projects still run fine).

    Attach a Capx

    https://www.dropbox.com/s/kjjkfgm86ggs30z/visualglitch.capx?dl=0

    Description of Capx

    The sprite object (the pink squiggles) appears out of bounds. It may be not apparent at first until you try to move it. This "offset" distance is not even consistent if you scroll the layout, as seen on the attached video.

    Since this is about an layout editor bug, running the project is irrelevant.

    Steps to Reproduce Bug

    I can't seem to consistently reproduce this bug, sadly. But it goes somewhat like this:

    • Create a tiled background with "glass" effect. If there is a couple of them in the layout it helps triggering the bug.
    • Create a 9patch object with Edges property set to Tile. Not sure if size, margins, etc affect the result (Mine is a 96x15 graphic, with 32 left and right margins, 15 at top and 0 at bottom). There is a bunch of them but apparently one is enough.
    • Create a sprite or a new instance of a created one (Not very consistent, sorry I cant pinpoint this more accurately).

    Observed Result

    https://youtu.be/zJ47WDGNCMs

    Here we can see how to avoid this. Without preview effects there is no issues, for example.

    I forgot to include it in the video, but sending the affected sprite to the bottom of the layer or to another layer makes it display properly too.

    Expected Result

    Well, its kinda obvious!

    Affected Browsers

    Irrelevant, it seems to run just fine outside the editor.

    Operating System and Service Pack

    Windows 7 service pack 1

    Construct 2 Version ID

    R243 64 bits (I tried the latest stable release and the problem persists)

    My graphic card drivers are up to date and as far as I know I have no graphic glitches on any other program or game or whatever.

  • Try to think about it without programming in mind from a logical standpoint...even if the character is solid, why would it interact with a non solid terrain? (Think that you could need a non solid tilemap for a decorative background, for example. You would not want your character interacting with supossedly distant stuff like background clouds or mountains)

  • Thanks again!

  • I still dont like unnecesary events, but I'll go for legibility then... thanks, everyone!

  • So, Im making an engine template for the store.

    I want to make it as easy to understand as I can, so I try to divide funcionality blocks into groups, but to make it like that Im kind of forced to repeat some conditions that could be on the same event.

    One of many examples: I have a group that manages the animation of a character and wich animation to display on any situtation; on it I have an on landed platform event to make the character perform a landing animation before going idle.

    I also use the same on landed event to change the platform physics so the character handles differently on land than while he is airborne, but I want to put all that stuff on his own "Physics" group, hence the need of a repeated on landed event instead of doing all that stuff on the same one.

    Yeah, I guess the performance hit would be pretty much non-existant or in any case negligible, but....I dont think is a good practice anyways.

    Easier of understand code vs economy of events.....What do you guys think?

  • Awesome!

    I didn't know (or think of) you could check for overlapping outisde the sprite boundaries...clever!

  • Thanks for your reply newt! But it was actually quite simple

    I was checking the speed limit and setting on the boolean if it was exceeded, AND setting the boolean off if the speed wasn't enough. I took out that Else and moved the toggling off to the on landed event.

    Now I have to check special cases where vector Y gets altered or reset to also toggle it off, but it works fine! (Cases like double jumping, damage knockback, and stuff like that)

  • I want to trigger an special "landing" animation on a platform character only when he lands with a certain fall speed.

    So I gave the character a "Hardfalling" boolean variable wich is set to true or false depending on the falling speed in order to trigger the animation with the On landed platform condition.

    The thing is, this doesnt work consistently, sometimes it triggers, some times it doesnt...

    I tried the speed check both with compare speed and checking vector Y to no avail.

    I guess the problem is that the same moment it lands the speed is cut. It doesnt matter if I set the HardFalling boolean before or after the On landed condition, although theoretically makes sense that setting the boolean after the on landed event would fix this.

    I made this barebones example: in it, the HardFalling boolean is set if the vector Y is > 0 so every landing would be considered a hard fall, and set the hard fall to trigger a sound instead an animation.

    If you change the vector Y check for compare speed the inconsistent behaviour is pretty much the same, although logically, it triggers if you are moving horizontally. The order of the boolean setting/On landed check in the event sheet doesnt change much either.

    It seems to trigger much more often if you jump in place and much less when jumping from platform to platform for some reason.

    Demo

    CAPX

    Ideas? Any workaround? Thanks!

  • Do you ever get the feeling that you run into bugs/errors on popular software that happen to you and you only on the whole world?

    That is what im experiencing right now: I'd like to take advantage from the current Spriter sale, so I downloaded the last free version in order to test it.

    The thing doesn't even load, I get this weird error and then it closes:

    Of course, I tried the Spriter forums, but I got no response yet and im in a hurry because of the sale (Obviously I wont purchase it if it doesnt even work), so I post this here on the off chance that you guys know what is going on.

    As you can see, my system is in spanish, the rough translation is "Disk error". It seems that Spriter is somehow trying to access some nonexistent hdd/partition wich makes absolutely no sense...

    I tried reinstalling it, installing it on the secondary hdd, etc, to no avail. As far as I can tell, my computer is clean and I dont have any kind of problem with the miriad of software I use on it. Googling around I found some generic (as in not necessarily relative to Spriter) "fix" to this specific error involving editing window's registry, but the only thing it did is skip the error dialog, so Spriter crashes even faster.

    The funny thing is that I had an old free version already installed that I never got around to tinker with, but at least it loaded...

    Any help/Ideas? Thanks!

  • Try:

    canvas {

    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    }

    It works!! But now the game is horizontally disaligned to the right with a chunk of it out of the screen xD

    Maybe I put your code where it shouldn't be, I barely know what Im doing

    Y tried adding transform: translateX(-50%); it gets to the x center again but messes up the vertical align and the game displays at the bottom, also with a part outside of the screen...

    Any ideas? Thank you so much!

    EDIT: This did the trick

    canvas {
    			position: absolute;
    			top: 50%;
    			transform: translateY(-50%);
    			left: 0;
    			right: 0;
    			margin: 0 auto;
    			}[/code:3tt02ge5]
    
    Thanks again for showing me the way!
  • Im aware im most probably not the first to ask about this, but after searching I couldn't find anything, so sorry about that!

    So, there is some way to vertically center the canvas on a html5 construct game? I tinkered a bit with the index.html to no avail...but on the other hand im barelly html5/css literate and mildly retarded

    Any help? Thanks!

    (If it helps, the fullscreen on browser option is off, although I guess that was quite obvious)

  • I think that's not the case, but you may get a nice discount, but dont take my word for it.

  • Thanks for your answer!