Yttermayn's Forum Posts

  • Never mind. I found it. Sheesh, I swear it wasn't there before...

  • I understand pretty well what containers do and are for. After rereading the manual entry for them, however, it is unclear to me how to make them. The manual refers to the "container category" in an objects properties, but I cannot find that entry. Are containers not in the free version or something? Is there some obscure setting that has to be ticked to make an object a container before the category shows up in any objects properties? What's up?

    Thanks.

  • But then the player is stranded and can't move back onto the sprite. I am currently pursuing this as a possible solution, but I have two problems: 1) I'll have to code getting the player back onto the sprite as if bumping into the wall (which I can do) 2)The overlap doesn't trigger until the player is COMPLETELY outside (ie, not overlapping at all) the sprite. I need to figure out how to make it trigger earlier so that the player appears to be contained within the sprite. Not sure how to go about doing that yet. Maybe something involving image points.

    OlivierC Yes, I am aware of pinning and use that method to contain the player quite well in a different project. However, for reasons more complicated than I want to get into now, it is not a viable solution for this particular application. Just trust me on this.

    Yeah, I am aware of the danger of reinventing the wheel. Trying to avoid it. However, often I find that there are options and methods that I am not aware of that folks on this forum can point out.

    Thanks!

  • It occurs to me that I could use an inverted overlap condition; that then disables 8 direction, kicks you in reverse a little, then re-enables 8 direction.

    Any thoughts?

  • Thanks, but: " so bordering the sprite with other solid sprites is out"

    Already gave this idea plenty of thought. There are other reasons as well, which I won't go in to, but trust me, that option is out.

  • If there isn't a way to do this I may have to delve into the custom movement behavior, but it's worth a shot. If I do, is there a custom movement already written that is similar to what I want, or like the 8 direction movement that I can then adapt instead of reinventing the wheel?

  • I am wondering if this can done simply: I want to have the player only able to move around when on top of another sprite, and collide with the edge as if colliding with something solid. The sprite needs to be able to move around, so bordering the sprite with other solid sprites is out. (It might be possible but way to complicated to be practical)

    Is there some way to invert the solid/8 direction behavior in this way?

  • Ok, thanks guys. I got it working, there was another bug interfering with what I was doing that made things more difficult to sort out. Thank you both, you were very helpful in this matter.

  • Oooh, that's a dang handy shortcut! Thanks!

  • That's all great until you get to the part where you "add 1 to X". C2 doesn't seem to allow me to put an action within a loop after the inner loop, but before leaving the scope in which the inner loop exists. I am using the "repeat X times" loop events. Would using a different type of loop make a difference?

  • Say you make a nested loop with one inner, and one outer loop. How do you make an action happen after the inner loop runs? Like, say I wanted to increment a number every time the inner loop runs through, but I don't want the number incremented until after it has actually ran?

  • That is an intriguing idea. I think I did something like that years ago in C++, I will have to think on this. Thank you!

  • Wow, that's a cool plugin!

    Unfortunately, It won't help me. In my initial post, I should have mentioned this game is a roguelike, where maps are generated dynamically, not premade.

    I did have some more thoughts about the engine design, though. I'm worried FPS will suffer with 4096 sprite tiles. I am already using R0J0hound's canvas plugin for something else in this project. I think I could have a big canvas object, 4096x4096 pixels, and then have the update function read my map data array, then rubber stamp the correct tile image onto the canvas at the right place. Any part of the map that can be collided or otherwise interacted with will have to be layered on top of this canvas, however. More complicated, but should perform much quicker I think.

  • My design for the map: A 64x64 grid of tiles, each represented by 32x32 pixel tiles that are all sprites. The map data will be held in a 2D array, and there will be a function that runs whenever something changes that will update the sprite-tiles to reflect the data in the array. The player's view window of the map will be only 10-15 tiles in size and will follow the player, generally, wherever they go on a particular map.

    When the player goes from one 64x64 map area to another, the array will be filled with the new data, and the tiles will be updated.

    Now that you (hopefully) have an idea of how this is supposed to work, I am wondering if there is an easier way to place each of those tile sprites (all 64x64=4096 of them) in the editor? Or will I have to script it in runtime to set the grid up?

    Also, do you think having 4096 relatively inactive sprites will run slow or cause other problems? Any suggestions for a better method of having dynamic tiles?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • spongehammer Ah hah! Thanks! Missed that little plus sign to expand the group.