Grimmy's Recent Forum Activity

  • In the end I just used two - one dimensional arrays.

    I transferred only elements to the 2nd 'temporary array' that had values greater than 0, cleared the initial array and then transferred them back.

    I was original using the 2d array layout to dictate the visual (like a chess board) but because I switched to a 1d array instead I had to control the layout using instance ids of each array element.

    To conclude; This experience made me scared to use anything other than a 1d array in future as there seems to be very little control to pop/push over individual elements in 2d or 3d arrays .(only complete axis)

  • Yes that's exactly what I mean. Apologies for the confusion.

    Overnight I had the idea that a good approach to this might be to create a temporary 16 by 16 array and then for each element in the original array; copy values across IF they are not null/zero. The new array would then be arranged as in the above example. ie no gaps in the middle.

    Testing now...

    UPDATE. Not possible because it seems there is no simple way to just push something to the end of a 2d array. ?!?

    It looks like another approach maybe to convert everything down to a 1d array, do the edits and then turn it back into a 2d array.

    Another idea is to have 16 1 dimensional arrays of 16 elements each...

    ...although I suspect this is waaay overcomplicated for what it needs to be.

    Accepting all ideas here :)

  • I have a 2d array of data. A grid x and y which is 16 by 16. Each element contains some data ( a string).

    I want to remove a single value from the grid and everything after if shift up so there are no spaces. Imagine removing an entry from a list of items, you want everything to shift up and not display empty spaces.

    Because this is a 2d grid I would want everything on the same row to the right to shift left and the same for all rows below it with values moving up a row to fill spaces at the right hand side of each row.

    I have been trying to figure this out for hours with my 2d grid array but cant seem to do it. Is there no command for the array which splices them like this automatically?

    The delete seems to delete an entire axis which is not what I want. Just a single element needs to be removed.

    Note: I want the array size to stay the same (16 by 16) all the time. but ones with null/zero values be put at the end.

    Tagged:

  • Lets say I have a bunch of instances that get created based on a for loop (eg For each Foo ...create Bar ) which is inside a function.

    ..but I want a little delay of half a second between each; how would I do this?

    Putting waits inside the 'for each' loop (between each iteration) would be my first thought but that just doesn't work.

    Thanks

  • Hi, since I published my last version of my app with construct I'm noticing a lot of crashes appearing on the crash reports. Today I even had a customer send me a video of the game not starting properly on their device.

    On all my test devices the game seems to correctly but obnviously it IS crashing for some. The crashes I see are :

    • android.view.View.populateVirtualStructure
    • [vulkan.adreno.so] !!!0000!8fc203f72276cff568aecfb05c6306!5441528417!
    • [libGLESv2_mtk.so] glScissor
    • android.view.View.populateVirtualStructure

    How can I solve this as to me it looks more like an engine issue? Maybe Im wrong?

    I'm not sure exactly which version of construct I used to publish it but it was published around a couple of weeks ago.

    Cheers

  • Is there a more detailed answer than this? I noticed LDTK seems a way ahead of Tiled these days..

    For example;

    Do I still use a tileset or individual sprites?

    How are layers handled?

    How are atlasses handled?

    Should I use javascript or events? There is a js library in ldtk.

    Has anyone written an importer before for c3? Have you actually done this? Is there a step by step guide anywhere?

    If the JSON format is consistent it seems like something the community needs doing once only and so might have already been done..

    Cheers

  • Great Thanks. I got it working but I have no idea how. I'm going to try to implement different noise types then will update more here. Thanks again.

  • I am making a small grid of drawing canvasses. (To test seamless noise)

    I have 2 Drawing canvasses each 200 by 200 pixels sitting pixel perfect next to each other in my layout.

    When I scale my browser window I see a single pixel column gap flickering between them. Why is this?

    I have tried changing the Fullscreen mode and also switching on pixel rounding but I always see the gap at certain resolutions.

    How can I fix this?

    Thanks

  • Thanks very much for this. I got the javascript implementation working in C3, but again, there seems to be no customization options or any way to make the noise seamless afaik :(

  • Hi again, DiegoM I tried simplexnoise2d.js but surprisingly despite its name it seems to be written in typescript. This mean when I bring it into construct I just get a ton of errors.

    I always thought c3 supported typescript but it seems to rename everything to .js and also throw errors.

    I just saw the help on typescript. Seems a lot of effort just to include a library.:(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks fedca, yes this was my initial approach but sadly I dont think there is a way to make the advanced Random Seamless.

    Although Im still hoping there is :)

  • Well, after spending quite a bit of time with this I realised FastNoiseLite doesnt do 'seamless' noise ; which is really what Im after.

    So, does anyone know any library I can use to generate seamless noise in construct?

    I saw a few but tried them and they all have very weird setups that I just dont understand how to import and use in construct. I just get errors. For example, one begins like this...

    function Grad(x, y, z, t) {
     this.x = x; this.y = y; this.z = z; this.t = t;
     }
    
     Grad.prototype.dot2 = function(x, y) {
     return this.x*x + this.y*y;
     };
    

    ..which is neither a class of regular function, others have other, even weirder looking setups and I just get errors everytime I try to hook them up.

    I am well aware of using export and import but I cant get anything working.

    Does anyone have any recommendations?

    Thanks

Grimmy's avatar

Grimmy

Member since 20 Nov, 2012

Twitter
Grimmy has 2 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

16/44
How to earn trophies