nimos100's Recent Forum Activity

  • Try in the second one with the tiled background to add an inverted "on touched sprite"

    So it only resets when it hits the background and not a sprite, and see if that works.

    You can just copy/paste the condition from the first one and invert that.

    Not sure that will work, since they are both "green arrows" so you might need to use an "is not over sprite" condition if there is one for touch.

  • Yeah I know that 7500 images are quite a lot, but its just a test, since the other browsers doesn't seem to have a problem with it.

    But did you try to refresh the page with F5 and see if the problem went away as well?

    Because it seems that it can actually load that many images, but maybe not during the initial startup for some reason. But I don't know how images are handled when you preview a project in C2 and how chrome deals with them. Meaning that if the images are stored in some cache some where, and it cant load them fast enough and simply start the program while doing that in the background, and then the animation catches up with it, before its done or something, and then throws an error.

    But if I delete so there is 5500 images, it doesn't have a problem during the startup either.

    But its a bit weird, because in my actual program, where it also does it, there are only 9 images and 1 list in the first layout and it goes wrong as well, But in the "Remember not to waste your memory" - it says that:

    "In Construct 2, images are loaded layout-by-layout. This means when a layout starts, every object on the layout is loaded in to memory immediately. This is to avoid mid-game pauses as textures are loaded on the fly. When the layout ends, it will free all the images in memory not used by the next layout, and load any new images the next layout uses. This means your game's peak memory use is based only on the layout with the most images, rather than all the images in the project."

    So that would mean if I understood it correct, that those 10 objects are the only ones being loaded into the memory at the start. Which I don't really understand because in the javascript console I can see that images that are not part of that layout, are also being listed under the "Failed to load resource", so I guess its doing or want to do something with these images, even though they are not part of the layout. But I did a memory usage test on the main page and it uses 11 not full screen and 18 in full screen, so its not a lot I guess, and seems to be as stated in the "remember not to waste your memory". So what exactly its doing with the images from the other layouts are a bit weird.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I should probably have been more careful adding the images. However I "optimized" it, so now it uses only 91.9 mb, and removed 1000 images of the 512x512 cube, so its now 7500 frames.

    However it still does exactly the same as before. And didn't seem to have any impact what so ever.

    Here is the new Capx, which is about 13 mb.

    New capx

    Can you check to see if you still get the same problem as I do?

    I tried adding a timer and a memory usage text, to see what it said. And the memory usage is about 33-39 while running, and after 13s or so, one of the cubes disappear. Like it starts the application before being sure that all images have even been loaded something, which could explain that 13s of animation with a 30 FPS is 390 frames, and the javascript console starts reporting "cant find resources" for the disappeared cube around frame 390+. This varies a little bit it seems. But don't know if Chrome caches the images or loads them into memory or C2 does it, and the application is started before this is completed.

    So when it reaches those frames, it screws up or something, as it cant find them. However if you refresh the page by hitting F5 the problem seem to go away, and the cubes no longer disappear. Which could suggest that since most of the images are already loaded, it can easily load the rest and therefore the problem goes away. However Im completely guessing :D

  • Im using r132 and i updated the driver not long ago. I also tried to reinstall construct 2 yesterday and run the update graphic driver option during the install, and it said it was up to date.

    However i did a test with an empty project an a number of spinning cubes. Which each consist of either 500 or 1000 frames. For a total of 8500 frames.

    It seems that, at least my Chrome cant handle that, as some of the cube might either render black at the start or disappear suddenly while the program is running.

    Checking the Javascript console, it write the following. (There are suppose to be 3 more cubes in the screenshot, but they disappeared)

    Chrome javascript console

    I have added the capx here if you want to try and see if you get same kind of error, since there are so many images in it, its about 40 mb.

    Capx

  • I have looked at some different options for publishing my game. And saw the chrome web store, and thought it might be a good place to start.

    I read the tutorial on how to publish there, and it seems pretty straight forward. But i tried some games there and can see that they all run in fairly low resolutions (800x600 or something). However i made my game to run in full screen (1680x1050) and now im in not sure it was a good idea in regards to the chrome web store.

    So would it be better to aim for a lower resolution than that, maybe 1024x768 or 800x600?

    Also my current plan is just to add some Ads to the loading screen or something, and hopefully make a few bucks on that. But havent really spend a lot of time looking into this area. But as im already running another website, which is connected with google adsense, does anyone know if its possible to hook up a loading screen with ads to your an adsense account?

    Also it worries me a bit that i cant preview my project in chrome as all graphic is black, and then have to export it to there web store. As my experience is that things doesnt always look as you thought in the different browsers.

    For instant i exported it as an html5 and ran it in internet explore, which lag so much that it was useless. Also the buttons were jumping around.

    I then tried it in firefox, where it ran fine, however the sound is bad, due to it now being able to handle looping sound.

    And chrome couldnt even load it, which is a bit scary :D

    Also tried exporting to chrome web store, and that give same results. I dont really feel like adding something to there webstore, that i cant even load my self.

    So at the moment im a bit confused, regarding what to do. So any advice would be appreciated.

  • Screenshot

    I cant edit my posts, just get a 500 server error, but this should work.

  • I have updated my drives a few days ago. And it havent always been like that, it just suddenly happend.

    This is what it looks like, first its black except the buttons. then this one shows up.

    Which seems to be the Exit buttons graphic zoomed way in, but the 4 small black squares are graphic and the background is also a sprite as well. And have nothing to do with the exit button that it shows, for some reason.

    <img src="https://www.dropbox.com/s/iurx1is9ev9s383/Image_test.jpg" border="0" />

  • Im pretty sure it were my own fault, as i had added the effect to the family and therefore all objects. I have now changed it so its a layer effect and it works a lot better.

    However i tested my game in chrome and suddenly some of the images wouldnt load and just turn black. I saw another one posting about this problem and you mentioned that it were a bug in Chrome, because he had to many objects, think he had 6000. However i dont have that many. But do you know if there have been made a solution to this problem, or a workaround?

    As Chrome seem to be the only browser capable of running the game without other side effects.

    In internet explorer sound and music wont play at all. And the graphic quality seems to be a lot lower than with chrome.

    In firefox sound doesnt play correctly, meaning that it doesnt seem to be able to handle looping sounds correctly. However the graphic quality seems fine. But it seems to use more CPU than Chrome. However it runs without lagging so at the moment i use that, but would prefer chrome if it werent for the missing graphic.

  • The other, which is a kind of middle ground, is to put all of your objects on the layer and then apply your black effect to the layer, not the objects. This way, it processes the effect once over a larger area instead of potentially 500-600 times with how your were describing.

    Yeah thats what i did, i added it to the family, which probably werent a good idea. However i didnt expect it to update the effect every tick, but guess it doesnt that. Hence the bad performance it gives.

  • I might be wrong but it seems that these effects are cpu based, and therefore the performance goes with them. So as long as you dont use them it can handle a lot more.

    Its not really a problem for me, as i can just make the shadows as you suggested, and that what i will do :). But i was a bit surprised that the impacts on performance these effect have are so servere, that at least to me, they are completely useless. As i really dont like any type of performance drops when i play games my self, so to make one that does it my self, would be really bad :D.

  • Did some more testing, and cranked up the amount of objects and it seems that also the black and white effect have a huge impact on performance. Whether its all the effects that have such impact on performance i dont know. But seems that if you just dont use them its a lot better. This are the results i got, for those that cares, or have similar problems.

    Effect: Black and white

    Total objects: 3240

    CPU: 0,78

    FPS: 15

    Total objects: 3280

    CPU: 0,8

    FPS: 15

    Effect: Black and white and blur horizontal and vertical

    Total objects: 3287

    CPU: 0,98

    FPS: 6

    Total objects: 3371

    CPU: 1+

    FPS: 6

    Effect: None

    Total objects: 3280

    CPU: 0,25

    FPS: 60

    Total objects: 3267

    CPU: 0,25

    FPS: 60

  • Hi

    Im working on a game, and i have a lot (well not really, i think) of objects, in the game that are part of the scenery, Such as trees, rocks etc. These objects doesnt do anything, and are not checked every tick for anything. However i decided that i wanted to add some sort of shadows to them, so i made a copy of them and gave them a black and white effect, and lowered the opacity, and its ok, nothing fancy.

    However since these are sprites as well, it will make the amount of objects go to between 1300-1550 in total, at the moment, and thats when not all objects have shadows. However it seems that construct have a hard time dealing with this amount of objects, which is pretty annoying as it puts a lot of limits to things you can do in my opinion.

    I have been really careful to make sure, that these objects are not tested or doing anything every tick, not that it should matter i guess. But personally i dont think 1300-1550 objects should be such a big problem for computers today, I have a pretty decent one, Intel I5 with a good graphic card and loads of memory, as i also use it to make 3D graphics with. But to see it starting to crawl on a game this simple is a bit disappointing, compared to other games i can run, without any problems.

    Are there anything that can be done about it, or is it simply that construct 2 engine is just not capable of handling more than around 1000 sprites decent?

    On a side node, i started by adding blur effect to the shadows as well, and that seems to really have a huge impact on performance, so had to remove it all together, as it went from bad, to really bad performance.

    The last test i did, it were with about 1200 objects, with no blur and it sometimes drop down to around 44 fps, even though nothing is going on in the game as its game speed is 0.

    With Blur effect and 1100 objects, it goes to 30 fps and occasionally goes to 58 fps for short periods of time.

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