matriax's Forum Posts

  • Lordshiva1948 Come on! .

    Already there is a lot people that in some time learned shaders or they actually work with that and can do in short time.

    For example, discover how apply the alpha in NormalMaps took me 2 days, and the solution was simply add "* front.a" at the end of the shader output ¿You think spend 2 days for that is give up easy?. An expert or somebody that already release effects and works with that can discovered/did it in seconds. If this took me two days imagine apply all this things of the tutorial, at the end i not will work nothing in the game.

    And for end, as i said: "i will give a try this weekend when i finish other things". BTW, for my game i not need this last things, with the actual NormalMaps effects i have just i need now, for that, apply all in this tutorial with spotlights,etc... maybe an expert with time can do that but with my skills on C2(I started a few days ago) and shaders, well , apologize me if i actually prefer invest the most part working in the game.

  • they are interesting but as you said seems complicated, maybe an expert can do all that, but i will give a try this weekend when i finish other things just for fun .

  • Instead every tick, with a simple "On start layout" set this parametres to the windows height/width sizes will be ok, but again you will need an event. The idea is put on the .fx to get it automatically without needs of nothing .

    I see "LightDir" inside the .fx but this is calculated automatically depending in where is the player respect the objects with normal maps. You set the LightDir to the point you want in the .capx in my case on the Mouse.X and Mouse.Y. I not understand in which way you want to use that variable ¿? .

    If you do will be good to see an example of the difference and the improvement

  • Added the live example to see how works in real time:

    https://dl.dropboxusercontent.com/u/659 ... index.html

    -

    I want to optimize the code and i need help.

    Before add multiple lights or more things i want to reduce the number of variables for each light using only one box instead various, What i mean? For example for the light color and the ambient i use 6 boxes for R,G,B. The idea is reduce to 2 using something like: "RGB: 255,255,255". If somebody knows how to do that please feel free to edit the .fx and upload! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Other thing is the "Screen X/Y resolution" that you need to adjust to your window project. There is any way to add some variable in the .fx that get the window screen automatically?

    With this two things go from 8 to 2 variables with a total of 10 for each light when i discover how to add more.

  • Normal Map Extended:

  • The normal map effect is based on this:

    https://github.com/mattdesl/lwjgl-basic ... derLesson6

    Screenshot:

    The effect was first ported to C2 by donelwero that posted in some lost thread i found the other day. After see various NormalMaps effects this was the best(IMHO), so for my game i decide to use and edit without any experience about shaders to adapt to my needs.

    As i said donelwero made the hard work making the .fx and .xml file port. My work was pass from the original 5 variables to 16, i passed all that i saw in the .fx to be adjusted easily from C2, here is how actually looks:

    Also i corrected how the X/Y light was applied in the .capx file(And works with scroll to) and today finally discovered how edit the .fx file to use normal maps with alpha channel, after two days was simply adding at the output of all the effect a "* front.a" , still i don't know why, as i said i not have idea of shader i simply passed 2 days changing variables to get the effect desired XD .

    -

    Edit 1 - 13 July:

    Normal Map Extended v1.01 (Multiple lights added)

    *Added multiple lights(in total 3) with all their variables an with the option to enable/disable from an individual texture.

    Download v1.01 (Includes the effect and demo .capx)

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

    Screenshot:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think i found what happens.

    Seems the layout have different render like the output. The image is correct in the output then, is in the layout where my GPU apply more AA to the GFX ¿? , i have to do more tests to see what exactly happens.

  • Here is the image to see what happens:

    Is there any option on Construct2 i'm missing? I tested the options on properties and set yes or "Max quality" about display, scaling or something and still nothing. The project is a 640x480 window.

    Is there an option, effect or something i can do to fix that? I tested on all browsers and exported to desktop with NW.js and in all the sites the same, the AA is dispalyed wrong/low.

    I tried to open the image in browsers or using another programs,etc... and the image is displayed correctly. I don't know what more can i do to solve it :S

    Here you can download the image if you want to test:

    https://dl.dropboxusercontent.com/u/659 ... anetp1.png

  • This can be a good idea to implement in the zombie prototype game i'm doing to see the enemies in the dark , i will try later and i will let a comment that how worked.

    Also for all the effects will be great add to the "effects" list in the stick thread, is not updated since january and since then a lot of effects has been released :S , i'm crazy searching in the forums and sometimes i find truly great effects.

  • Yes but if i set "no" then i can launch the ball towards angle using Bullet Behaviour to calculate in what direction will be theball moving when is touched by the player.

    At least i tested in both ways and with the "property: no" i was not able to launch/move the ball towards some angle ¿?. I will test again with other options but i remember that not works correctly.

  • You can have the bullet behavior bounce off solids, but the physics behavior needs the other objects to have physics to work. The physics behavior will give more realistic bounces though. The third option would be to do your own physics with events, but this isn't by any means simple.

    The problem is that with bullet behaviour the sprite move towards the rotation angle, so i can't make the ball moves, bounce and give them some sprite rotation depending of the velocity because this will change the real direction.

    I mean, actually with physics i give the ball impulse to move/bounce and give the sprite some rotation depending of the velocity and works correctly.

    So or there is any form to use the Bullet behaviour to move, bounce and rotate the sprite without this affect to the direction angle of the movement or i use 2 sprites, one that moves and bounce and set invisible and the sprite ball every tick in the same position giving rotation depending of the speed. But with the last one i will have to create/use 2 sprites for every thing i want to make the same effect.

    Create my own physics well, i'm a noob i only have a few days of experience on C2 so not .

  • Nothing? So there is no possible? :S all the examples i found their use physics in the objects to bounce so i guess there will be no possibility.

    Then will be great for next updates of the physics object an event or parameter to say: "bounce on solids? - Yes/No".

  • I'm trying to do the soccer ball physics from a top down view. Is working perfect now it's simply to know if there is a more efficient way to do that.

    Actually i have the ball bouncing with other objects adding to every object to a family that have the behaviour of physics with:

    Inamovable: Yes | Collision mask: Use collision Polygon.

    This is how is working now:

    https://instagram.com/p/4zZHf-gLzH/

    Is there another way to make the ball bounce with objects, for example with the ones that have the "solid" behaviour?. With this i will have one less family and behaviour added to the objects and i guess the perfomance will be better instead of add physics to all the objects that i want the ball bounce, right?

    Will be great an option on the physics object called "Bounce". So when Ball collides an object -> Bounce. But i not found nothing ¿?

  • New video adding some medical kits, infrared for the gun and arrows to indicate the location of the objects.

    https://instagram.com/p/4yWSFZgL6n/

  • Problem Description

    In R206 the bumpMap.capx works correct, the light appears in the center of the mouse but in r209 not and the Y is reversed.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/343 ... mpmap.capx

    Description of Capx

    Shows the bumpmap effect on a texture on you can change the light size and other variables.

    Steps to Reproduce Bug

      I simply install r206 and works perfect, i install r209 and works wrong, install r206 and again works well,etc... is when i install r209 when works wrong.

    Observed Result

    The light have different position of the mouse and the coordinate Y is reverse.

    Expected Result

    The light have to be positioned in the mouse

    Affected Browsers

      all

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r209 Beta

    ------------------------------

    Edit: I changed the Mouse position for a sprite with the 8directions behavious enable and the same, the light is not positiones in the X/Y coordinates of the sprite created using r209, works fine in r206.