ScrotieFlapWack's Recent Forum Activity

  • Hi,

    I purchased a server and I have uploaded all the files from the PHP folder on to my server. I am trying to follow the instructions within the zipped file for the plugin but I am really struggling.

    Can someone help?

  • I've run into a small problem. The modulo operator doesn't seem to be working for me. I am comparing two values but my first value is X % (128/Y) = 0, I am still getting back a remainder which is giving me a decimal number and not a whole number. My order of operations is done using () so the division is done first and then the modulo which should bring me back a whole number.

    I am trying to use this to subtract 1 from a global value which is my gap length between my tiles.

    Here is a shot of the event sheet: http://i.imgur.com/pOkAedJ.png

    Here is the value of gap length in the debugger, I am not getting any gaps within my tiles either (my mouse cursor is over the gap length value box): http://i.imgur.com/cickRyD.png

    Anyone see where the problem is?

  • Here is my progress after learning about the For Each loop (big thanks to Magistross)

    https://www.dropbox.com/s/4cipvzeay0a8oef/2016-03-18_00-04-29.mp4?dl=0

    I am now going to be adding the various heights to the floor, once that has been done I will be working on a 'tile sorter' which will check neighboring tiles and generate the correct tiles next to each other.

    I'm feeling very pleased with the results so far though and feel like some solid progress has been made. I am wondering if I continue to use the For Each loop for my tile checks this would work on a 'per tile' basis?

  • OMG!

    Thank you so much Magistross.

    That's it!

    I now have a simple system of tiles being generated on the right off screen and when they reach the left off screen they are destroyed. What a relief. I've been working all week to get this result, I can't thank you enough!

    Now I can progress and figure out how to change each tiles animation on this sprite object, depending on its neighboring tile. Like a procedural system. First though I will set the maximum height my floor tiles can be.

    Thank you so much Magistross, thank you!

  • I have been messing around with my idea of using a sprite object and storing each tile in its own animation state within that sprite object. This works great for storing each tile in one object. I can now set the X position of the sprite object in my layout to -1 every tick to get that scrolling effect.

    I've even made a global variable which I then use some simple math on to generate tiles on right side off my layout off screen so I get endless tiles scrolling across the screen.

    My problem now is that the tiles that are going off on the left of the screen I need to destroy, because I am using one sprite object for my tiles whenever I destroy those tiles with a condition that compares two values e.g Tiles.X < LayoutWidth("TilesLayer") -1, all of my tiles then get destroyed because each generated tile is an instance of the sprite object.

    Is there another method to destroy an instance without affecting all instances?

    If this isn't possible I may need to start looking into other ways to achieve this. It's frustrating that something like this is taking me so long considering that this program is so easy to use

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • After doing some thinking I realized that I could be using a sprite rather than a tilemap and still keep the performance relatively well.

    I've used one sprite object and I have imported each of my tiles in as animation frames. This way I can now manage each frame of the animation as it's own tile (similar to a tilemap) and still have the ability to set it's X position to every frame of the game to give a scrolling effect.

    This should make the generation of tiles a lot easier as well because now I can use my animation frames to figure out what tile can go next to another without the use of an array.

    Hopefully it is possible to do instances of sprites at different animation frames so my method can work this way rather than having a sprite object for each tile (which isn't what I want).

    I will continue to work on this and if this method works I will post a video and possibly write some information on the process, maybe I can make a sample .CAPX file and share that to the community as a thank you for everyone's help

  • Great examples guys. Thank you so much!

    I am still going through the material you guys have posted, so far it isn't exactly what I am looking for although I have still learnt some good techniques!

    My issue is that I am using a tilemap and need to make the tiles scroll. There is no condition or option for a condition or action that will allow me to scroll tiles that are within a tilemap (set the tiles positions).

    I can set the maps position and do simple math such as, every tick move the tilemaps position -1. This gives a scrolling effect but it moves the tilemap and not the individual tiles. So if I wanted to generate more tiles on the right of the screen I can't because the tilemaps position is constantly -1 on the X axis every tick.

    All I need is to make my tiles scroll across the screen, I can't seem to do this with a tilemap so I am trying to figure out ways I can use the tilemap to store my tiles (kind of like an array) to spawn and move the tiles X positions every frame to give a scrolling effect.

    I was thinking of saving my tilemap as a .JSON file and then loading that .JSON file into an array and then looping through the array to place down my tiles in my layout and have those scrolling but then I don't think that would work. I need something where I can set its X position every frame -1 to give a simple scrolling effect, I could do this with sprites and import every tile in my tile set as a sprite and store that in an array but this is for a mobile game and I need to be careful with performance (I have a lot of tiles and that's not including my character or prop sprites).

    I'm not looking for a level builder just an idea on the logic of how to make tiles in a tilemap scroll, by either setting their X position every frame or some other method somebody else knows about.

    Thank you though for your replies I really appreciate the material you have sent over, some very interesting techniques

  • Still no answer on this?

    I've been trying to do this for 3 days now and cannot figure it out. I don't think it is possible to move tiles in a tilemap. I may have to look in to other ways to achieve this.

    I guess I could bring in my tiles as separate sprites and store those sprites in an array.

    Any help at all on this would really be appreciated, I'm surprised I've not yet got an answer on this.

  • I would like a basic run down or opinion on what the best way would be to incrementally move tiles in a tile map.

    In short, I am creating an endless runner and want to have the tiles in my tilemap scrolling to the left of the screen and anything that goes off the left of the screen gets destroyed.

    In a separate event sheet I am creating and setting a tilemap object in my main layout (I am also creating a character but that isn't important right now). I want the individual tiles to scroll to the left of the screen and all tiles that go off the left of the screen get destroyed. I want to be able to generate these tiles and get them scrolling to give the illusion of an endless level, there will be variations in height for the platforms but that I will deal with later haha.

    I have been trying for a 2 days messing with some logic. I came across this tutorial https://www.youtube.com/watch?v=I05TDijQx-Q which does seem to help a little until he starts moving the platforms, then I can't seem to translate what he is doing in Fusion 2.5 to Construct 2.

    I have learnt about expressions now and I am getting fairly comfortable in Construct 2.

    I have made a global variable which the guy in the video also does and he performs some math on that variable which basically creates the platforms. I have jumped ahead making this variable because I can't make my tiles scroll using the same method he does in the video because he is using objects and not a tilemap. I can make the tilemap itself scroll but then that isn't what I want to do as the tiles that get created won't be seen due to the tilemap scrolling off the screen.

    The reason I want to use a tilemap is because I have heard they work great in regards to performance and there is variations in the floor such as gaps and height which have specific tiles associated to that. Once I figure out how to get the tiles to scroll and not the tilemap itself, then I can start adding in rules to adjust the height and gaps of my tiles and choose the appropriate tiles that make sense (if that makes any sense lol)

    It seems very easy when I write down my thoughts of this process on paper but then using the conditions Construct 2 has to offer I feel a little lost on how to make the process work.

    The final result I want is to have an almost procedural generator which will generate my tiles as they scroll off screen and have variations in the tile gaps for obstacles such as spike pits or holes to fall down. In my mind I am thinking that I can make the tiles off screen on the right and have them scroll on screen, then get destroyed off screen on the left and this is a constant generation with all the variations I mentioned above working with rules to place the tiles in positions that make sense.

    Any help is appreciated

    Feel free to add me on Steam or Skype if you want to talk if you have the time. I would greatly appreciate it, I am still learning and although this may seem a simple task, it feels incredibly difficult for me to work out.

  • Hi Guys,

    I am looking for a little bit of help in regards to coding the logic of some level elements.

    I have started to bring in some elements to my game to test some idea's and I am struggling on how to code them and give them functionality.

    I have a saw in my game which is an obstacle the player must dodge and not get hit by. The saw is something I want to move up, down, left and right. I have seen some tutorials which use sprites as boundaries in order to keep the AI in specific area's. I have a simple set up at the moment here is a screenshot.

    The saw for this section of my game I want to move up and down, but I have other sections where I want the saw to move horizontally as well. I did get the saw moving horizontally through a simple event which basically stated

    if the saw is > 0, set y position, 415.

    This got my saw in the correct position and with the platformer behavior I simulated left and right movement through a global variable called 'Patrol' (0 was left and 1 was right). I don't know if this is the best way but it did work as I wanted in regards to the movement of the saw my only problem was I was unable to get the saw moving vertically when I wanted. I was thinking of using separate event sheets but then I thought that just complicated things and wouldn't really be the best solution to how I want to use the saw throughout my game.

    I guess what I am asking here is, would it be possible to have an object move on its own in multiple directions? I am struggling to work out the logic and what behaviors to use.

    Cheers,

    Dave.

  • jojoe,

    I got your PM but unfortunately can't reply (need 500 rep). I am very interested though but have a few questions for you I can't post my email in the this thread but if you look on my profile I have my Steam ID on there if you want to add me can talk through Steam.

    Thanks man!

  • Sorry to be a nag, how would I do something like this?

    [quote:2qn1e10g]you will need to make an in game editor, so you can draw the rooms back, and record the tile positions.

    I understand the tilemaps and I have a tileset already made. But I have no idea how to make an 'in game editor'.

    Thanks for your help man I really appreciate it, giving me a direct answer on the best approach is brilliant

ScrotieFlapWack's avatar

ScrotieFlapWack

Member since 4 Oct, 2015

None one is following ScrotieFlapWack yet!

Connect with ScrotieFlapWack

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies