Rushino's Recent Forum Activity

  • So XML pluging is not supported at all on ConcoonJS export ? and what about the other android export ?

  • Alright thanks! Nah it couldnt be just one sprite but i what i did is put 4 connectors as one sprite through reducing the amount of objects needed.

    Thanks!

  • Hello,

    I am doing a mini-map that represent connected levels. I was wondering what would be best for performance between..

    1- Creating a single sprite that show all the possibilities of connection. A level can have from 1 to 4 levels connected (left, right, top, bottom) so i though i could use 14 animation and then each frame would be the type of level showed on mini-map. This would take less objects in the screen at the price of maintenance. (Total of 144 minimum objects created for a 16x9 grid)

    2- Creating a sprite connector (1x4 pixels) for left-right and top-bottom and create one if the level have a connection with another level. So that mean that basically for each level 4 sprites connectors can be created for a total of 16x9x4 (576 objects created generated each time i draw the mini-map, i normally do it once the level is loaded and each time the mini-map change or the window is resized). This take less maintenance but at the price of performance... however.. does this will reduce a lots the performance ? (Total of 576 possible objects created for a 16x9 grid, minimum still 144 but with the connectors that can be up to 576)

    Thanks!

  • Fixed. It was something related to my auto adjusting the hud.. that was called too many time.. the debug session seem to resize the viewport at start which explain why i didnt get the same result in both startup.

  • Hi there,

    Found a strange behavior... this time it really look like a bug but again i am not sure. Through all i can say is that the result from a session without debugging and a session with debugging give different results.

    Basically i am just iterating in an array. Look at my events... the debugging session generate a TONS of console message.. it shouldn't happen. The hilarous thing is that the debug session show the result correctly ( 2 dot at right corner) but the session without debug put both dot at the same location.. any ideas ? i am a bit desesperate... not the first time i use array and that this result happen. I had to redesign the way i was using a feature to avoid using an array because i had strange problem... but i didn't know it was the array the problem. Now that tell an hint.

    My events..

    mediafire.com/view/h8m3wmz0evfn0ff/events.png

    With debug... (seem to do an infinite loop...)

    mediafire.com/view/66xvnr8dq63bvet/with_debug.png

    Without debug... (act normally. But the result is not right.. put both dot at the same place)

    mediafire.com/view/069l7ii59h4ctll/without_debug.png

    Thanks for any help! Greatly appreciated! If you ever seen that before.. please drop a message lol

    EDIT: Figured out that the function DrawMinimapOnScreen is called 1 time in normal and called 81 times in debug. That may explain why, at least a part of it... so its not related to arrays.

  • Alright thanks for clarification. Should it be useful to have a condition to detect that an object has been marked as such ? or does this mechanic already exist ?

  • Alright. That increase my understanding of Construct 2 at the same time. Hehe. I have been able to avoid using wait.. i just had to put a flag telling the app that in the next tick.. do the rest of the operations. So this enable to destroy in the first set and then do other stuff with the new instances.

    Thanks for you guys help.

  • Yeah seem like construct 2 haven't finished destroying them when the for each loop is reach. I have put a wait to fix it.. but is there another way to fix that ? problem with the wait is that its only apply to next action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Link to .capx file (required!):

    mediafire.com/download/c2pva1vo43bxbfh/PickingBugWithFunctions.capx

    Steps to reproduce:

    1. Add event picking all sprite X or for each sprite X in a function that destroy found sprite X. That should destroy all the sprites X.

    2. Add an event after that tell to loop that sprite X with a for each. Normally none should be found since they got destroyed.. but they are still found.

    Observed result:

    Sprites X are still found in the function even if they got destroyed just before. That doesn't happen outside the function.

    Expected result:

    I expected that all the sprite X would have been destroyed and none could be found in the next for each event.

    Browsers affected:

    Node-Toolkit

    Operating system & service pack:

    Windows 7 64 bits, service pack 1

    Construct 2 version:

    r152

  • Hello,

    I stomped on something weird..

    I do in a function..

    + Pick All ObjectA.. Destroy..

    Then somewhere after i do..

    For Each ObjectA.. and it still find something in the loop.. why ?

    It is because the object is kept in memory before the next tick ? I expected that the loop find nothing since i ordered to destroy all of them before that event. It seem to happen only in functions.

    Here a screen... in a mini sample.

    mediafire.com/view/ivqiw8x4yjcc3le/Bug.png

    Here a demo..

    mediafire.com/download/c2pva1vo43bxbfh/PickingBugWithFunctions.capx

    Thanks!

  • I fixed my problem with Crop mode and HUD positionning. Was really challenging but ended up with a solution that can adjust stuff automatically. The idea is spotting Viewport variable change then reposition the whole stuff.

  • Found something interesting. If you scale you have to wait around 1 sec before positionning the HUD otherwise it won't work or always set the positionning at each tick (but i am pretty sure it would cause some performance loss)

    So what i do is having 2 variable which is LastViewportLeft and LastViewportTop. The first time i set thoses variable to current view ports. Then i detect if the viewport changed and repositionate the HUD based on the new viewport. Work like a charm!

Rushino's avatar

Rushino

Member since 15 Sep, 2013

None one is following Rushino yet!

Connect with Rushino

Trophy Case

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

Progress

14/44
How to earn trophies