Majinboo's Forum Posts

  • I am doing this tutorial https://www.scirra.com/tutorials/237/ho ... -web-fonts , but didn't works to me the font-face Kit Generator, my font is .woff extension then my question is if i don't need the other font extensions ( .eot, .svg, .ttf, .woff2 ) in my project? i only want to publish my game in android, ios and windows 10, i don't want make my game playable in a browser, my font .woff is enough to launch my game in these stores without any issue?

  • The spritefont will take 4096*4096*4= 67108864 bytes = 67 Mb of image memory during gameplay..

    Sounds like a lot to me..

    Does using local webfonts have any disadvantage in mobile? Chinese characters are a lot and i cant use a small spritefont to my purposes.

  • i am using a big spritefont, 4096x4096, this will be a problem for my game in mobile or desktop? i was thinking use localy webfonts but i am reading about that webfonts have problems to work in mobile devices, i cant use small size spritefont because my project have 2500 chinese characters.

  • append " " should work

    thanks!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i wasted 1 hour finding in the forum a capx example of a virtual keyboard or how to make this, i know to emulate backspace i need to use this code: on backspace pressed, set text: Mid(spritefont.Text,0,Len(spritefont.Text)-1) , i need to know how to emulate the spacebar key (the code), maybe is a stupid question but i cant find the answer in the forum, Thanks for helping me.

  • If you're loading the array once, you'd at most get a pause depending how big the array is. If it's impacting the fps then that sounds like you're loading the array every tick.

    On start of layout -> load from JSON string..... i need to add trigger once in this event? i only have lag when i am using construct 2 to edit events and in the debugger only when i check the array and for some seconds, but i don't have lag when i open the game normally in the browser.

  • >

    > > Can you post a Capx? I have a feeling the lag is from the local storage.

    > >

    > i am not using local storage in my test project, i just paste the big array and nothing more.

    >

    OK sorry, I am done guessing.

    Loading a 1024x1024x1 array from a text object full of Perlin noise values and it is instant. So I am thinking it is not a C2 bug.

    then is normal this lag in construct 2 and in the debugger? i don't need to worry about the performance of the game using big arrays with Load from JSON string?

  • Can you post a Capx? I have a feeling the lag is from the local storage.

    i am not using local storage in my test project, i just paste the big array and nothing more, i tried with 500,30,1 and this size reduce a lot the lag using construct 2 to edit events , with 200,30,1 i don't have any lag, my concern is if big size array have some impact in the game, the debugger give me lag only when i tried to see the array and this lag is for some seconds, and if i use local storage i need to know if the big array will have some impact in performance.

  • i have an array of 1000,20,1, i have in my project on start of layout -> Load from JSON string , i have lag using construct 2 after i paste the array information from the array tool creator, i am using local storage to save information in the array, how i can handle big arrays without lag? i need to load the information from a CSV file? i can use local storage to save information in the CSV file? i cant use Load from JSON string with big arrays?

    I don't want to complicate my head with this, i am not programmer, i can handle this construct 2 lag to edit events, my only concern is if this construct 2 lag have any impact in the performance of the game? in the debugger when i tried to see the array i get lag and the FPS down a lot like 9 FPS, after some seconds the debugger return to 58-60 FPS without lag.

  • >

    Arrays are broken. >

    http://i.imgur.com/HOT708n.png?1

    >

    http://i.imgur.com/Pyr3wrI.png

    >

    Turns out, the array needed to be larger than the scope. The array width, height etc. are not zero based. They are the count of the number of entries on that dimension.

    If your array height is 7, try making it 8.

    This worked:

    The capx I used: [mediafire]

    I recheck the capx, i think is working now, thank you so much!

  • It sounds as if an else would do this.

    But I'm not sure I understand what you mean.

    Edit: Like this, I mean:

    i tried else and didn't work, i just want if the array not found 0 value then set text value not found.

  • I cant find any question like this in the forum or a tutorial, maybe this cant be done by the way that i am thinking, i have a loop like you can see in the image, if the array contains the value 0 in Y7 then -> action, but my other events modify the array Y7 value then sometimes my array will not contain the 0 value in Y7, i want that when i call the function if the value 0 isn't in the array then set text: value not found, i have different values in the array that change with the other events then i cant use a specific value to do this.

  • a small error in event 16

    lol, i recheck for 1 hour the events and didn't see that. thank you so much for your help!!

  • check this capx

    4Answers.capx

    Amazing!! Thank you so much for your help!!!!!!!!! i spend the whole day analyzing your capx and modifying it, please give me a little hand with this little issue, i am trying to use a loop to not show the questions that you responded with two good answers however i cant get the second answers to work because some answers repeat in the four spritefonts (this didn't happen in the first answers, your original function) and if the loop doesnt finds an unanswered question in the array how can I put a test that says "no questions left"?, the idea is to show the questions with one bad answer again at the end of the round and don't show again the questions with the 2 good answers responded.

    I tried to replicate the your original function but didn't worked, i don't know why

    http://www.filedropper.com/4answersv2

  • You can use the RandomArray plugin to get four random indices. From there you can pick though various means, one being "Pick nth instance".

    if i have a list of 1000 words is not more easy to make something like this?

    This is working to me, with random the probabilities of get the same word in the answer are 1 in 1000? , even if i use the RandomArray how i can put the correct answer in those sprite fonts?