Estecka's Recent Forum Activity

  • Have you thought about the conditions "on object created" and "on object destroyed" ?

    Though "on destroyed" will not allow you to animate their destruction, because it is triggered after they are removed, but you could work around this by animating their destruction into a separate object type that is spawned "on destruction" and then destroyed when its animation ends.

  • Thread requested by Ashley

    Problem Description

    Strings above a certain lenght are truncated depending on the context, to about half a million caracters.

    Attach a Capx:

    http://sta.sh/01qsh2vnd6j4

    The download contains two file: the capx project, and a text file of about one-million caracters that I used in the project.

    The text is made of a single line, at the beginning is a big "THIS IS THE BEGINNING", at the end a big "THIS IS THE TAIL".

    In between is simply some HTML code I've been processing, this part doesn't matter here

    I'll refer to the text as the "one-million string".

    Description of Capx

    The Capx contains only a text box, which has three instance variables:

    "Variable", a text variable into which I directly pasted the one-million string

    "Pasted_Lenght", a number programmed to reflect the length of the string pasted into the text box.

    "Variable_Lenght", a number programmed to reflect the lenght of "FullHTML"

    Additionally, I programmed "Variable" to automatically capture the exact content of the text box.

    Steps to Reproduce Bug

    Observed Result

    • Start the project with Chrome in debug mode

    • Look for "FullHTML" and "Variable_Lenght" in the debugger

    ==> You'll notice that "FullHTML is truncated in the middle of the html and doesn't display the TAIL. It's lenght is said to be 30.000 instead of the expected one million

    • Open the text file in the notepad, and copy-paste the one-million string into the text box.

    ==> While looking into the textbox itself, you'll see the ending TAIL, meaning the string was succesfully pasted as a whole

    • Look for "Text" and "Pasted_lenght" inside the debugger

    ==> You'll notice that the debugger does not display the pasted string whole. Again, it is truncated in the middle of the code. It's lenght is said to be 524.288

    • Go back into the text box an type/erase a few caracters.

    ==> The advertised length remains at 524.288. My guess is it can't go higher and won't go down until you actually erase enough caracters. As well, the "text" in the debugger won't move unless you change caracters early in the string.

    • Redoing the same within Firefox, all the numbers match the actual lenght of the One Million string, (1.095.764), which displays both head and tail in the debug window.

    Expected Result

    Being able to input and manipulate insanely long strings.

    Affected Browsers

    Chrome: yes

    Firefox: NO

    Microsoft Edge*: yes

    *wasn't able to paste the string into edge, too much lag. Only the truncated variable is confirmed.

    Operating System and Service Pack

    Windows 10 64bit

    Construct 2 Version ID

    r230

  • The source of the html is from a website I do not host, I need to get it into the app at running time.

    For now as a temporary solution I've been copy pasting the chunk I needed into a text box so I could still develop the processing side of the app; but I'm still open to any suggestion as to how to get the html from the site into the running app.

    I am able to paste the entirety of the string into the box (I can see the tail end), but when I ask construct to tell me the length of what it reads, it typically returns 524.288 caracters.

    At first I tried to use Pode's HTML plugin to load the site into an iFrame inside the app, but because of some cross-domain thingy I could read the iframe's inner HTML from the app...

    Now that I think about it, the site does provide this chunck bits after bits as you scroll down, so if I eventually managed to grab it directly from the iframe I wouldn't even need to manage huge strings in the first place.

    I just know nothing about these cross domain thing.

  • I wanted to make an app to process insanely long chunck of HTML, (I'm speaking of several millions of caracters), but just found that construct would truncate any string I give it to the 524.288th caracter.

    I though about cutting my string into smaller bits, -I could perfectly work with that,- but again, I want to give my string as a whole to construct, so even if I ask him to do this job, it will still only take in the first 524.288 caracters before cutting it into pieces...

    Is there a way I can safely enter a million caracters at once into my app without loosing the tail bit on the way ?

  • Isn't construct two debug performance check is due to single core and not multi-thread or layering or multi-core processors ?

    I... simply didn't understand that bit.

  • Again, I don't understand what your game is about, so you'll need to give more details.

    Alternatively, there is the "container" functionality I never used, but could help. It allows you to "link" objects of different types:

    If an object of one type is spawned, the linked object are also spawned. If an instance of on type is picked, the linked instances are also picked.

    You'll find an option to create a container on the left panel after selecting the first object you want to link.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I understand, you want the game to automatically detect which tile the player is allowed to hang to?

    That's an interesting question I've also tried to solve.

    Your boxes around the player are to define the hitbox and the "no-grab" zone? It reminds me of an attempt I made myself (but didn't test yet) using "yes-grab" zone instead of grabable tiles, let me fetch some screenshot, and I'll explain...

  • That's another problem... There are things called family instance variable, that automatically applies to all object of the family. If your variables weren't set as family from the beginning you cannot upgrade them to family.

    If you don't have a lot of code about these variables, you can delete the variable then recreate it, but otherwise I'd suggest you to use the dictionnary method right above.

  • If you don't have access to the family function, you could use dictionnaries instead:

    One loop for every object type:

    For each object, create a key "Playername" with value "Score" in the dictionnary, then use a single to retrieve the keys in order.

  • Oh, my bad, I didn't understand the objects were of different types.

    Getting "different object" mixed up with "different instance"

  • If you want to create an ordered list you don't need to compare "two" instance with each other, "For" does it and order them for you.

    So let's say you want to create a scoreboard, your code would be like:

    • For each (Object) ordered by (Score) (Descending)
    • - Put (Object) at the top of the list

    or

    • For each (Object) ordered by (Score) (Ascending)
    • - Put (Object) at the position of the list (loopindex)

    It will start putting the smallest score in the list, then the second smallest above the smallest, and will finish with the highest at the top of alls.

  • (First, the "every tick" event does nothing, it's literally just for aesthetic when you don't want to leave an event blank.)

    From what I understand:

    You have an invisible sprite named camera to more easily locate the camera on the field. Did you use a "Scroll-to" behavior or did you make your own code for it ?

    Also several thing you might want to check:

    Is only the camera stuttering, or does the camera "object" stutter too?

    Did you check in debug mode whether only one player has ActorNr set to Photon.MyActorNr ?

Estecka's avatar

Estecka

Member since 21 Dec, 2015

None one is following Estecka yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies