Tokinsom's Forum Posts

  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • 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 ;)

  • Sounds like your graphics are too big or you're using too many tiles. Layout\layer effects are substantially better performance-wise than applying them to individual objects. How big are the levels? If your tiles don't NEED to be tiles I recommend pasting all of them to a grid of 1024x1024 or 2048x2048 canvases, then loading those images into blank sprite objects in the same fashion, then destroying both canvases and tiles.

  • Seems as responsive as ever. What browser are you testing the game in?

  • I'd deactivate the platform behavior, set a var to 1, and while that var is 1 move your player by angle(self.x,self.y,enemy.x,enemy.y) until collision, then restore platform behavior and set var to 0. Bada bing, bada boom. Don't forget to pick nearest enemy.

  • NP. You still have to add the file in the editor once but you can overwrite it outside of C2 afterwards.

  • Arima Actually you can use "Request URL" to get a project file by string e.g. "Room_A_1.tmx"

  • I'm gonna get a lot of flack for this but..

    It's not that those in this community don't have talent, skills, good ideas etc. or never made a large-scale game before. It's that C2 isn't designed for large-scale game development by any means. It's designed with the single hobby developer in mind.

    Everything about C2 is internal. The level editor, the event editor, the objects, the animations, the textures, the sounds. It's practically impossible to use C2 in a team and you know what teams offer? Large-scale games.

    We don't have massive areas and entire worlds or even (good) tile-based games because you can't use external level editors.

    We don't have heavy dialogue,inventories,world-maps,customizable characters, etc. because you can't really use external files. Project files are a temporary workaround at best.

    We don't have lots of sound effects and music because you can only import .wav PCM which must then be converted into an unorganized project-bloating super folder of sounds.

    We don't have solid, bug-free, ready-to-distribute games because all of that relies on 3rd party software seemingly shoehorned into C2 and forgotten about.

    "Oh, well just use a project folder instead!"

    Nope. You still have to add everything to your game inside the C2 editor else it's not recognized. So if you're in a team of 5, all building levels - each member will need a C2 license - all of the project's plugins - and the latest build, just to put his or her levels into the game. That applies to *everything*. There's SVN but that sounds like even more of a nightmare and I still don't see how C2 will pick up anything if it is added outside of the editor.

    That's not to say it isn't currently possible to make a large-scale game in C2 - I'm working on 2 right now - but it's a dreadful process and I'm not sure we're going to get much farther without a number of changes and additions to C2. I've already had to cancel two others.