eleanorjmorel's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you have to understand picking

  • 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

eleanorjmorel's avatar

eleanorjmorel

Member since 7 May, 2020

Twitter
eleanorjmorel has 7 followers

Connect with eleanorjmorel

Trophy Case

  • 4-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

10/44
How to earn trophies