jwilkins's Recent Forum Activity

  • My biggest issue with Persist behavior is that "Reset persisted objects" action resets all objects on all layouts - which makes it pretty much unusable in large projects.

    There are also lots of bugs when objects with Persist behavior are in hierarchies, restored from save state etc.

    What are some of the issues you've run into regarding saves? I'll need to keep an eye out on those in my project as well. I did run into hierarchy issues on my end too, which I had to solve with some failsafes.

    Persist feels more and more like it is more trouble than it's worth. I've avoided using it in other projects because of it's monolithic nature, and only did so this time because developing my own tracking methods was previously such a pain that I figured this would be better.

  • You would think that the straightforward nature of the Persist behavior means it works as intended all the time right? After all, it barely even warrants a page in the documentation, and it doesn't have any parameters. It just makes things remember how they were when moving back into a layout after all.

    Except it does have at least 2 issues that do not work as expected and are not documented anywhere in the behaviors page:

    1. It doesn't work with the Pin behavior. I can at least understand that this is because Pin is dependent on 2 objects, and there is no guarantee that both objects also contain Persist... but if they do, it should work properly, or at the very least this should be noted in the documentation instead of forcing users to figure it out on their own, since (to my knowledge) Pin is the only built-in C3 behavior that contains an incompatibility with Persist.
    2. Objects with Persist do not remember their template names. Unlike the previous issue, I don't see any reason for this, it's just something you have to find out the hard way on your own. Yes, it's easily worked around by simply storing the templates name in a local variable, but I shouldn't have to do that, or (again) at the least this issue should be documented.

    -Signed, an annoyed dev who spent a couple hours tracking down why his supposedly persistent templated doors didn't work and could not be picked using previously working code.

  • Still trying to figure this one out, I am able to band-aid fix some of the issue by turning the back face of the object invisible when it's obscured from the player (using raycasting) but this still allows for edge cases (such as when the corner of the object is visible, but the rest of the back face is obscured, it will still display).

  • This is an odd one that I am having very little luck fixing or pinpointing. At specific camera angles the back face (only the back face) of 3D objects display through other 3D terrain:

    I have checked and re-checked that my transparent/opaque layers are setup properly as outlined in this documentation, and I have double checked that I am not manipulating the back-face of these objects during runtime.

    I do have some effects that I thought could be contributing (fog exponential and set color) but even after disabling them on the objects this issue still occurs.

    The obvious thing is to just disable the back face, but in these cases I am using it as a shadow for things like tables or couches that have legs and transparent parts to the sprite where a shadow would be seen.

    Any suggestions on things to look out for or check?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been using the fog exponential effect for my project and up til recently been quite happy with it. However, I discovered that it doesn't really create a radius around the player from which fog starts, but rather just draws a straight line in relation to where the camera is facing, to illustrate this point, here is a screenshot where I bumped the fog density up to 100%:

    I get why, for most projects this would be perfectly acceptable. It's not ideal for mine though, I was hoping to have a radius I can fiddle with to give the game a bit more moodiness. Any ideas on ways I can recreate or work with the existing fog exponential effect to achieve more of a ring of fog around the player?

    Tagged:

  • The two methods that immediately come to mind would be updating the players deceleration value, or for more granular control you could tween a value and update the players speed to reflect that while the tween is running.

  • Thank you so much for the reply R0J0hound!

    It took a bit of futzing with, but I did get it running in my game and I am pretty happy with the results. For anyone who hopes to do this in the future with 3D shapes as I did, the easiest way is to basically just copy your example and then add a "for each sprite" event afterward that replaces each sprite with your 3d shape and updates its size to reflect it. Make sure you add a centered image point to your sprite and spawn the 3D shape there. I spent a couple hours trying to spawn the 3D shape instead of a sprite and just offset it but that never worked properly for me.

  • So I'm trying to optimize my dungeon generation. Currently I use a similar method to the "3D Castle Maze" example. I generate a tilemap at runtime that then creates 3D objects as solid walls on each applicable tile.

    However ideally I would like to optimize this further. Because my generated dungeons can be quite large and complex, and because I am spawning hundreds of enemies, I do start to see performance drops when I reach 900+ objects.

    One way to reduce the number of 3D objects is to identify straight lines of repeating tiles and create a single 3D object that is the length/width of those identical tiles (plus their corners) instead of one 3D object per tile.

    I have an over complicated, very broken version of this already so I'm hoping someone can point me to a simpler solution to this. Currently I ID every "corner" tile and repeat a check in 1 direction for that corner until it ID's a different corner, and spawn the 3D object based on that information. Unfortunately this is really complicated and falls apart a bit at some weirder junctions you can see in the screenshot below:

    Tagged:

  • I've been having random, intermittent visual issues with effects in 3D through out my project. This either seems to be tied to updates being made to Construct or changes I am making in development that I assume won't affect established effects but apparently do. Here's some examples:

    Here we have an issue where a tint effect placed on a sprite being used as a 3D face screws up some aspects of other 3D objects behind it.

    The above issue has been occurring for a longer period, some bullet objects display even when behind a 3d object.

    These kinds of issues have been popping up through out the project, what should I look for to fix them and what might be some best practices to avoid them going forward?

    Thanks in advance

  • A stupid method I have used is to pin a fan shaped sprite to the player billboard facing toward the camera. Your player billboard is already locked to the camera so if you pin the angle of the fan, it should do the same.

    Then you set any wall colliding with that fan to invisible. This has some obvious drawbacks, like allowing players to see through walls, but works well enough in many cases.

    Alternatively, you could use the Line of Sight behavior to cast a ray in the direction of the camera from the player, and then clamp the camera distance to the length of that ray if it intersects a solid object. That might have some issues to, just spitballing.

  • A quick follow up because I had an idea on how to approach this that I think would work, but presents edge-cases I can't account for and just isn't as stable as the original brute-force method.

    My idea was to identify corner tiles in the generated tilemap and then assign each one a direction. The system then repeats a check in that direction from that corner until it identifies a tile different from the wall connected to the tile:

    Tilemap being used (arrows id corners and which direction they check for):

    I couldn't use the Auto-16 tilebrush and had to use the 47 in order to identify both inner and outer corners. This ALMOST works:

    There are some positioning issues I could work through, the bigger issue is that using this method, sometimes a wall is created that has no "spawn corner":

    Short of brute-force checking corners for connecting walls and fixing them after the original run, I can't think of an elegant solution to this. I'm probably going to revert back to the "one tile one 3Dobject approach", but I wanted to document this here in case anyone has a similar issue and wants to refine my approach. Here's my function:

  • You are likely going to need to split the colored parts of the sprite into their own sprite(s) and pin them to the player object.

    You can change the color of the specific colored parts using "Replace Color" but I am not aware of any way you can apply specific effects to specific colors.

jwilkins's avatar

jwilkins

Member since 17 Dec, 2016

None one is following jwilkins yet!

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies