tarek2's Forum Posts

  • Well, thats exactly the kind of thing you should be able to make your own performance measurements of... but for what it's worth, Construct does drawing work for every individual tile, so the total drawing work will always be proportional to the number of tiles. However I think in the C2 runtime, if the tile texture is the same it doesn't need to switch the texture, which is faster. (In the C3 runtime it can render the entire tilemap without switching texture at all, even if every tile is different, hence the large performance improvement.) But either way it's doing drawing work per-tile; in the C2 runtime the amount of work per tile depends on the tile.

    Awesome thanks a lot for all the Extra details really appreciated, I'm looking forward to Subscribing to c3 again I just have one problem to solve with MoveTo Plugin is not available yet.

    The technologies involved are super complex - few deeply technical questions come down to a simple "yes/no" answer. You shouldn't expect things to be so straightforward, and you shouldn't get upset if you can't reduce complicated topics to such a simple answer.

    Ashley, I wasn't upset lol, You missed my point about (Yes or No) it was in good faith :) Basically, I felt that you don't wanna talk about this topic for some X reason it can be because its complicate like you said etc... And I know you must be very busy with all the Staf that you have to do so I didn't want to take any of your Time that's why I said it will be enough for me just with a (Yes/no) obviously for me the more you explain the better because I will understand it a lot better feel free anyone if wants to go in more detail its much appreciated honestly.

    The one thing that it's a bit frustrating and that I just can understand Why you keep saying

    > "you should be able to make your own performance measurements of"

    Because just by the outcome of the answer if it was (yes or not) I shouldn't need to do any performance measurements, I feel like I'm missing something? or maybe that I didn't explain properly

    Just to make sure I explained Properly:

    Both Tests are displaying Tile ID = 9

    Both Tests Have 20 Tiles

    The only difference is that Test1 is just one object and Test2 is split into 5 Instances

    So basically is exactly the same thing

    Is Test2 gone take more performance just by the fact that is split into 5 instances even that both Tests is basically the exact same thing, just one is in one full Tilemap object and the Test2 its split into 5 Instances

    Test1

    Test2

  • Ashley

    Sorry to tag you again but I'm still confused as for when I first asked the question.

    I didn't get any info that Helped me to clear up my doubts and you are the only one can answer this question.

    Let me change the Question:

    Does the Draw Calls increase for each Instance of a TileMap Created displaying the same Tile ID?

    With a Simple Yes or Not will be enough to finally know the answer to my original question

    Thank you

  • Try closing the preview when you save.

    Hi

    Sorry, I didn't get what you mean, What preview are you referring to?

  • Only a wild guess. You could try to change the name of the png to lowercase and without any spaces (if there are any).

    Try: Change the name to tilemap2.png" and use "/tilemap2.png" to load from URI.

    Asmodean Thanks a lot mate it's working Great doing it the way you said, I couldn't find any example on the Manual and all the examples that I found on the forum they were using the external "http://" expression.

    Thanks again for that and take care :)

  • am I misusing the Load From URL or its a bug?

    After exported with PhoneGap and installed on an iphone6 when it loads the test I got 12 Messages "Failed to load image [object object]"

    I have 12 instances of a TileMap so is one message per instance.

    But if I just Test the same Capx over Wifi locally I don't get any messages it works perfectly and on my Pc too

    Capx:

    https://www.dropbox.com/s/4kfgi6eeeviel2d/Load%20From%20URL%20Problem.capx?dl=0

  • Ashley

    Ok ok you could just have written that on your first Comment lol :) for one moment I was thinking what's going on on this thread did I touch some obscure topic that you don't wanna talk about it and the thread is gonna end up in who knows.

    I'm not a programmer so I thought the answer will as easier as this amounts of calls or that amount, I understand now it's more complicated to answer not a problem sir.

    Just a quick note:

    A didn't have any problems yet I was just trying to learn the best approaches to make things depends on the situation and also good to know for future projects so you know what to do in each situation.

    Thanks for your Explanation and for your Time

  • Answer your own performance questions with measurements

    If you're concerned about tilemap performance, by far the biggest factor is the fact the C3 runtime has an incredibly faster tilemap rendering approach. It's something like 40x faster.

    Thanks for the Info but if you could just Answer the original question I could do the everything else by myself the problem is this missing information which will make the things much easier and quicker to asses

    If I have for example 4 Instances of the same TileMap and all display tile Frame ID=0 does it count as four Draw Calls or it just 1 Draw Call as if it was using one TileMap without Instances?

  • Thanks newt

  • IIRC Construct doesn't show you the number of draw calls anywhere - just the time taken for all draw calls. So what exactly does the answer affect?

    Hi Ashley, So basically I need to do an assessment to make a choice

    I'm in between of a dilemma for my current Project I don't know which way to go to make the most efficient for Performance purposes

    I have two options :

    1-EachTileMap have many Instances, and can be from 2 to 4 different TileMaps depends on the Level and different other Things, so you can multiply the Numbers of the different TileMaps by their Instances.

    So

    Example:

    TileMap1 x Many Instances

    TileMap2 x Many Instances

    TileMap3 x Many Instances

    TileMap4 x Many Instances

    So if a TileMap and Their instances displaying the same Tile ID doesn't count as one can be quite Impact on Performance

    2-The second Option was if the Option1 is not Efficient because of the Draw Calls try something else that involves loading TileMaps from URL etc... but I'm still Experimenting with URL thing so I'm not really sure if this will be better as has one problem that it takes a few seconds to load the TileMaps

    The explanation its very lite just to make it simple

    What do you think it could be the Best Option?

    Axely I opened a thread a few days ago about this but nobody replayed yet

    https://www.construct.net/en/forum/construct-2/general-discussion-17/tilemap-load-from-url-locally-140747

  • Does anyone have any Idea?

  • tarek2

    Have you tried without the browser add-ons?

    To be honest, I didn't think about that, Good point I will investigate more Next Time it Happens as it may be one of those Addons as Today I did quite a lot of Testing but with the Desktop version and I didn't have any problems saving it worked quite smooth.

    Thanks for the Tip

  • No, you don't need to be logged in to save.

    The best place to look for more details about a problem is the browser console - press F12 to open it.

    Thanks Ashley I forgot about F12, I will do more investigation with the Console next Time

  • So CS2 can not laod objects unless they are on a layer that has been visited right?

    You see, now with that we got to the Root of the Problem, this is the one that it didn't let you understand what I was explaining to you as you had the wrong understanding somehow so it was causing miscommunication and I knew from your first Replay that it will be very difficult to make you understand this concept that's why I decide to let someone else see if they can make you understand better without making you more frustrating. Luckily fredriksthlm came to rescue and made the Answer more simple to understand probably I talk to much :)

    Thanks, fredriksthlm

    To add more to what fredriksthlm explained:

    To make it more obvious here is the visual representation maybe will help you to see the things more clear.

    I need a Game that has Menu and Two Levels:

    -For Menu: I just need a Button

    -For Level 1: I just need the Enemy1

    -For Level 2: I just need the Enemy2

    1-Place the objects that the current Layout is gone be using during that Level

    https://www.dropbox.com/s/rnq1038jy49ldti/1-Layout%20By%20Layout.capx?dl=0

    or

    2-You can Put all the Objects on a different Layout you can Name it "Bank Objects" then you will be able to create the objects on RunTime, this is for developers that like to keep the Levels or layouts clean just with the Decorations

    https://www.dropbox.com/s/y1db18k3cp4oags/2-Layout%20By%20Layout.capx?dl=0

    As you can see you can start from any Layout and travel to any other layout without any problems and this is without Ever visiting any Layout that holds all the objects that the project use. Also, you can save and you can load without any problem.

    Things you got Wrong:

    1-First you need to understand the concept of why c2 tells you that any object that you gonna use it must exist inside the project before you can refer to it or create it.

    This is by design to avoid Exactly this Problem:

    here's an example if you try to go to "Level 2" you gonna get an Error Log because on the start of the Layout we have an Event that needs to create the "BadGuy" object but the BadGuy is nowhere in the project, so this is not about Visiting a "Layer" or "Layout" its about having the Objects inside the Project in some Layout.

    https://www.dropbox.com/s/ehv9clasccno9uw/3-Layout%20By%20Layout.capx?dl=0

    2-There is the second thing you need to understand that comes together in a Pack, C2 loads 1 Layout at the Time when you finish one it loads the next one so basically, its Layout by layout and this is to win Performance and to avoid doing the things that you where doing putting all the objects in one Layout and load that layout First on the start of the Game because if you think you load all the objects but you need to use just maybe 10% so you would have wasted 90% extra Memory Plus slows Downs loading your Game etc.... That's why it was designed the Layout by layout to avoid this, where you can just go to "Menu Layout" and load just the Objects that you need Example (Buttons, Txt, Icons) etc....and the other Levels the same just Load the things you need by request.

    I hope this clears up your doubts

  • I know that. But is it enough it exist in a layout once per save? Or must it be once per launch? Everytime the player launches the game, must that layer be played once atleast or it doesnt since u have a saved game?

    I'm sorry mate I found quite difficult to follow what you trying to say especially this >>>(once per save?)

    it looks like there is a confusion here or I didn't understand your question properly I will leave it to someone else to see if they can give you better help than me. As you asking for Loading the Game and Objects but at the same Time you talking about saves and Layers it doesn't make sense as everything its done before you export the Game so is no sense to talk about the save Games.

    After the Game is exported and installed:

    1-C2 Loads the whole assets before the Game starts into the Memory

    2-C2 loads after that Layout by Layout meaning if you go directly to Level 1 it will load only the objects from Level 1 once you finish playing that Level and if you change layouts all the objects that are not used on the Next layout will be destroyed it only keeps the one that will be used on the next layout

    3-You just need to make sure what you already know which is to place the objects on their respective layouts before you export the Game and if you do this properly you shouldn't worry about the saves that happen after Exports as that is C2 responsibility after the Export so it will take care of that as long you done everything properly

    If this is not what you looking for please give them more Explanation to understand more and I'm sure someone else will help you out I hope it helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • tarek2 Thank you so much. That's what i really wanted.

    Actually, i spent so much time to figure out how to do this with pathfinding. lol, but it can be done without pathfinding. thats amazing

    No problem mate, Glad that helped you :)

    I just remembered now that C3 has the New Tween Behaviour will be helpful for saving on Overlaps checks, and has the On twin Finished Trigger which is nice.

    Here is Demo if you are interested:

    https://www.dropbox.com/s/j3ke9ih0zwdp72g/Snail1-C3.c3p?dl=0

    Note: for some reason, the Tween Behaviour is not working on the last C3 beta release R132 it gives a black screen use R131 instead if you have the same problem