Eleanor's Patreon (the best construct 3 programmer in the world)

    Hello my name is Eleanor Jacques-Morel

    Pixel Artist and the best Construct 3 programmer in the world! She/Her & Trans woman with Asperger's syndrome, Making 🍓Strawberry Punch 🍓

    I decided to open up my Patreon if you want to:

    • want to support me, Eleanor.
    • want to support my game, https://www.strawberrypunch.com.
    • want to support women and queer and marginalized game creators.
    • want to support the best of the best, crème de la crème!!
    • want to stick it to the sexists and transphobes and haters.
    • want personal help with construct 3 or pixelart.

    Here's my Patron link ! patreon.com/strawberrypunch

    Some of the tiers include exclusive tips and help with Construct 3 from the best Construct 3 programmer in the world, me!!!!!

    Happy Developing !!

    As we require of everyone posting to the forum, please keep your posts in line with the Forum & Community guidelines, in particular the parts covering a polite and respectful attitude. I edited out some offensive language (see the rule covering Offensive language, such as swearing). If you have had issues anywhere else on the Internet, please don't bring it to the forums here, we will hold you to the community guidelines regardless.

    I started clicking around in your demo and soon myself unable to move downwards anymore. Not sure what that was.

    Update !

    There are now variations in:

    - Boots

    - Suits

    - Armors

    - Hairs

    - Ornaments

    There are also now 2 Ornament slots to equip two at the time

    What this means is every variation gets every color possible. No compromises on colors for hair !!

    You also now have a variation of the suit that completely covers the skin of the arms and legs !

    Of course you can mix and match pieces for every set, you don't need to pick all of the pieces from set #1 for example!

    Get out there and be super cute little vampires !

    Reminder: You don'T have to pledge all that much to get direct support in construct 3.

    You can find some of my projects here yoyoeleanor.itch.io

    My biggest strengths are multiplayer, optimizations and using events instead of behaviors!

    And you get to support someone awesome !! !

    3D collision detection is IN !!!

    also mobile controls

    it dosen'T get stuck in the seams between blocks anymore !!

    see for yourself strawberrypunch.com

    Here's progress on the game

    Subscribe to Construct videos now

    Here's some of my construct 3 tricks I use to make this work

    launch the uh quad issue performance under tech demo in construct 3 and run it and compare it with this cdn.discordapp.com/attachments/312194372001202177/587028875696144427/quadisperf.c3p

    the second one will run out of memory before it runs out of CPU

    and have gazillions of objects

    I discovered i could do this when i was getting a really high engine% on cpu usage in strawberrypunch and i started some optimisations like

    i coded a render culling thing that would check where objects are in 3D space and see if the camera can see them and if not the delete all of the rendering and make the "object" containing the variables stop ticking engine stuff like quads and whatever

    my first try was i made them stop moving

    even though their 3D variables still ticked a lot

    and then i was like

    wait a minute

    what if i just use some object that doesn't have stuff that the engine ticks on every frame

    and empty arrays and binary data works great

    bonus for empty array for being able to self reference data in the array

    bonus for binary data to be able to self stuff that you want to serialize

    keep in mind the "self" thing that'S gonna become really important

    that'S like my shittyest trick so put your seat-belt on

    uh

    i could cite lots and lots of testing with this project

    to test what kind of variables are referenced the fastest

    or just tell you the gist of it

    arrays are complete ass

    6 times slower than for each

    for each is very slow

    self is pretty fast

    global is fast

    global static is the fastest

    global constant ?

    bleh

    i always mix up those two words

    that might not seem important yet

    it will be in a minute

    do you know how booleans work in the engine ?

    They're like either 1 for true or 0 for false

    but

    they suck

    because

    you can't toggle them without picking

    so they'Re garbage

    you can make your own booleans with get bit set bit

    get bit set bit is better than using a number

    for reason we'll see later but

    what's important is the 1 and 0 part

    you can for example, in a single line of code, increase the falling speed if your velocity is over 0

    by doing set falling speed to self.fallingspeed + gravity + self.fallingspeed > 0 * gravity

    where self.fallingspeed > 0 will return either 0 or 1

    so gravity will be double or not

    you can get pretty complicated with that it's really useful

    also

    you can call functions without for each

    by calling them with a return value

    do you know that ?

    like

    in the event sheet

    there is function call

    to be able to call for each object without using a for each loop

    you can create a function with a return value

    and then call it in the expression system thingy

    this might seem dumb

    but it'S really really important

    because you can use the function to change other expression inside the thingy

    like in this collision detection code

    where it calls a functions that alters self.vx that is used in the operation later on

    so that if it collides with a wall while walking self.vx will be set to 0

    and stop going forwards

    but if you'Re hit

    self.vx will be set to -self.vx

    and you will bounce off the wall

    and the function is not called at all if there is no collision detected

    so saves overhead

    this kind of reveals the biggest part

    making code without picking

    this is why you need to know the speed of references

    it changes how you write it

    where it can end the code prematurely and set it to self or 0

    so it dosent have to call functions

    and it dosen'T do picking

    because picking is a huge overhead inside the engine

    well

    every time you pick it calls functions to the engine

    for every instance

    so when you have a shitton of them like i do it'S a big deal

    so

    I make those overly complicated expressions to set variables

    using all of the operators to the max and the boolean comparator thing and calling functions while seting the value

    but you have to balance engine overhead to "set a variable" with "expensive references"

    like if in a calculation you need to divide the same value 20 times

    it'S faster to add a variable

    calculate it once with self and set it once

    and then use it to call self once instead of multiple self to calculate the result multiple times

    if that makes sense

    oh also in that code snippet my collision detection is in a dictionary

    and it creates unique keys using a X & "x" & Y & "y" & Z string

    to see if that voxel is occupied

    and it checks of 0 instead of checking for all of the other possible results

    and the results are in the function for the type of collision

    so i can add and remove collisions in 3D space at runtime in the level so that'S cool

    doing it with a dictionary beats an array because most of the array is filled with empty space

    and both of those beat an octree because it only need to check for one collision on each axis

    whereas with the octree sometimes it would be 7 or 8

    or much much much worse in the shadow's case it could do 50

    ouch

    because it needed to raycast down until it found something

    also for rendering it's kinda complicated

    it takes into account how many numbers you can cram inside construct 3 's 64 bit numbers

    and how the data is networked

    so positions are 16int or unit i dont remember

    but can go up to 32000 ish

    so 5 digits

    and so it goes by first priority, what is the distance from the cell to the camera

    then if it's the same cell, what's the Z value divided by the z side of the tiles

    and then if also the same it goes by calculating the Y position

    of the screen

    isometrick-y

    so it's a more refined way of doing it ?

    and there will be two digits left

    for a dot and a decimal

    for zordering my sprites on

    so that the clothes are over the skin and so on

    all super fancy like

    no picking because they're in a container

    the set animation has getbit into it

    so that it plays a different animation if the bit is true or false

    without any new code to switch it

    and the letters hold the data for the colors and the variants

    and the animation name

    so my whole game is super duper fancy like

    with my own collision detection and physics and shit

    kind of hacking my way around the picking

    cool stuff

    it uses the multiplayer plugin with binary data to do whatever the fuck i want

    interest management and whatever people claim you can'T do

    and the host can control all of the AI too so that'S cool

    to sync like 400 objects it uses 30 kbps ?

    it will probably increase later when i need to sync more data but that sounds realy good to me

    so

    here you go

    that was big secrets

    Support me on Patreon if you want more and/or help with those until someone takes all of this information and makes an actual tutorial you can use instead of me regurgitating it all at once

    Containers are extremely useful.

    what they do is, whenever you have any event, like say, set instance variable, all of the instance variables of everything inside the container will be available to you without any picking necessary

    example:

    here i pick my own player object, "Entity", by UID because picking by UID is by far the fastest since it dosen't need to pick every single instance and then compare variables it just straight up picks the right one.

    Then, whenever a skin is created, the skin's UID is saved inside my player object for fast reference

    Now that both my player object is picks, and my player object'S visual element, "skin" is picked, i can use any variables of both, but also "skin" is in a container with the rest of the visual elements,

    so I can use any variables for them to. Also in any action that any of them do, I can use variables from "skin" and my player object too.

    for example,

    to se the position of "skin" on the screen, I need to translate's my player object's 3D position into screen position while considering the camera's isometric angle,

    so Px ÷ 2 - Py ÷ 2 moves across the screen horizontally, that will be X, and Px ÷2 + Py ÷2 moves vertically, that will be Y, but also -Pz to it because Pz is a positive value but moving up on the Y axis requires a negative value. Pz is a positive value because When I started making this project using sync value only supported uint8 not int8

    then every other object can be simply set to skin's X and Y position except the shadow which is made to stick to the floor below the character.

    It works this way instead of using the PIN behavior because using PIN created pretty big slowdowns when creating lots of objects, and also I cannot control when, inside the event sheet, moving the sprites occur when using PIN, so bugs will inadvertently happen that I cannot control. Also it uses less CPU this way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    For the shadow to stick to the floor I use this piece of code

    note that for this specific piece of code, I'm using this for each loop

    because I'm still testing features with it, but on to how it works !!

    so the code above the red line is to check if there is a floor using a dictionnary like previously explained,

    but this time it'S slightly different because it uses -1*loopindex inside a loop and if the result is 0, which is what is returned when no dictionary entries at the specified key exists,

    then nothing will happen,

    so the variable is set to 0 and the "set variable" action ends, then loopindex gets increased by 1, and the code will look for a dictionary entry that corresponds to the space below the one in the previous loop to check if there is floor again, and repeat 5 times.

    The goal is that if it cannot find a floor within 5 loops, then i could make the shadow sprite invisible or place it somewhere else to indicate there is no floor below the character.

    But, if a floor is found, it calls the function shadowstoploop

    that sets stoploop to true, and if you remember from the events earlyer, if stoploop is true then the loop ends

    and variable "shadowZ" becomes the distance between the character and the floor on the Z axis, and the shadow is set to the right position where isometricangle is 0.5.

    My issue with this code is how hard it is to stop a loop Ashley, it's impossible to put a function there that just stops the loop, and if the loop isn'T stopped, then the shadow looks for floors below the current one.

    I though about using a variable to determine if that specific instance of the player has detected a floor with it's shadow, but that means that every player that has stopped looking for floors still have to run events to check if they have found a floor if the for each is removed, which is a lot of wasted CPU time when there are a LOT of players

    the ? : operators

    if you noticed in my code I use a lot of x > y ? x+1 : x-1

    this is the documentation for it with no examples whatsoever

    basically, instead of creating a condition for x is greater than y, then an action, then a condition for x is smaller than Y , then an action, there are no conditions and a single action that will iterate on all of the objects in order of IID sequentially.

    You can combine multiple ones like so x > y ? x < z ? x+1+z : x+1 : x < z? x-1+z : x-1

    you can make them be any combinations of OR and AND using the & and | operators, bypassing any problem you may have with conditions, and use parenthesises too like so

    (x > y & x > z)| x > 100 ? x+1 : x-1 (if X is greater than Y and if x is greater than Z ) or x is greater than 100

    all of it in a single action block !!! bye bye overhead from using conditions ! I've seen performance gains up to 16x times when using really really complicated picking events from my older versions of strawberrypunch.

    keep in mind that to use events like this, your picking game must be top notch using containers and stuff. also, using sprite.x will not work because sprite.x will pick the instance of sprite with the lowest IID, you have to use self.x at all times. using sprite2.x will work though, if in a container with sprite

    I appreciate your contributions, but perhaps the Tools and Resources section of the forums may be more suitable for this kind of thread.

    Not really my place to say though and I don't mean to be antagonistic. This is awkward.

    I appreciate your contributions, but perhaps the Tools and Resources section of the forums may be more suitable for this kind of thread.

    Not really my place to say though and I don't mean to be antagonistic. This is awkward.

    If it was in there I personally would've never seen it, kind of a dead section

    to Eleanor, thank you for this info! This is some incredible stuff you've figured out

    A blog might be a better place.

    Same for this guy:

    construct.net/en/forum/construct-3/general-discussion-7/dreamstrata-thoughts-144208

    Rory oosyrag newt delete your post

    I appreciate your contributions, but perhaps the Tools and Resources section of the forums may be more suitable for this kind of thread.

    I agree

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)