Rozard's Recent Forum Activity

  • I tried this:

    Player has LOS on wall

    then For each wall

    Wall is overlapping OOS tile

    Hide OOS tile

    This really improved performance, tho, debug says that vision controls still uses a bit of cpu.. but atleast its not chokingly bad.

  • Hello,

    I'm working on tile based line-of-sight, in my case there is Unknown tiles, Out-of-sight tiles (OOS tiles) and shadow tiles.

    They work in way that is hard to explain, so here is example:

    Now it works and looks good, but issue is performance.

    The way I implemented line of sight related to walls, seems to really choke performance.

    For example, OOS tiles, I hide them if you have line of sight to it. Of course, issue is that if wall (sight blocker) and that OOS tile are in same tile then player will never have sight to that.

    So I made

    player has LOS on wall

    Wall is overlapping a OOS tile

    Then > hide OOS tile

    Map size (more OOS tiles) doesn't really impact performance but as I add more walls performance start to fall. I assume there's something with that "Wall is overlapping a OOS tile" that causes issues...

    Any suggestions how I make that detection properly?

  • I mean, its not that hard... I added line-of-sight for light source and if it sees darkness tile, I set its opacity

    clamp(distance(Lightsource.X, Lightsource.Y, DarknessTile.X, DarknessTile.Y), 0, 100)

    That works as long map doesn't have two lightsource, if I add one more, I think these start to conflict.

    I think I should make so that darkness only react to closest light source but can't find how.

  • Hello,

    I wonder how to make performance friendly tile based darkness and light.

    I have 64x64 darkness tile, which is little transparent sprite and have them cover whole layout.

    Then there are "lightsources" objects.

    So, idea is that darkness should lose opacity as it gets closer to lightsource.

    Haven't managed to get this work, and every tick solutions seems to impact performance...

    Ideas?

    Thanks.

  • I managed to solve this while ago, but just remembered this post and add answer here, incase someone else has this issue.

    In my case I made Tile based pathfinding so:

    When object finds path -> system repeat object.pathfinding.NodeCount times -> create pathnode(object) to position using object.Pathfinding.NodeXAt(loopindex) and NPCs.Pathfinding.NodeYAt(loopindex).

    After that, that NPC has path nodes to walk to, but not moving.

    Then every time its that NPCs turn, it moves toward pathnode using tilemovement.

    of course, there are bunch little details like node numbering so NPC knows which node it should walk to, and so on.

    I used example from one of the topics provided here... sadly, I didn't manage to find it just now.

  • Hello,

    I've been trying to get tile movement and pathfinding to work together, also, entity should move only one tile at time after player have moved (I guess that could be called turn-based).

    For example: NPCs form Cataclysm, caves of Qud or some classic RPG games.

    I already have that time/turn system working and NPC will move one tile at time toward its target if it has vision to it.

    But I know that there will be cases where I need NPCs to chase targets, walk around objects or go investigate stuff that it didn't see.

    I thought I was clever, if I combine pathfinding and tile movement behavior and use pathfinding's angle of motion as control to which direction it tries to simulate tile movement, but it started moving back and forth between three tiles... I guess it didnt hit waypoints or something so it got stuck.

    Any tips have this should be done? (doesn't need to work with those behaviors)

  • Hmm...

    When using custom obstacles for pathfinding, those obstacles doesn't need solids to be enabled, so maybe for now I try making enemies pathfind around and if in same level and

    in presence of player, then switch their movement something more precise.

    Of course, Im open for suggestions, if there is better solution, but I try that for now.

  • Thanks for reply,

    Yeah I noticed that there were tags for solids and those are good if I have to go with enable/disable solution.

    But yeah, I plan those enemies be able to follow player to different floor and later even make them able to detect player through noise and then try search player.

    I already use tags in shadowcasters, its too bad that solids don't have something similar.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, my issue is bit hard to explain so I explain it in scenario..

    So, I have top-down game, there's 3 store house, I have separated each floor to separate set of layers... walls and some objects are solid and blocks movement.

    I have made that when Player walk upstairs, I make that level visible and hide it when going downstairs. Now, I have issue with collisions with solid objects, downstairs walls still blocks player when upstairs.

    I know I could only enable solids of floor that player is in, but when I start implementing enemies, they still need those walls and objects be blocking in downstairs even if player is upstairs.

    so, if I think player and enemies as entities. I need solid collision apply only to entities that are in same level.

  • Hey, I'm currently planning a game that has security panel that shows screens, which displays various locations of a map real time. I'm bit pre-planning what I should be prepared for.

    So, is there some good feature or method that could display area, or do I have to recreate that position in that small display area? or is there better ways to do this?

    if that recreation is only option, you don't have to try explain how (I think I can figure out), but I rather avoid it as it sounds like a hassle.

    I wasn't able to find if someone have tried making similar stuff already.

    hopefully my question was clear enough.

    I don't have construct 3 currently, but planning to move from C2, if C3 has me better covered.

    Tagged:

Rozard's avatar

Rozard

Member since 2 Feb, 2017

None one is following Rozard yet!

Trophy Case

  • 7-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies