Ribis's Forum Posts

  • Thanks for your reply!

    Actually i use the same object for different images.

    I think i can make myself more clear now.

    I got a object with all different frames ( not animations my bad there! )

    I made this image to make it a little more clear.

    As shown in the picture i got only one object with all levels as frames.

    I place the object multiple times in my layout.

    Now, on start of layout it has to use its instance variable "levelid" to know what frame it would show.

    But also as you can see, with the "Set Frame" action i can't use "levelid" as refference.

    Any idea how to do this idea?

    Thanks again!

    you should use the name of sprite to reference the correct variable.... in your screenshot you try to set the frame with a global variable

    use self.levelid

  • Ok, i'm opening this topic because I need some help to "design" the loading of some sprite...

    I'm making a platform in 2d for iphone5s... is working fine everything, the problem start when I have a lot of object on the layout (like 100)...

    the most of my object are with these behavior:sine, solid, bullet, fade...etc....

    and I make the platform with the tilemap...

    now, I start to make some level, and when I make a hard level (with a lot of trap) the iphone is going to 35 fps... now, 35 fps isn't bad, but it's annoying and is more difficult to make some level with more object...

    now, I'm thinking to use the event sheet to spawn the object when the player.X is > than someX of the layout, but this means, make a lot of event, because for every object I need to specify like 20 variable, and if I need to change some object will be frustrating and very hard...(bad method to design a level) but it's good because I can show only 20 object If I need it, I means, if the all level have 200 object, I can spawn a specific object when I want.

    now, someone know another method? if I set the object Invisible the fps will be lagging, If I disable the behavior if the player is far from the object will not work too...

    the first method it's the best system maybe?

    Thank you all

  • Any idea what would cause the NAN value ?

    NaN is when you try to load some variable (a number) and on variable isn't a number...

    it's easy to fix it

    post your capx for sure

  • thats odd for only 4 objects, you're sure its the sinebehavior? no lag if you completly remove the behavior?

    anyway hard to tell whats causing that..

    yes, is for the sine behavior... it's strange but cooconJS works better if you disable the webGL...

  • Well, I guess I was to quick. it works fine on my PC's browser. On my iphone it's showing "NaN"

    Any idea whats the reason behind that ?

    is "Nan" because on start layout I declare the variable with no value, if you click reset and try to add or sub the value will work fine

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ribis

    if you should want collisionchecking on same object

    you can put the one object in a family and then check between the family and the object

    or use system pick nth instance in a subevent (collision filters 2 instances)

    sytem pick instance 0: do something

    system pick instance 1: do something

    and probably also by variable or uid, ..

    yes, this is a good idea to check the collision...

    but for now, the collisionchecking doesn't make any lag in my game, just the Sine behavior make a lag (just for 4 object) when I try on cooconJS with webGL on...

  • Ok, that would be by next Question

    I have tried cocoon JS and I am just super confused as I am new to all this. I am a Developer but completely new to the game thing.

    When opening Cocoon JS on Iphone it allows me to select a URL which I am pointing to my webserver and the game runs in full screen when I select webview mode. When I am trying to run using Canvas 2D /WEBGL I am getting a black screen. I do not really know what the difference here is.

    How do you make an App and run it with CocoonJS ?

    I will try your example know. Thank you for that.

    I'm not new to make game, but I'm new to export in cocoonJS ... when you finish your game, just upload on the website of ludei and register on apple developer... it's better if you get a premium account of cocoonJS...

    when you click on canvas 2D/webGL, you need to wait some seconds (depends how is big the game) and check if your antivirus block the iphone when it try to open the game... you should look on the debug if you have some problem...

    I had a problem with my firewall when I tried the application

  • How did you get the webstorage to work ? When I compile the game in html5 onto my webserver and run it using mobile safari on iphone 5 the webstorage is not working

    I never try to test my app on safari... the best way is to export in cocoonJS and make an application...

    I made this example for you, try and let me know if is working

  • Has anyone saved any data using construct in a an ios game and can describe how to do it ?

    Actually I'm making a game for iOS, and the webstorage is working when I try the game on wi-fi...my doubt is when you remove the cache from the iphone if the savegame still stay on the phone... but one user said to me is working when you publish the application... maybe the app will make a special folder with the cache of the app...

    and how... you can see the manual of construct2: https://www.scirra.com/manual/120/webstorage

  • thank you all for the reply, maybe I will continue to use less object and more variable/event...

    I made a test and on mobile and is better to make more instance and change the variable to make a "new" object with the same instance (just change the frame of animation and edit the variable of the instance...) in a long time will be difficult, but is better...

    > (my english is not very good)

    >

    Usually i'd try to understand what is being said, but trying to decipher what you wrote... just gives me a headache.

    It's like you're not even trying. >_>

    ...

    I'd say that making many different types of objects for different purposes would be better, as it would be easier to manage and edit, and any behaviors used wouldn't be applied to all of the objects. Probably the same for checking if conditions are true.

    a lot of people understand my post, I don't like to use google translate, I just use for a new word when I don't know how I can say something new, but I wrote the first post in 3 min and for me is a good....

  • Hi everybody, I have a doubt about the performance in general, and don't just construct2...

    I means, when I'm thinking about how make some objects (sprite) for the games, o for one software, I like to make 1 object and use for many different kind of things...

    it's pretty difficult to explain that (my english is not very good) but, for instance:

    if we make a 2d platform game, you can make some objects for make the gameplay (like a movable platform, enemy...etc)

    now, I'm making a platform in 2d, and I have one object, and this object can be a lot of object (change the frame, the variable...etc)

    now, is better to have one object with 20 variable and 10 frame (and use 40 instances of the same object with different variable on the scene) or make 2 object, with 10 variable and 5 frame and use 20 instance of one and 20 instance of the another one?

    what is the best system to make the best performance? is the same?

    thank you very much!!

    I don't understand people like this... it's illegal off course, but

    Construct2 personal license is like 120$... you can try the free version and consider if the cost is good or bad...

    for my personal opinion I think the cost is very good and everyone who has a computer and like to get a new experience 120$ isn't enough... is not 5000$ ... if you spent 120$ and in the future you will not make money from your application, is a sort of investment...

  • first of all, its pretty strange you have better performance without webgl,

    i would say its your graphic driver thats need updating, but then again if it happens on ios, that couldn't be the case

    maybe its a genuine bug with the canvas render and tilemap, as most people are using webgl, it could be undetected

    best would be to try to reproduce it in a smaller project and post a bug

    Ok, I find a ""solution""....

    depends of the windows size and the scale setting...

    I was use 1280 x 720 on windows size( the resolution of iphone 5s)... I try different test, now I use 960 x 640 without scale, and is working.

    but I think this problem is very important to solve, because if depends of the resolution screen and the windows size, maybe when I will try on ipad or different apple device the problem appear again and again... this make a serious problem if you like to make your game in iOS.

    another serius point (this is about cocoonJS and not construct2 maybe) is:

    when you active the webGL and test your project on iphone (with wi-fi), the battery will be very hot (never seen before like this), and in you have the iphone on charge, the battery still go down!! if you use like 10 sprite is the same, it's the webGL to take a lot or resources maybe.

    so, webGL for cocoonJS is a big problem, but if you don't use the webGL, the performance is incredible, you can make a very big map with a lot of sprite and the performance is unbelievable off course, maybe if you use the tilemap (I consider the tilemap very important)

    now, if with the next resale of construct2 and of cocoonJS solve this problem is perfect, and I think is good idea to fix it (if the problem is about the rendering,windows size etc... maybe it's easy to fix it)

    Ribis I hope you will succedd.

    Ashley

    thank you very much, I hope too eheheh

  • above the fullscreen detail setting, "fullscreen in browser" has options, try integer scaling

    if I set integer scaling, on the computer is working (sometimes...) , but on iphone with cooconJS, when the player is moving on the map, you can see a horizontal line with the same color of my texture, the horizontal and vertical line take all of the screen...

    it's happen without tile (where I don't have texture in the tilemap) and when the player is moving on the map.... sometimes the lines are different from the border of the single tile (look this image and the first of the upload)

    this is very strange and I don't know what I can do... this make to me a big problem, I must disable the webGL because I don't need to use it... tomorrow I will post a capx with the same tilemap...

    someone know how I can fix it? I would like to use tilemap, I think is the best way for my game...

    thank you very much!!

  • Ribis are you using fullscreen scaling? you must use integer scaling, other than that, maybe post a capx with your settings to check

    thank you for the reply, and what is integer scaling? I can't see on the options

    I try all of the resolution (Fullscreen in browser) with:

    pixel rouding:on

    Fullscreen scaling: High quality

    use high-DPI display: yes

    enable WebGL: off

    Sampling: point

    I try all of the combination, on the computer you see the seams like 80% of the tile, on iphone you see the seams a little bit, depends where the player is on the Y,X...

    this is very frustrating, because I tried Construct2 for 2 years, and now, when I'm ready to make a serious project just appear a error rendering

    with webGL no seams, but I don't need webGL, just make lag on CocoonJS, a lot of lag.

    I can't send the project now (I need to make a new one with the same problem, and I will do it) did you resolve this problem without WebGL?

    this is very frustrating