zikdot's Recent Forum Activity

  • I have been using families and arrays for spawning my 5 enemies in previous games. This would go as follows

    every x seconds > create object > family.....

    on created set speed etc

    The problem is that when played on my android phone there is always slight lag from the enemies spawning.

    I was suggested to use a InUse boolean for the enemies as it would cause less lag as it doesnt depend on the system??? I am a little confused to be honest. Are there any alternate spawning methods that wouldn't cause lag?

  • Tekniko sent

    thank you!

  • Okay so I found a noticeable improvement when I changed the sprites resolution. It's a bit hard to explain but here's an example.

    When I normally export a 100x100px image from Adobe Illustrator, I export as a png at 72PPI (pixels per inch). when i then import this into C2 its size is generally around 50x50 even though its true size is 100x100. I'm not sure if programes generally do this or whether its a fault on my behalf but either way i was worried that if i scalled it from 50x50 to 100x100 it may be a little pixelated so i've been exporting most of my images from Adobe Illustrator at 150PPI so that when importing it is around 100x100.

    This time I decided to re-save them at 72PPI and just scale up the sprites to the desired size which has helped with the performance of the game. It still lags a bit but not near as much as it did. So i'm thinking that a few more tweaks need to be done in terms of the images themselves. I'm just not sure what?

    I have a big sprite which is the size of the layout which i use as the game over page. Should i put this in a separate layout instead of it sitting in the game layout and then setting its position when the player is destroyed? Does it slow the game even though it has no use or events until the player is destroyed?

    Thanks

  • JeremyBenson11 sorry If my post was unclear. It wasn't caused from admob. I previously wrapped the game using cocoonJS which i found was more efficient for my game in terms of loading speed etc, i just found it ran quite smoothly. But i wasnt able to integrate admob with it very easily so decided to swap over to intel XDK instead so that i could incorporate the admob into my game which worked fine.

    However the game didn't run as smooth and seemed to lag more. I was suggested yesterday to look into the resolution of my images. I sent one of the C2 members the capx and they said that their phone was showing 10% of its real resolution?

    I made the sprites in adobe illustrator. Maybe I made the images with too higher resolution when exporting or something? If it makes any difference the colour of the images is a lot more vibrant on my android than on my PC. Not sure if that is relevant at all. Going to try and look into the resolution of the images

  • Tekniko can I PM it you?

  • ahhhh right I understand. The player is stationary but rotates on touch.

    I will have a look at the image compression link, thank you

  • JeremyBenson11 I read up on the DT it says that for things such as every x seconds you don't use dt. so I dont think dt is the issue.

    I made the mistake of not testing my app as I went along. I'm really unsure what the problem is and have been suffering with the problem for several months now. I can always PM you capx if you're good with understanding C2?

    I don't think it is due to the webstorage or local storage that I am using since everyone else uses it in their apps. Could it be the images I made for the sprites? they're only around 100x100px and i made them in adobe illustrator and just exported as a standard PNG and the image size isn't very large, much less than 1mb so i don't think that is the issue.

    To be honest i'm honestly stuck with what it could be. I have no idea at all.

  • ohhh okay just realised. doing it now

  • The problem I had was that i couldnt locate the folder for the zipalin command. Try this path

    computer > local disk (c:) >Users > (name of user) > AppData > Local > Android > sdk

    use the tools folder to open the command. If you have an issue when trying to input the info in the command window then it is because you need to transfer the 'zipaline' file from the 'build tools' folder into the 'tools' folder which can be found in the same place as the tools folder (within the sdk file).

    for further info if you have problem, read this forum

    http://stackoverflow.com/questions/1609 ... al-command

    Good Luck

  • thanks JeremyBenson11 i'll have a go.

    for when i spawn the enemy should i change the every 1.2,1.8 seconds create enemy to dt time?

    and also where i have every 5 seconds add 1 to global variable. should i also change that to dt?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • can you send me the link to the forum page this is from. Only because I cant understand some of it since it is out of context.

    3: For the whole project: use Powers of two in the sprites?........what does it mean by that? 2,4,8,16? I'm confused

    7: Don't play animations too often......all my enemies are an animation that are spawned every 1.3-1.8 seconds. could this be the issue?

    On code:

    6.- Use delta time, you have lots of actions using time. That will help on frameratesss.....when would i be using this?

    7.- Also, use Groups, your code needs it, a lot.......what does this mean?

  • I made a fairly straightforward game and compiled it through cocoonjs. The Game Worked fine but had problem putting ads on using admob so decided to compile through Intel xdk. After downloading it through the Google play store I noticed that it lags a lot.

    I made the following changes to try and solve the problem:

    -changed all text to sprite font

    -reduced collision points on the sprites to just 3

    -changed webstorage to local storage for the highscore so that on start of layout it runs better.

    -destroy sprites outside of layout

    -changed properties to rounded pixels

    Just to quickly explain the game. It consists of a player on the left side of the screen. 4 types of enemies are spawned every random 1.3,1.8 seconds. The enemies are in a family and randomly chosen when spawned. If the player destroys the enemy a point is gain if not then It's game over. Simple!

    I would appreciate it massively if someone could help me out with what the issue may be.

    Thank you

zikdot's avatar

zikdot

Member since 4 Mar, 2015

None one is following zikdot yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies