eli0s's Recent Forum Activity

  • Ashley concerning the new Video plugin, I have some questions:

    1) Is it possible in the future to have video that supports transparency? I mean an alpha channel, just like PNGs have. We could do incredible stuff with that, just imagine backdrops that are pre-rendered and imported into separate layers with different parallax values etc! XP Using a sprite to cut out the video with blend modes is feasible, but very restrictive for really dynamic stuff.

    2) If I instance the video object (I haven't tried with to different objects yet), I notice that the video playback isn't in sync between them. They start playing in sequence. Why is that, and is there a way around it?

    3) The set loop action doesn't seem to work. No matter what I've tried, I can't make the videos to loop, unless I use the "on ended" condition and set the playback time to 0 and start again. Any advice on that?

    -EDIT- The looping problem seems related with using instances of the same video object.

    Here is an example in which I use the video object as a backdrop element. I've used the Chroma effect (https://www.scirra.com/forum/viewtopic.php?t=93321&start=0) to key out the areas that I want them to be transparent, so this is might be a temporary solution for the first subject also. Notice that both video instances start in sync (I used a different video source on this test, so my 2nd point on this topic might also be off), but the loop isn't happening for both of them (the duration of the video is 10 secs).

    [attachment=0:1i6wbx9m][/attachment:1i6wbx9m]

    -EDIT-

    Thank you in advance!!!

  • eli0s - both lights are set to cast from 'all'. You need to change that to 'same tag'. Also note system expressions don't pick objects so comparing the tag and moving the Z order will always move both of them.

    Damn! I didn't even saw those parameters... It's even simpler than I expected

    Now, one last thing as food for thought. Is it possible to make semi-transparent shadows not build up when on top of each other (or have it as an option)..?

    Look at the following example:

    [attachment=0:1r573006][/attachment:1r573006]

    The desired visual result is the right one. But this is made by having the shadows 100% black on a separate layer, and lowering the layer's opacity. On the left side, the multi-z-ordered nature of the scene does not allow for such a solution, and the shadows build up, thus creating an unnatural result for a scene that it's supposaly lit from one directional source (the Sun) and has an ambient light (the sky) "breaking" the shadows...

  • Ashley

    First of all, thank you so much for further developing the shadow system!

    I am trying to use the tags to create a scene where a crate that casts shadows is being shadowed by a wall that is supposed to be higher. I can't get how the tagging system works. Can you tell me what I am doing wrong? How am I supposed to differentiate the lights? As it is now, both lights are casting shadows on both objects.

    Please, see the following example

  • Well, physics collisions are accurate. The problem is with the normal collision/overlaping check. What would be nice is to have physics objects as detectors/triggers. That way we would have accurate detections either upon collisions, or while overlaps.

    I am not sure what is the purpose in your gameplay, if you are trying to simulate penetration damage. I did some checks and came up with a basic capx that does detect all collisions, perhaps it will be of some use to you. Perhaps not. Here it is never the less

  • Oh good

  • If you are using the bullet behavior, there isn't much you can do. If you are using the physics behavior, perhaps setting the "bullet" property on the bullet sprite might improve things out. Although a quick test I did with the bullet sprite set to fired with an impulse of 1000, worked perfectly, without even having to set the bullet property to "yes". In fact I don't think that the physics behavior allow for that kind of high velocities. 1000 impulse has the same speed as 10000 or 100000000....

    Oh well...

  • Instead of lowering the light object's opacity, put the light object on a separate layer* (below your objects for the result you're after judging from your picture) and lower that layer's opacity.

    *Don't forget that the default layer in C2 is opaque. If you create a layer and drag it bellow this "layer 0" it will be covered from it. I suggest creating 2 new layers and put your sprite objects on the top layer, your light object (which will hold the shadows) on the middle layer (remember to lower its opacity), and keep the bottom layer for your backgrounds.

  • istavang

    zenox98

    My PC is a 6 year old rig with Intel core 2 quad. I have 16Gb of RAM and a GTX 660 Ti though, but never the less, it's pretty week by today's standards.

    On Chrome I get 60 fps most of the time and the CPU gets as high as 74%. This is on it's peek, with more than 1300+ objects at once.

    On Firefox I get 20 fps and 15% CPU, but the fps are not correct because Firefox freezes for 8-12 and performs like a slideshow.

    I haven't tested Firefox before, I do all my tests on Chrome because it renders more stable and predicable results and since I am only interested on desktop stuff (which in theory should have the same performance with node webkit). It's obvious to me that Firefox does not utilize the CPU correctly. I would have never thought that it would be so bad though.

    istavang, you can also reduce the amount of shadowing objects that each cloud holds. For example, use 12 image points for each cloud frame and increase the size of the shadow object from 8x8 to 16x16 to balance the difference and roughly match the cloud's outline. Finally, reduce the Repeat loop from 24 to 12 times. That should give similar results with half the object count.

  • Welcome back

    I don't have any serious experience with AI, so all I can tell you is based on examples I've seen and on speculation.

    If your game is strictly "grid" based, meaning that all the corridors/rooms/walls/doors are divided into segments, you might just make it with custom movement/events. You could make the player spawn an invisible sprite every x grid spaces and make the friendly NPCs move to the last known location in steps.

    But I think that using the path finding behavior will save you a lot of headaches. Just figure out a system that makes sense, make them move/stop when appropriate. I think that the most challenging part won't be the movement, but picking which target should they choose to go/attack to.

  • Yeah, coffee does help sometimes

    The dynamic shadowing plugin is in its infancy right now. v.170 was the first time ever having such a system. I think that it will improve and expanded upon in the future, so building your gameplay and level design around its current state might cause you problems later on.

    There are other ways around your darkening rooms mechanic, a simple one is the following -that of course can be improved using variables and UIDs to link each room with a certain doors etc.

    [attachment=0:1nistk12][/attachment:1nistk12]

    I suggest try and develop some other mechanics of your game first, give the lighting/shadowing system some time to develop and come back to it later on, when it has proven more useful/reliable.

    Anyway, good luck, if you need anything don't be shy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't interpret this "the player can see through the shadow cast by the walls when they're close to said wall". You mean that when you come edge on with a wall, that particular wall stops emitting shadows?

    If yes, perhaps you are using a light radius that is too big? The light radius should be half the size than the diameter of the smaller shadow caster object. In practice, if you have a wall that it has 128px width and 8px height, the light radius shouldn't be more than 4, since 8 is the smaller dimension and the radius has to be <= of that dimension.

    As for the next part, for the time being, there isn't a way to have a shadow casting object be both above the shadows and below the shadows, depending from if it's being shadowed by an other object or not.

  • I am not sure I understand what you mean. Can you post the capx..? A simplified version will do.

eli0s's avatar

eli0s

Member since 24 Apr, 2013

None one is following eli0s yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers

Progress

13/44
How to earn trophies