eleanorjmorel's Forum Posts

  • Ok so let me try and explain this.

    I draw my animations and make variants like so

    And then export the whole spritesheet like this

    and make the couple different color schemes

    and then inside construct, all of the spritesheet is a single animation with an animation speed of 0 or whatever it doesn'T really matter because you animate with events

    different animation means different color

    and so when you want to animate them you do this

    so basically what it does it it has a "animation length" variable, that'S like the maximum size of animations on a grid, and "animation variants", that'S like, different variations like, it could be like different pairs of wings or whatever, here i have put different clothes as an example because im pretty lazy and I'm not going to recreate my whole animation events here but you get it, and then there's an instance variable containing the variant and the animation index and the math basically makes it play the correct animation.

    The whole point of this is that you only have to export your whole spritesheet like, maybe 80 times or something , and your colors will be handpicked and pretty and it will animate and stuff, versus having to upload a thousand animations in the editor which takes like literal days.

    There is a small performance hit by doing things this way but it adds a couple features to your game, like you can accurately control frame data for online multiplayer games and stuff so that'S cool.

    not all your animations are going to be the same length obviously, so you have to choose the longest animation as the length and will have blank frames, but construct will deduplicate them when you export so it should be ok. If you don't like using indexes as the animations you can use objects or a data structure instead, and then store how many "used" frames each animation has and put that in the formula

    Anyways you get the idea, here's the file drive.google.com/file/d/1nM01IikxX-VVV_ZnrRP7pws73gdSBxWY/view

    Edit: commented and made some changes to the file, enjoy?

    edit edit: Tom some of the images aren'T displaying, any idea why ?

  • seekins no no what i mean is, the editor animation is the color. using the set animation in the editor changes the color. Your character animations are driven by frame index with events. This way when you import them, you import all of the character animations in the same editor animation. This way you don't have to import a thousand different animations. I don't think there is any other way to have good performance AND keep your color theory and hue shifting. Just changing a sprite'S HSL does not look good at all.

  • I'll be honest before this post i had no idea what scene graph meant and I still don'T really understand. Would this fit my needs or make things worse, I don't know.

    This whole engine is about picking, so I need a more flexible way to pick without impacting performance in a negative way.

    How? I don't know. All of this is just suggestion, but the suggestion itself isn't the goal. The goal is picking.

  • sorry i keep writing these super long posts

  • This is taking longer than expected, thank you for your patience, meanwhile:

    When i try to code a game without using behaviors in construct so that the mechanics better suit my needs and I don'T need band aid fixes, my options are:

    • make every state a condition of every object. every single object has to go down a if { }elseif{ }elseif{ }else if{ } kind of thing. States sorted by how often they are in that state from top to bottom for efficiency this only works if objects cannot have multiple states. Code is pretty annoying to write this way because if you change something in one state, you may have to edit other similar states too (not using functions because they lower performance, so they put a ceiling on complexity of the game). To make this method more flexible, instead of using elseifs, every object has to check every state on every tick, that's not very good.
    • Don't use conditions (except for exceptions) and instead jam pack all of your code into actions like this
      with a megaobject that contains all possible states. this code is more flexible and faster than the previous method, in the example, the velocity of the object on the x axis is set correctly, regardless of state, all at once for each object, and like previously, the action is optimised to exit early and not check for states if the correct one is already found. All velocities are set in one fell swoop without having to return to this variable later down the line, removing overhead for calling multiple engine functions that basically do the same thing, but at different times.
    • what i want to do is to not have to loop through objects to check for states altogether, when the state changes, a new object is created, variables are passed, and the old object is deleted. Then, this object's code executes unconditionally until it passes to another state. The problem with this is it creates a lot of garbage ( especially with containers) and isn'T as flexible as the previous model, and code isn't as reusable, since in the previous one, all objects passed through the same code so bugs were easy to fix, but now the bug may be in multiple places.
    • The solution I theorized is a combination of both previous models for my events, with a main game object that can be given components (the new empty object type) Components run the big code inside of action without conditions like before, but can be removed or added to main game objects at will. The roadblock with this method is that, within the construct 3 architecture, it'S actually slower than the good second method because while it does not have to do conditions and saves cpu there, it adds cpu by needing a main game object UID property saved to it and then it needs to be looped and pick main game object by UID to do its job,which ends up being slower because while picking by UID is fast, a loop to pick by UID has to be invoked, removing the CPU time benefits for this method unless the state is rare (like the wall sliding example from my previous post),

    So basically, I know that you keep saying that performance doesn't matter

    Ashley but that's not exactly the case.

    I Consider performance a complexity Ceiling, and I discovered all of these weird ways to use events to raise that complexity ceiling for my game, it being multiplayer and 3D/isometric with lots of sorting and collision detection

    Containers should in theory be able to do this because containers are great for avoiding picking, but one of the big problems I encounter is that containers are immutable, so if I would, say, create a "gravity" object and put it in a container, and then do an action on gravity, it picks everything in the same container so I can add gravity to my objects without any picking, and that'S great! BUT! Families and containers are incompatible.

    IF i try to do "gravity family" and "gameobject family", then nothing gets picked which means if I create a gravity object for every object type combination and try to put them all inside a family and do an action on that family, it will not pick objects in the same containers, so this method is a dead-end. Similarly, making an event for every possible gravity object for each object type without using families adds a lot of unnecessary code complexity and makes maintaining your code a nightmare, so, also a dead-end.

    So for my suggestion:

    I don'T actually know what you'Re willing to accept as a suggestion Ashley, and you're actually way smarter than me and got more experience, but it'S really hard to have a discussion together because you are so busy, and what I need is probably very niche within the community because most people are focused on ease of use and behaviors, which is great!!! it'S what got me into using this engine in the first place, but maybe niche very experienced users like me aren't really a focus.

    I'm still working on the example project, but making an example project that shows that complex games struggle is more difficult than anticipated, I can'T just use quadisperf for this one.

  • You do not have permission to view this post

  • I don't know how to replicate or explain it

  • ask people about it, i think, or look at templates and try and make games and look at the documentation and struggle, it'S up to you.

  • you have to understand picking

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey, what I suggest you do is color them manually in your pixel art editor and export them as different animations and use the animation's name to set the color, that way it's not just cheap recoloring, you get your palettes in there without a big performance hit

  • You do not have permission to view this post

  • ok so

    UID is the unique ID, every time an object is created, UID goes up by 1 and assigns that UID to the object, every single object type is part of the same UID group, UID for an object never changes, UID never gets recycled, which means once an UID has been used for an object, it will never be used ever again and it keeps incrementing.

    IID is unique to every object type, meaning every single object will be in a different IID group, sprite1 will have their own group of IID, sprite3 will be in a different group. IID changes, when an object is deleted, every object with an higher IID, their IID goes down by 1, when a new object is created, it becomes the object with the highest IID, meaning IID is ordered by creation, older objects have a smaller IID

    You usually use IID when you want to pick a specific object type in a loop or something, like, if you're looping through every object count in the "car" family or when there is a predetermined hardcoded amount of them.

    UID is fast and is for picking a specific object project wide like, you store a character's UID in their hat sprite so you can set the hat's X and y positions to the position of the character sprite picked by UID or soemthing something

  • press ctrl + shift + J and look at what the console says

  • Hey I have a similar bug, all of my anchored UI goes poof and returns NaN as their X or their Y, but I can't narrow down on why it happens, but it happens on certain screen resolutions and not others

    honestly I have no idea what to put in my bug report, sometimes it broke, sometimes it fine ?

  • basically,

    screen.x = (object.x - object.y) * 0.5

    screen.y = (object.x + object.y) * 0.5

    if you want 3D,

    screen.x = (object.x - object.y) * 0.5

    screen.y = ( (object.x + object.y) * 0.5 - object.z )*0.5

    that'S it really. this will turn the x and y axis 45 degrees clockwise.

    how you modify the object's x and y is up to you, be it instance variables or behaviors, and they will translate to isometric movements

    If you want to know more about my game, there's more information and links inside the game, but I'm not going to talk about it here because I don't want to get banned