nimos100's Forum Posts

  • What wondering about the resources that the inspector uses. I know that it does hurt performance when using it. But it seems to use a lot more resources that you would expect, the reason for my wondering is because my current program is very small (207 events) and 49 objects, however when in the inspector (Inspect mode, System) it uses between 20-49% CPU and a FPS drop of about 6 to 13, which i find to be quite a lot for a program of this size.

    If I switch to "Profile mode" to see what is using these resources it instantly drop to 0% CPU and 60 FPS indicating that nothing is being used, which I would expect as nothing is really happening in the game in its current state.

    Also if i switch to any other object than the "System" it again goes to 0% CPU with no FPS drop.

    So something in the system tab seems to use a lot of unnecessary resources, whatever it is that does it, i think it would be better to remove that part of the system, because it seems to provide inaccurate data while in that tab.

  • You should correct your title. It should read "Are there any C2 roadmaps?". My answer is no, I don't think so.

    Yeah wrote it a bit fast

  • Was wondering if there is a roadmap somewhere of what things are planned on being added to C2 in the future and in what order, what is currently being prioritized etc?

  • I honestly can not think of any simpler way to show what I am trying to do without someone looking at the .cpax

    Think you misunderstood me, I weren't referring to what was in the screenshot it self, more that it was so small that its difficult to read the code as some of it is really blurry.

    But anyway I think Ramones solved it.

  • A For loop will go from a starting value to its end value with an increment of 1 each time it loops.

    So:

    For 0 to 5

    (Will start at 0 and end at 5)

    So 0,1,2,3,4,5

    You can get the current index of a loop by using loopindex. This also means as C2 encounters a loop it will finish it before continuing. And guess that's why you think it jumps to the end, but in fact its running 5 times through the loop. So if you at the end of the loop have something that would be an end, then that is what it will be.

    But when the loopindex is = 5 in the above example then the loop is done and C2 will continue with whatever.

    In your example you would normally do like this:

    Every 1 second

    For 1 to Variablestorenumber

    ...do something

    (Which means that every 1 sec you run a loop starting at 1 and end at "Variablestorenumber")

    So its predictable in the sense that you might know the starting value and the end value, or at least based on some calculations know them and you know that it increment by 1 each time.

  • OK, I am approaching this from a new angle. That being instead of having a array for each character I now have a Dictionary for each one.

    Each Dictionary has 7 values and having 3 Dictionary when I run the for each Key where adding 1 to a variable gives me 21. However now when I try to narrow down that list to only add 1 for each key that has the string "T" in it I should get 3. Instead It will not run the block and my debug var stays at 0. I have tried using compare values, in both the dictionary and system. As well as compare current value that is in the for each loop section.

    I am starting to feel that I may have a bug as everything I try that should work will not in the way I understand it.

    >>EDT<<

    Damn, I just opened a new empty project and only added what I absolutely needed to test it and it worked just great. Sooo that means to the best of my knowledge all my problems more likely than not are instances where C2 is bugged.

    PS How many dictionary's can I have and the game still function? Because I may need a lot.

    >>EDIT2<<

    And now making yet another new file I now can not do the exact same thing I just did in the last new file Ive noticed a *at the end of my project name on the right hand side. Does this mean anything?

    Its very difficult to see what you are doing on the screenshot. But something could seem like there are no "T's" in the dictionaries, have you checked that there actually is or do you assume that there are?

    I don't think there are any limits to how many dictionaries you can have in your project, so dictionary away

    The * on the right side next to the project name just means there are unsaved changes to the project.

  • You can run the game in debug mode, and choose profile in lower right corner it will give you an estimate of what events etc are using the most CPU. However I don't think there are anyway to see what a specific object uses of memory. And therefore no way to select objects using more than 20mb of memory.

  • [quote:205wgrcy]

    Would it still be too much if instead of using own map for every instance you would use predefined amount? For instance on this RTS example there would be 2 (air units probably don't need one), on old X-com there is 4 and on X-Com: Apocalypse there is 9 etc.

    Using one for each instance I think would create some serious performance issues, and would probably be a bit overkill. If you should do it like this, I would prefer there not to be any redefine amounts of obstacle layers. People should instead just be aware that adding to many of these would hurt performance, just like if you add to many collision points to an object in the editor it gives you a warning. But as you wrote that would be the overall idea to do it like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem is there is only one global obstacle map used for the pathfinding behavior. Everything pathfinds on the same map. So if you have object A with two obstacle types, and object B with no obstacle types, you have a conflict: should the one global map have those objects as obstacles, or not? In this case it happens to pick the global map where no obstacle types are defined. If you delete the red object there's no conflict any more and it uses the right obstacles.

    I'm not sure how to resolve this - having multiple maps becomes memory inefficient and possibly slower, but on the other hand perhaps the obstacle types should be global as well to avoid this situation... the easiest thing to do is to make sure you have the same obstacles added for every object using the pathfinding behavior.

    I can see why it would be memory inefficient, but as it is now the purpose of using custom obstacles kind of vanish as the benefit of using them, rather than just making objects solid was so you would be able to control obstacle settings for individual objects more specific I guess?

    But the moment you have 2 or more different types of objects, the behaviour will bug, for instant a game where you have two units using pathfinding, a "Ship" and a "Tank" and for the ship you want the land area to be the obstacle and for the tanks the water area. Then there are no way of using pathfinding as it is now, as i see it? Im actually working on a game which uses both ships and land units, and what made me notice this problem in the first place.

    Im by no means an expert in pathfinding, so might not be a huge help in finding a solution, but I did search around a bit for things, and I found something called Navmesh, whether its useful or not I have no clue.

    [quote:2q7bd8gr]

    From the second link

    Benefits of a Navigation Mesh over pathnodes:

    Reduction in node density

    Since with a mesh we can represent a large area with a single polygon, overall graph density goes down. This is a win for many reasons:

    Memory footprint is reduced with the decrease in nodes being stored.

    Pathfinding times go down as the density of the graph being searched shrinks.

    Less nodes means less time fixing up cross-level pathing information

    A* with NavMesh Detailed

    Navigation Mesh Reference

    Edit:

    Another way that might work, could be if you could create obstacle maps kind of like you would a layer. So as you add them you would be able to choose which obstacle map an object would use in the properties panel just like with layers. And maybe be able to switch them around during runtime and so on. But don't know If that would cause memory problems as well.

  • It makes it much easier if you are tracking your tiles using an array.

    Here is a nicer example of "Bitwise Numbers" to automatically tile what you draw for you.

    HTML5 Demo

    Just left click to place a tile. Ignore the tilemap it was something I had laying around from an old prototype just imagine the sea/blue is the grass and the sand is your dirt.

    Here is more info on Bitwise Numbers definitely worth reading it's a great explanation of bitwise numbers.

    [attachment=0:1wv0765z][/attachment:1wv0765z]

    Ahh ok I see what you mean that's pretty clever to be honest. Ill have to try that out some time. thanks

  • Maybe I misunderstood the program, but I don't see how that relates to this issue, besides that its generate the tilemap for you a bit easier.

    But the tilemap that it creates will as far as I can see not be able to handle this situation either, if you use what I refer to as an external correction method, that you couldn't solve yourself, by adding some more tile options?

    The program seems to use an internal correction, but again it doesn't change the fact that you still need to add a lot of code to make it work. But maybe i misunderstood the purpose of it or do you mean that if you use that program and just hook it up to C2 then you wouldn't have to make any checks, it would just handle it for you automatically?

    Because I tried to download the demo capx in the link that was posted, and i see no particular benefits in the code that would suggest that it does such thing. The code seems to just be another way of working with tilemaps, but whether you made it like that or some other way, doesn't really change anything you still have to do it yourself one way or another.

  • Tiled supports auto-tiling and can be imported to C2. So you can design maps in that and import them to Construct 2.

    https://www.scirra.com/tutorials/1128/auto-tiling-with-autotilegen-and-tilemaps

    And there's a lot more examples on the forum.

    Well I will definitely check that out later, had no clue that something like that existed

  • [quote:344c85pd]You wouldn't want to take a look, huh? I end up with way more than 8 corrections, but maybe I'm over complicating it. I start to "get it" but then it stops making sense when I get around to implementing it.

    After doing an example I think you need 12 in total to make it work. Here is how I would approach it.

    If we do an internal correction of the tiles, meaning that we replace the actual farming tiles with the correct ones, it could be like this:

    Which will work fine if the farming area is a minimum of 9 tiles. But that is not going to be very flexible and it doesn't work well with different shapes.

    In this case all single tiles will cause some problems and would create some weird spikes in the farming plot. So instead we can do an external correction. Indicated by the blue dots. So if we start making all the horizontal and vertical corrections (Top, Bottom, Left, Right). We would end up with something like this.

    Next we do it for the outer corners which again requires 4 corrections. (Top left, Top right, Bottom left, Bottom right) and then we would end up with something like this:

    So last we need the inner corners, in the screenshot there are only 3 dots, but obviously you need 4, but its just not in this shape. But again it requires 4 corrections (Inner top left, inner top right, inner bottom left, inner bottom right) and then you would be able to make any shape needed.

    So I would approach it like that, split each correction up into these categories. And just focus on 1 of them at the time, and don't worry that it doesn't look correct until all of them are made. And just work on one shape all the time until it looks correct to avoid confusion. And when that shape is working, then try to make some other random shapes. Because even though I say that these 12 correction will allow you to make any shape, it actually not true

    The moment you get a shape like this, then it wont work anymore.

    So you need to find some way to handle situations like that as well. But if you focus on all the problems at once, I think it will be very confusing.

  • I know the basics, but was hoping there was something already done to make this an easier process. It's driving me nuts trying to do it alone, but what I'm trying to accomplish is for a character to "farm" land, and the border of the land to auto-fill with the proper border. The closest thing I can think of to this is the way RPG Maker handles putting land on water or vice versa. What is this called?

    BTW: This is the current "farming" tiles I'm using. Is this the proper format (enough images, that is) to "auto-tile" the borders?

    Think I mentioned this in the other post, as soon as you have stuff that are bigger than the tile size then it starts to get a bit complicated

    I don't think there are any other way than to make it so you check the surrounding tiles and correct them. I used a similar method in my Random dungeon generator tutorial - https://www.scirra.com/tutorials/999/random-dungeon-generator-node-based#h2a13 - Step 9, this is ofc a bit different as I work with hallways, where there are certain limits to how they can be arranged, where I guess the player in your game could make the farming area whatever shape they like. So in your case you would need 8 corrections I think, where as I needed 4 because of there being no directional corrections needed.

    However what you can do is start by placing a square farm plot on the map using those tiles that are just dirt. And then you add functionality that corrects these, so it create a border around that. When that is done you should now have the ability to correct Left, Right, Top, Bottom tiles. So you create a new shape maybe one that is in the shape of a horseshoe and again you try to see how you can correct the borders on that one. And you just keep doing that until you have all the stuff you need to make any shape. Doing it like that will make it a bit easier to see where bugs occur and what tiles still need to be corrected as you work.

    But it seems that you have most types that you need, might lack 4 tiles for turning but if you do it like above and just build the shape in design view it should quickly show whether that's the case or not.

  • it took me a while to exactly understand what you wrote... and on second thought i have to go with my aproach. i want to use the instance variables, as i need more values than just the description. and it seems to be "cleaner" for me if i dont define all that over the actions but in the instance variable for the objet itself

    let me know if i am wrong here...

    regards

    patrick

    Think my last post answered it