GeorgeZaharia's Forum Posts

  • here you go mate download i just created u the same effect. u can take a look inside i added some poorly commented events ... this is the easy and long way... there might be a more shorter way ...

  • mardoch here you go download

    i used line of sight... its easier then what u got there... which was a bit of to much spaghetti code... u can duplicate it and do the same thing for ghost also...

    i used r220

    Edited:updated the capx... sometimes before cause of the distance view was 500 or to large and the bats where to close to each other 1 of them was not rising up but flying in sleep mode... so i fixed that ... i updated the download link hope its what u wanted

  • Edited: ehm i might be confusing things...i got old lately.. meant exactly that Pause on Unfocus. but then u saying it doesn't work so then there is no point of me replying i guess i misunderstood ur post... sorry

  • you can always have 4 hidden objects in, following the object u want to be surrounded.

    when all 4 are overlapped destroy the main one? u can also try it with the chess board plugin from r0j0hound i think ... considering at all time the slots around the main object ... then there is another way... similar to the first suggestion ... the same way u do match games... but that is a bit array based and slightly difficult since involves some more then usual math .... those algebra hours wold come in handy now... to bad i always did something else at the class...

    another way the simple c2 way is to check for position but not for overlapping... but for the X + - y + - something and in center being the position of the main object... which i think its easier to do then the rest of the above i used something similar to create a cue stick angle position and guide line for a pool example il try find it if u dont get some more help till then i guess

    ie: 1 event with 5 conditions inside pos x= mainobjx+mainobjwidth and so on ...considering the squares are equal to the objects width and height

  • The canvas plugin is causing the cpu usage when webgl is on. Basically it has to copy the canvas to a texture every tick. If you disable webgl it's fast or alternately you could use the paster object instead.....

    i see ... i did tested the paster object runs blazing fast compared to the canvas i always avoided it ..however they seem to have the same issue all of them doing the same thing even if u do it by spawning normal sprites in the 2d canvas or in the canvas plugin or even in paster ... they all create sprites ... none draws ... which is something that i think is really needed for c2 ... paster does have that option to draw shapes based on coordinates however i need to test it more to understand it ... thanks again for reply ur plugins are awesome ..

    i wonder if someone could strip down paster from all other functions and keep only the drawing to coordinates or spline ? part but then it will need a fade out on them or some behavior to create the fadeout effect of the trails ... if its used for that purposed. but as newt said ... is not that simple

  • ..........- if you want to take a look and let me know if you still think images are the problem or you see something else.

    i did take a look inside... and i was pretty amazed by the fact the event sheet is pretty clean all events trigger once when is needed however .... i have tested it on a duo core older rig i have... and fps showed me 47-57 most of time didn't drop under 50 and cpu utilization was somewhere under 0.05%... but then when i started the debug mode...i barely hit 30 fps ... even if it wasn't necessary had no reason for it ... and cpu utilization blown to 50-70% ... thats something i never seen before doing in debug mode ... for sure is not ur event sheet but i guess something is up with the debug viewer...

    u can lower the approx . download weight of the game by loading the sounds from a ftp server or preloading it (for preloading sounds all music or sounds have to be uploaded in the sounds folder) i prefer having smaller music loops to prevent audio breakage on intelxdk building or other mobile wrappers.

    kinda thats it.. u had it all good from beginning the memory use being at 6.6mb its something i cant really say how u can lower it ... but again from my point of view for small games which c2 is meant to be used for... u had the optimization if i may say ... pretty darn right

    keep it going for sure ul encounter other problems. but as for a optimization test u did good. just keep in mind when u build ur games ... the key for success is always optimization that 1% that u have to push defines the unexpected results ... have a great day hope it helped u ..

  • you said" Is opening the image in Construct's image editor and scaling down the image work as well as in an outside program? They both will reduce the number of pixels, right? Or does Construct save the original image somewhere or something."

    i think what u miss understand is the memory usage of image sizes... lowering the image size or the sprite in the visual editor or when u place it in the layout that u see or prebuilt is not going to change the actually image weight... so what u need to do is ... if u exported as png jpg or whatever use the auto cut space out from image editor c2 has ... it will automatically adjust the image transparent parts which are known to heavy the image memory... 2nd thing re-scale the image upon import in c2 in the animation editor where u place ur frames... not only in the layout part ... cause if u only re-scale in the layout that wont change the actual image weight ... which the engine still has to resize from the high quality frame u use ... hope u understand..... i have a bit of work to do il upload a schematic later if ur interested...

    try this... make the sprite frames in the object animation editor.. as small as possible then see if the app runs faster... if it doesn't then its something else u might missing cant really say if i dont see ur capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • seems about right however all my image memory on a 800 events game has 1.2 mb image memory... tops ... with high quality sprites... something u do there that heavy's the image cache... however on my projects total download memory is around 10 mb... u can see those stats at the bottom of c2 ... cpu utilization u can lower it down by tweaking and optimizing ur events... i did a gain of 5-10 -20 fps by re arranging the entire events-sheet... maybe take a look at what ur events triggers?and when... and yes debug mode uses more cpu about 20% more then what actually the app uses... which is weird... so based on ur performance benchmark ur app should be in the optimal running area... and u should have 45/50+fps ...dont worry if ur app isn't running at 60fps.. it will depend also on the power the devices used have

  • thats some nice capx but its to heavy for using it in a game... my pc went 70% usage on preview ... which is nothing i wold use inside a game that has another 1000 elements and events to worry about... but its good that works but not sure if is CPU utilizable for what u want as performance even if u make it standalone app. ul cut half of ur players maybe more.

  • use arrows to control the green player move to yellow to teleport to 2nd gate download capx everything else is effects and graphics u have to figure it out

  • Read this for better understanding of webgl and canvas2d ... in short ... webgl is mostly used in this community for effects such as light... blend modes... lava effects and other cool stuff that u usually do in flash... which html5 (javascript based) cannot do without WebGL

  • do u really even need WEBGL? do u use any effects/blending modes? if u dont disable it ... that will save u some FPS and CPU also ... dont do everything on everytick or on blank events... try using the condition to trigger once when needed and not let the engine check for conditions everytick ...move all text objects to when value or text needs to be changed and displayed ... destroy all sorts of objects that needs to be eliminated ... after that ... if u doing graphics in 1080p ... u may want to lower them down... u dont need full 4k images inside a iphone the resolution is not needed to be big... u can have great quality even if ur image is 256x256 or 128x128 the resolution is just resolution ... DPI is something else...

    as ur benchmark says Performance

    Frames per second 11 (90.9 ms/frame)

    Est. CPU utilisation 47.1%

    Est. image memory 16.8 mb

    image size is huge... lower it down a bit...

  • Z is limited to the layer the object is created on ... Y is the vertical ax while X is the horizontal one ... Z is just layering purposes ... for bg overlays and other stuff c2 is not designated for 3d positioning ... unless u use Q3DPlugin

    however u can make ur own Z if u follow the Tutorialfor the 2.5D thing

  • depends how random u want it to be ... if u want a random event to happen to switch position random is not something u may want since everything u have is a round number try using choose instead and a list of numbers that u set for each "random" action u want to do so for example u got the random string number that u want the engine to choose from like this choose(1,2,3,4,5,6,7,8,9,10)

    then add a condition for each number what to happen if number =1 = trigger animation right

    and so on its actually pretty easy to understand ... however using random(1,2) it wont do it right ... since random takes any number +-0.00001 and so on so the result will be somewhere between 1 and 2 that means it can also be 1.5 or 1.1 or smth else and if u need a full round number... the system expression random is not something to use unless u really need it ... choose is also similar to random just its more clean.. which i think is even better then random.. takes away some problems ... unless u got a huge list of numbers u want then u use floor(random(1,100000000)) or what ever to get a random number between 1, and 100 mil and floor cuts the 0.001 sub-digits... but i think in this case for ur use best choice is to use the expression choose(n,n) replace n n with any number u want

    a poor representation capx Download

  • Download

    it lacks some comments since i took it from an old capx see if till someone develops a plugin to do it better if that helps u in anyway