briggybros's Forum Posts

  • for the map generation I would use a seeded perlin noise generator, in much the way you would use to create an island in 3D but just set it so if the height is greater than x the tile is land, and if it is less then x it is sea. See here. It is important to seed the generation else it wont give you an island, but instead areas of water and land in a cloud-like pattern.

    As for the trees and rocks you could use a loop while x is less than the number of tree areas you want, pick a random position. If that position is empty land, then continue, else break. Then from that position, place x trees by moving random values (within reason) in x and y and placing trees there until you have x trees in the area. The same can be applied to the rocks. As for the interaction, when the player wants to move check that its not into a rock before allowing the move, if it is, prevent the move. If the player is looking at the coordinate of the tile given +- arctan(width-of-tile/distance-from-tile) degrees and is a suitable distance from the tile then a use key should do the required function.

  • Ashley sorry, I forgot that was in there, the download has been updated with it removed as the problem persists.

  • You know the value of the data in the x yeah?

    loop through the array in the x direction until the value you're looking for is found then do Array.At(loopindex, 1)

  • While taking time off my main project and was just messing about and made this, I don't really know what it's good for but I feel its rather sweet <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    I don't know what to do with it, I might just leave it as is. If anyone has any ideas fire them this way <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    https://www.scirra.com/arcade/other-games/bunnies-603

  • Does it matter that the game disconnects? You could just save everyone's data to a peer when the host disconnects, start a new room with that peer as the host and then force all the other peers to join that new room. If you have a host migration gui while it happens and do all the connection stuff in the background then it would just be a few seconds and then straight back in!

  • https://www.scirra.com/arcade/other-games/bunnies-603

    How about this? The rabbits are bound within the region of the field and wander around it. They also go into holes and come out of other ones.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Then you should look in C2Runtime and search for black, 000 or 000000

  • [...]

    You can change the background color to any color. Look at HEX color codes (they are made of # and 3 characters)

    using only 3 characters (#RGB, where R,G,B represent the values for red green and blue respectively) limits the variety of colour you can have (3,360). I know it's not required for this post, but just for reference, you can make a colour like #RRGGBB which gives 16,581,120 different colour combinations.

    NB: My maths on the permutation numbers may not be up to scratch.

  • For the free roaming AI, you could store a range of where it can move, eg max x, min x, max y, min y, then use the pathfinding behaviour, select a random x and y coordinate within that range and have the character move to it with pathfinding. Once they have reached it, move to another random point, repeat. This may not be exactly what you're looking for, but it may be a start.

  • When working with the multiplayer object the way you work with C2 is different, you need to be able to work with two states in mind the peer and the host. If you can grasp that then there shouldn't really be anything stopping you from working with multiplayer.

  • You could do host migration so long as you have at least one person in the room. Point 3 is also possible so long as there is another host there. For both cases here, if there are not enough people playing the game, then the methods will not work effectively.

  • make they layout wide and apply the "scroll to" behaviour to the character.

  • Problem Description

    ____ A concise description of your problem here ____

    When running my project in debug mode with NWjs, if an alert is closed via the red cross it comes up with this error:

    TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'.

    at TypeError (native)

    at instanceDestroyed (http://localhost:50000/debugger.js:434:11)

    at onMessage (http://localhost:50000/debugger.js:233:6)

    This does not occur when using the normal play mode.

    I cannot recreate this error in a new project, so have attached just the first layout of my current project.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/70605402/error.capx

    Description of Capx

    Simply the first layout of my project with all elements not influencing the problem removed.

    Steps to Reproduce Bug

    • Open project
    • Run from layout 'Loader' in debug mode
    • When the browser alert pops up, close it via the cross
    • If it does not error then restart with the restart button on the debug section of window. (Repeat previous step)

    Observed Result

    NWjs throws an error

    Expected Result

    No error <.<

    Affected Browsers

    • NWjs

    Operating System and Service Pack

    Win 7 Ultimate - SP1

    Construct 2 Version ID

    207 64 bit

  • Would be nice just to have it as part of the text object, but this will do

  • From what I can see, there is no way to set the vertical and horizontal alignment of text from an event sheet. Can this be a thing?