mOOnpunk's Forum Posts

  • I see.

    Ashley

    Can you shed some light on things?

    is _draw V2 or V1?

    Thanks.

  • Hi.

    You seem to be using _draw for rendering which is SDK v1 i think?

    Half my problem is trying to get Draw() SDK v2 to work.

    I'll keep looking.

  • That very much for your help.

    My experience mirrors your own. I made a polygon plugin which uses ear clipping and can render concave shapes, it all works fine in the editor, but trying to get it to work at runtime since it uses different methods is annoying.

    The SDK is unhelpful. There are hardly any example files. We don't have access to built in plugins to study them. I tried looking at some 3rd party ones in the repository, but there aren't any graphical ones and most are V1.

    I will take a look at your example and figure out what i'm doing wrong.

    Thanks again.

  • Is there a simple graphical example i can study some where?

    The SDK is very confusing. A lot of it says SDK V1 only, you click a link to SDK 2 and it sends you back to the same SDK pages with warnings at the top.

  • Thanks.

    If i use my method i can get the object to render but the bounding box doesn't update.

    If i use your method, the bounding box works but the i cant get the object to render at runtime.

  • How do i get the bounding box of my object to update when the window is resized?

    Construct 3 updates this.x and this.y when the layout resizes but getBoundingQuad doesnt appear to be automatically called. I'm using layer.layerToCssPx.

    It updates when i use SetPosition.

    Don't now if any of this is correct as i'm new to this.

    Thanks.

  • You do not have permission to view this post

  • Thanks ASHLEY.

    One of the issues with drawing canvas is that if i space the stars out more, which i need to, then that increases the memory used considerably. That's why i wanted to use a polygon, or mesh, so i can use a small sprite and stretch it. It only needs to be white so i can colour it at runtime and use blends for textures.

  • Would a polygon plugin be possible in c3, which uses ear clipping?

    I don't have experience making plugins, but do we have access to polygons in the sdk from meshes?

  • Very impressive as usual. Thanks very much for your help.

    This maybe the way to go. If so I'll probably convert it over to JavaScript.

    I was hoping there was a way to do it with a mesh, as the issue with canvas is the memory it uses soon gets quite large with big shapes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll look into “Ear clipping”, thanks.

  • Unfortunately all the shapes are pretty much concave, and since its all procedural i can never be sure. I've tried convex but it never renders the shape accurately.

    I would appreciate increasing the limit to 1000.

    What I'm doing is already really complex, delaunay triangulation, centroids, creating local boundaries, joining boundaries into clusters, clusters groups within cluster groups within cluster groups etc.

    It seems to work well most of the time, with some really complex shapes.

    It would be an extra layer of complexity to split the shape up into chunks.

    I'll have to think some more.

  • I'm currently working on making star maps like the game Stellaris.

    I'm trying to render the regions controlled by different teams. I'm using a sprite with mesh distortion to create the outline of boarders (so i get a nice sharp clean edge rather than pixelated edge), and the canvas object to draw the inner solid colour.

    The issue I'm having is in some circumstances the canvas wont render properly, 99% of the time it works though.

    The points are ordered correctly, as they use the same points as the mesh object, which is the correct shape, so i've ruled that out.

    I thought it might have to do with having "convex" checked when filling the polygon, but that made things worse.

    Then i looked in the console log and notice this.

    "quick decomp: max level (100) reached". Related to polygons.

    It only comes up when i notice the rendering error.

    I'm kind of stuck. The mesh object being square grid based cant render such complex shapes. I've tried writing a custom shader but shader files don't support token strings so each point would have to be a separate parameter, which is not feasible.

    Ashley any help?

    Thanks

    Tagged:

  • Are you talking about using AI to help develop and code your game, or AI inside the game being played to control character behaviours and things?

  • I don't know how you would control the 3 different functionality of zoom, pan and rotate with just touch, unless you added the relevant buttons on the screen to touch with one finger while dragging with an other?