greenleafvt's Forum Posts

  • So Wondering if anyone has figured out a way - if even possible - to fade between animation frames?

    Example:

    Let say I have something like a plant sprite that I want to grow over a long period of time. I would like to make like 4-8 frames and fade slowly between them VS making a 50 frame animation sprite.

    I'm guessing this could be done using multiple sprites, but seems like it would get complicated and messy real quick.

    It would be really neat to have multiple sprite animations play at once. Like if they could be layered in the single sprite - damage - fire - lighting - etc.

    Maybe best example in my case apples or fruit growing on a tree?

    Let me know if anyone has figured out a good way to do this.

    Thanks Constructors.

  • kind of abstract but lets say you have a a layout that is a map and you allow players to create features on that map - towns for example and you would want a custom layout for that "town" What would be the best way of setting this up so you could have a map with many custom "towns" that could be entered - (load that town layout)

    Thinking just make a set number of blank layouts town1,town2,town3 etc?

    Is their a way to create a new layout in game? Like create another "town1"?

    Sorry very to be vague, Imagine a Hero's of MM or Starcraft/Warcraft type where you would have many bases or "towns" that would have custom layouts. How would you set up construct to handle this type of thing. Loading a layout on town clicked or on town entered / possibly creating dynamic layouts?

    Just looking for the ideal path forward if anyone has an idea - Thanks!

  • Thanks Jobel,

    Got your version and the original working well. I found in full screen the performance is so much better (for both versions)

  • So I can make a transparent sprite that the viewport always scrolls to and make some sprites on the edge of my project top, left, bottom, right that make the center sprite scroll too +/- 10 lets say and it works OK. But can someone point me in a direction of what function I should be using to make this more fluid? The current thing I'm using - on cursor over the "side" sprites is sluggish and probably wont work on every screen possibility.

    How can I detect the mouse hitting the screen edge and then scroll in that direction? Preferably at the angle its hitting. So 45 at corners and 90 in the dead center + all the iterations in between.

    Note I'm thinking the functionality seen in StarCraft and Civ - lots of games have this but I', not happy with my above mentioned solution.

    Don't waste time please just send me to the function I should be using VS sprite collision :)

  • Thanks Dop2000 and Oosyag,

    Those seem like great solutions. Going to have fun combining the sine, orbit and some transparent PNGs :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So whats the best practice for having something like a bug hover around an object at random angles but never leave the area. been playing with the pathfinder but how would you limit it to say 500 pixels?

    imagine butterflies or dragonflies that don't leave the pond area...

    Note this could be very cool with the new orbit behavior :)

  • Yeah Just getting the browser link to blob still. Think Construct is doing everything correct but PHP or my server wants to encode everything as the local URL making it useless for emailing - as its in the local browser session. Googled a lot of writing the binary URL to a PHP file but nothing works. Creates blank PNG files. Tried reading the blob URL inline in the email img scr= and can't get that to work either. Haven't worked in PHP for years so I'm probably doing something dumb.

    Is their a way to just write the binary out in a PHP var based on the construct Blob URL and paste that into the email from PHP? Maybe its better to just give up on PHP and do with Javascript?

    drive.google.com/file/d/1sMOEn_01pg9YVZZiJ--o9rGXTCMizo2Z/view

  • TY Ashely for pointing the way!

    I'm still a little stuck on this do you mean like this:

    drive.google.com/file/d/1hrHOZQDLDliB6LT5uPHupm-KfJXFQSZU/view

  • Thanks Ashely and fellow Constructors!

    If anyone knows how long do Blob's exist? Seems like their is a window to write them into a file. Sorry new to this sort of transfer via PHP

    blob:https://preview.construct.net/3913b9dc-d856-4a3f-a67e-7fc7e80e83ff

    Can see the links now but cant get the image to decode in the PHP email.

    See screen shot bellow .... Ha

    Think some wrapper may need to be activated for the PHP settings on our server and then maybe I'll be able to save the binary to a php but so far no luck.

  • I have been having problems with sending the canvas screenshot to PHP an then emailing myself. Discovered that its working fine but its delivering a BlOb - Binary Object which I can decode manually but I also saw that their is a new draw canvas function. Has anyone figured out how to have this new function just POST to an email? or should I write a PHP script to decode the binary and from which? canvas shot Vs the new Draw Canvas would be better future thinking?

    Thanks

  • Ok I'll try to explain this situation. I know how to pick random values for a sprite and or animation frame but How would you pick a random variable if lets say you wanted to limit or filter the values to an option - lets say their is a menu and its options are colors. I'm picking 4 random colors but when RED is selected at least one of the 4 items is RED.

    I have my sets of frames all ordered the same so lets say RED is 1-10 orange is 11-20 yellow is 21-30 etc.

    Any Ideas?

  • Is it possible to skew a sprite?

    graphicdesign.stackexchange.com/tags/skew/info

  • So I would like to read the screen center X value. Any ideas on how to do this would be appreciated. Guessing that their are many ways to do this. Was sizing things based on their Y value but hope use this value to keep thing connected vs just getting smaller.

    Crude example:

    .........

    '''''''''

    *********

    XXXXXXXXX

    Vs

    . . . . . .

    ' ' ' ' ' '

    * * * * * * * * *

    XXXXXXXXXXXXXXXXXX

  • Yes using the r133 but haven't used the viewport function before so I was thinking:

    Z elevation = ViewportTop-"SpriteName".Y

    or something like that but can't get the argument to work. I'll keep messing around but not sure even if ViewportTop is the correct place to start.

    Thanks for the help!

  • How do I change a value based on distance from top of viewport (or top of screen)? I want to know the sprites X & Y value based on the distance from the top not its X & Y value in the game layout / canvas. Imagine a huge canvas which the camera can only see a small part of and that camera follows a character around the canvas so what is at the top of the screen is always changing.

    What I wanted to do with this is change the new Z elevation of sprites based on their screen position. o things as then moved in the viewport would change z elevation. Think of some old pseudo 3d racing games.