nimos100's Recent Forum Activity

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies