tarek2's Recent Forum Activity

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

  • Try Construct 3

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

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

  • 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

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies