Prominent's Recent Forum Activity

  • I know that the aliasing can look different depending on the browser (I've experienced this sort of thing too). My guess is because they might be using different algorithms to handle certain rendering/transformation processes. Maybe someone more knowledgeable about it could give their take on it.

  • lennaert , I was using a general global sprite with variables for a while, but for my latest project I'm using a "master" sprite for each part of the game; dialogMaster, menuMaster, etc.. I put them in a family and give the family a state behavior. I'm using those to control which parts run. It seems to be working well.

    I'm finding that it becomes easier to expand things when I separate stuff and not try to cram everything into one object or family. If I try to cram stuff together, that just encourages more of that and it becomes a mess.

    But since I use more objects now, I also make sure to use folders to organize them all.

  • justifun , That's a good idea- I'll have to look into that and see what can be done.

  • Yeah, if I use a lot of eventsheets I forget to include them sometimes. The thing I dislike about event sheets is the limited amount of tabs that can be shown in c2- so it makes it difficult to flip through them if you have too many open. But they are definitely useful.

    I'm also learning that it is good to use separate arrays for specific things instead of mixing different things in one big array. By having smaller arrays that are designed for one use, you can also name it more appropriately, and it is less confusing to retrieve data from them, and also store data (you don't have to keep track of which index stores what, etc).

  • Thanks for the suggestions!

    I like the idea of organizing the functions alphabetically.

    I've been minimizing everything recently too. It definitely helps traversing through a project.

    A comment for function parameters is a good idea- I'll have to remember to do that.

    I too am trying to find ways to prevent code from constantly running. At the moment, I'm creating a blank project just to see if I can come up with some generic system that will encourage that. At the moment I'm thinking I'll have a set of groups that run continuously, and then a set of groups that can only have one group from the set active at a time. Then I'm going to try to put stuff that needs precedence(they should be the only thing happening) into that group set. Still experimenting with it, but I hope that it will prevent things from becoming entangled- so that I can keep adding more without concern with breaking something.

    One thing I've used more are local variables in groups, and setting them static so that they don't reset their values. I use to have the habit of adding variables to objects, but now I try to limit those whenever I can.

  • Hey, so I've been spending time trying to figure out what the best way to manage game states are as my projects become larger.

    So why not put the question out to the community and see what everyone's opinions are on how to manage your game states and keep your projects clear and concise.

    For example, do you use groups to separate game states? if so, how do you manage them? Do you have any organizational patterns for your groups/events, etc?

  • Pin+

    Works just like the pin behavior, but has more features.

    You can pin other properties besides the default;

    position/angle,

    width/height, (w/h size, w/h size relative, x/y scale, x/y scale relative)

    zindex/layer,

    opacity,

    visibility,

    collisionEnabled,

    timescale,

    hotspotX/hotspotY,

    imagepoint,

    animation,

    frame,

    mirror,

    flip,

    destroy

    There are also expressions to receive the states of each, as well as actions to set them. You can also have them preset in the properties window.

    When you pin an object, it will ask for a mode, such as position only/position and angle, etc. It will only reposition if you have the x,y property enabled and only set angle if the angle property enabled.

    download link:

    r8 (new): https://1drv.ms/u/s!AhHSZHEulqh_gg2mU5cKBvCFdUKo

    r7 (old): https://1drv.ms/u/s!AhHSZHEulqh_ggeYd6-9HIeFgikN

    edit: here's a simple capx example

    https://1drv.ms/u/s!AhHSZHEulqh_gX4lAkddZ560rWic

  • nice, thanks for the info! That works great!

    I feel like I've gained some new brain cells and can make better plugins/behaviors now.

  • Thanks for that tip!

    Okay, seems like it might be choosing the first instance of the objectType..

    I believe by calling the ZMoveToObject it was expecting to be run in an event which would have a SOL..

    var other = obj_.getFirstPicked(this);

    is in the call, so I think it tried to pick from SOL.. so in this case it would always pick the first instance of the object apparently.

    I went and copied the code into my behavior and replaced that so that it doesn't try to pick anything(since the behavior already has the object picked), and now it works..

    So I guess I'll live with this unless anyone knows how to change the SOL??

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    maybe someone who knows more about it can suggest it, but I remember the desire for a timeline feature where you can set up scheduled events or animate the events, or something like that..

  • oohh I see. Okay, now it is called, but for some odd reason it isn't moving the object to the correct layer.

    ..just seems to be setting it 1, when it should be set to 6 (pinObject is on 6, this.inst ends up on 1).

  • "this.inst.type.plugin.__proto__.acts.ZMoveToObject"

    is not correct

    "cr.plugins_.WebStorage.prototype.acts.StoreLocal.call(webstorage_obj, key, value)" ,

    - replace "WebStorage" to your plugin name ("Sprite", maybe)

    - replace "StoreLocal" to your function name ("ZMoveToObject", maybe)

    - replace 1st parameter to the instance ("this.inst")

    - replace other parameters according to your function call interface("1,this.pinObject.type", maybe, I am not sure "this.pinObject.type" is correct or not)

    Reference : Function.prototype.call()

    The plugin name could be different depending on which object has the behavior.

    So if a 9patch has it, it would be NinePatch. If a sprite has it, then it would be Sprite, I think..

    How would I find that out?

    I guess I would then do cr.plugins_["objectType"] ?

    I tried console.log(this); to search through it, but can't find it anywhere.

Prominent's avatar

Prominent

Member since 28 Apr, 2012

Twitter
Prominent has 9 followers

Trophy Case

  • 12-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Email Verified

Progress

15/44
How to earn trophies