Yttermayn's Recent Forum Activity

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

  • spongehammer Ah hah! Thanks! Missed that little plus sign to expand the group.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't see the "Canvas2" object referenced anywhere...

  • spongehammer

    "rgba(00,255,0,1) = Array.At(loopindex("xloop"),loopindex("yloop"))"

    It looks like you are trying to compare/match colors on the array you added to the layout (which is blank?), rather than reading image data from the canvas. I'm still getting hung up on this...

    Thanks for your patience.

  • Yes, that makes more sense now, thank you very much! Hopefully I can get something rudimentary working this weekend.

Yttermayn's avatar

Yttermayn

Member since 3 Feb, 2013

None one is following Yttermayn yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies