Ramladu's Recent Forum Activity

  • Hi,

    This is more of a "how do [YOU]"...question.

    I am curious how people approach tilemaps. Do you use one tilemap and make sure all of your tiles are in it or do you have a tilemap for specific purposes? For example, in my new adventure into tilemaps, I have access to zip file that has multiple tile maps based on seasons, temples, dungeons, etc..., and it is quite annoying to work with so I have been trying to find ways to consolidated them all into 1 tilemap for Construct 3. It's been painful, but the work is paying off for me due to experiencing the work involved in making things just right. I am not afraid of work, myself being a BI/ data science professor by day.

    But then I am wondering how you handle things like an impassible rock on a road. Do you use a sprite for the rock? Do you have two tilemaps overlaying each other? One for the rock which could be mined away and one for the road which would allow the character to move faster than not on the road? Or do you have another tile which is in fact the road and a rock and then when it's mined, switch the tile to a road tile only?

    Thanks!

  • Got it! Made a tiledbackground and just extended the size to fill the layout. That was a lot easier than the one I was trying.

    Wooohoo

  • Thanks. I still haven't got it to work right. Sometimes the gridlines draw perfectly horizontally and then are off vertically by 2 (missing) and vice versa. It has to be a drawing issue. I put in a wait 1 second for each run of the loop but that didn't help. I may need to just make a new object that already has the grids made before run time.

    Also, I noticed it changes based on whether my preview window is fully expanded versus a different size.

    I have ran this on two different computers.

  • Hi,

    I am trying to draw gridlines at runtime for the player to better understand the map layout. I have an event and action that draws horizontal and vertical grid lines based on a tiled background. The problem I am having is that the lines are not displaying with a consistent look nor do they all show up sometimes. Is there a different technique and/or object I need to look into? I didn't see anything in the tilemap object's actions to show the gridlines so I invented my own.

    Here is a video showing the problem.

    youtube.com/watch

    Here are some screenshots

    Thanks!

  • Hi,

    I have been using the default tilemap in the tilemap object as I learn the tile events and actions. Now, I want to grow and get crazy with level design.

    I have access to different sites that offer tilesets but none of them are ever in such a neat order like the tilemap object's default tiles.

    So...where do you go for your tilesets and/or what techniques do you use to clean them up? I have Spriter and was thinking of using that. I have the Adobe Creative Studio...so photoshop, illustrator etc, and I am fairly average to above average with the tools.

    Just kind of looking for guidance before I go down the rabbit hole for awhile to figure this out.

  • Does what I need!

  • Thanks. I understand what you're saying. I'll give it a whirl. Tilemap reminds me of Microsoft Excel spreadsheets but no offset() function here - well, unless I build one. :-)

  • Hi,

    As you can see below, I want my player unit to move up on my tilemap. It does it successfully. However, now I would like to figure out a way to identify which type of tile the one-up is before the player goes there.

    For example, let's say the tile up from the player is a tree, and I want the player to chop the tree each time it tries to move up and the tree is in that tile up.

    I believe I have it set correctly except for being able to check before the player moves to the tile:

    tilemap.tileat(tilemap.positiontotilex(OverlandMapPlayer.x),tilemap.positiontotiley(OverlandMapPlayer.y))

    I assume I would need to add a condition that checks for the tile up from the player and then a sub-event or otherwise that will move the player if it is an open tile OR if it is a tree tile. I can then use my tree-chopping function/mechanic.

    Can you help me identify what I need to check? I assume I need to do tileID - 1 or tileID - Column, etc..., or is there something built in?

    The other idea I have is to move the player UP, then check what tile it is ON, run a checker function to see if it's a tree tile and then knockback the player to the original tile, while also completing a chop at the tree. Then rinse and repeat assuming AP > cost and tree hp > 0.

    Thanks!

  • I think I solved this once by picking the topmost based on Z-Order. IE. If two enemies are going to be hit at the same time via a collision detection, then it will take the one at the top of the Z order on the layer. I also did this with mouse click to loot an item that happened to spawn very close to another piece of loot.

    Here is an example based on mouse click and having two loot items on the same coordinates.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. I bow to you.

    I didn't try the nested technique. I tried them separately and thought I kept getting close. Now I know the magic. Lesson learned.

  • Hi,

    I am back. I have searched through 5 pages of tilemap forum posts and either I am not understanding it or it's not being addressed simply.

    My objective:

    At runtime, user mouse clicks on tilemap object, return the tile # in a textbox so the user knows what it is.

    Kind of like if I click on a sprite, I can get the frame #. Let's say user clicks on a tilemap object but more specifically, the tile and there's a number associated, from there I could then have an array with elements that matches with the tile number and then tell the user that they clicked on the "Swamp" tile.

    Is there a simple way to do that?

    I know how to set a tile at X = 5, Y = 5, tile = 5 which will put in the 5th tile in the tilemap tool in the 5th column on the 5th row in my tilemap placed on the layout. But how do I get that same kind of data by using a mouse click. "You clicked on the tile in X = 5, Y = 5, and is the 5th tile in the tilemap tool"

    Thanks. I appreciate how helpful everyone has been over the last few weeks as I continue to improve my skills.

    I am thinking maybe the only way to do this is create the actual tiles at runtime, storing an array after each tile by running a for loop I <= #tiles to generate on each row, nested with a for loop for columns, and then storing what I want to store into other arrays or a single multidimensional one. But then again, how do I return the value of the tile that was clicked on.

  • You do not have permission to view this post

Ramladu's avatar

Ramladu

Member since 28 Jan, 2018

None one is following Ramladu yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies