jwilkins's Forum Posts

  • I'm making a platformer with multiple lanes by using Colludium's Platform2 Behavior. This makes collision events a little different.

    When the player jumps or is thrown into the air they need to create a shadow sprite that follows their X position and is destroyed when they land. That stuff is all easy to setup, no real concerns there.

    Where things get difficult is adjusting the Y position of the shadow sprite object based on the highest Y position of any solid object underneath the player.

    Additionally, the Platform2 behavior utilizes collision masking, meaning there are multiple layers of platforms in my game so we also want to ignore the layers not currently in the same "ZLane" as the character casting the shadow.

    Ideally this solution also can account for dozens of these shadows being cast at a time, as I would like the non-player characters to cast them as well (so long as they are on screen of course).

    I've tried a couple approaches to this but nothing has worked to my satisfaction thus far. I really do want shadows in because it helps the player know what lane theyre in and where they can expect to land.

  • Hmm, I think I see what you are doing. I hadn't thought to use the dictionary object, that thing is much easier to organize than arrays, maybe that is the best way to go about this. Thanks for the food for thought!

  • That is very similar to the setup I am looking at relixes. In your case, what do you plan to do for enemies that have no weapon associated with them? This is of course assuming you plan on adding enemies like that.

  • So bear with me here, this is more a question of a best practices, and it's also going to get into the weeds a bit. I'll outline the issue, then outline the options I know of, along with their pro's and con's. Please read the whole post if you have a suggestion.

    I'm making an action RPG. Prototyping is going really well! Because the sprites are very simple 2D pixel art, attack animations utilize paper-dolling techniques where I overlay a weapon sprite animation on top of or underneath the player. This function extends to all humanoid enemies as well. Because I want the player to be able to play as and/or recruit any of the creatures they come across, player objects and enemy objects are functionally the same. This is also helpful for/required for other gameplay elements. Players and enemies are all grouped under the same Family I'll refer to from here as "Character Family".

    So far this has worked really great! Originally I was pinning the weapon sprite to the Character Family sprite, and then storing the information for the attacks (range, frames where collision detection is necessary to register hits, knockback values, etc) inside those weapon sprites.

    Then I hit my snag: This only works for Character Family sprites that use weapons. I have plans for other Character Family sprites (creatures for instance) to not use weapons, and instead call attack animations from their sprite sheet. I can't store all the information for those attacks in an object that they won't have pinned to them.

    Here are the options I have come up with so far:

    1. Store all the instance variables for the weapons inside the Character Family instead, and update them when appropriate. This is going to heavily bloat my Character Family instance variables, so I'd like to avoid it. Right now human players only have 2 attack animations per weapon, but enemies without weapons could potentially have more, which adds up quickly considering how many values each attack needs to store.
    2. Create "dummy" weapon objects for creatures. The brute force method for doing this would be to create invisible dummy weapons for each creature, but I could easily modify this to instead point to one weapon per enemy attack. It's inelegant but it does keep things relatively well organized.
    3. Store attack information in an array. This is the obvious one, but it too has some setbacks I can't get around. Specifically, I am trying to automate as much of this work as possible, and as such having been using families and functions a LOT. But if I want to attach an array to an objects container, I can't do so within a family, so I can't reference it easily (unless I can and I just don't know how).

    Any help here would be appreciated, and I'll try to explain everything else around this better if needed.

  • Having a lot of success implementing this plugin but I did notice 2 errors, the first occurs when you disable then enable the Platform2 behavior:

    Javascript error!
    ReferenceError: inst is not defined
    http://localhost:50000/Platform2_behavior.js, line 1583 (col 5)
    
    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.[/code:2ypwkcqz]
    
    The second occurred when trying to edit the Collision Mask values of Solid2 objects when those objects are created:
    
    [code:2ypwkcqz]Javascript error!
    ReferenceError: value is not defined
    http://localhost:50000/solid2_behavior.js, line 140 (col 3)
    
    This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.[/code:2ypwkcqz]
    
    Neither are project breaking for me but I wanted to document them here, this plugin is still amazing!
  • Oh my bad, thats not actually my game, I was just using it to explain how the lane mechanic works in it as theyre similar, my game is not nearly at that stage of polish yet.

    I purchased the behavior and am in the process of implementing it now, I'm having some trouble making sense of how to filter the collisions though. Do platform2 objects and solid2 objects only interact with objects of the same collision mask or collission category? I've tried that but it's not filtering them yet. What do I need to be doing to get that work?

    EDIT: I am fairly certain based on the tool tip information provided that objects with the Platform2 behavior are only meant to interact with other Platform2 or Solid2 objects with the same Collision Category or Collision Mask, but this is not happening, all of Platform2 objects interact with all of the Solid2 objects regardless of the category or mask value

  • This looks perfect for my project, currently I am using a modified platform behavior that checks for collisions based on layer, but it's old and I recently ran into a major issue with it where it doesn't appear to take simulated controls from a gamepad.

    I have a couple concerns specific to my game though. The project is a beat-em-up that uses a lane-depth system similar to the game Viking Squad (there is the illusion of depth like most beat em ups, but you are locked to a specific lane rather than free Y movement):

    So I need multiple instances (players and enemies) to only interact with the collisions of their current lane.

    Would this behavior support that?

  • Thanks I will definitely take a look at that.

  • Did not actually know that text in construct2 was handled that way, but I assumed as much regarding the sprites.

    Let me try asking the question this way: If I want to draw a rectangle in my construct project that is then styled through CSS, how would I do that?

  • So I know that I can use CSS to style buttons and entry fields. No problems there. But lets say I want to have design elements like squares be styled? Usually I would use a sprite or tile or tileset, but if I want to style them through CSS this isn't really an option from what I understand.

    Additionally, is there anyway I can style text through CSS in construct2?

    Thanks!

  • Hello, a project I am working on has this issue only in Internet Explorer:

    https://drive.google.com/file/d/0B664kH ... sp=sharing

    It's doing a couple of things:

    It centers the 3D Sphere in the screen no matter where it should be.

    It shows only part of the star and the text usually has lines or some other graphical issue.

    In another layout with 2 3D Spheres, the project becomes unresponsive after a few seconds.

    Again, this is only happening in IE.

  • Unless I am completely mistaken on what you are doing your solution will not work the moment you introduce more than one character or object that needs to interact with platforms. When you disable collisions for an object you disable collisions for ALL interactions with that object, so when the player moves layers, all the objects on other layers will fall straight through them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't see any of that being very helpful.

    My major issue is still making sure that all platform-behavior objects (players, enemies, etc) only interact with the platforms in their lane. Sizing is not a concern, nor is the actual transition between these lanes.

    Effectively every lane needs to have it's own platforms, and characters should only interact with their lanes platforms. But disabling platforms is not an option because different characters (players, enemies, etc) can be in different lanes.

  • (LBP = Little Big Planet, which uses a system where you can switch between a foreground,middleground, and background "lane".)

    So for a personal project I am making a beat-em' up, but I want to use lanes to sidestep the issue of players not quite lining up on the Y axis with their intended target. This is what the beat-em' up Viking Squad does and you can see it in action here as an example.

    This will (hopefully) also give me the ability to do some multi-lane platforming.

    Initially I had considered doing this by simply giving the player object the platform behavior and then moving a small, invisible platform under them to the lanes Y positions when switching lanes, but this would create a slew of issues where the player would accidentally interact with enemy platforms and vice-versa.

    I think the best bet would be to create the platforms for each lane and then have a lane value for the player/enemies that determines which lanes platforms they can interact with. I'm not actually sure how to do this though as I don't think there's anything in the platform behavior that would support that.

    Any suggestions? Thanks!

  • Unfortunately we do not have any control over the product that the user uses as a screen reader. There are commercial screen-readers and browser plug-ins and phone apps etc. that do the job, and they do so based on industry standards (this is one reason why ADA compliant sites use proper h1/h2 tags). These plugins all do the same thing (read text on the browser screen) in roughly the same way. But we can't create our own both due to a lack of resources, but also because it undermines the purpose of this is which is to support any screen reader the user wishes.

    As I said, I can get Construct to just read the text I pass through it with the existing TtS functions but that is not optimal, I need to pass text information out of the construct project into something that the screen reader can read.

    I was told this was because ADA compliancy requires screen reader functionality, though I admit that I am not actually sure of that, in which case I can probably default to the TtS alternative in C2.