Tokinsom's Recent Forum Activity

  • I see. Well, will leaving it up to GC cause any problems like stuttering or over-working hardware or anything?

    Also the canvases have been invisible this whole time; doesn't seem to make a difference.

    As for the global canvas..not sure how that'll work since it still needs to be created and destroyed each time a room is loaded to prevent performance issues. I did manage to use only 1 canvas for all layers instead of 1 per layer, though..unfortunately that doesn't make a difference either.

    I hope it won't take too much longer for the WebGL canvas. This is only one of the many many things I'll be using it for!

  • Thanks but that's not an option here, for many reasons.

  • Alright the problem is indeed with the canvas plugin. I tried leaving the tiles as they were and VRAM stayed the same in between rooms. R0J0hound is there anything that can be done about this on my end? Will WebGL support fix it?

  • I'm building a metroidvania using Tiled and Rexrainbow's TMXImporter. The tiles are frames in a sprite object.

    When a room is loaded the tiles are created, then 4 canvas objects and 4 empty sprite objects are created and stretched out to the size of the room. I then paste all the tiles into the canvases, then load the canvas images into the sprite objects (because WebGL and canvas don't go well together) and finally destroy all the tiles and canvases. Bada bing bada boom - hundreds of tiles are now 4 medium-sized sprite objects and performance is great. When all is said and done, the previous room is destroyed in its entirety.

    However..

    I started keeping track of RAM & VRAM and every time I load a new room these numbers go up - even if the room uses the exact same tiles and objects as the last.

    What can I do about this? If you play the game for too long you'll surely run out of memory, and I'm not seeing "dump textures from memory" or anything like CC had so I'm starting to freak out a bit. Thanks for any help!

  • In some cases you'll want to use an expression to decide what layer to use, and a drop-down list won't allow this.

    In CC you could choose between a drop-down list or expression...I really miss that.

  • He's a friend I asked to +1 because the ability to change the parallax origin point at runtime will greatly benefit our project. GUILTY -.-;;

    moving on..

  • When you say all art do you mean all the walls and platforms too? What I was getting at earlier is too many objects with the solid attribute can easily lower the framerate.

    Also are you running any heavy loops or anything?

  • Dude just read the first few pages ^^;

    "Retrieve Tile Array" action in one event triggers "On each tile cell" condition in the other event. You retrieve the tile property using TMXImporter.TileProp("") in the same event you create your tiles.

  • After looking at the video I'm not sure that'd be the best approach ^^; Your game isn't really tile-based, so. Seems to me you just have too many large sprite objects with the solid attribute and the BGs are probably massive as well. The shaders on top of all that definitely don't help. Maybe you can deactivate the solid attribute for platforms/walls that aren't on-screen? (that'd break most games but it looks like it might work here)Another thing to consider is breaking up the levels into multiple acts.

  • Basically I use 2 global variables "X_Origin" and "Y_Origin" and system expressions ScrollX and ScrollY to make my own parallaxing backgrounds...

    +Every tick

    -Set Background.X to (X_Origin+ScrollX)/2

    -Set Background.Y to (Y_Origin+ScrollY)/2

    That's the same as setting a layer's parallax to 50, except with this you can change the parallax origin (the 2 global vars)

    It's an alright workaround...but you'll probably want to use a family for all objects you want to parallax, and if you have a lot..well..it gets messy. That's why I'd love for this feature to be added!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow. Minitroid's entire world map was 20000x20000 :P

    The size of the layout shouldn't affect anything, just what you put in it.

    I'm not sure if it'll work for your game but since mine use hundreds and hundreds of tiles I just stretch a canvas across the layout, then paste all the tiles into the canvas, then load the image from the canvas into a sprite object (because webgl and canvas don't go well together) and then delete the canvas and tiles - effectively turning hundreds of performance-killing tiles into 1 image.

    You don't want that 1 image to be too big though, so for the really big levels you might want to make a grid of canvases & sprite objects instead of just that one.

    Sounds crazy but I get a smooth 60fps with a bunch of particle FX and everything this way, whereas I used to get ~30 with just the tiles.

  • +1

    Being able to change the parallax origin at runtime will make parallaxing BGs for Metroidvanias (or any game with multiple rooms per layout) much easier. Currently I'm making my own with events and families and it's kind of a pain with the different object types and so on.

    It'll also allow you to set the parallax origin to the middle of a room or layout like it should be in the first place ;)

Tokinsom's avatar

Tokinsom

Member since 6 Jun, 2010

Twitter
Tokinsom has 11 followers

Connect with Tokinsom

Trophy Case

  • 14-Year Club
  • Entrepreneur Sold something in the asset store
  • 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
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies