jimutt's Forum Posts

  • Thanks for a great and detailed answer!

    I think I'll go with the idea to have the character follow an object with the pathfinding behaviour. I think it'll be one of the best methods for this case.

    Thank you very much!

  • I'm looking for feedback on how to best implement pathfinding for my game idea.

    I've made a small illustration to make it easier for you to understand what I'm talking about:

    You're looking at this 2d building from the side. You've got multiple rooms and between the rooms there are doors that can either be locked or open and there are ladders connecting the two floors.

    Let's say we now have a character in the building. And he (let's imagine it's a guy) stands in Room 2. To move him you click on him and select where you want him to move. If you click in Room 6 he will try to find a way of getting there and then walk there. In this case he would need to move to Room 3 -> Room 4 -> Room5 -> Room 6 to get there.

    I want you to help me with ideas of how to best implement the pathfinding and routing for this kind of game mechanics. Is there any way to adapt the pathfinding behaviour so that it will work with this, or will I be better of by making my own implementation?

    It should be possible to create arrays containing information about which rooms are connected to eachother and then implement a routing algorithm for finding possible ways to get to the destination. But I really want to make it as simple (but still good of course) as possible so therefore I will be happy to recieve some feedback from other people.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you ramones, sorry for my late reply but I think you're idea will work just fine.

  • Oh.. Well that was a silly problem.. Thank you! But are there any similar way to select instances with a specific UID? As I'm using two UIDs in the same event I can't "pick by UID".

    I got it working by first getting the UIDs and then from the UIDs I selected the correc IIDs to use. The issue then is that if you delete a node the IIDs will change. Which means I would not too run a routine to update all connections to use the right IIDs. So it would be more neat if you could use the UIDs directly in an expression.

  • Hi!

    I've got some issues in my program. The idea is that when you hold the key "c" and click on two nodes the nodes will be connected by a black "wire". And if you press "a" you can create more nodes. Everything is shown in the video below. It all works well for the objects created in the editor. But when adding new objects by pressing a and clicking a free spot the connection feature won't work anymore. See the video here: http://youtu.be/sztt1364HlU

    Here is my .capx file as well: http://www.mediafire.com/download/q6q5w ... oblem.capx

    I will be very thankful if someone can tell me what I've done wrong. Perhaps it's just something silly that I've missed. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    The positioning of the wire object is decided by the nodes UIDs as you'll see in the code. But as it all works with objects created before running the program I don't know what's wrong really.

    Some of the logic in the program is a bit wierdly implemented but it's a quite small program after all so I think you'll be able to see what's going on.

  • Thank you codah! Should work just fine Haven't worked much with containers earlier though so didn't think about that. Thanks!

  • Hi,

    I'm trying to setup a small routing simulation in Construct 2 which will in a casual (not truly like the way it works in reality) simulate the the way internet routing works. The user is able to create networks with nodes/routers. Each router object will need a routing table where for example net addresses and cost values will be stored.

    So what I would need is to create arrays for each instance of the router object. Of course it would be possible to create one really huge multi-dimensional array where all routing tables will be stored. Though this will not be a "pretty" solution and it would not represent what it looks like in reality. So I'm wondering if there is any way you can programatically create array which you tie to an instance by for example giving it the instance UID name?

  • Alright. Well I'll probably go with just the 0.1 delay. Thank you for answering!

  • Are you refering to the file format of the recordings? Because the recordings are "clean" without any distortions.

  • I'm having some issues with the audio feature. I want to have quite long sounds that will be stopped before they have been played to the end. Though when using the audio "stop" function I get a strange popping sound right when the sound is stopped. Is there any way to bypass it? This sound is not produced if changing the volume to -100 db for example. But as I want to stop the sound and just not mute it it would be nice if this was doable without getting distortions when stopping it.

    Here is the file I've used for testing, press the red squares to play the sound: http://www.mediafire.com/download/0fkdb ... dTest.capx

  • Well now this thread is pretty old. But still we've seen no sign of this requested feature (if I haven't missed it). Would be great to get a status update as I believe this is very important for the current pathfinding system which is not very good for certain types of game due to the lack of a fast solution to dynamically add and delete obstacles.

  • A very very early image (just to give myself some ideas) for a MMO mars exploration game I'm currently thinking about:

  • I managed to get it right after a much needed night of sleep ;)

    The size for the array is 1,2,5.

    Really don't know how I couldn't get that right last night. :P

  • I'm trying out the JSON and AJAX functionality in Construct 2 and I just have a quick question. I'm just too tired for getting this right.

    When you load JSON data into Arrays you have to use the specific Construct 2 format for the JSON data. Which means you have to put this information before the actual data:

    "c2array":true,
         "size":[
              xsize,
              ysize,
              zsize
         ],
    

    What I'm wondering is what array sizes (see the code window above) I should enter for this array which I generated from a my MySQL table:

    [["1","4","5","Brasiv","12300"],["2","3","7","jimutt","6783"]]
    

    Thanks in advance,

    Jimmy

  • You could draw curved solids an then edit the collision polygon to your liking. (http://www.mediafire.com/view/bkyqt5bo9655xh3/colpoly.jpg)

    Keep in mind though that more points in the polygon means more resources are needed for the game to check for collisions.