dop2000's Recent Forum Activity

  • JSON: As I understand, your mistake is that you are creating a family instance, and it creates a random family member. You need to create specific object instances.

    To do this you need to also save object names in the array, you can get them with Family.ObjectTypeName expression. Then, when you restore these objects, use "Create object (by name)" action.

    Memory issue: I actually made a very similar post yesterday. I guess adding objects to all layouts is the only way to keep them in memory..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add an instance variable prevY

    On start of layout : Sprite set prevY to self.y
    
    Sprite compare Y<self.prevY : [sprite is going up]
    
    Sprite compare Y>self.prevY : [sprite is going down]
    
    On every tick : Sprite set prevY to self.y
    
  • Have you seen this SMB clone made in Construct?

    construct.net/en/forum/construct-2/works-in-progressfeedback-24/super-mario-bros1-1-remake-83433

    You can download capx file here:

    https://mfgg.net/index.php?act=resdb&param=02&c=4&id=30480
    
  • Yeah, I ended up adding all objects onto the main game layout, and it's turning into a huge mess.. Also this means that lots of unnecessary images are loaded every time (backgrounds which will not be used in this level etc.), and a lot of memory is wasted.

    .

    I think I understand what's happening - this image gets released from memory when switching to another layout, and then it's loaded again.

    Ashley Could you please confirm this is the case? Is there any way to preload images and keep them in memory even after switching to another layout?

    I think MM_Preloader plugin does that, but there is no C3runtime version of it..

  • Please see this demo project:

    dropbox.com/s/b6g18oaeljp2u0d/PreloadImage.c3p

    There are two layouts - L1 and L2. In both layouts a big sprite is created on start.

    Layout L1 has an instance of this sprite, so when I delete this instance and create a new one, it happens immediately.

    Layout L2 has no instances of this sprite. When I create it, there is a visible delay - you can see a splash of white background before the image appears. This is especially noticeable on mobile, I have an old phone and it shows the white background for about half a second!

    What I don't understand is why preloading the image doesn't make any difference?? It still takes the same long time for the image to appear on layout L2, even though it's already loaded to memory.

    Am I doing something wrong?

    Tagged:

  • Disabling physics for bottom boxes would probably not be a good idea, because other boxes will start falling through them. You can check if boxes are sleeping, and set them immovable.

    The problem with Box2D engine is that touching physics objects continue to wobble and shift a little and don't want to go to sleep. So you might need to check X/Y velocity and if these values are very small, set them as immovable.

    See this post:

    construct.net/en/forum/construct-2/how-do-i-18/detect-physics-object-finally-144877

  • It's not recommended to mix physics with other behaviors (Platform, Drag&Drop, Pin, Bullet etc.) in the same object. It's very difficult to make them work together correctly.

    You can use a different invisible sprite with Drag&Drop, and move the physics box to its position, see this example:

    dropbox.com/s/65wlg7mxfbg2y8s/PhysicsBasket4.capx

  • Like I said, in this case you can use MoveTo behavior. Move your sprite from point 1 to point 2. When point 2 reached, move to point 3 and so on.

    If you want a continuous smooth motion between several points, you can try Spline:

    construct.net/en/forum/extending-construct-2/work-in-progress-addons-30/behavior-rexspline-114539

  • The correct way to parse response from the weather server is to feed it into JSON plugin, but if you only need to retrieve a couple of values, you can use this method:

    dropbox.com/s/n8oo19a0aa2bauu/WeatherData.capx

    If this doesn't work in preview mode, open browser console. If you see "Origin localhost is not allowed by Access-Control-Allow-Origin" or similar error there, this is CORS issue, search the forum for solutions.

  • You need to export the game to HTML5, then upload it to some web server and post the link on the forum. If you don't have your own server, you can use itch.io, netlify.com or some similar service.

  • What do you mean by "not responsive"? To scroll with mouse - On mouse wheel move the panel some distance up or down.

    I don't know how you display the weather, probably send a http request to some weather web service via AJAX, then parse the response.

  • You mean instead of the list 1 item wide and 100 rows down you want it to be 4 items wide and 25 rows down?

    dropbox.com/s/1676stwx1ysnz9n/ScrollingList4columns.capx

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies