oosyrag's Forum Posts

  • Thought about this some more... Since cellular noise and Voronoi noise using the same seed results in the same cells, you can run a search from any given point using the cellular noise data. Check each adjacent pixel (or other arbitrary resolution) from that point to see which has a higher value, loop until you reach the highest value. That would be the origin of that cell, which can be transposed on to the Voronoi noise map.

    If you have a set of node coordinates for each cell, you can use Delaunay triangulation to build a second set of coordinates, which would be the vertices. From those you can define edges which would be the cell borders.

  • I believe there is an angry birds type example on the start page.

    Edit: editor.construct.net

  • Sounds like a good excuse to have the customer keep you on a retainer for updates.

    I do think it's a valid concern though, and I don't think it is currently possible in C3. It's going to be one of those compromises you'll have to accept for using a third party engine as your primary development software.

    Perhaps file a suggestion

    at construct3.ideas.aha.io

    Edit: Note that this is probably undesired for most people by default. Besides the loss of optimization, it's very easy for end users to abuse the accessibility of assets, leading to the game being broken or cheating. Imagine what could happen if you made a particular object bigger or smaller, or transparent when is is supposed to be obscuring, ect. Normally you want only the developer to be able to modify game assets. So your customer can license C3 and you can provide them with the project file to edit themselves, or they can retain you to update the game for them when they send you new assets.

  • Int does removes the decimals. It effectively rounds towards 0.

    Floor rounds towards negative infinity.

    Ceil rounds towards positive infinity.

    Random gives you any number from the lower bound up to but not including the upper bound.

    Round(random(0.5,100.5)

    Floor(random(1,101)

    Int(random(1,101)

    Floor(random(100))+1

    Int(random (100))+1

    Are all equivalent, use whatever whatever you like.

    Ceil(random(100)

    Is also basically the same thing, except you have a negligible chance of actually getting 0. And since I'm being needlessly pedantic now, I believe JavaScript uses a 53 bit float, so the actual chance world be around 1 in 90 quadrillion or so.

    int(random(1,100)) can never result in a 100 though, while round(random(0.5,100.49)) has a 1% less chance to get 100 compared to 1-99, and round(random(1,100)) would have half the chance of getting 1 or 100 compared to the other numbers.

  • I believe so.

  • (int(random(1,101)) if you want to include 100.

  • To check an object with other instances of the same object, use a family.

    To check neighboring positions, use the overlapping at offset.

    To check multiple positions, right click the event to change it into an or block.

    Alternatively, you can use the system condition pick overlapping point to check the 4 neighboring positions, then check if pickedcount is < 5, including the center object.

  • Normally you would use an array for this, which already has indexes built in and easily accessible.

    As for spelling something gradually, you might look into the left, right, and len system expressions, to get part of a string.

    Tokenat is also an option, as a method to store and retrieve multiple values as part of a single string.

  • Use mysql with android apk ? php or json

    Yes. Use the AJAX plugin to request post to a php URL with a mysql database behind it. construct.net/en/make-games/manuals/construct-3/plugin-reference/ajax

    There is a JSON plugin as well.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/json

    Use Facebook login with android apk ? "maybe see friends"

    Yes, you can use Facebook log in. I don't believe the plugin has any functionality to access the friend list, although you might be able to do something directly with JavaScript, which C3 also supports.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/facebook

    Otherwise, the Facebook Instant Games platform may have different functionality you might be interested in.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/instant-games

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I also ran into this logical roadblock when dabbling with procedural generation. How to get nodes and edges from a procedural Voronoi map? The data is there but how to get to it to utilize it...

    I think if I had continued I would tried layering it on top of another procedural map, for example terrain/elevation, to further further modify the elevation values or add terrain features to suit a particular biome, based strictly on the value returned by the Voronoi noise at each coordinate.

    Another idea I had, if using the Voronoi noise pattern to define spaces like on a board/tactical game for example, would be to use some sort of flood fill algorithm on any given spot until the returned value changes. Then at least I would be able to get the top/bottom/left/right bounds of any cell area, and maybe use the center of that as a node position. Defining edges between nodes should be simple enough from there.

    For a more accurate node position, you might be able to count and weigh the number of tiles/pixels in any particular cell and see how many fall in each quadrant relative from the "center". That might be just running the actual Voronoi noise algorithm backwards, I don't know. The formula should be out there.

    No ideas on how to get vertices and their edges though, to draw borders between cells or implement something like a river between biomes...

    Sorry if this doesn't help much, just thinking out loud. I didn't get very far in my experiments myself. I suspect you'll find more insight at /r/proceduralgeneration/ than on these forums, even if they aren't familiar with Construct. They would probably have more ideas and experience on how to use and apply the results by themselves even when the generation of the noise is obfuscated.

  • Multiplayer signaling actions are asynchronous. If you put them in the same event as the layout change action, you will leave the layout before either of the signaling actions complete. Notice that the "Signaling: left room" and "Signaling disconnected" message logs never show up, even though there are events to log when they happen. So basically what is happening is that you never left the room as far as the signaling server is concerned, therefore the "join room" action will no longer work even if you leave the layout and come back with a new peerid/alias. The second time you go to the game layout, since you're already in a room and the auto join room action fails, the following "On Signaling Joined Room" event does not run and assign paddles to host/peer.

    If you do the following, it works fine:

    + Keyboard: On Escape pressed
    -> Multiplayer: Disconnect from room
    -> System: Reset global variables to default
    
    + Multiplayer: On signalling left room
    -> Functions: Call AddLog (message: "Signalling: left room")
    -> Multiplayer: Disconnect from signalling server
    
    + Multiplayer: On signalling disconnected
    -> Functions: Call AddLog (message: "Signalling disconnected")
    -> System: Go to Login
    
  • You'll want to use a text object attached to your enemy sprite in a container.

    When you type, you'll be able to compare the player input to the contents of the text object to pick the matching text object. If that text object is in a container with the enemy sprite, the correct enemy will also be picked. From there you have the proper target picked and you can do whatever you want with it, including get its position or destroying it.

  • Gonna start off by saying this is decidedly not a beginners topic, and that there are so many different ways to do it you're not going be finding a tutorial or template that will walk you through exactly the way you want it.

    Also, as far as game design goes, hand crafted levels are going to be superior to randomly generated ones 99% of the time, for much less work. I highly recommend building the rest of the game first, using a sample /example handcrafted level first, as the "fun-ness" of your game should not be dependent on procedural generation. When your core game is ready, you can add procedural generation of levels afterwards. By doing this, you'll also have a much clearer scope of what exactly you need your procedural generation to do.

    Here are a few resources:

    The closest thing I can think of from your description would be levels similar to Dungeon of the Endless: youtube.com/watch

    gamasutra.com/blogs/AAdonaac/20150903/252889/Procedural_Dungeon_Generation_Algorithm.php

    squidi.net/three/c_procedural.php

  • If wallclock time doesn't work, use date.now.

  • You can use system wallclocktime, or the date plugin's now expression to get Unix time.

    Dt by default has a limit of 30 fps (minimum of 0.033. You can change this by the system action set minimum framerate.