Ramladu's Forum Posts

  • Yeah, I am just trying to figure out why my numbers are so different from that Demonoire game sample. That game is larger and has far less checks.

    There's something I am just not seeing. There will be a lightbulb moment coming.

    I isolated it to one of my global GUI layers. So it's not something occurring directly on the map itself.

  • Also, I think you're right. I removed (toggled them off) many of the loot mechanic ones and my collision detection jumped from 600 to 16,000. So the engine must be searching for them. In otherwords, I have set up some pretty disorganized triggers / events. It must be struggling to find them now that I toggled the functions off.

    Interesting...

  • Darn. That was going to be my guess but they are essential to me. I was hoping it wasn't that. I have loot mechanics and select a skill based on mouse clicked on object.

  • I am working on my tile game and I did a ctrl-f to look for collision events in my game across all of my event sheets. I do not have any. So I am curious what other events cause collision checks?

    I have bullets, particles, and moveTos but they are all based on a trigger, not automatic and not repeating every X number of seconds. I also have NPCs moving based on tile movement but I don't have any sprites for them to possibly collide with. No block behaviors.

    Thanks

  • Thanks. I was thinking something around that direction or dividing the layout width by the tile size and evaluating where the X/Y mouse click is and running some evaluations that way.

    Also, I just took another look at that Demonoire example again and saw that they have tiles but also a sprite that is a destructible object. Maybe it's just better to do that method but instead of my game having X number of unique sprites, I just have a box that is not visible and it's used to store the data for each instance of the destructible I am targeting. I just worry about CPU use because one of my computers is real slow and one is pretty fast. Ah maybe I need to stop thinking of efficiency and just get on a move on it. But I feel like I am just giving up. :-?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Let's say I have a tilemap as my map at runtime with 3 columns and 3 rows. Trees, grass, whatever...doesn't matter.

    I want to click on 1 particular tile at runtime and identify which index value it is. Not which tile in the tilemap tiles it is but whether I clicked on tile 1 through 9 that is laid out at run time. Not the value of this:

    Also, this is not what I am after either (I mean it gets me really close but not close enough to what I want):

    Tilemap2.PositionToTileX(Mouse.X),Tilemap2.PositionToTileX(Mouse.Y) as this returns the column and row such as 1,2 meaning the second column, and third row based on the 0-index.

    What I want is to return 8. Because then I can have an array for the tiles and just feed data to match the tile. I guess another way to look at it is there a way to take that 1,2 example above and translate it to a single value returned? Right now I am having to use it as the image below but it seems wrong to run it this way. I would then have two arrays, one for the X and one for the Y and then have to evaluate them together. It seems inefficient but I'm still learning so I don't know. I feel like I am just missing some method to the object that converts that column and row nicely into a unique number.

  • Hi,

    How do I add hitpoints (or any variable for that matter) to a specific tile in my game?

    Currently, I have tiles of mushrooms, trees, ore, etc..., and I have a mechanic where the player destroys it in one hit if the distance and tool in hand requirements are met. However, I want to deepen then experience by adding hitpoints to the specific tile being "attacked".

    I know how to do this easily with sprite instances but having a bunch of sprites kind of defeats the purpose of the tilemap and it also slows my game down a lot. (tested it previously)

    Any ideas on how to do this or is there another way? I need a hitpoint variable associated with each tile so that the attack can be done and "chip" or "chop" away at the tile, reducing its hitpoints until zero. Right now it's one hit, one achievement and then I automatically switch the specific tile to grass or whatever the natural environment is.

    For example, if the tile being attacked is 34 and 34 has been coded to be a "tree", then the maximum hitpoints are 10 but I also need to know which tile it is specifically not just in the tilemap object itself but in the instance . If the tile being attacked is 73 and has been coded to be a "copper ore", then the maximum hitpoints are 6, etc...

    One thing I thought of and it is not ideal is to just identify which tile index id the tile being attacked is and then make the player roll a dice roll higher than a specific requirement, with the aid of the tool and player strength as +N for the dice roll, however, that would really change my vision of how to achieve things in the game.

    Thanks for any help. I think I am really close to being able to run with my vision. Everyone has been great these last few weeks.

  • Reminds me of the time I had two player instances (one was off screen) and couldn't figure out why the Scroll To wasn't working for the instance I saw.

  • Thanks! Learning a lot.

    That's the direction I've been thinking. Right now, I am consolidating the seasonal pieces (winter, summer, etc... and buildings because that makes sense to me and I think they were just separated due to the artist but now I am rethinking that) but the things that have to do with potential destruction/farming/mining, etc..., are on their own layer and the road (speed control )is on its own too.

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