solar's Forum Posts

  • 14 posts
  • It seems like there is no way to pick an object based on its attributes rather than object type, but I guess it's not a problem -- I can just use a specific object that can be climbed and make it invisible, while having a tiled background object on top for graphics.

  • I have set up a ladder climbing system for the platform behaviour, which basically switches to 2-directional (up/down) movement whenever you trigger ladder climbing. Which objects you can climb are determined by a custom "Climbable" attribute.

    I want to snap the player object to the center of the ladder, but I cannot seem to find any way to pick the ladder object I'm interacting with so that I can retrieve its X value. Is there no way to do this in Construct?

  • The problem with the InputSystem object plugin is that all controls you intend to use need to be armed first before they will work.

    <img src="http://dl.dropbox.com/u/28629176/gamedev/arm_control.PNG" border="0" />

    dl.dropbox.com/u/28629176/gamedev/crouch3.cap

  • Try Construct 3

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

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

    I don't have visual studio installed atm, so I can't tinker with the Texture Setter source right now. But it should be possible to get it to work with tiledBackgrounds, in fact I'm pretty sure I had it working at some point when I was making it.

    it occurred to me that the image manipulator object also does not affect the tiled background object, is there a relation?

  • <img src="http://dl.dropbox.com/u/28629176/gamedev/sux.gif" border="0" />

    it sux i hate myself

    also tested python in construct by making cartesian/polar co-ordinate functions to snap joystick values to a circle

    <img src="http://dl.dropbox.com/u/28629176/gamedev/circularjoy.PNG" border="0" />

    dl.dropbox.com/u/28629176/gamedev/polarjoy.cap (needs inputsystem plugin)

    anyone here have experience with construct python? considering switching to it instead of using events but i don't know yet

    i'll say one thing though the script editor in construct is a pain in the ass and you cant even indent with the tab key and this is on a language that relies on indentation >:(

  • dl.dropbox.com/u/28629176/gamedev/isosnap.cap

    the snapping here is kinda iffy though so maybe someone else can do it better

    also see here: scirra.com/forum/hex-grid-sorry-if-duplicate-q_topic44313.html

  • How can I constantly update my tile map while moving around?

    If you did this with one large map file, you'd have to loop through said map file constantly, and that sure doesn't sound good. I imagine that the best way to do this is to divide your world map up into cells made up of a certain size of tiles. You'd stitch these together; maybe using a 2D array where each position points towards a cell file or something, then when your player moves towards a new cell, the engine knows to load that cell and unload older ones. I thought about doing this back when I was using MMF2 but I'm lazy and never get anything done huehuehue <img src="smileys/smiley9.gif" border="0" align="middle">

    EDIT: Alternatively, you could easily just name the cell after the coordinates of the cell in world space e.g. "0,0.map" "0,1.map" etc, and have the game search for the appropriate cell file based on its name when you enter that cell. Would be easier on the processing, too.

    What is the best object used for backdrops? Why is that the case?

    I see the way you're doing it right now is loading an image for every single tile, meaning VRAM usage is going to inflate very quickly at very large map sizes and cause the map loading process to hang the entire application. This is obviously not a viable solution :(

    I think the best way (performance-wise) to do tile-based maps is using only one image for a tileset which is comprised of every single tile you plan to use in your map side-by-side. The image is then loaded into the Tiled Background object and is shared among every instance of the object, then tiles can be picked using the image offset function. But even this method has its problems:

    • The image offset function only works for textures sizes that are a power of 2. Obviously this isn't too big a deal, if you're using irregular tile sizes there can be some blank space you can program your game to ignore.
    • At runtime, loading a new texture into the Tiled Background object causes it to gain a unique texture. Either we have to set the object's texture in-editor as a game resource or, once again, VRAM usage inflates and the game hangs as a result of trying to load an entire tileset into every single tile.
    • I also tried to solve the above problem using the Texture Setter object. Unfortunately, it doesn't affect Tiled Background objects. So much for that idea.

    I think this is the method konjak uses in The Iconoclasts, but as far as I know it doesn't use external tileset images, the tiles are presumably stored in the game resources.

    You could also try using a sprite object to load every tile image you're going to use into a new frame for the sprite object at the beginning of runtime, then when you're creating a new tile, instead of loading the texture into it, you're just setting the animation frame. I think this method also causes VRAM usage to inflate and locks up the game for a while, but not as much as if you were loading textures into objects individually, since you're only loading the texture for a tile once. Also, since you can't add new animation frames you have to add a whole ton of empty frames in the editor and there'll be a hard limit to how many tiles you can use as a result.

    I can't think of any other way to do it. Sorry if I can't be any more helpful. Maybe we should ask r0j0hound why the texture setter doesn't work on tiled BG objects? If it did, things would be so much easier :(

    Will invisible tiles consume VRAM as well?

    Yeah. It's best to have your loader ignore blank spaces instead of trying to create a blank tile there.

  • Forgot to clarify that I meant when the entire viewport is resized via the "stretch window content" setting. I already know about point sampling.

  • As far as I know all scaling in Construct Classic under DX9 uses ugly interpolation which makes everything blurry, so crisp retro pixel-art games can't be scaled up without being utterly ruined. Unless I haven't found an option for it that already exists, can we expect this in a later version of Construct Classic?

  • okay well I can't get the tiled background object to load an image at runtime that applies to every instance of that object. I have to do it for every single tiled background object when it is created which causes the VRAM usage to inflate like crazy (~120mb for a 2D game I am #1 optimizer). what am I doing wrong?

  • The texture must be a power of 2 size for image offset to work. You can use empty space if needed.

    I can't say I like that or having empty space but at least it works

    Now there's only one problem left:

    <img src="http://dl.dropbox.com/u/28629176/gamedev/wrong_tiling.png" border="0" />

    Why does this happen?

  • looks like I'll at least have to hold onto the Image Manipulator object to check the tileset image size

    but Tiled Background's set offset isn't even doing anything for me, I'm calling it but nothing is happening

  • You're better off using a tiled bg object for your tileset and image offset to get your tiles!

    What are the implications on memory usage for loading the tileset texture for every tile, though?

    EDIT:

    So it's definitely not possible it seems. I don't like the idea of loading the tileset texture into, maybe ~1000 tiled background objects and I don't think it would work anyway since I'm using irregular 24x16 sized tiles. Any other bright ideas on how tile maps could work in Construct?

  • So I'm working on a tile-based map system. It will (eventually) load tiles from an array specified in an ini, though I haven't got around to that yet because of one rather big problem.

    So I'm using Image Manipulator to load the tileset image in data/tiles/debug.png. Then I cut the tiles up using crop. Then I use Image Manipulator to copy its image onto a sprite. But once I do this, every instance of that sprite uses that image, overwriting the previous one. I don't want this. I want the sprite to have a unique image when it is created, but I don't know how to do it. Should I even be using the sprite object? I don't know.

    Anywhere, here's the project folder with the .cap. If you can find the time, please take a look at the events in the Engine layout and tell me what I'm doing wrong that causes this to happen.

    http://dl.dropbox.com/u/28629176/gamedev/game.zip

    I also noticed that my "Tiled Background" object isn't tiling at the correct size. Though I'm using events to load a 24x16 image (in data/floors/tiles.png) into it, it tiles at 23x15. This doesn't exactly halt the progress of the project but is there a way to fix this, too?

    Thanks anyway.

  • 14 posts