Momio's Recent Forum Activity

  • 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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • Savvy001

    It's an issue with this plugin. Speciffically it has to do with pasting stuff that has effects. C2's runtime has had updates with it's webgl renderer and I haven't kept up since my pc doesn't use webgl currently.

    Im having that same issue, and I don't mind downgrading...wich older C2 version would you recommend in order to use paster with webgl effects?

    Thank you!

  • Wow, hats off! Pretty nice work, you could teach a thing or two to the guys who made Sonic 4 about old-school "Sonic physics" (at least on episode 1, I didn't try the second one)

    Toggling collisions on the slopes and playing with z order you can easilly make the classic Sonic loopings.

  • Nice! Thank you!

    But still it's not what I need (Although it helps anyways!)

    What I need is to save the image of a sprite I'll be creating in runtime (The original image with webGL effects "baked in") instead of a dropped image or a loaded image...

    If there is a way to access the URI of the sprites you are using on the program (If they actually have URIs to begin with, wich I dont know ) this would be easy, but if that is possible, I dont know how...

Momio's avatar

Momio

Member since 20 May, 2014

None one is following Momio yet!

Trophy Case

  • 10-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies